java.lang.Object
overrungl.Pointer
overrungl.Struct
overrungl.stb.STBIIoCallbacks
- All Implemented Interfaces:
Addressable
STBIIoCallbacks
relies on preview features of the Java platform:
STBIIoCallbacks
refers 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 (*read
PREVIEW)(void* user, char* data, int size);
void (*skip
PREVIEW)(void* user, int n);
int (*eof
PREVIEW)(void* user);
}
- Since:
- 0.1.0
- Author:
- squid233
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
The eof callback interfacestatic interface
The read callback interfacestatic interface
The skip callback interface -
Field Summary
Fields inherited from class overrungl.Pointer
address, allocator, managedSegment
-
Constructor Summary
ConstructorDescriptionSTBIIoCallbacks
(MemorySegmentPREVIEW address, SegmentAllocatorPREVIEW allocator) Create astbi_io_callbacks
instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBIIoCallbacks
create
(SegmentAllocatorPREVIEW allocator) Creates astbi_io_callbacks
instance 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_callbacks
instance.- Parameters:
address
- the address.allocator
- the allocator of this address.
-
-
Method Details
-
create
Creates astbi_io_callbacks
instance 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
-
STBIIoCallbacks
when preview features are enabled.