|
Hermes 0.7.0
Linux game streaming host
|
Linux platform input implementation backed exclusively by libvirtualhid. More...
#include "kwin_input.h"#include "src/config.h"#include "src/logging.h"#include "virtualhid_common.h"#include "virtualhid_gamepad.h"#include "virtualhid_keyboard.h"#include "virtualhid_mouse.h"#include <utility>Go to the source code of this file.
Functions | |
| platform_caps::caps_t | platf::virtualhid::input_capabilities (const lvh::BackendCapabilities &backend) |
| Compute advertised protocol capabilities from backend availability and input policy. | |
| std::unique_ptr< lvh::Runtime > | platf::virtualhid::create_runtime () |
| lvh::DeviceProfile | platf::virtualhid::with_hermes_identity (lvh::DeviceProfile profile, const std::string &session_tag, const std::string &display_name) |
| void | platf::virtualhid::log_failure (const char *operation, const lvh::OperationStatus &result) |
| input_t | platf::input (const std::string &session_tag={}) |
| std::unique_ptr< client_input_t > | platf::allocate_client_input_context (input_t &input) |
| Allocate a context to store per-client input data. | |
| void | platf::freeInput (void *) |
| void | platf::move_mouse (input_t &input, int deltaX, int deltaY) |
| void | platf::abs_mouse (input_t &input, const touch_port_t &touch_port, float x, float y) |
| void | platf::button_mouse (input_t &input, int button, bool release) |
| void | platf::scroll (input_t &input, int distance) |
| void | platf::hscroll (input_t &input, int distance) |
| void | platf::keyboard_update (input_t &input, std::uint16_t key_code, bool release, std::uint8_t flags) |
| void | platf::unicode (input_t &input, char *utf8, int size) |
| void | platf::touch_update (client_input_t *input, const touch_port_t &touch_port, const touch_input_t &touch) |
| Send a touch event to the OS. | |
| void | platf::pen_update (client_input_t *input, const touch_port_t &touch_port, const pen_input_t &pen) |
| Send a pen event to the OS. | |
| int | platf::alloc_gamepad (input_t &input, const gamepad_id_t &id, const gamepad_arrival_t &metadata, feedback_queue_t feedback_queue) |
| Create a new virtual gamepad. | |
| void | platf::free_gamepad (input_t &input, int nr) |
| void | platf::release_gamepad (input_t &input, int nr) |
| Release a gamepad because its stream ended, not because the client removed it. A detached desktop keeps it for the next stream to the same desktop, so the desktop's programs never see the controller leave. | |
| void | platf::forget_kept_gamepads (const std::string &session_tag) |
| Remove the gamepads a session tag kept between streams. | |
| void | platf::gamepad_update (input_t &input, int nr, const gamepad_state_t &gamepad_state) |
| void | platf::gamepad_touch (input_t &input, const gamepad_touch_t &touch) |
| Send a gamepad touch event to the OS. | |
| void | platf::gamepad_motion (input_t &input, const gamepad_motion_t &motion) |
| Send a gamepad motion event to the OS. | |
| void | platf::gamepad_battery (input_t &input, const gamepad_battery_t &battery) |
| Send a gamepad battery event to the OS. | |
| platform_caps::caps_t | platf::get_capabilities () |
| Get the supported platform capabilities to advertise to the client. | |
| util::point_t | platf::get_mouse_loc (input_t &input) |
| Get the current mouse position on screen. | |
| std::vector< supported_gamepad_t > & | platf::supported_gamepads (input_t *input) |
| Gets the supported gamepads for this platform backend. | |
Linux platform input implementation backed exclusively by libvirtualhid.
Definition in file virtualhid.cpp.
| void platf::abs_mouse | ( | input_t & | input, |
| const touch_port_t & | touch_port, | ||
| float | x, | ||
| float | y ) |
Definition at line 118 of file virtualhid.cpp.
| int platf::alloc_gamepad | ( | input_t & | input, |
| const gamepad_id_t & | id, | ||
| const gamepad_arrival_t & | metadata, | ||
| feedback_queue_t | feedback_queue ) |
Create a new virtual gamepad.
| input | The global input context. |
| id | The gamepad ID. |
| metadata | Controller metadata from client (empty if none provided). |
| feedback_queue | The queue for posting messages back to the client. |
Definition at line 183 of file virtualhid.cpp.
| std::unique_ptr< client_input_t > platf::allocate_client_input_context | ( | input_t & | input | ) |
Allocate a context to store per-client input data.
| input | The global input context. |
Definition at line 103 of file virtualhid.cpp.
| void platf::button_mouse | ( | input_t & | input, |
| int | button, | ||
| bool | release ) |
Definition at line 125 of file virtualhid.cpp.
| std::unique_ptr< lvh::Runtime > platf::virtualhid::create_runtime | ( | ) |
Definition at line 29 of file virtualhid.cpp.
| void platf::forget_kept_gamepads | ( | const std::string & | session_tag | ) |
Remove the gamepads a session tag kept between streams.
| session_tag | The tag of a session that has stopped. |
Definition at line 201 of file virtualhid.cpp.
| void platf::free_gamepad | ( | input_t & | input, |
| int | nr ) |
Definition at line 193 of file virtualhid.cpp.
| void platf::freeInput | ( | void * | pointer | ) |
Definition at line 107 of file virtualhid.cpp.
| void platf::gamepad_battery | ( | input_t & | input, |
| const gamepad_battery_t & | battery ) |
Send a gamepad battery event to the OS.
| input | The global input context. |
| battery | The battery event. |
Definition at line 217 of file virtualhid.cpp.
| void platf::gamepad_motion | ( | input_t & | input, |
| const gamepad_motion_t & | motion ) |
Send a gamepad motion event to the OS.
| input | The global input context. |
| motion | The motion event. |
Definition at line 213 of file virtualhid.cpp.
| void platf::gamepad_touch | ( | input_t & | input, |
| const gamepad_touch_t & | touch ) |
Send a gamepad touch event to the OS.
| input | The global input context. |
| touch | The touch event. |
Definition at line 209 of file virtualhid.cpp.
| void platf::gamepad_update | ( | input_t & | input, |
| int | nr, | ||
| const gamepad_state_t & | gamepad_state ) |
Definition at line 205 of file virtualhid.cpp.
| platform_caps::caps_t platf::get_capabilities | ( | ) |
Get the supported platform capabilities to advertise to the client.
Definition at line 221 of file virtualhid.cpp.
| util::point_t platf::get_mouse_loc | ( | input_t & | input | ) |
Get the current mouse position on screen.
| input | The input_t instance to use. |
Examples
Definition at line 226 of file virtualhid.cpp.
| void platf::hscroll | ( | input_t & | input, |
| int | distance ) |
Definition at line 139 of file virtualhid.cpp.
| input_t platf::input | ( | const std::string & | session_tag = {} | ) |
Create a platform input device set. session_tag is stamped into Linux uinput phys/uniq metadata so a compositor seat can select only its client.
Definition at line 99 of file virtualhid.cpp.
| platform_caps::caps_t platf::virtualhid::input_capabilities | ( | const lvh::BackendCapabilities & | backend | ) |
Compute advertised protocol capabilities from backend availability and input policy.
| backend | Available libvirtualhid backend features. |
Definition at line 18 of file virtualhid.cpp.
| void platf::keyboard_update | ( | input_t & | input, |
| std::uint16_t | key_code, | ||
| bool | release, | ||
| std::uint8_t | flags ) |
Definition at line 146 of file virtualhid.cpp.
| void platf::virtualhid::log_failure | ( | const char * | operation, |
| const lvh::OperationStatus & | result ) |
Definition at line 51 of file virtualhid.cpp.
| void platf::move_mouse | ( | input_t & | input, |
| int | deltaX, | ||
| int | deltaY ) |
Definition at line 111 of file virtualhid.cpp.
| void platf::pen_update | ( | client_input_t * | input, |
| const touch_port_t & | touch_port, | ||
| const pen_input_t & | pen ) |
Send a pen event to the OS.
| input | The client-specific input context. |
| touch_port | The current viewport for translating to screen coordinates. |
| pen | The pen event. |
Definition at line 173 of file virtualhid.cpp.
| void platf::release_gamepad | ( | input_t & | input, |
| int | nr ) |
Release a gamepad because its stream ended, not because the client removed it. A detached desktop keeps it for the next stream to the same desktop, so the desktop's programs never see the controller leave.
Definition at line 197 of file virtualhid.cpp.
| void platf::scroll | ( | input_t & | input, |
| int | distance ) |
Definition at line 132 of file virtualhid.cpp.
| std::vector< supported_gamepad_t > & platf::supported_gamepads | ( | input_t * | input | ) |
Gets the supported gamepads for this platform backend.
This may be called prior to platf::input()!
| input | Pointer to the platform's input_t or nullptr. |
Definition at line 230 of file virtualhid.cpp.
| void platf::touch_update | ( | client_input_t * | input, |
| const touch_port_t & | touch_port, | ||
| const touch_input_t & | touch ) |
Send a touch event to the OS.
| input | The client-specific input context. |
| touch_port | The current viewport for translating to screen coordinates. |
| touch | The touch event. |
Definition at line 160 of file virtualhid.cpp.
| void platf::unicode | ( | input_t & | input, |
| char * | utf8, | ||
| int | size ) |
Definition at line 153 of file virtualhid.cpp.
| lvh::DeviceProfile platf::virtualhid::with_hermes_identity | ( | lvh::DeviceProfile | profile, |
| const std::string & | session_tag, | ||
| const std::string & | display_name ) |
Definition at line 42 of file virtualhid.cpp.