Class SDL_StorageInterface
- All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer
struct SDL_StorageInterface {
Uint32 version;
bool (* close) (void * userdata);
bool (* ready) (void * userdata);
bool (* enumerate) (void * userdata, char const * path, SDL_EnumerateDirectoryCallback callback, void * callback_userdata);
bool (* info) (void * userdata, char const * path, SDL_PathInfo * info);
bool (* read_file) (void * userdata, char const * path, void * destination, Uint64 length);
bool (* write_file) (void * userdata, char const * path, void const * source, Uint64 length);
bool (* mkdir) (void * userdata, char const * path);
bool (* remove) (void * userdata, char const * path);
bool (* rename) (void * userdata, char const * oldpath, char const * newpath);
bool (* copy) (void * userdata, char const * oldpath, char const * newpath);
Uint64 (* space_remaining) (void * userdata);
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Struct
Struct.StructValidationNested classes/interfaces inherited from interface Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionSDL_StorageInterface(ByteBuffer container) Creates aSDL_StorageInterfaceinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_StorageInterfacecalloc()Returns a newSDL_StorageInterfaceinstance allocated withmemCalloc.static SDL_StorageInterface.Buffercalloc(int capacity) Returns a newSDL_StorageInterface.Bufferinstance allocated withmemCalloc.static SDL_StorageInterface.Buffercalloc(int capacity, MemoryStack stack) Returns a newSDL_StorageInterface.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_StorageInterfacecalloc(MemoryStack stack) Returns a newSDL_StorageInterfaceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.@Nullable SDL_StorageInterfaceCloseCallbackclose$()close$(@Nullable SDL_StorageInterfaceCloseCallbackI value) Sets the specified value to theclosefield.@Nullable SDL_StorageInterfaceCopyCallbackcopy()copy(@Nullable SDL_StorageInterfaceCopyCallbackI value) Sets the specified value to thecopyfield.static SDL_StorageInterfacecreate()Returns a newSDL_StorageInterfaceinstance allocated withBufferUtils.static SDL_StorageInterface.Buffercreate(int capacity) Returns a newSDL_StorageInterface.Bufferinstance allocated withBufferUtils.static SDL_StorageInterfacecreate(long address) Returns a newSDL_StorageInterfaceinstance for the specified memory address.static SDL_StorageInterface.Buffercreate(long address, int capacity) Create aSDL_StorageInterface.Bufferinstance at the specified memory.static @Nullable SDL_StorageInterfacecreateSafe(long address) static @Nullable SDL_StorageInterface.BuffercreateSafe(long address, int capacity) @Nullable SDL_StorageInterfaceEnumerateCallbackenumerate(@Nullable SDL_StorageInterfaceEnumerateCallbackI value) Sets the specified value to theenumeratefield.@Nullable SDL_StorageInterfaceInfoCallbackinfo()info(@Nullable SDL_StorageInterfaceInfoCallbackI value) Sets the specified value to theinfofield.static SDL_StorageInterfacemalloc()Returns a newSDL_StorageInterfaceinstance allocated withmemAlloc.static SDL_StorageInterface.Buffermalloc(int capacity) Returns a newSDL_StorageInterface.Bufferinstance allocated withmemAlloc.static SDL_StorageInterface.Buffermalloc(int capacity, MemoryStack stack) Returns a newSDL_StorageInterface.Bufferinstance allocated on the specifiedMemoryStack.static SDL_StorageInterfacemalloc(MemoryStack stack) Returns a newSDL_StorageInterfaceinstance allocated on the specifiedMemoryStack.@Nullable SDL_StorageInterfaceMkdirCallbackmkdir()mkdir(@Nullable SDL_StorageInterfaceMkdirCallbackI value) Sets the specified value to themkdirfield.static @Nullable SDL_StorageInterfaceCloseCallbacknclose$(long struct) Unsafe version ofclose$().static voidnclose$(long struct, @Nullable SDL_StorageInterfaceCloseCallbackI value) Unsafe version ofclose$.static @Nullable SDL_StorageInterfaceCopyCallbackncopy(long struct) Unsafe version ofcopy().static voidncopy(long struct, @Nullable SDL_StorageInterfaceCopyCallbackI value) Unsafe version ofcopy.static @Nullable SDL_StorageInterfaceEnumerateCallbacknenumerate(long struct) Unsafe version ofenumerate().static voidnenumerate(long struct, @Nullable SDL_StorageInterfaceEnumerateCallbackI value) Unsafe version ofenumerate.static @Nullable SDL_StorageInterfaceInfoCallbackninfo(long struct) Unsafe version ofinfo().static voidninfo(long struct, @Nullable SDL_StorageInterfaceInfoCallbackI value) Unsafe version ofinfo.static @Nullable SDL_StorageInterfaceMkdirCallbacknmkdir(long struct) Unsafe version ofmkdir().static voidnmkdir(long struct, @Nullable SDL_StorageInterfaceMkdirCallbackI value) Unsafe version ofmkdir.static @Nullable SDL_StorageInterfaceReadFileCallbacknread_file(long struct) Unsafe version ofread_file().static voidnread_file(long struct, @Nullable SDL_StorageInterfaceReadFileCallbackI value) Unsafe version ofread_file.static @Nullable SDL_StorageInterfaceReadyCallbacknready(long struct) Unsafe version ofready().static voidnready(long struct, @Nullable SDL_StorageInterfaceReadyCallbackI value) Unsafe version ofready.static @Nullable SDL_StorageInterfaceRemoveCallbacknremove(long struct) Unsafe version ofremove().static voidnremove(long struct, @Nullable SDL_StorageInterfaceRemoveCallbackI value) Unsafe version ofremove.static @Nullable SDL_StorageInterfaceRenameCallbacknrename(long struct) Unsafe version ofrename().static voidnrename(long struct, @Nullable SDL_StorageInterfaceRenameCallbackI value) Unsafe version ofrename.static @Nullable SDL_StorageInterfaceSpaceRemainingCallbacknspace_remaining(long struct) Unsafe version ofspace_remaining().static voidnspace_remaining(long struct, @Nullable SDL_StorageInterfaceSpaceRemainingCallbackI value) Unsafe version ofspace_remaining.static intnversion(long struct) Unsafe version ofversion().static voidnversion(long struct, int value) Unsafe version ofversion.static @Nullable SDL_StorageInterfaceWriteFileCallbacknwrite_file(long struct) Unsafe version ofwrite_file().static voidnwrite_file(long struct, @Nullable SDL_StorageInterfaceWriteFileCallbackI value) Unsafe version ofwrite_file.@Nullable SDL_StorageInterfaceReadFileCallbackread_file(@Nullable SDL_StorageInterfaceReadFileCallbackI value) Sets the specified value to theread_filefield.@Nullable SDL_StorageInterfaceReadyCallbackready()ready(@Nullable SDL_StorageInterfaceReadyCallbackI value) Sets the specified value to thereadyfield.@Nullable SDL_StorageInterfaceRemoveCallbackremove()remove(@Nullable SDL_StorageInterfaceRemoveCallbackI value) Sets the specified value to theremovefield.@Nullable SDL_StorageInterfaceRenameCallbackrename()rename(@Nullable SDL_StorageInterfaceRenameCallbackI value) Sets the specified value to therenamefield.set(int version, SDL_StorageInterfaceCloseCallbackI close$, SDL_StorageInterfaceReadyCallbackI ready, SDL_StorageInterfaceEnumerateCallbackI enumerate, SDL_StorageInterfaceInfoCallbackI info, SDL_StorageInterfaceReadFileCallbackI read_file, SDL_StorageInterfaceWriteFileCallbackI write_file, SDL_StorageInterfaceMkdirCallbackI mkdir, SDL_StorageInterfaceRemoveCallbackI remove, SDL_StorageInterfaceRenameCallbackI rename, SDL_StorageInterfaceCopyCallbackI copy, SDL_StorageInterfaceSpaceRemainingCallbackI space_remaining) Initializes this struct with the specified values.set(SDL_StorageInterface src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).space_remaining(@Nullable SDL_StorageInterfaceSpaceRemainingCallbackI value) Sets the specified value to thespace_remainingfield.intversion()version(int value) Sets the specified value to theversionfield.@Nullable SDL_StorageInterfaceWriteFileCallbackwrite_file(@Nullable SDL_StorageInterfaceWriteFileCallbackI value) Sets the specified value to thewrite_filefield.Methods inherited from class Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
VERSION
public static final int VERSIONThe struct member offsets. -
CLOSE
public static final int CLOSEThe struct member offsets. -
READY
public static final int READYThe struct member offsets. -
ENUMERATE
public static final int ENUMERATEThe struct member offsets. -
INFO
public static final int INFOThe struct member offsets. -
READ_FILE
public static final int READ_FILEThe struct member offsets. -
WRITE_FILE
public static final int WRITE_FILEThe struct member offsets. -
MKDIR
public static final int MKDIRThe struct member offsets. -
REMOVE
public static final int REMOVEThe struct member offsets. -
RENAME
public static final int RENAMEThe struct member offsets. -
COPY
public static final int COPYThe struct member offsets. -
SPACE_REMAINING
public static final int SPACE_REMAININGThe struct member offsets.
-
-
Constructor Details
-
SDL_StorageInterface
Creates aSDL_StorageInterfaceinstance at the current position of the specifiedByteBuffercontainer. 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.
-
-
Method Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<SDL_StorageInterface>
-
version
- Returns:
- the value of the
versionfield.
-
close$
- Returns:
- the value of the
closefield.
-
ready
- Returns:
- the value of the
readyfield.
-
enumerate
@NativeType("bool (*) (void *, char const *, SDL_EnumerateDirectoryCallback, void *)") public @Nullable SDL_StorageInterfaceEnumerateCallback enumerate()- Returns:
- the value of the
enumeratefield.
-
info
@NativeType("bool (*) (void *, char const *, SDL_PathInfo *)") public @Nullable SDL_StorageInterfaceInfoCallback info()- Returns:
- the value of the
infofield.
-
read_file
@NativeType("bool (*) (void *, char const *, void *, Uint64)") public @Nullable SDL_StorageInterfaceReadFileCallback read_file()- Returns:
- the value of the
read_filefield.
-
write_file
@NativeType("bool (*) (void *, char const *, void const *, Uint64)") public @Nullable SDL_StorageInterfaceWriteFileCallback write_file()- Returns:
- the value of the
write_filefield.
-
mkdir
@NativeType("bool (*) (void *, char const *)") public @Nullable SDL_StorageInterfaceMkdirCallback mkdir()- Returns:
- the value of the
mkdirfield.
-
remove
@NativeType("bool (*) (void *, char const *)") public @Nullable SDL_StorageInterfaceRemoveCallback remove()- Returns:
- the value of the
removefield.
-
rename
@NativeType("bool (*) (void *, char const *, char const *)") public @Nullable SDL_StorageInterfaceRenameCallback rename()- Returns:
- the value of the
renamefield.
-
copy
@NativeType("bool (*) (void *, char const *, char const *)") public @Nullable SDL_StorageInterfaceCopyCallback copy()- Returns:
- the value of the
copyfield.
-
space_remaining
@NativeType("Uint64 (*) (void *)") public @Nullable SDL_StorageInterfaceSpaceRemainingCallback space_remaining()- Returns:
- the value of the
space_remainingfield.
-
version
Sets the specified value to theversionfield. -
close$
public SDL_StorageInterface close$(@NativeType("bool (*) (void *)") @Nullable SDL_StorageInterfaceCloseCallbackI value) Sets the specified value to theclosefield. -
ready
public SDL_StorageInterface ready(@NativeType("bool (*) (void *)") @Nullable SDL_StorageInterfaceReadyCallbackI value) Sets the specified value to thereadyfield. -
enumerate
public SDL_StorageInterface enumerate(@NativeType("bool (*) (void *, char const *, SDL_EnumerateDirectoryCallback, void *)") @Nullable SDL_StorageInterfaceEnumerateCallbackI value) Sets the specified value to theenumeratefield. -
info
public SDL_StorageInterface info(@NativeType("bool (*) (void *, char const *, SDL_PathInfo *)") @Nullable SDL_StorageInterfaceInfoCallbackI value) Sets the specified value to theinfofield. -
read_file
public SDL_StorageInterface read_file(@NativeType("bool (*) (void *, char const *, void *, Uint64)") @Nullable SDL_StorageInterfaceReadFileCallbackI value) Sets the specified value to theread_filefield. -
write_file
public SDL_StorageInterface write_file(@NativeType("bool (*) (void *, char const *, void const *, Uint64)") @Nullable SDL_StorageInterfaceWriteFileCallbackI value) Sets the specified value to thewrite_filefield. -
mkdir
public SDL_StorageInterface mkdir(@NativeType("bool (*) (void *, char const *)") @Nullable SDL_StorageInterfaceMkdirCallbackI value) Sets the specified value to themkdirfield. -
remove
public SDL_StorageInterface remove(@NativeType("bool (*) (void *, char const *)") @Nullable SDL_StorageInterfaceRemoveCallbackI value) Sets the specified value to theremovefield. -
rename
public SDL_StorageInterface rename(@NativeType("bool (*) (void *, char const *, char const *)") @Nullable SDL_StorageInterfaceRenameCallbackI value) Sets the specified value to therenamefield. -
copy
public SDL_StorageInterface copy(@NativeType("bool (*) (void *, char const *, char const *)") @Nullable SDL_StorageInterfaceCopyCallbackI value) Sets the specified value to thecopyfield. -
space_remaining
public SDL_StorageInterface space_remaining(@NativeType("Uint64 (*) (void *)") @Nullable SDL_StorageInterfaceSpaceRemainingCallbackI value) Sets the specified value to thespace_remainingfield. -
set
public SDL_StorageInterface set(int version, SDL_StorageInterfaceCloseCallbackI close$, SDL_StorageInterfaceReadyCallbackI ready, SDL_StorageInterfaceEnumerateCallbackI enumerate, SDL_StorageInterfaceInfoCallbackI info, SDL_StorageInterfaceReadFileCallbackI read_file, SDL_StorageInterfaceWriteFileCallbackI write_file, SDL_StorageInterfaceMkdirCallbackI mkdir, SDL_StorageInterfaceRemoveCallbackI remove, SDL_StorageInterfaceRenameCallbackI rename, SDL_StorageInterfaceCopyCallbackI copy, SDL_StorageInterfaceSpaceRemainingCallbackI space_remaining) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newSDL_StorageInterfaceinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSDL_StorageInterfaceinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSDL_StorageInterfaceinstance allocated withBufferUtils. -
create
Returns a newSDL_StorageInterfaceinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_StorageInterface.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSDL_StorageInterface.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSDL_StorageInterface.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSDL_StorageInterface.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_StorageInterfaceinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSDL_StorageInterfaceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSDL_StorageInterface.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSDL_StorageInterface.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nversion
public static int nversion(long struct) Unsafe version ofversion(). -
nclose$
Unsafe version ofclose$(). -
nready
Unsafe version ofready(). -
nenumerate
Unsafe version ofenumerate(). -
ninfo
Unsafe version ofinfo(). -
nread_file
Unsafe version ofread_file(). -
nwrite_file
Unsafe version ofwrite_file(). -
nmkdir
Unsafe version ofmkdir(). -
nremove
Unsafe version ofremove(). -
nrename
Unsafe version ofrename(). -
ncopy
Unsafe version ofcopy(). -
nspace_remaining
Unsafe version ofspace_remaining(). -
nversion
public static void nversion(long struct, int value) Unsafe version ofversion. -
nclose$
Unsafe version ofclose$. -
nready
Unsafe version ofready. -
nenumerate
Unsafe version ofenumerate. -
ninfo
Unsafe version ofinfo. -
nread_file
Unsafe version ofread_file. -
nwrite_file
Unsafe version ofwrite_file. -
nmkdir
Unsafe version ofmkdir. -
nremove
Unsafe version ofremove. -
nrename
Unsafe version ofrename. -
ncopy
Unsafe version ofcopy. -
nspace_remaining
public static void nspace_remaining(long struct, @Nullable SDL_StorageInterfaceSpaceRemainingCallbackI value) Unsafe version ofspace_remaining.
-