Top Description Inners Constructors Methods
org.lwjgl.stb

public abstract Class STBIReadCallback

extends Callback
implements STBIReadCallbackI
Class Inheritance
All Implemented Interfaces
org.lwjgl.stb.STBIReadCallbackI, org.lwjgl.system.CallbackI, org.lwjgl.system.Pointer
Known Direct Subclasses
org.lwjgl.stb.STBIReadCallback.Container
Imports
javax.annotation.*, org.lwjgl.system.*, java.nio.*

Instances of this class may be set to the read field of the STBIIOCallbacks struct.

Type


int (*invoke) (
    void *user,
    char *data,
    int size
)

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
protected
pack-priv
STBIReadCallback(long functionPointer)

Method Summary

Modifier and TypeMethod and Description
public static STBIReadCallback

Returns:

the new STBIReadCallback
create
(long functionPointer)

Creates a STBIReadCallback instance from the specified function pointer.

public static STBIReadCallback
create(STBIReadCallbackI instance)

Creates a STBIReadCallback instance that delegates to the specified STBIReadCallbackI instance.

public static STBIReadCallback
createSafe(long functionPointer)

Like create, but returns null if functionPointer is NULL.

public static ByteBuffer

Returns:

the data as a ByteBuffer
getData
(long
the STBIReadCallback data argument
data
,
int
the STBIReadCallback size argument
size
)

Converts the specified STBIReadCallback arguments to a ByteBuffer.

Inherited from org.lwjgl.system.Callback:
addressequalsfreefreegetgetSafehashCodetoString

Constructor Detail

STBIReadCallbackback to summary
protected STBIReadCallback()
STBIReadCallbackback to summary
pack-priv STBIReadCallback(long functionPointer)

Method Detail

createback to summary
public static STBIReadCallback create(long functionPointer)

Creates a STBIReadCallback instance from the specified function pointer.

Returns:STBIReadCallback

the new STBIReadCallback

createback to summary
public static STBIReadCallback create(STBIReadCallbackI instance)

Creates a STBIReadCallback instance that delegates to the specified STBIReadCallbackI instance.

createSafeback to summary
public static STBIReadCallback createSafe(long functionPointer)

Like create, but returns null if functionPointer is NULL.

Annotations
@Nullable
getDataback to summary
public static ByteBuffer getData(long data, int size)

Converts the specified STBIReadCallback arguments to a ByteBuffer.

This method may only be used inside a STBIReadCallback invocation.

Parameters
data:long

the STBIReadCallback data argument

size:int

the STBIReadCallback size argument

Returns:ByteBuffer

the data as a ByteBuffer

org.lwjgl.stb back to summary

private final Class STBIReadCallback.Container

extends STBIReadCallback
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final STBIReadCallbackI

Constructor Summary

AccessConstructor and Description
pack-priv
Container(long functionPointer, STBIReadCallbackI delegate)

Method Summary

Modifier and TypeMethod and Description
public int
invoke(long
a pointer to user data
user
,
long
the data buffer to fill
data
,
int
the number of bytes to read
size
)

Implements org.lwjgl.stb.STBIReadCallbackI.invoke.

The stbi_io_callbacks.read callback.
Inherited from org.lwjgl.stb.STBIReadCallback:
createcreatecreateSafegetData

Field Detail

delegateback to summary
private final STBIReadCallbackI delegate

Constructor Detail

Containerback to summary
pack-priv Container(long functionPointer, STBIReadCallbackI delegate)

Method Detail

invokeback to summary
public int invoke(long user, long data, int size)

Implements org.lwjgl.stb.STBIReadCallbackI.invoke.

Doc from org.lwjgl.stb.STBIReadCallbackI.invoke.

The stbi_io_callbacks.read callback.

Parameters
user:long

a pointer to user data

data:long

the data buffer to fill

size:int

the number of bytes to read

Returns:int

the number of bytes actually read

Annotations
@Override