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.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The 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 aSTBIIOCallbacks
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBIIOCallbacks
calloc()
Returns a newSTBIIOCallbacks
instance allocated withmemCalloc
.static STBIIOCallbacks.Buffer
calloc
(int capacity) Returns a newSTBIIOCallbacks.Buffer
instance allocated withmemCalloc
.static STBIIOCallbacks.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSTBIIOCallbacks.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBIIOCallbacks
calloc
(MemoryStack stack) Returns a newSTBIIOCallbacks
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBIIOCallbacks
Deprecated.static STBIIOCallbacks.Buffer
callocStack
(int capacity) Deprecated.static STBIIOCallbacks.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static STBIIOCallbacks
callocStack
(MemoryStack stack) Deprecated.static STBIIOCallbacks
create()
Returns a newSTBIIOCallbacks
instance allocated withBufferUtils
.static STBIIOCallbacks.Buffer
create
(int capacity) Returns a newSTBIIOCallbacks.Buffer
instance allocated withBufferUtils
.static STBIIOCallbacks
create
(long address) Returns a newSTBIIOCallbacks
instance for the specified memory address.static STBIIOCallbacks.Buffer
create
(long address, int capacity) Create aSTBIIOCallbacks.Buffer
instance at the specified memory.static @Nullable STBIIOCallbacks
createSafe
(long address) static @Nullable STBIIOCallbacks.Buffer
createSafe
(long address, int capacity) eof()
eof
(STBIEOFCallbackI value) Sets the specified value to theeof
field.static STBIIOCallbacks
malloc()
Returns a newSTBIIOCallbacks
instance allocated withmemAlloc
.static STBIIOCallbacks.Buffer
malloc
(int capacity) Returns a newSTBIIOCallbacks.Buffer
instance allocated withmemAlloc
.static STBIIOCallbacks.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSTBIIOCallbacks.Buffer
instance allocated on the specifiedMemoryStack
.static STBIIOCallbacks
malloc
(MemoryStack stack) Returns a newSTBIIOCallbacks
instance allocated on the specifiedMemoryStack
.static STBIIOCallbacks
Deprecated.static STBIIOCallbacks.Buffer
mallocStack
(int capacity) Deprecated.static STBIIOCallbacks.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static STBIIOCallbacks
mallocStack
(MemoryStack stack) Deprecated.static STBIEOFCallback
neof
(long struct) Unsafe version ofeof()
.static void
neof
(long struct, STBIEOFCallbackI value) Unsafe version ofeof
.static STBIReadCallback
nread
(long struct) Unsafe version ofread()
.static void
nread
(long struct, STBIReadCallbackI value) Unsafe version ofread
.static STBISkipCallback
nskip
(long struct) Unsafe version ofskip()
.static void
nskip
(long struct, STBISkipCallbackI value) Unsafe version ofskip
.read()
read
(STBIReadCallbackI value) Sets the specified value to theread
field.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.int
sizeof()
Returnssizeof(struct)
.skip()
skip
(STBISkipCallbackI value) Sets the specified value to theskip
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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 aSTBIIOCallbacks
instance at the current position of the specifiedByteBuffer
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<STBIIOCallbacks>
-
read
- Returns:
- the value of the
read
field.
-
skip
- Returns:
- the value of the
skip
field.
-
eof
- Returns:
- the value of the
eof
field.
-
read
Sets the specified value to theread
field. -
skip
Sets the specified value to theskip
field. -
eof
Sets the specified value to theeof
field. -
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 newSTBIIOCallbacks
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSTBIIOCallbacks
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSTBIIOCallbacks
instance allocated withBufferUtils
. -
create
Returns a newSTBIIOCallbacks
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSTBIIOCallbacks.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSTBIIOCallbacks.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSTBIIOCallbacks.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSTBIIOCallbacks.Buffer
instance 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 newSTBIIOCallbacks
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSTBIIOCallbacks
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSTBIIOCallbacks.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSTBIIOCallbacks.Buffer
instance allocated on the specifiedMemoryStack
and 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
-