Declarations for gamepad, keyboard, and mouse input handling.
More...
#include <functional>
#include "platform/common.h"
#include "thread_safe.h"
#include "crypto.h"
Go to the source code of this file.
|
| void | input::print (void *payload) |
| void | input::reset (std::shared_ptr< input_t > &input) |
| void | input::passthrough (std::shared_ptr< input_t > &input, std::vector< std::uint8_t > &&input_data, const crypto::PERM &permission) |
| | Called on the control stream thread to queue an input message.
|
| std::unique_ptr< platf::deinit_t > | input::init () |
| bool | input::probe_gamepads () |
| std::shared_ptr< input_t > | input::alloc (safe::mail_t mail, const std::string &session_tag, int launch_gamepads, const std::string &wayland_socket, const std::string &client_id) |
| platf::touch_port_t | input::direct_device_port (int output_width, int output_height, int offset_x, int offset_y, int env_width, int env_height, bool binds_to_output) |
| | The rectangle a touchscreen or a pen is addressed in.
|
| std::pair< float, float > | input::scale_client_contact_area (const std::pair< float, float > &val, uint16_t rotation, const std::pair< float, float > &scalar) |
| | Scale the ellipse axes according to the provided size.
|
Declarations for gamepad, keyboard, and mouse input handling.
Definition in file input.h.
◆ alloc()
| std::shared_ptr< input_t > input::alloc |
( |
safe::mail_t | mail, |
|
|
const std::string & | session_tag = {}, |
|
|
int | launch_gamepads = 0, |
|
|
const std::string & | wayland_socket = {}, |
|
|
const std::string & | client_id = {} ) |
- Parameters
-
| session_tag | Seat of an isolated session; empty for the host's. |
| launch_gamepads | Gamepads to plug in now (the client's gcmap). |
| wayland_socket | Private KWin desktop to drive instead; empty for none. |
| client_id | The paired client's id, which its virtual gamepads are identified by. |
Definition at line 1854 of file input.cpp.
◆ direct_device_port()
| platf::touch_port_t input::direct_device_port |
( |
int | output_width, |
|
|
int | output_height, |
|
|
int | offset_x, |
|
|
int | offset_y, |
|
|
int | env_width, |
|
|
int | env_height, |
|
|
bool | binds_to_output ) |
The rectangle a touchscreen or a pen is addressed in.
- Parameters
-
| output_width | Width of the streamed output. |
| output_height | Height of the streamed output. |
| offset_x | Horizontal offset of that output within the desktop. |
| offset_y | Vertical offset of that output within the desktop. |
| env_width | Width of the whole desktop. |
| env_height | Height of the whole desktop. |
| binds_to_output | Whether the session maps such a device onto one output, which makes its coordinates relative to that output. |
Definition at line 963 of file input.cpp.
◆ init()
◆ passthrough()
| void input::passthrough |
( |
std::shared_ptr< input_t > & | input, |
|
|
std::vector< std::uint8_t > && | input_data, |
|
|
const crypto::PERM & | permission ) |
Called on the control stream thread to queue an input message.
- Parameters
-
| input | The input context pointer. |
| input_data | The input message. |
Definition at line 1685 of file input.cpp.
◆ print()
| void input::print |
( |
void * | payload | ) |
|
◆ probe_gamepads()
| bool input::probe_gamepads |
( |
| ) |
|
◆ reset()
| void input::reset |
( |
std::shared_ptr< input_t > & | input | ) |
|
◆ scale_client_contact_area()
| std::pair< float, float > input::scale_client_contact_area |
( |
const std::pair< float, float > & | val, |
|
|
uint16_t | rotation, |
|
|
const std::pair< float, float > & | scalar ) |
Scale the ellipse axes according to the provided size.
- Parameters
-
| val | The major and minor axis pair. |
| rotation | The rotation value from the touch/pen event. |
| scalar | The scalar cartesian coordinate pair. |
- Returns
- The major and minor axis pair.
Definition at line 571 of file input.cpp.