Package io.github.libsdl4j.api.rwops
Class SDL_RWops
- java.lang.Object
-
- com.sun.jna.Structure
-
- io.github.libsdl4j.api.rwops.SDL_RWops
-
@FieldOrder({"size","seek","read","write","close","type","hidden"}) public final class SDL_RWops extends com.sun.jna.Structure
This is a structure that holds references to functions for IO operations (read/write/seek).It is advisable to keep a reference to this class forever (more precisely, as long as the callbacks are valid) and reuse it to limit repeated creation of multiple JNA callback objects.
-
-
Field Summary
Fields Modifier and Type Field Description SDL_RWCloseFunction
close
A function that knows how to close a file.SDL_RWopsPlatformSpecific
hidden
SDL_RWReadFunction
read
A function that knows how to read up tomaxnum
objects each ofsize
from the data stream to the area pointed at byptr
.SDL_RWSeekFunction
seek
A function that knows how to seek tooffset
relative towhence
, one of stdio's whence values: RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_ENDSDL_RWSizeFunction
size
A function that knows how to figure out the size of the file in this rwops, or -1 if unknownint
type
SDL_RWWriteFunction
write
A function that knows how to write exactlynum
objects each ofsize
from the area pointed at byptr
to data stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
read()
-
Methods inherited from class com.sun.jna.Structure
allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFieldOrder, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField, writeField
-
-
-
-
Field Detail
-
size
public SDL_RWSizeFunction size
A function that knows how to figure out the size of the file in this rwops, or -1 if unknown
-
seek
public SDL_RWSeekFunction seek
A function that knows how to seek tooffset
relative towhence
, one of stdio's whence values: RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
-
read
public SDL_RWReadFunction read
A function that knows how to read up tomaxnum
objects each ofsize
from the data stream to the area pointed at byptr
.
-
write
public SDL_RWWriteFunction write
A function that knows how to write exactlynum
objects each ofsize
from the area pointed at byptr
to data stream.
-
close
public SDL_RWCloseFunction close
A function that knows how to close a file.
-
type
public int type
-
hidden
public SDL_RWopsPlatformSpecific hidden
-
-