Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
virtualhid_pen_touch.h
Go to the documentation of this file.
1
5#pragma once
6
8
9#include <cstdint>
10#include <libvirtualhid/libvirtualhid.hpp>
11#include <memory>
12#include <string>
13#include <unordered_set>
14
15namespace platf::virtualhid {
16
17 struct client_devices_t {
18 explicit client_devices_t(const std::string &session_tag, std::unique_ptr<lvh::Runtime> runtime = {});
19
20 std::unique_ptr<lvh::Runtime> runtime;
21 std::unique_ptr<lvh::Touchscreen> touch;
22 std::unique_ptr<lvh::PenTablet> pen;
23
24 // Both sets/states are per-client, never shared across streams.
25 std::unordered_set<std::int32_t> active_contacts;
26 std::uint8_t pen_buttons = 0;
27 };
28
29 void touch_update(client_devices_t &devices, const touch_port_t &port, const touch_input_t &touch);
30 void pen_update(client_devices_t &devices, const touch_port_t &port, const pen_input_t &pen);
31} // namespace platf::virtualhid
Declarations for common platform specific utilities.