public class STBIIOCallbacks
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
load_from_callbacks.
read – fill data with size bytes. Return number of bytes actually read.skip – skip the next n bytes, or unget the last -n bytes if negativeeof – returns nonzero if we are at end of file/data
struct stbi_io_callbacks {
int (*read) (void *user, char *data, int size);
void (*skip) (void *user, int n);
int (*eof) (void *user);
}| Modifier and Type | Class and Description |
|---|---|
static class |
STBIIOCallbacks.Buffer
An array of
STBIIOCallbacks structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
EOF
The struct member offsets.
|
static int |
READ
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
SKIP
The struct member offsets.
|
| Constructor and Description |
|---|
STBIIOCallbacks(java.nio.ByteBuffer container)
Creates a
STBIIOCallbacks instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static STBIIOCallbacks |
calloc()
Returns a new
STBIIOCallbacks instance allocated with memCalloc. |
static STBIIOCallbacks.Buffer |
calloc(int capacity)
Returns a new
STBIIOCallbacks.Buffer instance allocated with memCalloc. |
static STBIIOCallbacks |
callocStack()
Returns a new
STBIIOCallbacks instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static STBIIOCallbacks.Buffer |
callocStack(int capacity)
Returns a new
STBIIOCallbacks.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static STBIIOCallbacks.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
STBIIOCallbacks.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static STBIIOCallbacks |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
STBIIOCallbacks instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static STBIIOCallbacks |
create()
Returns a new
STBIIOCallbacks instance allocated with BufferUtils. |
static STBIIOCallbacks.Buffer |
create(int capacity)
Returns a new
STBIIOCallbacks.Buffer instance allocated with BufferUtils. |
static STBIIOCallbacks |
create(long address)
Returns a new
STBIIOCallbacks instance for the specified memory address. |
static STBIIOCallbacks.Buffer |
create(long address,
int capacity)
Create a
STBIIOCallbacks.Buffer instance at the specified memory. |
static STBIIOCallbacks |
createSafe(long address)
|
static STBIIOCallbacks.Buffer |
createSafe(long address,
int capacity)
|
STBIEOFCallback |
eof()
Returns the value of the
eof field. |
STBIIOCallbacks |
eof(STBIEOFCallbackI value)
Sets the specified value to the
eof field. |
static STBIIOCallbacks |
malloc()
Returns a new
STBIIOCallbacks instance allocated with memAlloc. |
static STBIIOCallbacks.Buffer |
malloc(int capacity)
Returns a new
STBIIOCallbacks.Buffer instance allocated with memAlloc. |
static STBIIOCallbacks |
mallocStack()
Returns a new
STBIIOCallbacks instance allocated on the thread-local MemoryStack. |
static STBIIOCallbacks.Buffer |
mallocStack(int capacity)
Returns a new
STBIIOCallbacks.Buffer instance allocated on the thread-local MemoryStack. |
static STBIIOCallbacks.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
STBIIOCallbacks.Buffer instance allocated on the specified MemoryStack. |
static STBIIOCallbacks |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
STBIIOCallbacks instance allocated on the specified MemoryStack. |
static STBIEOFCallback |
neof(long struct)
Unsafe version of
eof(). |
static void |
neof(long struct,
STBIEOFCallbackI value)
Unsafe version of
eof. |
static STBIReadCallback |
nread(long struct)
Unsafe version of
read(). |
static void |
nread(long struct,
STBIReadCallbackI value)
Unsafe version of
read. |
static STBISkipCallback |
nskip(long struct)
Unsafe version of
skip(). |
static void |
nskip(long struct,
STBISkipCallbackI value)
Unsafe version of
skip. |
STBIReadCallback |
read()
Returns the value of the
read field. |
STBIIOCallbacks |
read(STBIReadCallbackI value)
Sets the specified value to the
read field. |
STBIIOCallbacks |
set(STBIIOCallbacks src)
Copies the specified struct data to this struct.
|
STBIIOCallbacks |
set(STBIReadCallbackI read,
STBISkipCallbackI skip,
STBIEOFCallbackI eof)
Initializes this struct with the specified values.
|
int |
sizeof() |
STBISkipCallback |
skip()
Returns the value of the
skip field. |
STBIIOCallbacks |
skip(STBISkipCallbackI value)
Sets the specified value to the
skip field. |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int READ
public static final int SKIP
public static final int EOF
public STBIIOCallbacks(java.nio.ByteBuffer container)
STBIIOCallbacks 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic STBIReadCallback read()
read field.public STBISkipCallback skip()
skip field.public STBIEOFCallback eof()
eof field.public STBIIOCallbacks read(STBIReadCallbackI value)
read field.public STBIIOCallbacks skip(STBISkipCallbackI value)
skip field.public STBIIOCallbacks eof(STBIEOFCallbackI value)
eof field.public STBIIOCallbacks set(STBIReadCallbackI read, STBISkipCallbackI skip, STBIEOFCallbackI eof)
public STBIIOCallbacks set(STBIIOCallbacks src)
src - the source structpublic static STBIIOCallbacks malloc()
STBIIOCallbacks instance allocated with memAlloc. The instance must be explicitly freed.public static STBIIOCallbacks calloc()
STBIIOCallbacks instance allocated with memCalloc. The instance must be explicitly freed.public static STBIIOCallbacks create()
STBIIOCallbacks instance allocated with BufferUtils.public static STBIIOCallbacks create(long address)
STBIIOCallbacks instance for the specified memory address.@Nullable public static STBIIOCallbacks createSafe(long address)
public static STBIIOCallbacks.Buffer malloc(int capacity)
STBIIOCallbacks.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static STBIIOCallbacks.Buffer calloc(int capacity)
STBIIOCallbacks.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static STBIIOCallbacks.Buffer create(int capacity)
STBIIOCallbacks.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static STBIIOCallbacks.Buffer create(long address, int capacity)
STBIIOCallbacks.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static STBIIOCallbacks.Buffer createSafe(long address, int capacity)
public static STBIIOCallbacks mallocStack()
STBIIOCallbacks instance allocated on the thread-local MemoryStack.public static STBIIOCallbacks callocStack()
STBIIOCallbacks instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static STBIIOCallbacks mallocStack(org.lwjgl.system.MemoryStack stack)
STBIIOCallbacks instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static STBIIOCallbacks callocStack(org.lwjgl.system.MemoryStack stack)
STBIIOCallbacks instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static STBIIOCallbacks.Buffer mallocStack(int capacity)
STBIIOCallbacks.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static STBIIOCallbacks.Buffer callocStack(int capacity)
STBIIOCallbacks.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static STBIIOCallbacks.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
STBIIOCallbacks.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static STBIIOCallbacks.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
STBIIOCallbacks.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static STBIReadCallback nread(long struct)
read().public static STBISkipCallback nskip(long struct)
skip().public static STBIEOFCallback neof(long struct)
eof().public static void nread(long struct,
STBIReadCallbackI value)
read.public static void nskip(long struct,
STBISkipCallbackI value)
skip.public static void neof(long struct,
STBIEOFCallbackI value)
eof.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.