SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
SDL::HidDeviceBase Struct Reference

Base class to HidDevice. More...

Inheritance diagram for SDL::HidDeviceBase:
[legend]

Public Member Functions

void close ()
 Close a HID device.
PropertiesRef hid_get_properties ()
 Get the properties associated with an HidDevice.
int write (SourceBytes data)
 Write an Output report to a HID device.
int read_timeout (TargetBytes data, Milliseconds timeout)
 Read an Input report from a HID device with timeout.
int read (TargetBytes data)
 Read an Input report from a HID device.
void set_nonblocking (bool nonblock)
 Set the device handle to be non-blocking.
int send_feature_report (SourceBytes data)
 Send a Feature report to the device.
int get_feature_report (TargetBytes data)
 Get a feature report from a HID device.
int get_input_report (TargetBytes data)
 Get an input report from a HID device.
void get_manufacturer_string (wchar_t *string, size_t maxlen)
 Get The Manufacturer String from a HID device.
void get_product_string (wchar_t *string, size_t maxlen)
 Get The Product String from a HID device.
void get_serial_number_string (wchar_t *string, size_t maxlen)
 Get The Serial Number String from a HID device.
void get_indexed_string (int string_index, wchar_t *string, size_t maxlen)
 Get a string from a HID device, based on its string index.
hid_device_infoget_device_info ()
 Get the device info from a HID device.
int get_report_descriptor (TargetBytes buf)
 Get a report descriptor from a HID device.
constexpr ResourceBaseT ()=default
 Default constructor, creates null/invalid resource.
constexpr ResourceBaseT (RawPointer resource)
 Constructs from resource pointer.
constexpr ResourceBaseT (std::nullptr_t)
 Constructs null/invalid.
constexpr ResourceBaseT (const ResourceBaseT &)=default
 Copy constructor.
constexpr ResourceBaseT (ResourceBaseT &&) noexcept=default
 Move constructor.
Public Member Functions inherited from SDL::ResourceBaseT< HidDeviceRaw >
constexpr ResourceBaseT ()=default
 Default constructor, creates null/invalid resource.
constexpr operator bool () const
 Converts to bool.
constexpr auto operator<=> (const ResourceBaseT &other) const=default
 Comparison.
constexpr RawConstPointer operator-> () const noexcept
 member access to underlying resource pointer.
constexpr RawPointer get () const noexcept
 Retrieves underlying resource pointer.
constexpr RawPointer release () noexcept
 Retrieves underlying resource pointer and clear this.

Additional Inherited Members

Public Types inherited from SDL::ResourceBaseT< HidDeviceRaw >
using RawPointer
 The underlying raw pointer type.
using RawConstPointer
 The underlying const raw pointer type.
Protected Member Functions inherited from SDL::ResourceBaseT< HidDeviceRaw >
constexpr ~ResourceBaseT ()=default
 Destructor.
constexpr ResourceBaseToperator= (const ResourceBaseT &)=default
 Assignment operator.

Detailed Description

Base class to HidDevice.

See also
HidDevice

The documentation for this struct was generated from the following file: