Package org.lwjgl.sdl
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 org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionSDL_StorageInterface
(ByteBuffer container) Creates aSDL_StorageInterface
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_StorageInterface
calloc()
Returns a newSDL_StorageInterface
instance allocated withmemCalloc
.static SDL_StorageInterface.Buffer
calloc
(int capacity) Returns a newSDL_StorageInterface.Buffer
instance allocated withmemCalloc
.static SDL_StorageInterface.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSDL_StorageInterface.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_StorageInterface
calloc
(MemoryStack stack) Returns a newSDL_StorageInterface
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.@Nullable SDL_StorageInterfaceCloseCallback
close$()
close$
(@Nullable SDL_StorageInterfaceCloseCallbackI value) Sets the specified value to theclose
field.@Nullable SDL_StorageInterfaceCopyCallback
copy()
copy
(@Nullable SDL_StorageInterfaceCopyCallbackI value) Sets the specified value to thecopy
field.static SDL_StorageInterface
create()
Returns a newSDL_StorageInterface
instance allocated withBufferUtils
.static SDL_StorageInterface.Buffer
create
(int capacity) Returns a newSDL_StorageInterface.Buffer
instance allocated withBufferUtils
.static SDL_StorageInterface
create
(long address) Returns a newSDL_StorageInterface
instance for the specified memory address.static SDL_StorageInterface.Buffer
create
(long address, int capacity) Create aSDL_StorageInterface.Buffer
instance at the specified memory.static @Nullable SDL_StorageInterface
createSafe
(long address) static @Nullable SDL_StorageInterface.Buffer
createSafe
(long address, int capacity) @Nullable SDL_StorageInterfaceEnumerateCallback
enumerate
(@Nullable SDL_StorageInterfaceEnumerateCallbackI value) Sets the specified value to theenumerate
field.@Nullable SDL_StorageInterfaceInfoCallback
info()
info
(@Nullable SDL_StorageInterfaceInfoCallbackI value) Sets the specified value to theinfo
field.static SDL_StorageInterface
malloc()
Returns a newSDL_StorageInterface
instance allocated withmemAlloc
.static SDL_StorageInterface.Buffer
malloc
(int capacity) Returns a newSDL_StorageInterface.Buffer
instance allocated withmemAlloc
.static SDL_StorageInterface.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSDL_StorageInterface.Buffer
instance allocated on the specifiedMemoryStack
.static SDL_StorageInterface
malloc
(MemoryStack stack) Returns a newSDL_StorageInterface
instance allocated on the specifiedMemoryStack
.@Nullable SDL_StorageInterfaceMkdirCallback
mkdir()
mkdir
(@Nullable SDL_StorageInterfaceMkdirCallbackI value) Sets the specified value to themkdir
field.static @Nullable SDL_StorageInterfaceCloseCallback
nclose$
(long struct) Unsafe version ofclose$()
.static void
nclose$
(long struct, @Nullable SDL_StorageInterfaceCloseCallbackI value) Unsafe version ofclose$
.static @Nullable SDL_StorageInterfaceCopyCallback
ncopy
(long struct) Unsafe version ofcopy()
.static void
ncopy
(long struct, @Nullable SDL_StorageInterfaceCopyCallbackI value) Unsafe version ofcopy
.static @Nullable SDL_StorageInterfaceEnumerateCallback
nenumerate
(long struct) Unsafe version ofenumerate()
.static void
nenumerate
(long struct, @Nullable SDL_StorageInterfaceEnumerateCallbackI value) Unsafe version ofenumerate
.static @Nullable SDL_StorageInterfaceInfoCallback
ninfo
(long struct) Unsafe version ofinfo()
.static void
ninfo
(long struct, @Nullable SDL_StorageInterfaceInfoCallbackI value) Unsafe version ofinfo
.static @Nullable SDL_StorageInterfaceMkdirCallback
nmkdir
(long struct) Unsafe version ofmkdir()
.static void
nmkdir
(long struct, @Nullable SDL_StorageInterfaceMkdirCallbackI value) Unsafe version ofmkdir
.static @Nullable SDL_StorageInterfaceReadFileCallback
nread_file
(long struct) Unsafe version ofread_file()
.static void
nread_file
(long struct, @Nullable SDL_StorageInterfaceReadFileCallbackI value) Unsafe version ofread_file
.static @Nullable SDL_StorageInterfaceReadyCallback
nready
(long struct) Unsafe version ofready()
.static void
nready
(long struct, @Nullable SDL_StorageInterfaceReadyCallbackI value) Unsafe version ofready
.static @Nullable SDL_StorageInterfaceRemoveCallback
nremove
(long struct) Unsafe version ofremove()
.static void
nremove
(long struct, @Nullable SDL_StorageInterfaceRemoveCallbackI value) Unsafe version ofremove
.static @Nullable SDL_StorageInterfaceRenameCallback
nrename
(long struct) Unsafe version ofrename()
.static void
nrename
(long struct, @Nullable SDL_StorageInterfaceRenameCallbackI value) Unsafe version ofrename
.static @Nullable SDL_StorageInterfaceSpaceRemainingCallback
nspace_remaining
(long struct) Unsafe version ofspace_remaining()
.static void
nspace_remaining
(long struct, @Nullable SDL_StorageInterfaceSpaceRemainingCallbackI value) Unsafe version ofspace_remaining
.static int
nversion
(long struct) Unsafe version ofversion()
.static void
nversion
(long struct, int value) Unsafe version ofversion
.static @Nullable SDL_StorageInterfaceWriteFileCallback
nwrite_file
(long struct) Unsafe version ofwrite_file()
.static void
nwrite_file
(long struct, @Nullable SDL_StorageInterfaceWriteFileCallbackI value) Unsafe version ofwrite_file
.@Nullable SDL_StorageInterfaceReadFileCallback
read_file
(@Nullable SDL_StorageInterfaceReadFileCallbackI value) Sets the specified value to theread_file
field.@Nullable SDL_StorageInterfaceReadyCallback
ready()
ready
(@Nullable SDL_StorageInterfaceReadyCallbackI value) Sets the specified value to theready
field.@Nullable SDL_StorageInterfaceRemoveCallback
remove()
remove
(@Nullable SDL_StorageInterfaceRemoveCallbackI value) Sets the specified value to theremove
field.@Nullable SDL_StorageInterfaceRenameCallback
rename()
rename
(@Nullable SDL_StorageInterfaceRenameCallbackI value) Sets the specified value to therename
field.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.int
sizeof()
Returnssizeof(struct)
.space_remaining
(@Nullable SDL_StorageInterfaceSpaceRemainingCallbackI value) Sets the specified value to thespace_remaining
field.int
version()
version
(int value) Sets the specified value to theversion
field.@Nullable SDL_StorageInterfaceWriteFileCallback
write_file
(@Nullable SDL_StorageInterfaceWriteFileCallbackI value) Sets the specified value to thewrite_file
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.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_StorageInterface
instance at the current position of the specifiedByteBuffer
container. 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:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<SDL_StorageInterface>
-
version
public int version()- Returns:
- the value of the
version
field.
-
close$
- Returns:
- the value of the
close
field.
-
ready
- Returns:
- the value of the
ready
field.
-
enumerate
- Returns:
- the value of the
enumerate
field.
-
info
- Returns:
- the value of the
info
field.
-
read_file
- Returns:
- the value of the
read_file
field.
-
write_file
- Returns:
- the value of the
write_file
field.
-
mkdir
- Returns:
- the value of the
mkdir
field.
-
remove
- Returns:
- the value of the
remove
field.
-
rename
- Returns:
- the value of the
rename
field.
-
copy
- Returns:
- the value of the
copy
field.
-
space_remaining
- Returns:
- the value of the
space_remaining
field.
-
version
Sets the specified value to theversion
field. -
close$
Sets the specified value to theclose
field. -
ready
Sets the specified value to theready
field. -
enumerate
Sets the specified value to theenumerate
field. -
info
Sets the specified value to theinfo
field. -
read_file
Sets the specified value to theread_file
field. -
write_file
Sets the specified value to thewrite_file
field. -
mkdir
Sets the specified value to themkdir
field. -
remove
Sets the specified value to theremove
field. -
rename
Sets the specified value to therename
field. -
copy
Sets the specified value to thecopy
field. -
space_remaining
public SDL_StorageInterface space_remaining(@Nullable SDL_StorageInterfaceSpaceRemainingCallbackI value) Sets the specified value to thespace_remaining
field. -
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_StorageInterface
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSDL_StorageInterface
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSDL_StorageInterface
instance allocated withBufferUtils
. -
create
Returns a newSDL_StorageInterface
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_StorageInterface.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSDL_StorageInterface.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSDL_StorageInterface.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSDL_StorageInterface.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_StorageInterface
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSDL_StorageInterface
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSDL_StorageInterface.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSDL_StorageInterface.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-