Hermes
0.7.0
Linux game streaming host
Toggle main menu visibility
Loading...
Searching...
No Matches
kwin_session.h
Go to the documentation of this file.
1
5
#pragma once
6
7
#include <chrono>
8
#include <cstdint>
9
#include <memory>
10
#include <string>
11
12
namespace
platf::kwin {
13
struct
endpoint_t
{
14
// Absolute socket paths. Neither connection may fall back to host defaults.
15
std::string wayland_socket;
16
std::string pipewire_socket;
17
// Empty is accepted only when the private compositor has exactly one output.
18
std::string output_name;
19
};
20
21
struct
output_t
{
22
std::string name;
23
int
x {};
24
int
y {};
25
int
width {};
26
int
height {};
27
int
scale {1};
28
};
29
35
class
connection_t {
36
public
:
37
static
std::unique_ptr<connection_t> open(
const
endpoint_t
&endpoint,
bool
capture,
bool
input
, std::string &error);
38
~connection_t();
39
connection_t(
const
connection_t &) =
delete
;
40
connection_t &operator=(
const
connection_t &) =
delete
;
41
42
const
output_t
&output()
const
;
43
// The stream and its Wayland connection must outlive the PipeWire consumer.
44
bool
start_capture(
bool
cursor, std::uint64_t &serial, std::string &error);
45
bool
dispatch(std::chrono::milliseconds
timeout
);
46
bool
pointer_motion(
double
dx,
double
dy);
47
bool
pointer_absolute(
double
x,
double
y);
48
bool
button(std::uint32_t evdev_button,
bool
pressed);
49
bool
axis(
bool
horizontal,
double
value);
50
bool
key(std::uint32_t evdev_key,
bool
pressed);
51
// Touch points are in the compositor's global logical coordinates. Every
52
// down, motion or up is followed by its own frame.
53
bool
touch_down(std::uint32_t
id
,
double
x,
double
y);
54
bool
touch_motion(std::uint32_t
id
,
double
x,
double
y);
55
bool
touch_up(std::uint32_t
id
);
56
bool
keysym(std::uint32_t symbol,
bool
pressed);
57
std::string error()
const
;
58
59
private
:
60
struct
impl_t
;
61
explicit
connection_t(std::unique_ptr<impl_t> impl);
62
std::unique_ptr<impl_t> impl;
63
};
64
}
// namespace platf::kwin
platf::input
input_t input(const std::string &session_tag={})
Definition
virtualhid.cpp:99
platf::capture_e::timeout
@ timeout
Timeout.
Definition
common.h:438
platf::kwin::connection_t::impl_t
Definition
kwin_session.cpp:40
platf::kwin::endpoint_t
Definition
kwin_session.h:13
platf::kwin::output_t
Definition
kwin_session.h:21
src
platform
linux
kwin_session.h
Generated by
1.18.0