Virtual gamepad device handle.
More...
#include <src/include/libvirtualhid/runtime.hpp>
Virtual gamepad device handle.
◆ Gamepad()
| lvh::Gamepad::Gamepad |
( |
Gamepad && | other | ) |
|
|
noexcept |
Move construct a gamepad handle.
- Parameters
-
| other | Handle to move from. |
◆ close()
◆ device_id()
| DeviceId lvh::Gamepad::device_id |
( |
| ) |
const |
|
overridevirtual |
Get the device identifier assigned by the runtime.
- Returns
- Device identifier.
Implements lvh::VirtualDevice.
◆ device_nodes()
| std::vector< DeviceNode > lvh::Gamepad::device_nodes |
( |
| ) |
const |
|
overridevirtual |
Get platform-visible nodes associated with the device.
- Returns
- Device nodes and diagnostic paths currently known to the backend.
Implements lvh::VirtualDevice.
◆ dispatch_output()
Dispatch an output event to the registered callback.
- Parameters
-
- Returns
- Dispatch operation status.
◆ is_open()
| bool lvh::Gamepad::is_open |
( |
| ) |
const |
|
overridevirtual |
Check whether the device is open.
- Returns
true when the device can accept operations.
Implements lvh::VirtualDevice.
◆ last_input_report()
| std::vector< std::uint8_t > lvh::Gamepad::last_input_report |
( |
| ) |
const |
Get the most recently packed input report.
- Returns
- Last input report bytes.
◆ last_submitted_state()
Get the most recently submitted gamepad state.
- Returns
- Last submitted state.
◆ metadata()
Get the metadata supplied when the gamepad was created.
- Returns
- Gamepad metadata.
◆ operator=() [1/2]
Copy assignment is disabled because the handle owns device lifetime.
- Returns
- This gamepad handle.
◆ operator=() [2/2]
Move assign a gamepad handle.
- Parameters
-
| other | Handle to move from. |
- Returns
- This gamepad handle.
◆ profile()
Get the profile used to create this device.
- Returns
- Device profile.
Implements lvh::VirtualDevice.
◆ set_output_callback()
Register a callback for backend output events.
- Parameters
-
| callback | Output callback. Passing an empty callback clears it. |
◆ submit()
Submit the latest gamepad input state.
- Parameters
-
- Returns
- Submit operation status.
◆ submit_count()
| std::size_t lvh::Gamepad::submit_count |
( |
| ) |
const |
Get the number of successful submit operations.
- Returns
- Submit count.
The documentation for this class was generated from the following file: