Package org.lwjgl.sdl

Class SDL_GamepadBinding

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_GamepadBinding extends Struct<SDL_GamepadBinding> implements NativeResource

 struct SDL_GamepadBinding {
     SDL_GamepadBindingType input_type;
     union {
         int button;
         struct {
             int axis;
             int axis_min;
             int axis_max;
         } axis;
         struct {
             int hat;
             int hat_mask;
         } hat;
     } input;
     SDL_GamepadBindingType output_type;
     union {
         SDL_GamepadButton button;
         struct {
             SDL_GamepadAxis axis;
             int axis_min;
             int axis_max;
         } axis;
     } output;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • INPUT_TYPE

      public static final int INPUT_TYPE
      The struct member offsets.
    • INPUT

      public static final int INPUT
      The struct member offsets.
    • INPUT_BUTTON

      public static final int INPUT_BUTTON
      The struct member offsets.
    • INPUT_AXIS

      public static final int INPUT_AXIS
      The struct member offsets.
    • INPUT_AXIS_AXIS

      public static final int INPUT_AXIS_AXIS
      The struct member offsets.
    • INPUT_AXIS_AXIS_MIN

      public static final int INPUT_AXIS_AXIS_MIN
      The struct member offsets.
    • INPUT_AXIS_AXIS_MAX

      public static final int INPUT_AXIS_AXIS_MAX
      The struct member offsets.
    • INPUT_HAT

      public static final int INPUT_HAT
      The struct member offsets.
    • INPUT_HAT_HAT

      public static final int INPUT_HAT_HAT
      The struct member offsets.
    • INPUT_HAT_HAT_MASK

      public static final int INPUT_HAT_HAT_MASK
      The struct member offsets.
    • OUTPUT_TYPE

      public static final int OUTPUT_TYPE
      The struct member offsets.
    • OUTPUT

      public static final int OUTPUT
      The struct member offsets.
    • OUTPUT_BUTTON

      public static final int OUTPUT_BUTTON
      The struct member offsets.
    • OUTPUT_AXIS

      public static final int OUTPUT_AXIS
      The struct member offsets.
    • OUTPUT_AXIS_AXIS

      public static final int OUTPUT_AXIS_AXIS
      The struct member offsets.
    • OUTPUT_AXIS_AXIS_MIN

      public static final int OUTPUT_AXIS_AXIS_MIN
      The struct member offsets.
    • OUTPUT_AXIS_AXIS_MAX

      public static final int OUTPUT_AXIS_AXIS_MAX
      The struct member offsets.
  • Constructor Details

    • SDL_GamepadBinding

      public SDL_GamepadBinding(ByteBuffer container)
      Creates a SDL_GamepadBinding instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<SDL_GamepadBinding>
    • input_type

      public int input_type()
      Returns:
      the value of the input_type field.
    • input_button

      public int input_button()
      Returns:
      the value of the input.button field.
    • input_axis_axis

      public int input_axis_axis()
      Returns:
      the value of the input.axis.axis field.
    • input_axis_axis_min

      public int input_axis_axis_min()
      Returns:
      the value of the input.axis.axis_min field.
    • input_axis_axis_max

      public int input_axis_axis_max()
      Returns:
      the value of the input.axis.axis_max field.
    • input_hat_hat

      public int input_hat_hat()
      Returns:
      the value of the input.hat.hat field.
    • input_hat_hat_mask

      public int input_hat_hat_mask()
      Returns:
      the value of the input.hat.hat_mask field.
    • output_type

      public int output_type()
      Returns:
      the value of the output_type field.
    • output_button

      public int output_button()
      Returns:
      the value of the output.button field.
    • output_axis_axis

      public int output_axis_axis()
      Returns:
      the value of the output.axis.axis field.
    • output_axis_axis_min

      public int output_axis_axis_min()
      Returns:
      the value of the output.axis.axis_min field.
    • output_axis_axis_max

      public int output_axis_axis_max()
      Returns:
      the value of the output.axis.axis_max field.
    • input_type

      public SDL_GamepadBinding input_type(int value)
      Sets the specified value to the input_type field.
    • input_button

      public SDL_GamepadBinding input_button(int value)
      Sets the specified value to the button field.
    • input_axis_axis

      public SDL_GamepadBinding input_axis_axis(int value)
      Sets the specified value to the axis field.
    • input_axis_axis_min

      public SDL_GamepadBinding input_axis_axis_min(int value)
      Sets the specified value to the axis_min field.
    • input_axis_axis_max

      public SDL_GamepadBinding input_axis_axis_max(int value)
      Sets the specified value to the axis_max field.
    • input_hat_hat

      public SDL_GamepadBinding input_hat_hat(int value)
      Sets the specified value to the hat field.
    • input_hat_hat_mask

      public SDL_GamepadBinding input_hat_hat_mask(int value)
      Sets the specified value to the hat_mask field.
    • output_type

      public SDL_GamepadBinding output_type(int value)
      Sets the specified value to the output_type field.
    • output_button

      public SDL_GamepadBinding output_button(int value)
      Sets the specified value to the button field.
    • output_axis_axis

      public SDL_GamepadBinding output_axis_axis(int value)
      Sets the specified value to the axis field.
    • output_axis_axis_min

      public SDL_GamepadBinding output_axis_axis_min(int value)
      Sets the specified value to the axis_min field.
    • output_axis_axis_max

      public SDL_GamepadBinding output_axis_axis_max(int value)
      Sets the specified value to the axis_max field.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static SDL_GamepadBinding malloc()
      Returns a new SDL_GamepadBinding instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static SDL_GamepadBinding calloc()
      Returns a new SDL_GamepadBinding instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static SDL_GamepadBinding create()
      Returns a new SDL_GamepadBinding instance allocated with BufferUtils.
    • create

      public static SDL_GamepadBinding create(long address)
      Returns a new SDL_GamepadBinding instance for the specified memory address.
    • createSafe

      public static @Nullable SDL_GamepadBinding createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static SDL_GamepadBinding.Buffer malloc(int capacity)
      Returns a new SDL_GamepadBinding.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static SDL_GamepadBinding.Buffer calloc(int capacity)
      Returns a new SDL_GamepadBinding.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static SDL_GamepadBinding.Buffer create(int capacity)
      Returns a new SDL_GamepadBinding.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static SDL_GamepadBinding.Buffer create(long address, int capacity)
      Create a SDL_GamepadBinding.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable SDL_GamepadBinding.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static SDL_GamepadBinding malloc(MemoryStack stack)
      Returns a new SDL_GamepadBinding instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static SDL_GamepadBinding calloc(MemoryStack stack)
      Returns a new SDL_GamepadBinding instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static SDL_GamepadBinding.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new SDL_GamepadBinding.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static SDL_GamepadBinding.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new SDL_GamepadBinding.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ninput_type

      public static int ninput_type(long struct)
      Unsafe version of input_type().
    • ninput_button

      public static int ninput_button(long struct)
      Unsafe version of input_button().
    • ninput_axis_axis

      public static int ninput_axis_axis(long struct)
      Unsafe version of input_axis_axis().
    • ninput_axis_axis_min

      public static int ninput_axis_axis_min(long struct)
      Unsafe version of input_axis_axis_min().
    • ninput_axis_axis_max

      public static int ninput_axis_axis_max(long struct)
      Unsafe version of input_axis_axis_max().
    • ninput_hat_hat

      public static int ninput_hat_hat(long struct)
      Unsafe version of input_hat_hat().
    • ninput_hat_hat_mask

      public static int ninput_hat_hat_mask(long struct)
      Unsafe version of input_hat_hat_mask().
    • noutput_type

      public static int noutput_type(long struct)
      Unsafe version of output_type().
    • noutput_button

      public static int noutput_button(long struct)
      Unsafe version of output_button().
    • noutput_axis_axis

      public static int noutput_axis_axis(long struct)
      Unsafe version of output_axis_axis().
    • noutput_axis_axis_min

      public static int noutput_axis_axis_min(long struct)
      Unsafe version of output_axis_axis_min().
    • noutput_axis_axis_max

      public static int noutput_axis_axis_max(long struct)
      Unsafe version of output_axis_axis_max().
    • ninput_type

      public static void ninput_type(long struct, int value)
      Unsafe version of input_type.
    • ninput_button

      public static void ninput_button(long struct, int value)
      Unsafe version of input_button.
    • ninput_axis_axis

      public static void ninput_axis_axis(long struct, int value)
      Unsafe version of input_axis_axis.
    • ninput_axis_axis_min

      public static void ninput_axis_axis_min(long struct, int value)
      Unsafe version of input_axis_axis_min.
    • ninput_axis_axis_max

      public static void ninput_axis_axis_max(long struct, int value)
      Unsafe version of input_axis_axis_max.
    • ninput_hat_hat

      public static void ninput_hat_hat(long struct, int value)
      Unsafe version of input_hat_hat.
    • ninput_hat_hat_mask

      public static void ninput_hat_hat_mask(long struct, int value)
      Unsafe version of input_hat_hat_mask.
    • noutput_type

      public static void noutput_type(long struct, int value)
      Unsafe version of output_type.
    • noutput_button

      public static void noutput_button(long struct, int value)
      Unsafe version of output_button.
    • noutput_axis_axis

      public static void noutput_axis_axis(long struct, int value)
      Unsafe version of output_axis_axis.
    • noutput_axis_axis_min

      public static void noutput_axis_axis_min(long struct, int value)
      Unsafe version of output_axis_axis_min.
    • noutput_axis_axis_max

      public static void noutput_axis_axis_max(long struct, int value)
      Unsafe version of output_axis_axis_max.