Package org.lwjgl.stb
Class STBIIOCallbacks
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct stbi_io_callbacks {
int (* read) (void * user, char * data, int size);
void (* skip) (void * user, int n);
int (* eof) (void * user);
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionSTBIIOCallbacks(ByteBuffer container) Creates aSTBIIOCallbacksinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBIIOCallbackscalloc()Returns a newSTBIIOCallbacksinstance allocated withmemCalloc.static STBIIOCallbacks.Buffercalloc(int capacity) Returns a newSTBIIOCallbacks.Bufferinstance allocated withmemCalloc.static STBIIOCallbacks.Buffercalloc(int capacity, MemoryStack stack) Returns a newSTBIIOCallbacks.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBIIOCallbackscalloc(MemoryStack stack) Returns a newSTBIIOCallbacksinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBIIOCallbacksDeprecated.static STBIIOCallbacks.BuffercallocStack(int capacity) Deprecated.static STBIIOCallbacks.BuffercallocStack(int capacity, MemoryStack stack) Deprecated.static STBIIOCallbackscallocStack(MemoryStack stack) Deprecated.static STBIIOCallbackscreate()Returns a newSTBIIOCallbacksinstance allocated withBufferUtils.static STBIIOCallbacks.Buffercreate(int capacity) Returns a newSTBIIOCallbacks.Bufferinstance allocated withBufferUtils.static STBIIOCallbackscreate(long address) Returns a newSTBIIOCallbacksinstance for the specified memory address.static STBIIOCallbacks.Buffercreate(long address, int capacity) Create aSTBIIOCallbacks.Bufferinstance at the specified memory.static @Nullable STBIIOCallbackscreateSafe(long address) static @Nullable STBIIOCallbacks.BuffercreateSafe(long address, int capacity) eof()eof(STBIEOFCallbackI value) Sets the specified value to theeoffield.static STBIIOCallbacksmalloc()Returns a newSTBIIOCallbacksinstance allocated withmemAlloc.static STBIIOCallbacks.Buffermalloc(int capacity) Returns a newSTBIIOCallbacks.Bufferinstance allocated withmemAlloc.static STBIIOCallbacks.Buffermalloc(int capacity, MemoryStack stack) Returns a newSTBIIOCallbacks.Bufferinstance allocated on the specifiedMemoryStack.static STBIIOCallbacksmalloc(MemoryStack stack) Returns a newSTBIIOCallbacksinstance allocated on the specifiedMemoryStack.static STBIIOCallbacksDeprecated.static STBIIOCallbacks.BuffermallocStack(int capacity) Deprecated.static STBIIOCallbacks.BuffermallocStack(int capacity, MemoryStack stack) Deprecated.static STBIIOCallbacksmallocStack(MemoryStack stack) Deprecated.static STBIEOFCallbackneof(long struct) Unsafe version ofeof().static voidneof(long struct, STBIEOFCallbackI value) Unsafe version ofeof.static STBIReadCallbacknread(long struct) Unsafe version ofread().static voidnread(long struct, STBIReadCallbackI value) Unsafe version ofread.static STBISkipCallbacknskip(long struct) Unsafe version ofskip().static voidnskip(long struct, STBISkipCallbackI value) Unsafe version ofskip.read()read(STBIReadCallbackI value) Sets the specified value to thereadfield.set(STBIIOCallbacks src) Copies the specified struct data to this struct.set(STBIReadCallbackI read, STBISkipCallbackI skip, STBIEOFCallbackI eof) Initializes this struct with the specified values.intsizeof()Returnssizeof(struct).skip()skip(STBISkipCallbackI value) Sets the specified value to theskipfield.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
READ
public static final int READThe struct member offsets. -
SKIP
public static final int SKIPThe struct member offsets. -
EOF
public static final int EOFThe struct member offsets.
-
-
Constructor Details
-
STBIIOCallbacks
Creates aSTBIIOCallbacksinstance at the current position of the specifiedByteBuffercontainer. 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<STBIIOCallbacks>
-
read
- Returns:
- the value of the
readfield.
-
skip
- Returns:
- the value of the
skipfield.
-
eof
- Returns:
- the value of the
eoffield.
-
read
Sets the specified value to thereadfield. -
skip
Sets the specified value to theskipfield. -
eof
Sets the specified value to theeoffield. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newSTBIIOCallbacksinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSTBIIOCallbacksinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSTBIIOCallbacksinstance allocated withBufferUtils. -
create
Returns a newSTBIIOCallbacksinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSTBIIOCallbacks.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSTBIIOCallbacks.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSTBIIOCallbacks.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSTBIIOCallbacks.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newSTBIIOCallbacksinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSTBIIOCallbacksinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSTBIIOCallbacks.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSTBIIOCallbacks.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nread
Unsafe version ofread(). -
nskip
Unsafe version ofskip(). -
neof
Unsafe version ofeof(). -
nread
Unsafe version ofread. -
nskip
Unsafe version ofskip. -
neof
Unsafe version ofeof. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-