Package org.lwjgl.sdl
Class SDL_GamepadBinding
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
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;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionSDL_GamepadBinding(ByteBuffer container) Creates aSDL_GamepadBindinginstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_GamepadBindingcalloc()Returns a newSDL_GamepadBindinginstance allocated withmemCalloc.static SDL_GamepadBinding.Buffercalloc(int capacity) Returns a newSDL_GamepadBinding.Bufferinstance allocated withmemCalloc.static SDL_GamepadBinding.Buffercalloc(int capacity, MemoryStack stack) Returns a newSDL_GamepadBinding.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_GamepadBindingcalloc(MemoryStack stack) Returns a newSDL_GamepadBindinginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_GamepadBindingcreate()Returns a newSDL_GamepadBindinginstance allocated withBufferUtils.static SDL_GamepadBinding.Buffercreate(int capacity) Returns a newSDL_GamepadBinding.Bufferinstance allocated withBufferUtils.static SDL_GamepadBindingcreate(long address) Returns a newSDL_GamepadBindinginstance for the specified memory address.static SDL_GamepadBinding.Buffercreate(long address, int capacity) Create aSDL_GamepadBinding.Bufferinstance at the specified memory.static @Nullable SDL_GamepadBindingcreateSafe(long address) static @Nullable SDL_GamepadBinding.BuffercreateSafe(long address, int capacity) intinput_axis_axis(int value) Sets the specified value to theaxisfield.intinput_axis_axis_max(int value) Sets the specified value to theaxis_maxfield.intinput_axis_axis_min(int value) Sets the specified value to theaxis_minfield.intinput_button(int value) Sets the specified value to thebuttonfield.intinput_hat_hat(int value) Sets the specified value to thehatfield.intinput_hat_hat_mask(int value) Sets the specified value to thehat_maskfield.intinput_type(int value) Sets the specified value to theinput_typefield.static SDL_GamepadBindingmalloc()Returns a newSDL_GamepadBindinginstance allocated withmemAlloc.static SDL_GamepadBinding.Buffermalloc(int capacity) Returns a newSDL_GamepadBinding.Bufferinstance allocated withmemAlloc.static SDL_GamepadBinding.Buffermalloc(int capacity, MemoryStack stack) Returns a newSDL_GamepadBinding.Bufferinstance allocated on the specifiedMemoryStack.static SDL_GamepadBindingmalloc(MemoryStack stack) Returns a newSDL_GamepadBindinginstance allocated on the specifiedMemoryStack.static intninput_axis_axis(long struct) Unsafe version ofinput_axis_axis().static voidninput_axis_axis(long struct, int value) Unsafe version ofinput_axis_axis.static intninput_axis_axis_max(long struct) Unsafe version ofinput_axis_axis_max().static voidninput_axis_axis_max(long struct, int value) Unsafe version ofinput_axis_axis_max.static intninput_axis_axis_min(long struct) Unsafe version ofinput_axis_axis_min().static voidninput_axis_axis_min(long struct, int value) Unsafe version ofinput_axis_axis_min.static intninput_button(long struct) Unsafe version ofinput_button().static voidninput_button(long struct, int value) Unsafe version ofinput_button.static intninput_hat_hat(long struct) Unsafe version ofinput_hat_hat().static voidninput_hat_hat(long struct, int value) Unsafe version ofinput_hat_hat.static intninput_hat_hat_mask(long struct) Unsafe version ofinput_hat_hat_mask().static voidninput_hat_hat_mask(long struct, int value) Unsafe version ofinput_hat_hat_mask.static intninput_type(long struct) Unsafe version ofinput_type().static voidninput_type(long struct, int value) Unsafe version ofinput_type.static intnoutput_axis_axis(long struct) Unsafe version ofoutput_axis_axis().static voidnoutput_axis_axis(long struct, int value) Unsafe version ofoutput_axis_axis.static intnoutput_axis_axis_max(long struct) Unsafe version ofoutput_axis_axis_max().static voidnoutput_axis_axis_max(long struct, int value) Unsafe version ofoutput_axis_axis_max.static intnoutput_axis_axis_min(long struct) Unsafe version ofoutput_axis_axis_min().static voidnoutput_axis_axis_min(long struct, int value) Unsafe version ofoutput_axis_axis_min.static intnoutput_button(long struct) Unsafe version ofoutput_button().static voidnoutput_button(long struct, int value) Unsafe version ofoutput_button.static intnoutput_type(long struct) Unsafe version ofoutput_type().static voidnoutput_type(long struct, int value) Unsafe version ofoutput_type.intoutput_axis_axis(int value) Sets the specified value to theaxisfield.intoutput_axis_axis_max(int value) Sets the specified value to theaxis_maxfield.intoutput_axis_axis_min(int value) Sets the specified value to theaxis_minfield.intoutput_button(int value) Sets the specified value to thebuttonfield.intoutput_type(int value) Sets the specified value to theoutput_typefield.set(SDL_GamepadBinding src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
INPUT_TYPE
public static final int INPUT_TYPEThe struct member offsets. -
INPUT
public static final int INPUTThe struct member offsets. -
INPUT_BUTTON
public static final int INPUT_BUTTONThe struct member offsets. -
INPUT_AXIS
public static final int INPUT_AXISThe struct member offsets. -
INPUT_AXIS_AXIS
public static final int INPUT_AXIS_AXISThe struct member offsets. -
INPUT_AXIS_AXIS_MIN
public static final int INPUT_AXIS_AXIS_MINThe struct member offsets. -
INPUT_AXIS_AXIS_MAX
public static final int INPUT_AXIS_AXIS_MAXThe struct member offsets. -
INPUT_HAT
public static final int INPUT_HATThe struct member offsets. -
INPUT_HAT_HAT
public static final int INPUT_HAT_HATThe struct member offsets. -
INPUT_HAT_HAT_MASK
public static final int INPUT_HAT_HAT_MASKThe struct member offsets. -
OUTPUT_TYPE
public static final int OUTPUT_TYPEThe struct member offsets. -
OUTPUT
public static final int OUTPUTThe struct member offsets. -
OUTPUT_BUTTON
public static final int OUTPUT_BUTTONThe struct member offsets. -
OUTPUT_AXIS
public static final int OUTPUT_AXISThe struct member offsets. -
OUTPUT_AXIS_AXIS
public static final int OUTPUT_AXIS_AXISThe struct member offsets. -
OUTPUT_AXIS_AXIS_MIN
public static final int OUTPUT_AXIS_AXIS_MINThe struct member offsets. -
OUTPUT_AXIS_AXIS_MAX
public static final int OUTPUT_AXIS_AXIS_MAXThe struct member offsets.
-
-
Constructor Details
-
SDL_GamepadBinding
Creates aSDL_GamepadBindinginstance at the current position of the specifiedByteBuffercontainer. 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:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<SDL_GamepadBinding>
-
input_type
public int input_type()- Returns:
- the value of the
input_typefield.
-
input_button
public int input_button()- Returns:
- the value of the
input.buttonfield.
-
input_axis_axis
public int input_axis_axis()- Returns:
- the value of the
input.axis.axisfield.
-
input_axis_axis_min
public int input_axis_axis_min()- Returns:
- the value of the
input.axis.axis_minfield.
-
input_axis_axis_max
public int input_axis_axis_max()- Returns:
- the value of the
input.axis.axis_maxfield.
-
input_hat_hat
public int input_hat_hat()- Returns:
- the value of the
input.hat.hatfield.
-
input_hat_hat_mask
public int input_hat_hat_mask()- Returns:
- the value of the
input.hat.hat_maskfield.
-
output_type
public int output_type()- Returns:
- the value of the
output_typefield.
-
output_button
public int output_button()- Returns:
- the value of the
output.buttonfield.
-
output_axis_axis
public int output_axis_axis()- Returns:
- the value of the
output.axis.axisfield.
-
output_axis_axis_min
public int output_axis_axis_min()- Returns:
- the value of the
output.axis.axis_minfield.
-
output_axis_axis_max
public int output_axis_axis_max()- Returns:
- the value of the
output.axis.axis_maxfield.
-
input_type
Sets the specified value to theinput_typefield. -
input_button
Sets the specified value to thebuttonfield. -
input_axis_axis
Sets the specified value to theaxisfield. -
input_axis_axis_min
Sets the specified value to theaxis_minfield. -
input_axis_axis_max
Sets the specified value to theaxis_maxfield. -
input_hat_hat
Sets the specified value to thehatfield. -
input_hat_hat_mask
Sets the specified value to thehat_maskfield. -
output_type
Sets the specified value to theoutput_typefield. -
output_button
Sets the specified value to thebuttonfield. -
output_axis_axis
Sets the specified value to theaxisfield. -
output_axis_axis_min
Sets the specified value to theaxis_minfield. -
output_axis_axis_max
Sets the specified value to theaxis_maxfield. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newSDL_GamepadBindinginstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSDL_GamepadBindinginstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSDL_GamepadBindinginstance allocated withBufferUtils. -
create
Returns a newSDL_GamepadBindinginstance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_GamepadBinding.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSDL_GamepadBinding.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSDL_GamepadBinding.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSDL_GamepadBinding.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_GamepadBindinginstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSDL_GamepadBindinginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSDL_GamepadBinding.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSDL_GamepadBinding.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ninput_type
public static int ninput_type(long struct) Unsafe version ofinput_type(). -
ninput_button
public static int ninput_button(long struct) Unsafe version ofinput_button(). -
ninput_axis_axis
public static int ninput_axis_axis(long struct) Unsafe version ofinput_axis_axis(). -
ninput_axis_axis_min
public static int ninput_axis_axis_min(long struct) Unsafe version ofinput_axis_axis_min(). -
ninput_axis_axis_max
public static int ninput_axis_axis_max(long struct) Unsafe version ofinput_axis_axis_max(). -
ninput_hat_hat
public static int ninput_hat_hat(long struct) Unsafe version ofinput_hat_hat(). -
ninput_hat_hat_mask
public static int ninput_hat_hat_mask(long struct) Unsafe version ofinput_hat_hat_mask(). -
noutput_type
public static int noutput_type(long struct) Unsafe version ofoutput_type(). -
noutput_button
public static int noutput_button(long struct) Unsafe version ofoutput_button(). -
noutput_axis_axis
public static int noutput_axis_axis(long struct) Unsafe version ofoutput_axis_axis(). -
noutput_axis_axis_min
public static int noutput_axis_axis_min(long struct) Unsafe version ofoutput_axis_axis_min(). -
noutput_axis_axis_max
public static int noutput_axis_axis_max(long struct) Unsafe version ofoutput_axis_axis_max(). -
ninput_type
public static void ninput_type(long struct, int value) Unsafe version ofinput_type. -
ninput_button
public static void ninput_button(long struct, int value) Unsafe version ofinput_button. -
ninput_axis_axis
public static void ninput_axis_axis(long struct, int value) Unsafe version ofinput_axis_axis. -
ninput_axis_axis_min
public static void ninput_axis_axis_min(long struct, int value) Unsafe version ofinput_axis_axis_min. -
ninput_axis_axis_max
public static void ninput_axis_axis_max(long struct, int value) Unsafe version ofinput_axis_axis_max. -
ninput_hat_hat
public static void ninput_hat_hat(long struct, int value) Unsafe version ofinput_hat_hat. -
ninput_hat_hat_mask
public static void ninput_hat_hat_mask(long struct, int value) Unsafe version ofinput_hat_hat_mask. -
noutput_type
public static void noutput_type(long struct, int value) Unsafe version ofoutput_type. -
noutput_button
public static void noutput_button(long struct, int value) Unsafe version ofoutput_button. -
noutput_axis_axis
public static void noutput_axis_axis(long struct, int value) Unsafe version ofoutput_axis_axis. -
noutput_axis_axis_min
public static void noutput_axis_axis_min(long struct, int value) Unsafe version ofoutput_axis_axis_min. -
noutput_axis_axis_max
public static void noutput_axis_axis_max(long struct, int value) Unsafe version ofoutput_axis_axis_max.
-