Record Class SDL_HapticLeftRight

java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_HapticLeftRight
All Implemented Interfaces:
IPointer, ISDL_HapticLeftRight

@ValueBasedCandidate @UnsafeConstructor public record SDL_HapticLeftRight(@NotNull MemorySegment segment) extends Record implements 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.

  • Field Details

    • LAYOUT

      public static final StructLayout LAYOUT
    • BYTES

      public static final long BYTES
    • PATH$type

      public static final MemoryLayout.PathElement PATH$type
    • PATH$length

      public static final MemoryLayout.PathElement PATH$length
    • PATH$large_magnitude

      public static final MemoryLayout.PathElement PATH$large_magnitude
    • PATH$small_magnitude

      public static final MemoryLayout.PathElement PATH$small_magnitude
    • LAYOUT$type

      public static final ValueLayout.OfShort LAYOUT$type
    • LAYOUT$length

      public static final ValueLayout.OfInt LAYOUT$length
    • LAYOUT$large_magnitude

      public static final ValueLayout.OfShort LAYOUT$large_magnitude
    • LAYOUT$small_magnitude

      public static final ValueLayout.OfShort 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

      public SDL_HapticLeftRight(@NotNull @NotNull MemorySegment segment)
      Creates an instance of a SDL_HapticLeftRight record class.
      Parameters:
      segment - the value for the segment record component
  • Method Details