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_AttachVirtualJoystickSDL_INIT_INTERFACESDL_VirtualJoystickSensorDescSDL_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 recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final AddressLayoutstatic final AddressLayoutstatic final ValueLayout.OfShortstatic final ValueLayout.OfShortstatic final ValueLayout.OfShortstatic final ValueLayout.OfShortstatic final ValueLayout.OfShortstatic final ValueLayout.OfShortstatic final ValueLayout.OfShortstatic final SequenceLayoutstatic final ValueLayout.OfShortstatic final AddressLayoutstatic final AddressLayoutstatic final AddressLayoutstatic final AddressLayoutstatic final AddressLayoutstatic final AddressLayoutstatic final AddressLayoutstatic final AddressLayoutstatic final ValueLayout.OfShortstatic final AddressLayoutstatic final AddressLayoutstatic final ValueLayout.OfShortstatic final ValueLayout.OfIntstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSDL_VirtualJoystickDesc(@NotNull MemorySegment segment) Creates an instance of aSDL_VirtualJoystickDescrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_VirtualJoystickDescstatic SDL_VirtualJoystickDesc.Ptrintaxis_mask(int value) intbutton_mask(int value) Cleanup()voidCleanup(MemorySegment value) static SDL_VirtualJoystickDescclone(Arena arena, SDL_VirtualJoystickDesc src) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable BytePtrname()Note: the returnedBytePtrdoes not have correctBytePtr.size()property.nameRaw()voidnameRaw(MemorySegment value) shortnaxes()naxes(short value) shortnballs()nballs(short value) shortnbuttons()nbuttons(short value) shortnhats()nhats(short value) shortnsensors()nsensors(short value) shortntouchpads(short value) shortpadding()padding(short value) padding2()shortproduct_id(short value) Rumble()voidRumble(MemorySegment value) RumbleTriggers(@Nullable IPointer pointer) voidRumbleTriggers(MemorySegment value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.SendEffect(@Nullable IPointer pointer) voidSendEffect(MemorySegment value) @Nullable SDL_VirtualJoystickSensorDescsensors()sensors(int assumedCount) sensors(@Nullable ISDL_VirtualJoystickSensorDesc value) voidsensorsRaw(MemorySegment value) SetLED()voidSetLED(MemorySegment value) SetPlayerIndex(@Nullable IPointer pointer) voidSetPlayerIndex(MemorySegment value) SetSensorsEnabled(@Nullable IPointer pointer) voidSetSensorsEnabled(MemorySegment value) final StringtoString()Returns a string representation of this record class.@Nullable SDL_VirtualJoystickTouchpadDesctouchpads(int assumedCount) touchpads(@Nullable ISDL_VirtualJoystickTouchpadDesc value) voidtouchpadsRaw(MemorySegment value) shorttype()type(short value) Update()voidUpdate(MemorySegment value) userdata()voiduserdata(MemorySegment value) shortvendor_id(short value) intversion()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_VirtualJoystickDescrecord class.- Parameters:
segment- the value for thesegmentrecord 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 returnedBytePtrdoes 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 thesegmentrecord component.
-