screen-relay 0.0.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/Makefile +165 -0
- package/README.md +112 -1
- package/THIRD-PARTY-NOTICES.md +75 -0
- package/dist/cli/client.d.ts +28 -0
- package/dist/cli/commands.d.ts +52 -0
- package/dist/cli/config.d.ts +32 -0
- package/dist/cli/format.d.ts +15 -0
- package/dist/cli/help.d.ts +5 -0
- package/dist/cli/host/common.d.ts +23 -0
- package/dist/cli/host/doctor.d.ts +2 -0
- package/dist/cli/host/packages.d.ts +13 -0
- package/dist/cli/host/session_commands.d.ts +8 -0
- package/dist/cli/host/setup.d.ts +22 -0
- package/dist/cli/host/state.d.ts +23 -0
- package/dist/cli/host/supervisor.d.ts +94 -0
- package/dist/cli/host/watcher.d.ts +4 -0
- package/dist/cli/host/windows.d.ts +82 -0
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/mode.d.ts +14 -0
- package/dist/cli/output.d.ts +24 -0
- package/dist/cli/parser.d.ts +6 -0
- package/dist/cli/relay.mjs +12631 -0
- package/dist/cli/skills.d.ts +21 -0
- package/dist/cli/theme.d.ts +14 -0
- package/dist/protocol/errors.d.ts +155 -0
- package/dist/protocol/index.d.ts +119 -0
- package/dist/protocol/index.js +418 -0
- package/dist/sdk/index.d.ts +78 -0
- package/dist/sdk/index.js +834 -0
- package/dist/sdk/transport.d.ts +20 -0
- package/dist/viewer/index.html +96 -0
- package/dist/viewer/viewer.js +1079 -0
- package/package.json +47 -7
- package/packages.tsv +38 -0
- package/skills/core/SKILL.md +171 -0
- package/skills/core/references/cli.md +119 -0
- package/skills/core/references/config.md +48 -0
- package/skills/core/references/macos.md +50 -0
- package/skills/core/references/sdk.md +69 -0
- package/skills/core/references/troubleshooting.md +33 -0
- package/skills/core/references/wayland.md +47 -0
- package/skills/screen-relay/SKILL.md +24 -0
- package/skills/vercel-sandbox/SKILL.md +68 -0
- package/src/engine/backends/linux/keycodes.hpp +35 -0
- package/src/engine/backends/linux/wayland/capture.cpp +298 -0
- package/src/engine/backends/linux/wayland/input.cpp +559 -0
- package/src/engine/backends/linux/wayland/keymap.cpp +118 -0
- package/src/engine/backends/linux/wayland/keymap.hpp +54 -0
- package/src/engine/backends/linux/wayland/protocols/virtual-keyboard-unstable-v1.xml +112 -0
- package/src/engine/backends/linux/wayland/protocols/wlr-screencopy-unstable-v1.xml +234 -0
- package/src/engine/backends/linux/wayland/protocols/wlr-virtual-pointer-unstable-v1.xml +152 -0
- package/src/engine/backends/linux/wayland/wayland.cpp +166 -0
- package/src/engine/backends/linux/wayland/wayland.hpp +60 -0
- package/src/engine/backends/linux/x11/capture.cpp +206 -0
- package/src/engine/backends/linux/x11/input.cpp +266 -0
- package/src/engine/backends/macos/capture.mm +367 -0
- package/src/engine/backends/macos/display.hpp +20 -0
- package/src/engine/backends/macos/display.mm +84 -0
- package/src/engine/backends/macos/input.mm +287 -0
- package/src/engine/backends/macos/keys.hpp +34 -0
- package/src/engine/backends/windows/capture.cpp +393 -0
- package/src/engine/backends/windows/input.cpp +274 -0
- package/src/engine/backends/windows/output.cpp +65 -0
- package/src/engine/backends/windows/output.hpp +26 -0
- package/src/engine/core/capture-bucket.hpp +40 -0
- package/src/engine/core/capture-source.hpp +59 -0
- package/src/engine/core/capture.cpp +565 -0
- package/src/engine/core/capture.hpp +58 -0
- package/src/engine/core/color.cpp +176 -0
- package/src/engine/core/color.hpp +16 -0
- package/src/engine/core/cpu-budget.hpp +196 -0
- package/src/engine/core/flow.hpp +317 -0
- package/src/engine/core/input.cpp +98 -0
- package/src/engine/core/input.hpp +115 -0
- package/src/engine/core/wait.cpp +125 -0
- package/src/engine/core/wait.hpp +41 -0
- package/src/engine/server/backend.cpp +65 -0
- package/src/engine/server/backend.hpp +18 -0
- package/src/engine/server/config.cpp +257 -0
- package/src/engine/server/config.hpp +24 -0
- package/src/engine/server/main.cpp +82 -0
- package/src/engine/server/metrics.cpp +47 -0
- package/src/engine/server/metrics.hpp +10 -0
- package/src/engine/server/screenshot.cpp +108 -0
- package/src/engine/server/screenshot.hpp +31 -0
- package/src/engine/server/server.cpp +535 -0
- package/src/engine/server/server.hpp +89 -0
- package/src/engine/server/wire.cpp +70 -0
- package/src/engine/server/wire.hpp +29 -0
- package/index.js +0 -2
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#include <cstddef>
|
|
3
|
+
#include <cstdint>
|
|
4
|
+
#include <map>
|
|
5
|
+
#include <memory>
|
|
6
|
+
#include <string>
|
|
7
|
+
#include <vector>
|
|
8
|
+
#include <xkbcommon/xkbcommon.h>
|
|
9
|
+
|
|
10
|
+
namespace relay::wayland {
|
|
11
|
+
struct XkbContextDeleter {
|
|
12
|
+
void operator()(xkb_context* context) const { xkb_context_unref(context); }
|
|
13
|
+
};
|
|
14
|
+
struct XkbKeymapDeleter {
|
|
15
|
+
void operator()(xkb_keymap* keymap) const { xkb_keymap_unref(keymap); }
|
|
16
|
+
};
|
|
17
|
+
struct XkbStateDeleter {
|
|
18
|
+
void operator()(xkb_state* state) const { xkb_state_unref(state); }
|
|
19
|
+
};
|
|
20
|
+
using XkbContext = std::unique_ptr<xkb_context, XkbContextDeleter>;
|
|
21
|
+
using XkbKeymap = std::unique_ptr<xkb_keymap, XkbKeymapDeleter>;
|
|
22
|
+
using XkbState = std::unique_ptr<xkb_state, XkbStateDeleter>;
|
|
23
|
+
|
|
24
|
+
/** Most spare keys a Keymap takes: a base keymap that leaves fewer keycodes unbound gets fewer. */
|
|
25
|
+
constexpr size_t spareSlots = 32;
|
|
26
|
+
/** Returns libxkbcommon's default XKB text v1 keymap. */
|
|
27
|
+
std::string defaultKeymap();
|
|
28
|
+
/** A virtual keyboard keymap: a base keymap plus spare keys that are reassigned to Unicode codepoints. */
|
|
29
|
+
class Keymap {
|
|
30
|
+
public:
|
|
31
|
+
/** Takes an XKB text v1 keymap; throws std::runtime_error if libxkbcommon cannot compile it. */
|
|
32
|
+
explicit Keymap(const std::string& base);
|
|
33
|
+
/** Returns the evdev keycode that types codepoint. Sets changed when text() needs re-upload and returns 0 when no keysym exists. */
|
|
34
|
+
uint32_t assign(uint32_t codepoint, bool& changed);
|
|
35
|
+
/** Current XKB text v1 keymap, NUL-free. */
|
|
36
|
+
const std::string& text() const;
|
|
37
|
+
|
|
38
|
+
private:
|
|
39
|
+
struct Slot {
|
|
40
|
+
uint32_t keycode = 0;
|
|
41
|
+
std::string name;
|
|
42
|
+
uint32_t codepoint = 0;
|
|
43
|
+
uint32_t symbol = 0;
|
|
44
|
+
uint64_t used = 0;
|
|
45
|
+
};
|
|
46
|
+
void refresh();
|
|
47
|
+
std::string original;
|
|
48
|
+
std::string current;
|
|
49
|
+
std::map<uint32_t, uint32_t> direct;
|
|
50
|
+
std::vector<Slot> slots;
|
|
51
|
+
size_t insertAt = 0;
|
|
52
|
+
uint64_t typed = 0;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<protocol name="virtual_keyboard_unstable_v1">
|
|
3
|
+
<copyright>
|
|
4
|
+
Copyright © 2008-2011 Kristian Høgsberg
|
|
5
|
+
Copyright © 2010-2013 Intel Corporation
|
|
6
|
+
Copyright © 2012-2013 Collabora, Ltd.
|
|
7
|
+
Copyright © 2018 Purism SPC
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
10
|
+
copy of this software and associated documentation files (the "Software"),
|
|
11
|
+
to deal in the Software without restriction, including without limitation
|
|
12
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
13
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
|
14
|
+
Software is furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice (including the next
|
|
17
|
+
paragraph) shall be included in all copies or substantial portions of the
|
|
18
|
+
Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
23
|
+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
25
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
26
|
+
DEALINGS IN THE SOFTWARE.
|
|
27
|
+
</copyright>
|
|
28
|
+
|
|
29
|
+
<interface name="zwp_virtual_keyboard_v1" version="1">
|
|
30
|
+
<description summary="virtual keyboard">
|
|
31
|
+
The virtual keyboard provides an application with requests which emulate
|
|
32
|
+
the behaviour of a physical keyboard.
|
|
33
|
+
|
|
34
|
+
This interface can be used by clients on its own to provide raw input
|
|
35
|
+
events, or it can accompany the input method protocol.
|
|
36
|
+
</description>
|
|
37
|
+
|
|
38
|
+
<request name="keymap">
|
|
39
|
+
<description summary="keyboard mapping">
|
|
40
|
+
Provide a file descriptor to the compositor which can be
|
|
41
|
+
memory-mapped to provide a keyboard mapping description.
|
|
42
|
+
</description>
|
|
43
|
+
<arg name="format" type="uint" enum="wl_keyboard.keymap_format" summary="keymap format"/>
|
|
44
|
+
<arg name="fd" type="fd" summary="keymap file descriptor"/>
|
|
45
|
+
<arg name="size" type="uint" summary="keymap size, in bytes"/>
|
|
46
|
+
</request>
|
|
47
|
+
|
|
48
|
+
<enum name="error">
|
|
49
|
+
<entry name="no_keymap" value="0" summary="No keymap was set"/>
|
|
50
|
+
<entry name="invalid_keymap_format" value="1" summary="Invalid keymap format"/>
|
|
51
|
+
</enum>
|
|
52
|
+
|
|
53
|
+
<request name="key">
|
|
54
|
+
<description summary="key event">
|
|
55
|
+
A key was pressed or released.
|
|
56
|
+
The time argument is a timestamp with millisecond granularity, with an
|
|
57
|
+
undefined base. All requests regarding a single object must share the
|
|
58
|
+
same clock.
|
|
59
|
+
|
|
60
|
+
Keymap must be set before issuing this request.
|
|
61
|
+
|
|
62
|
+
State carries a value from the key_state enumeration.
|
|
63
|
+
</description>
|
|
64
|
+
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
|
|
65
|
+
<arg name="key" type="uint" summary="key that produced the event"/>
|
|
66
|
+
<arg name="state" type="uint" summary="physical state of the key"/>
|
|
67
|
+
</request>
|
|
68
|
+
|
|
69
|
+
<request name="modifiers">
|
|
70
|
+
<description summary="modifier and group state">
|
|
71
|
+
Notifies the compositor that the modifier and/or group state has
|
|
72
|
+
changed, and it should update state.
|
|
73
|
+
|
|
74
|
+
The client should use wl_keyboard.modifiers event to synchronize its
|
|
75
|
+
internal state with seat state.
|
|
76
|
+
|
|
77
|
+
Keymap must be set before issuing this request.
|
|
78
|
+
</description>
|
|
79
|
+
<arg name="mods_depressed" type="uint" summary="depressed modifiers"/>
|
|
80
|
+
<arg name="mods_latched" type="uint" summary="latched modifiers"/>
|
|
81
|
+
<arg name="mods_locked" type="uint" summary="locked modifiers"/>
|
|
82
|
+
<arg name="group" type="uint" summary="keyboard layout"/>
|
|
83
|
+
</request>
|
|
84
|
+
|
|
85
|
+
<request name="destroy" type="destructor" since="1">
|
|
86
|
+
<description summary="destroy the virtual keyboard keyboard object"/>
|
|
87
|
+
</request>
|
|
88
|
+
</interface>
|
|
89
|
+
|
|
90
|
+
<interface name="zwp_virtual_keyboard_manager_v1" version="1">
|
|
91
|
+
<description summary="virtual keyboard manager">
|
|
92
|
+
A virtual keyboard manager allows an application to provide keyboard
|
|
93
|
+
input events as if they came from a physical keyboard.
|
|
94
|
+
</description>
|
|
95
|
+
|
|
96
|
+
<enum name="error">
|
|
97
|
+
<entry name="unauthorized" value="0" summary="client not authorized to use the interface"/>
|
|
98
|
+
</enum>
|
|
99
|
+
|
|
100
|
+
<request name="create_virtual_keyboard">
|
|
101
|
+
<description summary="Create a new virtual keyboard">
|
|
102
|
+
Creates a new virtual keyboard associated to a seat.
|
|
103
|
+
|
|
104
|
+
If the compositor enables a keyboard to perform arbitrary actions, it
|
|
105
|
+
should present an error when an untrusted client requests a new
|
|
106
|
+
keyboard.
|
|
107
|
+
</description>
|
|
108
|
+
<arg name="seat" type="object" interface="wl_seat"/>
|
|
109
|
+
<arg name="id" type="new_id" interface="zwp_virtual_keyboard_v1"/>
|
|
110
|
+
</request>
|
|
111
|
+
</interface>
|
|
112
|
+
</protocol>
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<protocol name="wlr_screencopy_unstable_v1">
|
|
3
|
+
<copyright>
|
|
4
|
+
Copyright © 2018 Simon Ser
|
|
5
|
+
Copyright © 2019 Andri Yngvason
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
8
|
+
copy of this software and associated documentation files (the "Software"),
|
|
9
|
+
to deal in the Software without restriction, including without limitation
|
|
10
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
11
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
|
12
|
+
Software is furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice (including the next
|
|
15
|
+
paragraph) shall be included in all copies or substantial portions of the
|
|
16
|
+
Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
21
|
+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
23
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
24
|
+
DEALINGS IN THE SOFTWARE.
|
|
25
|
+
</copyright>
|
|
26
|
+
|
|
27
|
+
<description summary="screen content capturing on client buffers">
|
|
28
|
+
This protocol allows clients to ask the compositor to copy part of the
|
|
29
|
+
screen content to a client buffer.
|
|
30
|
+
|
|
31
|
+
Warning! The protocol described in this file is experimental and
|
|
32
|
+
backward incompatible changes may be made. Backward compatible changes
|
|
33
|
+
may be added together with the corresponding interface version bump.
|
|
34
|
+
Backward incompatible changes are done by bumping the version number in
|
|
35
|
+
the protocol and interface names and resetting the interface version.
|
|
36
|
+
Once the protocol is to be declared stable, the 'z' prefix and the
|
|
37
|
+
version number in the protocol and interface names are removed and the
|
|
38
|
+
interface version number is reset.
|
|
39
|
+
|
|
40
|
+
Note! This protocol is deprecated and not intended for production use.
|
|
41
|
+
The ext-image-copy-capture-v1 protocol should be used instead.
|
|
42
|
+
</description>
|
|
43
|
+
|
|
44
|
+
<interface name="zwlr_screencopy_manager_v1" version="3">
|
|
45
|
+
<description summary="manager to inform clients and begin capturing">
|
|
46
|
+
This object is a manager which offers requests to start capturing from a
|
|
47
|
+
source.
|
|
48
|
+
</description>
|
|
49
|
+
|
|
50
|
+
<request name="capture_output">
|
|
51
|
+
<description summary="capture an output">
|
|
52
|
+
Capture the next frame of an entire output.
|
|
53
|
+
</description>
|
|
54
|
+
<arg name="frame" type="new_id" interface="zwlr_screencopy_frame_v1"/>
|
|
55
|
+
<arg name="overlay_cursor" type="int"
|
|
56
|
+
summary="composite cursor onto the frame"/>
|
|
57
|
+
<arg name="output" type="object" interface="wl_output"/>
|
|
58
|
+
</request>
|
|
59
|
+
|
|
60
|
+
<request name="capture_output_region">
|
|
61
|
+
<description summary="capture an output's region">
|
|
62
|
+
Capture the next frame of an output's region.
|
|
63
|
+
|
|
64
|
+
The region is given in output logical coordinates, see
|
|
65
|
+
xdg_output.logical_size. The region will be clipped to the output's
|
|
66
|
+
extents.
|
|
67
|
+
</description>
|
|
68
|
+
<arg name="frame" type="new_id" interface="zwlr_screencopy_frame_v1"/>
|
|
69
|
+
<arg name="overlay_cursor" type="int"
|
|
70
|
+
summary="composite cursor onto the frame"/>
|
|
71
|
+
<arg name="output" type="object" interface="wl_output"/>
|
|
72
|
+
<arg name="x" type="int"/>
|
|
73
|
+
<arg name="y" type="int"/>
|
|
74
|
+
<arg name="width" type="int"/>
|
|
75
|
+
<arg name="height" type="int"/>
|
|
76
|
+
</request>
|
|
77
|
+
|
|
78
|
+
<request name="destroy" type="destructor">
|
|
79
|
+
<description summary="destroy the manager">
|
|
80
|
+
All objects created by the manager will still remain valid, until their
|
|
81
|
+
appropriate destroy request has been called.
|
|
82
|
+
</description>
|
|
83
|
+
</request>
|
|
84
|
+
</interface>
|
|
85
|
+
|
|
86
|
+
<interface name="zwlr_screencopy_frame_v1" version="3">
|
|
87
|
+
<description summary="a frame ready for copy">
|
|
88
|
+
This object represents a single frame.
|
|
89
|
+
|
|
90
|
+
When created, a series of buffer events will be sent, each representing a
|
|
91
|
+
supported buffer type. The "buffer_done" event is sent afterwards to
|
|
92
|
+
indicate that all supported buffer types have been enumerated. The client
|
|
93
|
+
will then be able to send a "copy" request. If the capture is successful,
|
|
94
|
+
the compositor will send a "flags" event followed by a "ready" event.
|
|
95
|
+
|
|
96
|
+
For objects version 2 or lower, wl_shm buffers are always supported, ie.
|
|
97
|
+
the "buffer" event is guaranteed to be sent.
|
|
98
|
+
|
|
99
|
+
If the capture failed, the "failed" event is sent. This can happen anytime
|
|
100
|
+
before the "ready" event.
|
|
101
|
+
|
|
102
|
+
Once either a "ready" or a "failed" event is received, the client should
|
|
103
|
+
destroy the frame.
|
|
104
|
+
</description>
|
|
105
|
+
|
|
106
|
+
<event name="buffer">
|
|
107
|
+
<description summary="wl_shm buffer information">
|
|
108
|
+
Provides information about wl_shm buffer parameters that need to be
|
|
109
|
+
used for this frame. This event is sent once after the frame is created
|
|
110
|
+
if wl_shm buffers are supported.
|
|
111
|
+
</description>
|
|
112
|
+
<arg name="format" type="uint" enum="wl_shm.format" summary="buffer format"/>
|
|
113
|
+
<arg name="width" type="uint" summary="buffer width"/>
|
|
114
|
+
<arg name="height" type="uint" summary="buffer height"/>
|
|
115
|
+
<arg name="stride" type="uint" summary="buffer stride"/>
|
|
116
|
+
</event>
|
|
117
|
+
|
|
118
|
+
<request name="copy">
|
|
119
|
+
<description summary="copy the frame">
|
|
120
|
+
Copy the frame to the supplied buffer. The buffer must have the
|
|
121
|
+
correct size, see zwlr_screencopy_frame_v1.buffer and
|
|
122
|
+
zwlr_screencopy_frame_v1.linux_dmabuf. The buffer needs to have a
|
|
123
|
+
supported format.
|
|
124
|
+
|
|
125
|
+
If the frame is successfully copied, "flags" and "ready" events are
|
|
126
|
+
sent. Otherwise, a "failed" event is sent.
|
|
127
|
+
</description>
|
|
128
|
+
<arg name="buffer" type="object" interface="wl_buffer"/>
|
|
129
|
+
</request>
|
|
130
|
+
|
|
131
|
+
<enum name="error">
|
|
132
|
+
<entry name="already_used" value="0"
|
|
133
|
+
summary="the object has already been used to copy a wl_buffer"/>
|
|
134
|
+
<entry name="invalid_buffer" value="1"
|
|
135
|
+
summary="buffer attributes are invalid"/>
|
|
136
|
+
</enum>
|
|
137
|
+
|
|
138
|
+
<enum name="flags" bitfield="true">
|
|
139
|
+
<entry name="y_invert" value="1" summary="contents are y-inverted"/>
|
|
140
|
+
</enum>
|
|
141
|
+
|
|
142
|
+
<event name="flags">
|
|
143
|
+
<description summary="frame flags">
|
|
144
|
+
Provides flags about the frame. This event is sent once before the
|
|
145
|
+
"ready" event.
|
|
146
|
+
</description>
|
|
147
|
+
<arg name="flags" type="uint" enum="flags" summary="frame flags"/>
|
|
148
|
+
</event>
|
|
149
|
+
|
|
150
|
+
<event name="ready">
|
|
151
|
+
<description summary="indicates frame is available for reading">
|
|
152
|
+
Called as soon as the frame is copied, indicating it is available
|
|
153
|
+
for reading. This event includes the time at which the presentation took place.
|
|
154
|
+
|
|
155
|
+
The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples,
|
|
156
|
+
each component being an unsigned 32-bit value. Whole seconds are in
|
|
157
|
+
tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo,
|
|
158
|
+
and the additional fractional part in tv_nsec as nanoseconds. Hence,
|
|
159
|
+
for valid timestamps tv_nsec must be in [0, 999999999]. The seconds part
|
|
160
|
+
may have an arbitrary offset at start.
|
|
161
|
+
|
|
162
|
+
After receiving this event, the client should destroy the object.
|
|
163
|
+
</description>
|
|
164
|
+
<arg name="tv_sec_hi" type="uint"
|
|
165
|
+
summary="high 32 bits of the seconds part of the timestamp"/>
|
|
166
|
+
<arg name="tv_sec_lo" type="uint"
|
|
167
|
+
summary="low 32 bits of the seconds part of the timestamp"/>
|
|
168
|
+
<arg name="tv_nsec" type="uint"
|
|
169
|
+
summary="nanoseconds part of the timestamp"/>
|
|
170
|
+
</event>
|
|
171
|
+
|
|
172
|
+
<event name="failed">
|
|
173
|
+
<description summary="frame copy failed">
|
|
174
|
+
This event indicates that the attempted frame copy has failed.
|
|
175
|
+
|
|
176
|
+
After receiving this event, the client should destroy the object.
|
|
177
|
+
</description>
|
|
178
|
+
</event>
|
|
179
|
+
|
|
180
|
+
<request name="destroy" type="destructor">
|
|
181
|
+
<description summary="delete this object, used or not">
|
|
182
|
+
Destroys the frame. This request can be sent at any time by the client.
|
|
183
|
+
</description>
|
|
184
|
+
</request>
|
|
185
|
+
|
|
186
|
+
<!-- Version 2 additions -->
|
|
187
|
+
<request name="copy_with_damage" since="2">
|
|
188
|
+
<description summary="copy the frame when it's damaged">
|
|
189
|
+
Same as copy, except it waits until there is damage to copy.
|
|
190
|
+
</description>
|
|
191
|
+
<arg name="buffer" type="object" interface="wl_buffer"/>
|
|
192
|
+
</request>
|
|
193
|
+
|
|
194
|
+
<event name="damage" since="2">
|
|
195
|
+
<description summary="carries the coordinates of the damaged region">
|
|
196
|
+
This event is sent right before the ready event when copy_with_damage is
|
|
197
|
+
requested. It may be generated multiple times for each copy_with_damage
|
|
198
|
+
request.
|
|
199
|
+
|
|
200
|
+
The arguments describe a box around an area that has changed since the
|
|
201
|
+
last copy request that was derived from the current screencopy manager
|
|
202
|
+
instance.
|
|
203
|
+
|
|
204
|
+
The union of all regions received between the call to copy_with_damage
|
|
205
|
+
and a ready event is the total damage since the prior ready event.
|
|
206
|
+
</description>
|
|
207
|
+
<arg name="x" type="uint" summary="damaged x coordinates"/>
|
|
208
|
+
<arg name="y" type="uint" summary="damaged y coordinates"/>
|
|
209
|
+
<arg name="width" type="uint" summary="current width"/>
|
|
210
|
+
<arg name="height" type="uint" summary="current height"/>
|
|
211
|
+
</event>
|
|
212
|
+
|
|
213
|
+
<!-- Version 3 additions -->
|
|
214
|
+
<event name="linux_dmabuf" since="3">
|
|
215
|
+
<description summary="linux-dmabuf buffer information">
|
|
216
|
+
Provides information about linux-dmabuf buffer parameters that need to
|
|
217
|
+
be used for this frame. This event is sent once after the frame is
|
|
218
|
+
created if linux-dmabuf buffers are supported.
|
|
219
|
+
</description>
|
|
220
|
+
<arg name="format" type="uint" summary="fourcc pixel format"/>
|
|
221
|
+
<arg name="width" type="uint" summary="buffer width"/>
|
|
222
|
+
<arg name="height" type="uint" summary="buffer height"/>
|
|
223
|
+
</event>
|
|
224
|
+
|
|
225
|
+
<event name="buffer_done" since="3">
|
|
226
|
+
<description summary="all buffer types reported">
|
|
227
|
+
This event is sent once after all buffer events have been sent.
|
|
228
|
+
|
|
229
|
+
The client should proceed to create a buffer of one of the supported
|
|
230
|
+
types, and send a "copy" request.
|
|
231
|
+
</description>
|
|
232
|
+
</event>
|
|
233
|
+
</interface>
|
|
234
|
+
</protocol>
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<protocol name="wlr_virtual_pointer_unstable_v1">
|
|
3
|
+
<copyright>
|
|
4
|
+
Copyright © 2019 Josef Gajdusek
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
7
|
+
copy of this software and associated documentation files (the "Software"),
|
|
8
|
+
to deal in the Software without restriction, including without limitation
|
|
9
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
10
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
|
11
|
+
Software is furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice (including the next
|
|
14
|
+
paragraph) shall be included in all copies or substantial portions of the
|
|
15
|
+
Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
20
|
+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
22
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
23
|
+
DEALINGS IN THE SOFTWARE.
|
|
24
|
+
</copyright>
|
|
25
|
+
|
|
26
|
+
<interface name="zwlr_virtual_pointer_v1" version="2">
|
|
27
|
+
<description summary="virtual pointer">
|
|
28
|
+
This protocol allows clients to emulate a physical pointer device. The
|
|
29
|
+
requests are mostly mirror opposites of those specified in wl_pointer.
|
|
30
|
+
</description>
|
|
31
|
+
|
|
32
|
+
<enum name="error">
|
|
33
|
+
<entry name="invalid_axis" value="0"
|
|
34
|
+
summary="client sent invalid axis enumeration value" />
|
|
35
|
+
<entry name="invalid_axis_source" value="1"
|
|
36
|
+
summary="client sent invalid axis source enumeration value" />
|
|
37
|
+
</enum>
|
|
38
|
+
|
|
39
|
+
<request name="motion">
|
|
40
|
+
<description summary="pointer relative motion event">
|
|
41
|
+
The pointer has moved by a relative amount to the previous request.
|
|
42
|
+
|
|
43
|
+
Values are in the global compositor space.
|
|
44
|
+
</description>
|
|
45
|
+
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
|
|
46
|
+
<arg name="dx" type="fixed" summary="displacement on the x-axis"/>
|
|
47
|
+
<arg name="dy" type="fixed" summary="displacement on the y-axis"/>
|
|
48
|
+
</request>
|
|
49
|
+
|
|
50
|
+
<request name="motion_absolute">
|
|
51
|
+
<description summary="pointer absolute motion event">
|
|
52
|
+
The pointer has moved in an absolute coordinate frame.
|
|
53
|
+
|
|
54
|
+
Value of x can range from 0 to x_extent, value of y can range from 0
|
|
55
|
+
to y_extent.
|
|
56
|
+
</description>
|
|
57
|
+
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
|
|
58
|
+
<arg name="x" type="uint" summary="position on the x-axis"/>
|
|
59
|
+
<arg name="y" type="uint" summary="position on the y-axis"/>
|
|
60
|
+
<arg name="x_extent" type="uint" summary="extent of the x-axis"/>
|
|
61
|
+
<arg name="y_extent" type="uint" summary="extent of the y-axis"/>
|
|
62
|
+
</request>
|
|
63
|
+
|
|
64
|
+
<request name="button">
|
|
65
|
+
<description summary="button event">
|
|
66
|
+
A button was pressed or released.
|
|
67
|
+
</description>
|
|
68
|
+
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
|
|
69
|
+
<arg name="button" type="uint" summary="button that produced the event"/>
|
|
70
|
+
<arg name="state" type="uint" enum="wl_pointer.button_state" summary="physical state of the button"/>
|
|
71
|
+
</request>
|
|
72
|
+
|
|
73
|
+
<request name="axis">
|
|
74
|
+
<description summary="axis event">
|
|
75
|
+
Scroll and other axis requests.
|
|
76
|
+
</description>
|
|
77
|
+
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
|
|
78
|
+
<arg name="axis" type="uint" enum="wl_pointer.axis" summary="axis type"/>
|
|
79
|
+
<arg name="value" type="fixed" summary="length of vector in touchpad coordinates"/>
|
|
80
|
+
</request>
|
|
81
|
+
|
|
82
|
+
<request name="frame">
|
|
83
|
+
<description summary="end of a pointer event sequence">
|
|
84
|
+
Indicates the set of events that logically belong together.
|
|
85
|
+
</description>
|
|
86
|
+
</request>
|
|
87
|
+
|
|
88
|
+
<request name="axis_source">
|
|
89
|
+
<description summary="axis source event">
|
|
90
|
+
Source information for scroll and other axis.
|
|
91
|
+
</description>
|
|
92
|
+
<arg name="axis_source" type="uint" enum="wl_pointer.axis_source" summary="source of the axis event"/>
|
|
93
|
+
</request>
|
|
94
|
+
|
|
95
|
+
<request name="axis_stop">
|
|
96
|
+
<description summary="axis stop event">
|
|
97
|
+
Stop notification for scroll and other axes.
|
|
98
|
+
</description>
|
|
99
|
+
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
|
|
100
|
+
<arg name="axis" type="uint" enum="wl_pointer.axis" summary="the axis stopped with this event"/>
|
|
101
|
+
</request>
|
|
102
|
+
|
|
103
|
+
<request name="axis_discrete">
|
|
104
|
+
<description summary="axis click event">
|
|
105
|
+
Discrete step information for scroll and other axes.
|
|
106
|
+
|
|
107
|
+
This event allows the client to extend data normally sent using the axis
|
|
108
|
+
event with discrete value.
|
|
109
|
+
</description>
|
|
110
|
+
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
|
|
111
|
+
<arg name="axis" type="uint" enum="wl_pointer.axis" summary="axis type"/>
|
|
112
|
+
<arg name="value" type="fixed" summary="length of vector in touchpad coordinates"/>
|
|
113
|
+
<arg name="discrete" type="int" summary="number of steps"/>
|
|
114
|
+
</request>
|
|
115
|
+
|
|
116
|
+
<request name="destroy" type="destructor" since="1">
|
|
117
|
+
<description summary="destroy the virtual pointer object"/>
|
|
118
|
+
</request>
|
|
119
|
+
</interface>
|
|
120
|
+
|
|
121
|
+
<interface name="zwlr_virtual_pointer_manager_v1" version="2">
|
|
122
|
+
<description summary="virtual pointer manager">
|
|
123
|
+
This object allows clients to create individual virtual pointer objects.
|
|
124
|
+
</description>
|
|
125
|
+
|
|
126
|
+
<request name="create_virtual_pointer">
|
|
127
|
+
<description summary="Create a new virtual pointer">
|
|
128
|
+
Creates a new virtual pointer. The optional seat is a suggestion to the
|
|
129
|
+
compositor.
|
|
130
|
+
</description>
|
|
131
|
+
<arg name="seat" type="object" interface="wl_seat" allow-null="true"/>
|
|
132
|
+
<arg name="id" type="new_id" interface="zwlr_virtual_pointer_v1"/>
|
|
133
|
+
</request>
|
|
134
|
+
|
|
135
|
+
<request name="destroy" type="destructor" since="1">
|
|
136
|
+
<description summary="destroy the virtual pointer manager"/>
|
|
137
|
+
</request>
|
|
138
|
+
|
|
139
|
+
<!-- Version 2 additions -->
|
|
140
|
+
<request name="create_virtual_pointer_with_output" since="2">
|
|
141
|
+
<description summary="Create a new virtual pointer">
|
|
142
|
+
Creates a new virtual pointer. The seat and the output arguments are
|
|
143
|
+
optional. If the seat argument is set, the compositor should assign the
|
|
144
|
+
input device to the requested seat. If the output argument is set, the
|
|
145
|
+
compositor should map the input device to the requested output.
|
|
146
|
+
</description>
|
|
147
|
+
<arg name="seat" type="object" interface="wl_seat" allow-null="true"/>
|
|
148
|
+
<arg name="output" type="object" interface="wl_output" allow-null="true"/>
|
|
149
|
+
<arg name="id" type="new_id" interface="zwlr_virtual_pointer_v1"/>
|
|
150
|
+
</request>
|
|
151
|
+
</interface>
|
|
152
|
+
</protocol>
|