Record Class SDL_VirtualJoystickDesc
java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_VirtualJoystickDesc
- All Implemented Interfaces:
IPointer
,ISDL_VirtualJoystickDesc
@ValueBasedCandidate
@UnsafeConstructor
public record SDL_VirtualJoystickDesc(@NotNull MemorySegment segment)
extends Record
implements ISDL_VirtualJoystickDesc
The structure that describes a virtual joystick.
This structure should be initialized using SDL_INIT_INTERFACE(). All elements of this structure are optional.
Since: This struct is available since SDL 3.2.0.
See also:
SDL_AttachVirtualJoystick
SDL_INIT_INTERFACE
SDL_VirtualJoystickSensorDesc
SDL_VirtualJoystickTouchpadDesc
Structure
typedef struct SDL_VirtualJoystickDesc {
Uint32 version
;
Uint16 type
;
Uint16 padding
;
Uint16 vendor_id
;
Uint16 product_id
;
Uint16 naxes
;
Uint16 nbuttons
;
Uint16 nballs
;
Uint16 nhats
;
Uint16 ntouchpads
;
Uint16 nsensors
;
Uint16[2] padding2
;
Uint32 button_mask
;
Uint32 axis_mask
;
char const* name
;
SDL_VirtualJoystickTouchpadDesc
const* touchpads
;
SDL_VirtualJoystickSensorDesc
const* sensors
;
void* userdata
;
PFN_SDL_VirtualJoystickDesc_Update
Update
; // optional
PFN_SDL_VirtualJoystickDesc_SetPlayerIndex
SetPlayerIndex
; // optional
PFN_SDL_VirtualJoystickDesc_Rumble
Rumble
; // optional
PFN_SDL_VirtualJoystickDesc_RumbleTriggers
RumbleTriggers
; // optional
PFN_SDL_VirtualJoystickDesc_SetLED
SetLED
; // optional
PFN_SDL_VirtualJoystickDesc_SendEffect
SendEffect
; // optional
PFN_SDL_VirtualJoystickDesc_SetSensorsEnabled
SetSensorsEnabled
; // optional
PFN_SDL_VirtualJoystickDesc_Cleanup
Cleanup
; // optional
} SDL_VirtualJoystickDesc;
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 ValueLayout.OfInt
static final ValueLayout.OfInt
static final AddressLayout
static final AddressLayout
static final ValueLayout.OfShort
static final ValueLayout.OfShort
static final ValueLayout.OfShort
static final ValueLayout.OfShort
static final ValueLayout.OfShort
static final ValueLayout.OfShort
static final ValueLayout.OfShort
static final SequenceLayout
static final ValueLayout.OfShort
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.OfShort
static final AddressLayout
static final AddressLayout
static final ValueLayout.OfShort
static final ValueLayout.OfInt
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 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 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 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 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
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 long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionSDL_VirtualJoystickDesc
(@NotNull MemorySegment segment) Creates an instance of aSDL_VirtualJoystickDesc
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_VirtualJoystickDesc
static SDL_VirtualJoystickDesc.Ptr
int
axis_mask
(int value) int
button_mask
(int value) Cleanup()
void
Cleanup
(MemorySegment value) static SDL_VirtualJoystickDesc
clone
(Arena arena, SDL_VirtualJoystickDesc src) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@Nullable BytePtr
name()
Note: the returnedBytePtr
does not have correctBytePtr.size()
property.nameRaw()
void
nameRaw
(MemorySegment value) short
naxes()
naxes
(short value) short
nballs()
nballs
(short value) short
nbuttons()
nbuttons
(short value) short
nhats()
nhats
(short value) short
nsensors()
nsensors
(short value) short
ntouchpads
(short value) short
padding()
padding
(short value) padding2()
short
product_id
(short value) Rumble()
void
Rumble
(MemorySegment value) RumbleTriggers
(@Nullable IPointer pointer) void
RumbleTriggers
(MemorySegment value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.SendEffect
(@Nullable IPointer pointer) void
SendEffect
(MemorySegment value) @Nullable SDL_VirtualJoystickSensorDesc
sensors()
sensors
(int assumedCount) sensors
(@Nullable ISDL_VirtualJoystickSensorDesc value) void
sensorsRaw
(MemorySegment value) SetLED()
void
SetLED
(MemorySegment value) SetPlayerIndex
(@Nullable IPointer pointer) void
SetPlayerIndex
(MemorySegment value) SetSensorsEnabled
(@Nullable IPointer pointer) void
SetSensorsEnabled
(MemorySegment value) final String
toString()
Returns a string representation of this record class.@Nullable SDL_VirtualJoystickTouchpadDesc
touchpads
(int assumedCount) touchpads
(@Nullable ISDL_VirtualJoystickTouchpadDesc value) void
touchpadsRaw
(MemorySegment value) short
type()
type
(short value) Update()
void
Update
(MemorySegment value) userdata()
void
userdata
(MemorySegment value) short
vendor_id
(short value) int
version()
version
(int value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$version
-
PATH$type
-
PATH$padding
-
PATH$vendor_id
-
PATH$product_id
-
PATH$naxes
-
PATH$nbuttons
-
PATH$nballs
-
PATH$nhats
-
PATH$ntouchpads
-
PATH$nsensors
-
PATH$padding2
-
PATH$button_mask
-
PATH$axis_mask
-
PATH$name
-
PATH$touchpads
-
PATH$sensors
-
PATH$userdata
-
PATH$Update
-
PATH$SetPlayerIndex
-
PATH$Rumble
-
PATH$RumbleTriggers
-
PATH$SetLED
-
PATH$SendEffect
-
PATH$SetSensorsEnabled
-
PATH$Cleanup
-
LAYOUT$version
-
LAYOUT$type
-
LAYOUT$padding
-
LAYOUT$vendor_id
-
LAYOUT$product_id
-
LAYOUT$naxes
-
LAYOUT$nbuttons
-
LAYOUT$nballs
-
LAYOUT$nhats
-
LAYOUT$ntouchpads
-
LAYOUT$nsensors
-
LAYOUT$padding2
-
LAYOUT$button_mask
-
LAYOUT$axis_mask
-
LAYOUT$name
-
LAYOUT$touchpads
-
LAYOUT$sensors
-
LAYOUT$userdata
-
LAYOUT$Update
-
LAYOUT$SetPlayerIndex
-
LAYOUT$Rumble
-
LAYOUT$RumbleTriggers
-
LAYOUT$SetLED
-
LAYOUT$SendEffect
-
LAYOUT$SetSensorsEnabled
-
LAYOUT$Cleanup
-
SIZE$version
public static final long SIZE$version -
SIZE$type
public static final long SIZE$type -
SIZE$padding
public static final long SIZE$padding -
SIZE$vendor_id
public static final long SIZE$vendor_id -
SIZE$product_id
public static final long SIZE$product_id -
SIZE$naxes
public static final long SIZE$naxes -
SIZE$nbuttons
public static final long SIZE$nbuttons -
SIZE$nballs
public static final long SIZE$nballs -
SIZE$nhats
public static final long SIZE$nhats -
SIZE$ntouchpads
public static final long SIZE$ntouchpads -
SIZE$nsensors
public static final long SIZE$nsensors -
SIZE$padding2
public static final long SIZE$padding2 -
SIZE$button_mask
public static final long SIZE$button_mask -
SIZE$axis_mask
public static final long SIZE$axis_mask -
SIZE$name
public static final long SIZE$name -
SIZE$touchpads
public static final long SIZE$touchpads -
SIZE$sensors
public static final long SIZE$sensors -
SIZE$userdata
public static final long SIZE$userdata -
SIZE$Update
public static final long SIZE$Update -
SIZE$SetPlayerIndex
public static final long SIZE$SetPlayerIndex -
SIZE$Rumble
public static final long SIZE$Rumble -
SIZE$RumbleTriggers
public static final long SIZE$RumbleTriggers -
SIZE$SetLED
public static final long SIZE$SetLED -
SIZE$SendEffect
public static final long SIZE$SendEffect -
SIZE$SetSensorsEnabled
public static final long SIZE$SetSensorsEnabled -
SIZE$Cleanup
public static final long SIZE$Cleanup -
OFFSET$version
public static final long OFFSET$version -
OFFSET$type
public static final long OFFSET$type -
OFFSET$padding
public static final long OFFSET$padding -
OFFSET$vendor_id
public static final long OFFSET$vendor_id -
OFFSET$product_id
public static final long OFFSET$product_id -
OFFSET$naxes
public static final long OFFSET$naxes -
OFFSET$nbuttons
public static final long OFFSET$nbuttons -
OFFSET$nballs
public static final long OFFSET$nballs -
OFFSET$nhats
public static final long OFFSET$nhats -
OFFSET$ntouchpads
public static final long OFFSET$ntouchpads -
OFFSET$nsensors
public static final long OFFSET$nsensors -
OFFSET$padding2
public static final long OFFSET$padding2 -
OFFSET$button_mask
public static final long OFFSET$button_mask -
OFFSET$axis_mask
public static final long OFFSET$axis_mask -
OFFSET$name
public static final long OFFSET$name -
OFFSET$touchpads
public static final long OFFSET$touchpads -
OFFSET$sensors
public static final long OFFSET$sensors -
OFFSET$userdata
public static final long OFFSET$userdata -
OFFSET$Update
public static final long OFFSET$Update -
OFFSET$SetPlayerIndex
public static final long OFFSET$SetPlayerIndex -
OFFSET$Rumble
public static final long OFFSET$Rumble -
OFFSET$RumbleTriggers
public static final long OFFSET$RumbleTriggers -
OFFSET$SetLED
public static final long OFFSET$SetLED -
OFFSET$SendEffect
public static final long OFFSET$SendEffect -
OFFSET$SetSensorsEnabled
public static final long OFFSET$SetSensorsEnabled -
OFFSET$Cleanup
public static final long OFFSET$Cleanup
-
-
Constructor Details
-
SDL_VirtualJoystickDesc
Creates an instance of aSDL_VirtualJoystickDesc
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
version
-
version
-
type
-
type
-
padding
-
padding
-
vendor_id
-
vendor_id
-
product_id
-
product_id
-
naxes
-
naxes
-
nbuttons
-
nbuttons
-
nballs
-
nballs
-
nhats
-
nhats
-
ntouchpads
-
ntouchpads
-
nsensors
-
nsensors
-
padding2
-
padding2
-
padding2Raw
-
button_mask
-
button_mask
-
axis_mask
-
axis_mask
-
name
Note: the returnedBytePtr
does not have correctBytePtr.size()
property. It's up to user to track the size of the buffer, and useBytePtr.reinterpret(long)
to set the size before actually reading from or writing to the buffer. -
name
-
nameRaw
-
nameRaw
-
touchpads
public SDL_VirtualJoystickDesc touchpads(@Nullable @Nullable ISDL_VirtualJoystickTouchpadDesc value) -
touchpads
-
touchpads
-
touchpadsRaw
-
touchpadsRaw
public void touchpadsRaw(@Pointer(target=SDL_VirtualJoystickTouchpadDesc.class) MemorySegment value) -
sensors
-
sensors
-
sensors
-
sensorsRaw
-
sensorsRaw
-
userdata
-
userdata
-
userdata
-
Update
-
Update
-
Update
-
SetPlayerIndex
@Pointer(comment="PFN_SDL_VirtualJoystickDesc_SetPlayerIndex") public MemorySegment SetPlayerIndex() -
SetPlayerIndex
public void SetPlayerIndex(@Pointer(comment="PFN_SDL_VirtualJoystickDesc_SetPlayerIndex") MemorySegment value) -
SetPlayerIndex
-
Rumble
-
Rumble
-
Rumble
-
RumbleTriggers
@Pointer(comment="PFN_SDL_VirtualJoystickDesc_RumbleTriggers") public MemorySegment RumbleTriggers() -
RumbleTriggers
public void RumbleTriggers(@Pointer(comment="PFN_SDL_VirtualJoystickDesc_RumbleTriggers") MemorySegment value) -
RumbleTriggers
-
SetLED
-
SetLED
-
SetLED
-
SendEffect
-
SendEffect
public void SendEffect(@Pointer(comment="PFN_SDL_VirtualJoystickDesc_SendEffect") MemorySegment value) -
SendEffect
-
SetSensorsEnabled
@Pointer(comment="PFN_SDL_VirtualJoystickDesc_SetSensorsEnabled") public MemorySegment SetSensorsEnabled() -
SetSensorsEnabled
public void SetSensorsEnabled(@Pointer(comment="PFN_SDL_VirtualJoystickDesc_SetSensorsEnabled") MemorySegment value) -
SetSensorsEnabled
-
Cleanup
-
Cleanup
-
Cleanup
-
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.
-