Record Class SDL_HapticLeftRight
- All Implemented Interfaces:
IPointer
,ISDL_HapticLeftRight
A structure containing a template for a Left/Right effect.
This struct is exclusively for the SDL_HAPTIC_LEFTRIGHT effect.
The Left/Right effect is used to explicitly control the large and small motors, commonly found in modern game controllers. The small (right) motor is high frequency, and the large (left) motor is low frequency.
Since: This struct is available since SDL 3.2.0.
See also:
SDL_HAPTIC_LEFTRIGHT
SDL_HapticEffect
Structure
typedef struct SDL_HapticLeftRight {
Uint16 type
;
Uint32 length
;
Uint16 large_magnitude
;
Uint16 small_magnitude
;
} SDL_HapticLeftRight;
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.OfShort
static final ValueLayout.OfInt
static final ValueLayout.OfShort
static final ValueLayout.OfShort
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 long
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionSDL_HapticLeftRight
(@NotNull MemorySegment segment) Creates an instance of aSDL_HapticLeftRight
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_HapticLeftRight
static SDL_HapticLeftRight.Ptr
static SDL_HapticLeftRight
clone
(Arena arena, SDL_HapticLeftRight src) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.short
large_magnitude
(short value) int
length()
length
(int value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.short
small_magnitude
(short value) final String
toString()
Returns a string representation of this record class.short
type()
type
(short value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$type
-
PATH$length
-
PATH$large_magnitude
-
PATH$small_magnitude
-
LAYOUT$type
-
LAYOUT$length
-
LAYOUT$large_magnitude
-
LAYOUT$small_magnitude
-
SIZE$type
public static final long SIZE$type -
SIZE$length
public static final long SIZE$length -
SIZE$large_magnitude
public static final long SIZE$large_magnitude -
SIZE$small_magnitude
public static final long SIZE$small_magnitude -
OFFSET$type
public static final long OFFSET$type -
OFFSET$length
public static final long OFFSET$length -
OFFSET$large_magnitude
public static final long OFFSET$large_magnitude -
OFFSET$small_magnitude
public static final long OFFSET$small_magnitude
-
-
Constructor Details
-
SDL_HapticLeftRight
Creates an instance of aSDL_HapticLeftRight
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
type
-
type
-
length
-
length
-
large_magnitude
-
large_magnitude
-
small_magnitude
-
small_magnitude
-
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.
-