java.lang.Object
overrungl.Pointer
overrungl.Struct
overrungl.stb.STBIIoCallbacks
- All Implemented Interfaces:
Addressable
STBIIoCallbacks relies on preview features of the Java platform:
STBIIoCallbacksrefers to one or more preview APIs:Arena,MemorySegment,SegmentAllocator,StructLayout.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
The IO callback of STB image.
Layout
struct stbi_io_callbacks {
int (*readPREVIEW)(void* user, char* data, int size);
void (*skipPREVIEW)(void* user, int n);
int (*eofPREVIEW)(void* user);
}- Since:
- 0.1.0
- Author:
- squid233
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe eof callback interfacestatic interfaceThe read callback interfacestatic interfaceThe skip callback interface -
Field Summary
FieldsFields inherited from class overrungl.Pointer
address, allocator, managedSegment -
Constructor Summary
ConstructorsConstructorDescriptionSTBIIoCallbacks(MemorySegmentPREVIEW address, SegmentAllocatorPREVIEW allocator) Create astbi_io_callbacksinstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBIIoCallbackscreate(SegmentAllocatorPREVIEW allocator) Creates astbi_io_callbacksinstance with the given allocator.eof()Returns the eof callback.eof(ArenaPREVIEW arena, STBIIoCallbacks.Eof eof) Sets the eof callback.read()Returns the read callback.read(ArenaPREVIEW arena, STBIIoCallbacks.Read read) Sets the read callback.skip()Returns the skip callback.skip(ArenaPREVIEW arena, STBIIoCallbacks.Skip skip) Sets the skip callback.
-
Field Details
-
LAYOUT
The struct layout.
-
-
Constructor Details
-
STBIIoCallbacks
Create astbi_io_callbacksinstance.- Parameters:
address- the address.allocator- the allocator of this address.
-
-
Method Details
-
create
Creates astbi_io_callbacksinstance with the given allocator.- Parameters:
allocator- the allocator- Returns:
- the instance
-
read
Returns the read callback.- Returns:
- the read callback
-
skip
Returns the skip callback.- Returns:
- the skip callback
-
eof
Returns the eof callback.- Returns:
- the eof callback
-
read
Sets the read callback.- Parameters:
arena- the arena of the callback.read- the read callback- Returns:
- this
-
skip
Sets the skip callback.- Parameters:
arena- the arena of the callback.skip- the skip callback- Returns:
- this
-
eof
Sets the eof callback.- Parameters:
arena- the arena of the callback.eof- the eof callback- Returns:
- this
-
STBIIoCallbackswhen preview features are enabled.