Package org.lwjgl.sdl

Class SDL_hid_device_info

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_hid_device_info extends Struct<SDL_hid_device_info> implements NativeResource

 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;
     {@link SDL_hid_device_info SDL_hid_device_info} * next;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int PATH
      The struct member offsets.
    • VENDOR_ID

      public static final int VENDOR_ID
      The struct member offsets.
    • PRODUCT_ID

      public static final int PRODUCT_ID
      The struct member offsets.
    • SERIAL_NUMBER

      public static final int SERIAL_NUMBER
      The struct member offsets.
    • RELEASE_NUMBER

      public static final int RELEASE_NUMBER
      The struct member offsets.
    • MANUFACTURER_STRING

      public static final int MANUFACTURER_STRING
      The struct member offsets.
    • PRODUCT_STRING

      public static final int PRODUCT_STRING
      The struct member offsets.
    • USAGE_PAGE

      public static final int USAGE_PAGE
      The struct member offsets.
    • USAGE

      public static final int USAGE
      The struct member offsets.
    • INTERFACE_NUMBER

      public static final int INTERFACE_NUMBER
      The struct member offsets.
    • INTERFACE_CLASS

      public static final int INTERFACE_CLASS
      The struct member offsets.
    • INTERFACE_SUBCLASS

      public static final int INTERFACE_SUBCLASS
      The struct member offsets.
    • INTERFACE_PROTOCOL

      public static final int INTERFACE_PROTOCOL
      The struct member offsets.
    • BUS_TYPE

      public static final int BUS_TYPE
      The struct member offsets.
    • NEXT

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

    • SDL_hid_device_info

      public SDL_hid_device_info(ByteBuffer container)
      Creates a SDL_hid_device_info 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_hid_device_info>
    • path

      public ByteBuffer path()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the path field.
    • pathString

      public String pathString()
      Returns:
      the null-terminated string pointed to by the path field.
    • vendor_id

      public short vendor_id()
      Returns:
      the value of the vendor_id field.
    • product_id

      public short product_id()
      Returns:
      the value of the product_id field.
    • serial_number

      public ByteBuffer serial_number()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the serial_number field.
    • serial_numberString

      public String serial_numberString()
      Returns:
      the null-terminated string pointed to by the serial_number field.
    • release_number

      public short release_number()
      Returns:
      the value of the release_number field.
    • manufacturer_string

      public ByteBuffer manufacturer_string()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the manufacturer_string field.
    • manufacturer_stringString

      public String manufacturer_stringString()
      Returns:
      the null-terminated string pointed to by the manufacturer_string field.
    • product_string

      public ByteBuffer product_string()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the product_string field.
    • product_stringString

      public String product_stringString()
      Returns:
      the null-terminated string pointed to by the product_string field.
    • usage_page

      public short usage_page()
      Returns:
      the value of the usage_page field.
    • usage

      public short usage()
      Returns:
      the value of the usage field.
    • interface_number

      public int interface_number()
      Returns:
      the value of the interface_number field.
    • interface_class

      public int interface_class()
      Returns:
      the value of the interface_class field.
    • interface_subclass

      public int interface_subclass()
      Returns:
      the value of the interface_subclass field.
    • interface_protocol

      public int interface_protocol()
      Returns:
      the value of the interface_protocol field.
    • bus_type

      public int bus_type()
      Returns:
      the value of the bus_type field.
    • next

      public SDL_hid_device_info next()
      Returns:
      a SDL_hid_device_info view of the struct pointed to by the next field.
    • path

      public SDL_hid_device_info path(ByteBuffer value)
      Sets the address of the specified encoded string to the path field.
    • vendor_id

      public SDL_hid_device_info vendor_id(short value)
      Sets the specified value to the vendor_id field.
    • product_id

      public SDL_hid_device_info product_id(short value)
      Sets the specified value to the product_id field.
    • serial_number

      public SDL_hid_device_info serial_number(ByteBuffer value)
      Sets the address of the specified encoded string to the serial_number field.
    • release_number

      public SDL_hid_device_info release_number(short value)
      Sets the specified value to the release_number field.
    • manufacturer_string

      public SDL_hid_device_info manufacturer_string(ByteBuffer value)
      Sets the address of the specified encoded string to the manufacturer_string field.
    • product_string

      public SDL_hid_device_info product_string(ByteBuffer value)
      Sets the address of the specified encoded string to the product_string field.
    • usage_page

      public SDL_hid_device_info usage_page(short value)
      Sets the specified value to the usage_page field.
    • usage

      public SDL_hid_device_info usage(short value)
      Sets the specified value to the usage field.
    • interface_number

      public SDL_hid_device_info interface_number(int value)
      Sets the specified value to the interface_number field.
    • interface_class

      public SDL_hid_device_info interface_class(int value)
      Sets the specified value to the interface_class field.
    • interface_subclass

      public SDL_hid_device_info interface_subclass(int value)
      Sets the specified value to the interface_subclass field.
    • interface_protocol

      public SDL_hid_device_info interface_protocol(int value)
      Sets the specified value to the interface_protocol field.
    • bus_type

      public SDL_hid_device_info bus_type(int value)
      Sets the specified value to the bus_type field.
    • next

      Sets the address of the specified SDL_hid_device_info to the next field.
    • 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

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

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

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

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

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

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

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

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

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

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

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

      public static SDL_hid_device_info calloc(MemoryStack stack)
      Returns a new SDL_hid_device_info 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_hid_device_info.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new SDL_hid_device_info.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static SDL_hid_device_info.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new SDL_hid_device_info.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
    • npath

      public static ByteBuffer npath(long struct)
      Unsafe version of path().
    • npathString

      public static String npathString(long struct)
      Unsafe version of pathString().
    • nvendor_id

      public static short nvendor_id(long struct)
      Unsafe version of vendor_id().
    • nproduct_id

      public static short nproduct_id(long struct)
      Unsafe version of product_id().
    • nserial_number

      public static ByteBuffer nserial_number(long struct)
      Unsafe version of serial_number().
    • nserial_numberString

      public static String nserial_numberString(long struct)
      Unsafe version of serial_numberString().
    • nrelease_number

      public static short nrelease_number(long struct)
      Unsafe version of release_number().
    • nmanufacturer_string

      public static ByteBuffer nmanufacturer_string(long struct)
      Unsafe version of manufacturer_string().
    • nmanufacturer_stringString

      public static String nmanufacturer_stringString(long struct)
      Unsafe version of manufacturer_stringString().
    • nproduct_string

      public static ByteBuffer nproduct_string(long struct)
      Unsafe version of product_string().
    • nproduct_stringString

      public static String nproduct_stringString(long struct)
      Unsafe version of product_stringString().
    • nusage_page

      public static short nusage_page(long struct)
      Unsafe version of usage_page().
    • nusage

      public static short nusage(long struct)
      Unsafe version of usage().
    • ninterface_number

      public static int ninterface_number(long struct)
      Unsafe version of interface_number().
    • ninterface_class

      public static int ninterface_class(long struct)
      Unsafe version of interface_class().
    • ninterface_subclass

      public static int ninterface_subclass(long struct)
      Unsafe version of interface_subclass().
    • ninterface_protocol

      public static int ninterface_protocol(long struct)
      Unsafe version of interface_protocol().
    • nbus_type

      public static int nbus_type(long struct)
      Unsafe version of bus_type().
    • nnext

      public static SDL_hid_device_info nnext(long struct)
      Unsafe version of next().
    • npath

      public static void npath(long struct, ByteBuffer value)
      Unsafe version of path.
    • nvendor_id

      public static void nvendor_id(long struct, short value)
      Unsafe version of vendor_id.
    • nproduct_id

      public static void nproduct_id(long struct, short value)
      Unsafe version of product_id.
    • nserial_number

      public static void nserial_number(long struct, ByteBuffer value)
      Unsafe version of serial_number.
    • nrelease_number

      public static void nrelease_number(long struct, short value)
      Unsafe version of release_number.
    • nmanufacturer_string

      public static void nmanufacturer_string(long struct, ByteBuffer value)
      Unsafe version of manufacturer_string.
    • nproduct_string

      public static void nproduct_string(long struct, ByteBuffer value)
      Unsafe version of product_string.
    • nusage_page

      public static void nusage_page(long struct, short value)
      Unsafe version of usage_page.
    • nusage

      public static void nusage(long struct, short value)
      Unsafe version of usage.
    • ninterface_number

      public static void ninterface_number(long struct, int value)
      Unsafe version of interface_number.
    • ninterface_class

      public static void ninterface_class(long struct, int value)
      Unsafe version of interface_class.
    • ninterface_subclass

      public static void ninterface_subclass(long struct, int value)
      Unsafe version of interface_subclass.
    • ninterface_protocol

      public static void ninterface_protocol(long struct, int value)
      Unsafe version of interface_protocol.
    • nbus_type

      public static void nbus_type(long struct, int value)
      Unsafe version of bus_type.
    • nnext

      public static void nnext(long struct, SDL_hid_device_info value)
      Unsafe version of next.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate