Package org.lwjgl.sdl
Class SDL_hid_device_info
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct SDL_hid_device_info {
char * path;
unsigned short vendor_id;
unsigned short product_id;
wchar_t * serial_number;
unsigned short release_number;
wchar_t * manufacturer_string;
wchar_t * product_string;
unsigned short usage_page;
unsigned short usage;
int interface_number;
int interface_class;
int interface_subclass;
int interface_protocol;
SDL_hid_bus_type bus_type;
SDL_hid_device_info * next;
}-
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 size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionSDL_hid_device_info(ByteBuffer container) Creates aSDL_hid_device_infoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintbus_type()bus_type(int value) Sets the specified value to thebus_typefield.static SDL_hid_device_infocalloc()Returns a newSDL_hid_device_infoinstance allocated withmemCalloc.static SDL_hid_device_info.Buffercalloc(int capacity) Returns a newSDL_hid_device_info.Bufferinstance allocated withmemCalloc.static SDL_hid_device_info.Buffercalloc(int capacity, MemoryStack stack) Returns a newSDL_hid_device_info.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_hid_device_infocalloc(MemoryStack stack) Returns a newSDL_hid_device_infoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_hid_device_infocreate()Returns a newSDL_hid_device_infoinstance allocated withBufferUtils.static SDL_hid_device_info.Buffercreate(int capacity) Returns a newSDL_hid_device_info.Bufferinstance allocated withBufferUtils.static SDL_hid_device_infocreate(long address) Returns a newSDL_hid_device_infoinstance for the specified memory address.static SDL_hid_device_info.Buffercreate(long address, int capacity) Create aSDL_hid_device_info.Bufferinstance at the specified memory.static @Nullable SDL_hid_device_infocreateSafe(long address) static @Nullable SDL_hid_device_info.BuffercreateSafe(long address, int capacity) intinterface_class(int value) Sets the specified value to theinterface_classfield.intinterface_number(int value) Sets the specified value to theinterface_numberfield.intinterface_protocol(int value) Sets the specified value to theinterface_protocolfield.intinterface_subclass(int value) Sets the specified value to theinterface_subclassfield.static SDL_hid_device_infomalloc()Returns a newSDL_hid_device_infoinstance allocated withmemAlloc.static SDL_hid_device_info.Buffermalloc(int capacity) Returns a newSDL_hid_device_info.Bufferinstance allocated withmemAlloc.static SDL_hid_device_info.Buffermalloc(int capacity, MemoryStack stack) Returns a newSDL_hid_device_info.Bufferinstance allocated on the specifiedMemoryStack.static SDL_hid_device_infomalloc(MemoryStack stack) Returns a newSDL_hid_device_infoinstance allocated on the specifiedMemoryStack.manufacturer_string(ByteBuffer value) Sets the address of the specified encoded string to themanufacturer_stringfield.static intnbus_type(long struct) Unsafe version ofbus_type().static voidnbus_type(long struct, int value) Unsafe version ofbus_type.next()next(SDL_hid_device_info value) Sets the address of the specifiedSDL_hid_device_infoto thenextfield.static intninterface_class(long struct) Unsafe version ofinterface_class().static voidninterface_class(long struct, int value) Unsafe version ofinterface_class.static intninterface_number(long struct) Unsafe version ofinterface_number().static voidninterface_number(long struct, int value) Unsafe version ofinterface_number.static intninterface_protocol(long struct) Unsafe version ofinterface_protocol().static voidninterface_protocol(long struct, int value) Unsafe version ofinterface_protocol.static intninterface_subclass(long struct) Unsafe version ofinterface_subclass().static voidninterface_subclass(long struct, int value) Unsafe version ofinterface_subclass.static ByteBuffernmanufacturer_string(long struct) Unsafe version ofmanufacturer_string().static voidnmanufacturer_string(long struct, ByteBuffer value) Unsafe version ofmanufacturer_string.static Stringnmanufacturer_stringString(long struct) Unsafe version ofmanufacturer_stringString().static SDL_hid_device_infonnext(long struct) Unsafe version ofnext().static voidnnext(long struct, SDL_hid_device_info value) Unsafe version ofnext.static ByteBuffernpath(long struct) Unsafe version ofpath().static voidnpath(long struct, ByteBuffer value) Unsafe version ofpath.static StringnpathString(long struct) Unsafe version ofpathString().static shortnproduct_id(long struct) Unsafe version ofproduct_id().static voidnproduct_id(long struct, short value) Unsafe version ofproduct_id.static ByteBuffernproduct_string(long struct) Unsafe version ofproduct_string().static voidnproduct_string(long struct, ByteBuffer value) Unsafe version ofproduct_string.static Stringnproduct_stringString(long struct) Unsafe version ofproduct_stringString().static shortnrelease_number(long struct) Unsafe version ofrelease_number().static voidnrelease_number(long struct, short value) Unsafe version ofrelease_number.static ByteBuffernserial_number(long struct) Unsafe version ofserial_number().static voidnserial_number(long struct, ByteBuffer value) Unsafe version ofserial_number.static Stringnserial_numberString(long struct) Unsafe version ofserial_numberString().static shortnusage(long struct) Unsafe version ofusage().static voidnusage(long struct, short value) Unsafe version ofusage.static shortnusage_page(long struct) Unsafe version ofusage_page().static voidnusage_page(long struct, short value) Unsafe version ofusage_page.static shortnvendor_id(long struct) Unsafe version ofvendor_id().static voidnvendor_id(long struct, short value) Unsafe version ofvendor_id.path()path(ByteBuffer value) Sets the address of the specified encoded string to thepathfield.shortproduct_id(short value) Sets the specified value to theproduct_idfield.product_string(ByteBuffer value) Sets the address of the specified encoded string to theproduct_stringfield.shortrelease_number(short value) Sets the specified value to therelease_numberfield.serial_number(ByteBuffer value) Sets the address of the specified encoded string to theserial_numberfield.set(ByteBuffer path, short vendor_id, short product_id, ByteBuffer serial_number, short release_number, ByteBuffer manufacturer_string, ByteBuffer product_string, short usage_page, short usage, int interface_number, int interface_class, int interface_subclass, int interface_protocol, int bus_type, SDL_hid_device_info next) Initializes this struct with the specified values.set(SDL_hid_device_info src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).shortusage()usage(short value) Sets the specified value to theusagefield.shortusage_page(short value) Sets the specified value to theusage_pagefield.static voidvalidate(long struct) Validates pointer members that should not beNULL.shortvendor_id(short value) Sets the specified value to thevendor_idfield.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. -
PATH
public static final int PATHThe struct member offsets. -
VENDOR_ID
public static final int VENDOR_IDThe struct member offsets. -
PRODUCT_ID
public static final int PRODUCT_IDThe struct member offsets. -
SERIAL_NUMBER
public static final int SERIAL_NUMBERThe struct member offsets. -
RELEASE_NUMBER
public static final int RELEASE_NUMBERThe struct member offsets. -
MANUFACTURER_STRING
public static final int MANUFACTURER_STRINGThe struct member offsets. -
PRODUCT_STRING
public static final int PRODUCT_STRINGThe struct member offsets. -
USAGE_PAGE
public static final int USAGE_PAGEThe struct member offsets. -
USAGE
public static final int USAGEThe struct member offsets. -
INTERFACE_NUMBER
public static final int INTERFACE_NUMBERThe struct member offsets. -
INTERFACE_CLASS
public static final int INTERFACE_CLASSThe struct member offsets. -
INTERFACE_SUBCLASS
public static final int INTERFACE_SUBCLASSThe struct member offsets. -
INTERFACE_PROTOCOL
public static final int INTERFACE_PROTOCOLThe struct member offsets. -
BUS_TYPE
public static final int BUS_TYPEThe struct member offsets. -
NEXT
public static final int NEXTThe struct member offsets.
-
-
Constructor Details
-
SDL_hid_device_info
Creates aSDL_hid_device_infoinstance 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_hid_device_info>
-
path
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by thepathfield.
-
pathString
- Returns:
- the null-terminated string pointed to by the
pathfield.
-
vendor_id
public short vendor_id()- Returns:
- the value of the
vendor_idfield.
-
product_id
public short product_id()- Returns:
- the value of the
product_idfield.
-
serial_number
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by theserial_numberfield.
-
serial_numberString
- Returns:
- the null-terminated string pointed to by the
serial_numberfield.
-
release_number
public short release_number()- Returns:
- the value of the
release_numberfield.
-
manufacturer_string
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by themanufacturer_stringfield.
-
manufacturer_stringString
- Returns:
- the null-terminated string pointed to by the
manufacturer_stringfield.
-
product_string
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by theproduct_stringfield.
-
product_stringString
- Returns:
- the null-terminated string pointed to by the
product_stringfield.
-
usage_page
public short usage_page()- Returns:
- the value of the
usage_pagefield.
-
usage
public short usage()- Returns:
- the value of the
usagefield.
-
interface_number
public int interface_number()- Returns:
- the value of the
interface_numberfield.
-
interface_class
public int interface_class()- Returns:
- the value of the
interface_classfield.
-
interface_subclass
public int interface_subclass()- Returns:
- the value of the
interface_subclassfield.
-
interface_protocol
public int interface_protocol()- Returns:
- the value of the
interface_protocolfield.
-
bus_type
public int bus_type()- Returns:
- the value of the
bus_typefield.
-
next
- Returns:
- a
SDL_hid_device_infoview of the struct pointed to by thenextfield.
-
path
Sets the address of the specified encoded string to thepathfield. -
vendor_id
Sets the specified value to thevendor_idfield. -
product_id
Sets the specified value to theproduct_idfield. -
serial_number
Sets the address of the specified encoded string to theserial_numberfield. -
release_number
Sets the specified value to therelease_numberfield. -
manufacturer_string
Sets the address of the specified encoded string to themanufacturer_stringfield. -
product_string
Sets the address of the specified encoded string to theproduct_stringfield. -
usage_page
Sets the specified value to theusage_pagefield. -
usage
Sets the specified value to theusagefield. -
interface_number
Sets the specified value to theinterface_numberfield. -
interface_class
Sets the specified value to theinterface_classfield. -
interface_subclass
Sets the specified value to theinterface_subclassfield. -
interface_protocol
Sets the specified value to theinterface_protocolfield. -
bus_type
Sets the specified value to thebus_typefield. -
next
Sets the address of the specifiedSDL_hid_device_infoto thenextfield. -
set
public SDL_hid_device_info set(ByteBuffer path, short vendor_id, short product_id, ByteBuffer serial_number, short release_number, ByteBuffer manufacturer_string, ByteBuffer product_string, short usage_page, short usage, int interface_number, int interface_class, int interface_subclass, int interface_protocol, int bus_type, SDL_hid_device_info next) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newSDL_hid_device_infoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSDL_hid_device_infoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSDL_hid_device_infoinstance allocated withBufferUtils. -
create
Returns a newSDL_hid_device_infoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_hid_device_info.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSDL_hid_device_info.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSDL_hid_device_info.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSDL_hid_device_info.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_hid_device_infoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSDL_hid_device_infoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSDL_hid_device_info.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSDL_hid_device_info.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
npath
Unsafe version ofpath(). -
npathString
Unsafe version ofpathString(). -
nvendor_id
public static short nvendor_id(long struct) Unsafe version ofvendor_id(). -
nproduct_id
public static short nproduct_id(long struct) Unsafe version ofproduct_id(). -
nserial_number
Unsafe version ofserial_number(). -
nserial_numberString
Unsafe version ofserial_numberString(). -
nrelease_number
public static short nrelease_number(long struct) Unsafe version ofrelease_number(). -
nmanufacturer_string
Unsafe version ofmanufacturer_string(). -
nmanufacturer_stringString
Unsafe version ofmanufacturer_stringString(). -
nproduct_string
Unsafe version ofproduct_string(). -
nproduct_stringString
Unsafe version ofproduct_stringString(). -
nusage_page
public static short nusage_page(long struct) Unsafe version ofusage_page(). -
nusage
public static short nusage(long struct) Unsafe version ofusage(). -
ninterface_number
public static int ninterface_number(long struct) Unsafe version ofinterface_number(). -
ninterface_class
public static int ninterface_class(long struct) Unsafe version ofinterface_class(). -
ninterface_subclass
public static int ninterface_subclass(long struct) Unsafe version ofinterface_subclass(). -
ninterface_protocol
public static int ninterface_protocol(long struct) Unsafe version ofinterface_protocol(). -
nbus_type
public static int nbus_type(long struct) Unsafe version ofbus_type(). -
nnext
Unsafe version ofnext(). -
npath
Unsafe version ofpath. -
nvendor_id
public static void nvendor_id(long struct, short value) Unsafe version ofvendor_id. -
nproduct_id
public static void nproduct_id(long struct, short value) Unsafe version ofproduct_id. -
nserial_number
Unsafe version ofserial_number. -
nrelease_number
public static void nrelease_number(long struct, short value) Unsafe version ofrelease_number. -
nmanufacturer_string
Unsafe version ofmanufacturer_string. -
nproduct_string
Unsafe version ofproduct_string. -
nusage_page
public static void nusage_page(long struct, short value) Unsafe version ofusage_page. -
nusage
public static void nusage(long struct, short value) Unsafe version ofusage. -
ninterface_number
public static void ninterface_number(long struct, int value) Unsafe version ofinterface_number. -
ninterface_class
public static void ninterface_class(long struct, int value) Unsafe version ofinterface_class. -
ninterface_subclass
public static void ninterface_subclass(long struct, int value) Unsafe version ofinterface_subclass. -
ninterface_protocol
public static void ninterface_protocol(long struct, int value) Unsafe version ofinterface_protocol. -
nbus_type
public static void nbus_type(long struct, int value) Unsafe version ofbus_type. -
nnext
Unsafe version ofnext. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-