Class AIFile

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • READPROC, WRITEPROC, TELLPROC, FILESIZEPROC, SEEKPROC, FLUSHPROC, USERDATA

        The struct member offsets.
    • Constructor Detail

      • AIFile

        public AIFile​(java.nio.ByteBuffer container)
        Creates a AIFile instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • ReadProc

        public AIFileReadProc ReadProc()
        Callback to read from a file
      • WriteProc

        public AIFileWriteProc WriteProc()
        Callback to write to a file
      • TellProc

        public AIFileTellProc TellProc()
        Callback to retrieve the current position of the file cursor (ftell())
      • FileSizeProc

        public AIFileTellProc FileSizeProc()
        Callback to retrieve the size of the file, in bytes
      • SeekProc

        public AIFileSeek SeekProc()
        Callback to set the current position of the file cursor (fseek())
      • FlushProc

        public AIFileFlushProc FlushProc()
        Callback to flush the file contents
      • UserData

        public long UserData()
        User-defined, opaque data
      • UserData

        public AIFile UserData​(long value)
        Sets the specified value to the UserData() field.
      • set

        public AIFile set​(AIFile src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

        public static AIFile malloc()
        Returns a new AIFile instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static AIFile calloc()
        Returns a new AIFile instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static AIFile create()
        Returns a new AIFile instance allocated with BufferUtils.
      • create

        public static AIFile create​(long address)
        Returns a new AIFile instance for the specified memory address.
      • createSafe

        @Nullable
        public static AIFile createSafe​(long address)
        Like create, but returns null if address is NULL.
      • malloc

        public static AIFile.Buffer malloc​(int capacity)
        Returns a new AIFile.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • calloc

        public static AIFile.Buffer calloc​(int capacity)
        Returns a new AIFile.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • create

        public static AIFile.Buffer create​(int capacity)
        Returns a new AIFile.Buffer instance allocated with BufferUtils.
        Parameters:
        capacity - the buffer capacity
      • create

        public static AIFile.Buffer create​(long address,
                                           int capacity)
        Create a AIFile.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static AIFile.Buffer createSafe​(long address,
                                               int capacity)
        Like create, but returns null if address is NULL.
      • mallocStack

        @Deprecated
        public static AIFile mallocStack()
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

        @Deprecated
        public static AIFile callocStack()
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • mallocStack

        @Deprecated
        public static AIFile mallocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

        @Deprecated
        public static AIFile callocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • mallocStack

        @Deprecated
        public static AIFile.Buffer mallocStack​(int capacity,
                                                org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
      • callocStack

        @Deprecated
        public static AIFile.Buffer callocStack​(int capacity,
                                                org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
      • malloc

        public static AIFile malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new AIFile instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

        public static AIFile calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new AIFile instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • malloc

        public static AIFile.Buffer malloc​(int capacity,
                                           org.lwjgl.system.MemoryStack stack)
        Returns a new AIFile.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static AIFile.Buffer calloc​(int capacity,
                                           org.lwjgl.system.MemoryStack stack)
        Returns a new AIFile.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nUserData

        public static long nUserData​(long struct)
        Unsafe version of UserData().
      • nSeekProc

        public static void nSeekProc​(long struct,
                                     AIFileSeekI value)
        Unsafe version of SeekProc.
      • nUserData

        public static void nUserData​(long struct,
                                     long value)
        Unsafe version of UserData.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate