Record Class SDL_hid_device_info
java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_hid_device_info
- All Implemented Interfaces:
IPointer,ISDL_hid_device_info
@ValueBasedCandidate
@UnsafeConstructor
public record SDL_hid_device_info(@NotNull MemorySegment segment)
extends Record
implements ISDL_hid_device_info
Information about a connected HID device
Since: This struct is available since SDL 3.2.0.
Structure
typedef struct SDL_hid_device_info {
char* path;
short vendor_id;
short product_id;
wchar_t* serial_number;
short release_number;
wchar_t* manufacturer_string;
wchar_t* product_string;
short usage_page;
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;
} SDL_hid_device_info;
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.
Member documentation
path()Platform-specific device pathvendor_id()Device Vendor IDproduct_id()Device Product IDserial_number()Serial Numberrelease_number()Device Release Number in binary-coded decimal, also known as Device Version Numbermanufacturer_string()Manufacturer Stringproduct_string()Product stringusage_page()Usage Page for this Device/Interface (Windows/Mac/hidraw only)usage()Usage for this Device/Interface (Windows/Mac/hidraw only)interface_number()The USB interface which this logical device represents.Valid only if the device is a USB HID device. Set to -1 in all other cases.
interface_class()Additional information about the USB interface. Valid on libusb and Android implementations.bus_type()Underlying bus typenext(club.doki7.sdl3.datatype.ISDL_hid_device_info)Pointer to the next device
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final AddressLayoutstatic final AddressLayoutstatic final AddressLayoutstatic final ValueLayout.OfShortstatic final AddressLayoutstatic final ValueLayout.OfShortstatic final AddressLayoutstatic final ValueLayout.OfShortstatic final ValueLayout.OfShortstatic final ValueLayout.OfShortstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSDL_hid_device_info(@NotNull MemorySegment segment) Creates an instance of aSDL_hid_device_inforecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_hid_device_infostatic SDL_hid_device_info.Ptrintbus_type()bus_type(int value) static SDL_hid_device_infoclone(Arena arena, SDL_hid_device_info src) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intinterface_class(int value) intinterface_number(int value) intinterface_protocol(int value) intinterface_subclass(int value) manufacturer_string(@Nullable IPointer pointer) voidmanufacturer_string(MemorySegment value) @Nullable SDL_hid_device_infonext()next(int assumedCount) next(@Nullable ISDL_hid_device_info value) nextRaw()voidnextRaw(MemorySegment value) @Nullable BytePtrpath()Note: the returnedBytePtrdoes not have correctBytePtr.size()property.pathRaw()voidpathRaw(MemorySegment value) shortproduct_id(short value) product_string(@Nullable IPointer pointer) voidproduct_string(MemorySegment value) shortrelease_number(short value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.serial_number(@Nullable IPointer pointer) voidserial_number(MemorySegment value) final StringtoString()Returns a string representation of this record class.shortusage()usage(short value) shortusage_page(short value) shortvendor_id(short value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$path
-
PATH$vendor_id
-
PATH$product_id
-
PATH$serial_number
-
PATH$release_number
-
PATH$manufacturer_string
-
PATH$product_string
-
PATH$usage_page
-
PATH$usage
-
PATH$interface_number
-
PATH$interface_class
-
PATH$interface_subclass
-
PATH$interface_protocol
-
PATH$bus_type
-
PATH$next
-
LAYOUT$path
-
LAYOUT$vendor_id
-
LAYOUT$product_id
-
LAYOUT$serial_number
-
LAYOUT$release_number
-
LAYOUT$manufacturer_string
-
LAYOUT$product_string
-
LAYOUT$usage_page
-
LAYOUT$usage
-
LAYOUT$interface_number
-
LAYOUT$interface_class
-
LAYOUT$interface_subclass
-
LAYOUT$interface_protocol
-
LAYOUT$bus_type
-
LAYOUT$next
-
SIZE$path
public static final long SIZE$path -
SIZE$vendor_id
public static final long SIZE$vendor_id -
SIZE$product_id
public static final long SIZE$product_id -
SIZE$serial_number
public static final long SIZE$serial_number -
SIZE$release_number
public static final long SIZE$release_number -
SIZE$manufacturer_string
public static final long SIZE$manufacturer_string -
SIZE$product_string
public static final long SIZE$product_string -
SIZE$usage_page
public static final long SIZE$usage_page -
SIZE$usage
public static final long SIZE$usage -
SIZE$interface_number
public static final long SIZE$interface_number -
SIZE$interface_class
public static final long SIZE$interface_class -
SIZE$interface_subclass
public static final long SIZE$interface_subclass -
SIZE$interface_protocol
public static final long SIZE$interface_protocol -
SIZE$bus_type
public static final long SIZE$bus_type -
SIZE$next
public static final long SIZE$next -
OFFSET$path
public static final long OFFSET$path -
OFFSET$vendor_id
public static final long OFFSET$vendor_id -
OFFSET$product_id
public static final long OFFSET$product_id -
OFFSET$serial_number
public static final long OFFSET$serial_number -
OFFSET$release_number
public static final long OFFSET$release_number -
OFFSET$manufacturer_string
public static final long OFFSET$manufacturer_string -
OFFSET$product_string
public static final long OFFSET$product_string -
OFFSET$usage_page
public static final long OFFSET$usage_page -
OFFSET$usage
public static final long OFFSET$usage -
OFFSET$interface_number
public static final long OFFSET$interface_number -
OFFSET$interface_class
public static final long OFFSET$interface_class -
OFFSET$interface_subclass
public static final long OFFSET$interface_subclass -
OFFSET$interface_protocol
public static final long OFFSET$interface_protocol -
OFFSET$bus_type
public static final long OFFSET$bus_type -
OFFSET$next
public static final long OFFSET$next
-
-
Constructor Details
-
SDL_hid_device_info
Creates an instance of aSDL_hid_device_inforecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
path
Note: the returnedBytePtrdoes not have correctBytePtr.size()property. It's up to user to track the size of the buffer, and useBytePtr.reinterpret(long)to set the size before actually reading from or writing to the buffer. -
path
-
pathRaw
-
pathRaw
-
vendor_id
public short vendor_id() -
vendor_id
-
product_id
public short product_id() -
product_id
-
serial_number
-
serial_number
-
serial_number
-
release_number
public short release_number() -
release_number
-
manufacturer_string
-
manufacturer_string
-
manufacturer_string
-
product_string
-
product_string
-
product_string
-
usage_page
public short usage_page() -
usage_page
-
usage
public short usage() -
usage
-
interface_number
public int interface_number() -
interface_number
-
interface_class
public int interface_class() -
interface_class
-
interface_subclass
public int interface_subclass() -
interface_subclass
-
interface_protocol
public int interface_protocol() -
interface_protocol
-
bus_type
-
bus_type
-
next
-
next
-
next
-
nextRaw
-
nextRaw
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
segment
Returns the value of thesegmentrecord component.
-