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.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The 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_GamepadBinding
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_GamepadBinding
calloc()
Returns a newSDL_GamepadBinding
instance allocated withmemCalloc
.static SDL_GamepadBinding.Buffer
calloc
(int capacity) Returns a newSDL_GamepadBinding.Buffer
instance allocated withmemCalloc
.static SDL_GamepadBinding.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSDL_GamepadBinding.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_GamepadBinding
calloc
(MemoryStack stack) Returns a newSDL_GamepadBinding
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_GamepadBinding
create()
Returns a newSDL_GamepadBinding
instance allocated withBufferUtils
.static SDL_GamepadBinding.Buffer
create
(int capacity) Returns a newSDL_GamepadBinding.Buffer
instance allocated withBufferUtils
.static SDL_GamepadBinding
create
(long address) Returns a newSDL_GamepadBinding
instance for the specified memory address.static SDL_GamepadBinding.Buffer
create
(long address, int capacity) Create aSDL_GamepadBinding.Buffer
instance at the specified memory.static @Nullable SDL_GamepadBinding
createSafe
(long address) static @Nullable SDL_GamepadBinding.Buffer
createSafe
(long address, int capacity) int
input_axis_axis
(int value) Sets the specified value to theaxis
field.int
input_axis_axis_max
(int value) Sets the specified value to theaxis_max
field.int
input_axis_axis_min
(int value) Sets the specified value to theaxis_min
field.int
input_button
(int value) Sets the specified value to thebutton
field.int
input_hat_hat
(int value) Sets the specified value to thehat
field.int
input_hat_hat_mask
(int value) Sets the specified value to thehat_mask
field.int
input_type
(int value) Sets the specified value to theinput_type
field.static SDL_GamepadBinding
malloc()
Returns a newSDL_GamepadBinding
instance allocated withmemAlloc
.static SDL_GamepadBinding.Buffer
malloc
(int capacity) Returns a newSDL_GamepadBinding.Buffer
instance allocated withmemAlloc
.static SDL_GamepadBinding.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSDL_GamepadBinding.Buffer
instance allocated on the specifiedMemoryStack
.static SDL_GamepadBinding
malloc
(MemoryStack stack) Returns a newSDL_GamepadBinding
instance allocated on the specifiedMemoryStack
.static int
ninput_axis_axis
(long struct) Unsafe version ofinput_axis_axis()
.static void
ninput_axis_axis
(long struct, int value) Unsafe version ofinput_axis_axis
.static int
ninput_axis_axis_max
(long struct) Unsafe version ofinput_axis_axis_max()
.static void
ninput_axis_axis_max
(long struct, int value) Unsafe version ofinput_axis_axis_max
.static int
ninput_axis_axis_min
(long struct) Unsafe version ofinput_axis_axis_min()
.static void
ninput_axis_axis_min
(long struct, int value) Unsafe version ofinput_axis_axis_min
.static int
ninput_button
(long struct) Unsafe version ofinput_button()
.static void
ninput_button
(long struct, int value) Unsafe version ofinput_button
.static int
ninput_hat_hat
(long struct) Unsafe version ofinput_hat_hat()
.static void
ninput_hat_hat
(long struct, int value) Unsafe version ofinput_hat_hat
.static int
ninput_hat_hat_mask
(long struct) Unsafe version ofinput_hat_hat_mask()
.static void
ninput_hat_hat_mask
(long struct, int value) Unsafe version ofinput_hat_hat_mask
.static int
ninput_type
(long struct) Unsafe version ofinput_type()
.static void
ninput_type
(long struct, int value) Unsafe version ofinput_type
.static int
noutput_axis_axis
(long struct) Unsafe version ofoutput_axis_axis()
.static void
noutput_axis_axis
(long struct, int value) Unsafe version ofoutput_axis_axis
.static int
noutput_axis_axis_max
(long struct) Unsafe version ofoutput_axis_axis_max()
.static void
noutput_axis_axis_max
(long struct, int value) Unsafe version ofoutput_axis_axis_max
.static int
noutput_axis_axis_min
(long struct) Unsafe version ofoutput_axis_axis_min()
.static void
noutput_axis_axis_min
(long struct, int value) Unsafe version ofoutput_axis_axis_min
.static int
noutput_button
(long struct) Unsafe version ofoutput_button()
.static void
noutput_button
(long struct, int value) Unsafe version ofoutput_button
.static int
noutput_type
(long struct) Unsafe version ofoutput_type()
.static void
noutput_type
(long struct, int value) Unsafe version ofoutput_type
.int
output_axis_axis
(int value) Sets the specified value to theaxis
field.int
output_axis_axis_max
(int value) Sets the specified value to theaxis_max
field.int
output_axis_axis_min
(int value) Sets the specified value to theaxis_min
field.int
output_button
(int value) Sets the specified value to thebutton
field.int
output_type
(int value) Sets the specified value to theoutput_type
field.set
(SDL_GamepadBinding src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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_GamepadBinding
instance at the current position of the specifiedByteBuffer
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
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<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
Sets the specified value to theinput_type
field. -
input_button
Sets the specified value to thebutton
field. -
input_axis_axis
Sets the specified value to theaxis
field. -
input_axis_axis_min
Sets the specified value to theaxis_min
field. -
input_axis_axis_max
Sets the specified value to theaxis_max
field. -
input_hat_hat
Sets the specified value to thehat
field. -
input_hat_hat_mask
Sets the specified value to thehat_mask
field. -
output_type
Sets the specified value to theoutput_type
field. -
output_button
Sets the specified value to thebutton
field. -
output_axis_axis
Sets the specified value to theaxis
field. -
output_axis_axis_min
Sets the specified value to theaxis_min
field. -
output_axis_axis_max
Sets the specified value to theaxis_max
field. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newSDL_GamepadBinding
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSDL_GamepadBinding
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSDL_GamepadBinding
instance allocated withBufferUtils
. -
create
Returns a newSDL_GamepadBinding
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_GamepadBinding.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSDL_GamepadBinding.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSDL_GamepadBinding.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSDL_GamepadBinding.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_GamepadBinding
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSDL_GamepadBinding
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSDL_GamepadBinding.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSDL_GamepadBinding.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-