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_LEFTRIGHTSDL_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 recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final ValueLayout.OfShortstatic final ValueLayout.OfIntstatic final ValueLayout.OfShortstatic final ValueLayout.OfShortstatic final longstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSDL_HapticLeftRight(@NotNull MemorySegment segment) Creates an instance of aSDL_HapticLeftRightrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_HapticLeftRightstatic SDL_HapticLeftRight.Ptrstatic SDL_HapticLeftRightclone(Arena arena, SDL_HapticLeftRight src) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.shortlarge_magnitude(short value) intlength()length(int value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.shortsmall_magnitude(short value) final StringtoString()Returns a string representation of this record class.shorttype()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_HapticLeftRightrecord class.- Parameters:
segment- the value for thesegmentrecord 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 thesegmentrecord component.
-