Record Class SDL_StorageInterface
- All Implemented Interfaces:
IPointer
,ISDL_StorageInterface
Function interface for SDL_Storage.
Apps that want to supply a custom implementation of SDL_Storage will fill in all the functions in this struct, and then pass it to SDL_OpenStorage to create a custom SDL_Storage object.
It is not usually necessary to do this; SDL provides standard implementations for many things you might expect to do with an SDL_Storage.
This structure should be initialized using SDL_INIT_INTERFACE()
Since: This struct is available since SDL 3.2.0.
See also:
SDL_INIT_INTERFACE
Structure
typedef struct SDL_StorageInterface {
Uint32 version
;
PFN_SDL_StorageInterface_close
close
; // optional
PFN_SDL_StorageInterface_ready
ready
; // optional
PFN_SDL_StorageInterface_enumerate
enumerate
; // optional
PFN_SDL_StorageInterface_info
info
; // optional
PFN_SDL_StorageInterface_read_file
read_file
; // optional
PFN_SDL_StorageInterface_write_file
write_file
; // optional
PFN_SDL_StorageInterface_mkdir
mkdir
; // optional
PFN_SDL_StorageInterface_remove
remove
; // optional
PFN_SDL_StorageInterface_rename
rename
; // optional
PFN_SDL_StorageInterface_copy
copy
; // optional
PFN_SDL_StorageInterface_space_remaining
space_remaining
; // optional
} SDL_StorageInterface;
Contracts
The property segment()
should always be not-null
(segment != NULL && !segment.equals(MemorySegment.NULL)
), and properly aligned to
LAYOUT.byteAlignment()
bytes. To represent null pointer, you may use a Java
null
instead. See the documentation of IPointer.segment()
for more details.
The constructor of this class is marked as UnsafeConstructor
, because it does not
perform any runtime check. The constructor can be useful for automatic code generators.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Represents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final StructLayout
static final AddressLayout
static final AddressLayout
static final AddressLayout
static final AddressLayout
static final AddressLayout
static final AddressLayout
static final AddressLayout
static final AddressLayout
static final AddressLayout
static final AddressLayout
static final ValueLayout.OfInt
static final AddressLayout
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionSDL_StorageInterface
(@NotNull MemorySegment segment) Creates an instance of aSDL_StorageInterface
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_StorageInterface
static SDL_StorageInterface.Ptr
static SDL_StorageInterface
clone
(Arena arena, SDL_StorageInterface src) close()
void
close
(MemorySegment value) copy()
void
copy
(MemorySegment value) void
enumerate
(MemorySegment value) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.info()
void
info
(MemorySegment value) mkdir()
void
mkdir
(MemorySegment value) void
read_file
(MemorySegment value) ready()
void
ready
(MemorySegment value) remove()
void
remove
(MemorySegment value) rename()
void
rename
(MemorySegment value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.space_remaining
(@Nullable IPointer pointer) void
space_remaining
(MemorySegment value) final String
toString()
Returns a string representation of this record class.int
version()
version
(int value) write_file
(@Nullable IPointer pointer) void
write_file
(MemorySegment value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$version
-
PATH$close
-
PATH$ready
-
PATH$enumerate
-
PATH$info
-
PATH$read_file
-
PATH$write_file
-
PATH$mkdir
-
PATH$remove
-
PATH$rename
-
PATH$copy
-
PATH$space_remaining
-
LAYOUT$version
-
LAYOUT$close
-
LAYOUT$ready
-
LAYOUT$enumerate
-
LAYOUT$info
-
LAYOUT$read_file
-
LAYOUT$write_file
-
LAYOUT$mkdir
-
LAYOUT$remove
-
LAYOUT$rename
-
LAYOUT$copy
-
LAYOUT$space_remaining
-
SIZE$version
public static final long SIZE$version -
SIZE$close
public static final long SIZE$close -
SIZE$ready
public static final long SIZE$ready -
SIZE$enumerate
public static final long SIZE$enumerate -
SIZE$info
public static final long SIZE$info -
SIZE$read_file
public static final long SIZE$read_file -
SIZE$write_file
public static final long SIZE$write_file -
SIZE$mkdir
public static final long SIZE$mkdir -
SIZE$remove
public static final long SIZE$remove -
SIZE$rename
public static final long SIZE$rename -
SIZE$copy
public static final long SIZE$copy -
SIZE$space_remaining
public static final long SIZE$space_remaining -
OFFSET$version
public static final long OFFSET$version -
OFFSET$close
public static final long OFFSET$close -
OFFSET$ready
public static final long OFFSET$ready -
OFFSET$enumerate
public static final long OFFSET$enumerate -
OFFSET$info
public static final long OFFSET$info -
OFFSET$read_file
public static final long OFFSET$read_file -
OFFSET$write_file
public static final long OFFSET$write_file -
OFFSET$mkdir
public static final long OFFSET$mkdir -
OFFSET$remove
public static final long OFFSET$remove -
OFFSET$rename
public static final long OFFSET$rename -
OFFSET$copy
public static final long OFFSET$copy -
OFFSET$space_remaining
public static final long OFFSET$space_remaining
-
-
Constructor Details
-
SDL_StorageInterface
Creates an instance of aSDL_StorageInterface
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
version
-
version
-
close
-
close
-
close
-
ready
-
ready
-
ready
-
enumerate
-
enumerate
-
enumerate
-
info
-
info
-
info
-
read_file
-
read_file
-
read_file
-
write_file
-
write_file
-
write_file
-
mkdir
-
mkdir
-
mkdir
-
remove
-
remove
-
remove
-
rename
-
rename
-
rename
-
copy
-
copy
-
copy
-
space_remaining
-
space_remaining
public void space_remaining(@Pointer(comment="PFN_SDL_StorageInterface_space_remaining") MemorySegment value) -
space_remaining
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
segment
Returns the value of thesegment
record component.
-