diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/CMakeLists.txt | 46 | ||||
-rw-r--r-- | protocols/desktop-shell.xml | 138 | ||||
-rw-r--r-- | protocols/gamma-control.xml | 57 | ||||
-rw-r--r-- | protocols/meson.build | 73 | ||||
-rw-r--r-- | protocols/server-decoration.xml | 94 | ||||
-rw-r--r-- | protocols/swaylock.xml | 18 | ||||
-rw-r--r-- | protocols/wlr-input-inhibitor-unstable-v1.xml | 67 | ||||
-rw-r--r-- | protocols/wlr-layer-shell-unstable-v1.xml | 281 | ||||
-rw-r--r-- | protocols/xdg-shell.xml | 430 |
9 files changed, 421 insertions, 783 deletions
diff --git a/protocols/CMakeLists.txt b/protocols/CMakeLists.txt deleted file mode 100644 index 8d8e58ad..00000000 --- a/protocols/CMakeLists.txt +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | include(Wayland) | ||
2 | |||
3 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-client-xdg-shell | ||
4 | xdg-shell.xml | ||
5 | xdg-shell | ||
6 | ) | ||
7 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-client-desktop-shell | ||
8 | desktop-shell.xml | ||
9 | desktop-shell | ||
10 | ) | ||
11 | WAYLAND_ADD_PROTOCOL_SERVER(proto-server-desktop-shell | ||
12 | desktop-shell.xml | ||
13 | desktop-shell | ||
14 | ) | ||
15 | |||
16 | WAYLAND_ADD_PROTOCOL_CLIENT(proto-client-swaylock | ||
17 | swaylock.xml | ||
18 | swaylock | ||
19 | ) | ||
20 | WAYLAND_ADD_PROTOCOL_SERVER(proto-server-swaylock | ||
21 | swaylock.xml | ||
22 | swaylock | ||
23 | ) | ||
24 | |||
25 | WAYLAND_ADD_PROTOCOL_SERVER(proto-server-gamma-control | ||
26 | gamma-control.xml | ||
27 | gamma-control | ||
28 | ) | ||
29 | |||
30 | WAYLAND_ADD_PROTOCOL_SERVER(proto-server-server-decoration | ||
31 | server-decoration.xml | ||
32 | server-decoration | ||
33 | ) | ||
34 | |||
35 | add_library(sway-protocols STATIC | ||
36 | ${proto-client-xdg-shell} | ||
37 | ${proto-client-desktop-shell} | ||
38 | ${proto-server-desktop-shell} | ||
39 | ${proto-client-swaylock} | ||
40 | ${proto-server-swaylock} | ||
41 | ${proto-server-gamma-control} | ||
42 | ${proto-server-server-decoration} | ||
43 | ) | ||
44 | |||
45 | set(PROTOCOLS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/protocols PARENT_SCOPE) | ||
46 | INCLUDE_DIRECTORIES(${WAYLAND_INCLUDE_DIR} ${XKBCOMMON_INCLUDE_DIRS}) | ||
diff --git a/protocols/desktop-shell.xml b/protocols/desktop-shell.xml deleted file mode 100644 index 581f0c5d..00000000 --- a/protocols/desktop-shell.xml +++ /dev/null | |||
@@ -1,138 +0,0 @@ | |||
1 | <protocol name="desktop"> | ||
2 | |||
3 | <interface name="desktop_shell" version="3"> | ||
4 | <description summary="create desktop widgets and helpers"> | ||
5 | Traditional user interfaces can rely on this interface to define the | ||
6 | foundations of typical desktops. Currently it's possible to set up | ||
7 | background, panels and locking surfaces. | ||
8 | </description> | ||
9 | |||
10 | <request name="set_background"> | ||
11 | <arg name="output" type="object" interface="wl_output"/> | ||
12 | <arg name="surface" type="object" interface="wl_surface"/> | ||
13 | </request> | ||
14 | |||
15 | <request name="set_panel"> | ||
16 | <arg name="output" type="object" interface="wl_output"/> | ||
17 | <arg name="surface" type="object" interface="wl_surface"/> | ||
18 | </request> | ||
19 | |||
20 | <request name="set_lock_surface"> | ||
21 | <arg name="surface" type="object" interface="wl_surface"/> | ||
22 | </request> | ||
23 | |||
24 | <request name="unlock"/> | ||
25 | |||
26 | <request name="set_grab_surface"> | ||
27 | <description summary="set grab surface"> | ||
28 | The surface set by this request will receive a fake | ||
29 | pointer.enter event during grabs at position 0, 0 and is | ||
30 | expected to set an appropriate cursor image as described by | ||
31 | the grab_cursor event sent just before the enter event. | ||
32 | </description> | ||
33 | <arg name="surface" type="object" interface="wl_surface"/> | ||
34 | </request> | ||
35 | |||
36 | <!-- We'll fold most of wl_shell into this interface and then | ||
37 | they'll share the configure event. --> | ||
38 | <event name="configure"> | ||
39 | <arg name="edges" type="uint"/> | ||
40 | <arg name="surface" type="object" interface="wl_surface"/> | ||
41 | <arg name="width" type="int"/> | ||
42 | <arg name="height" type="int"/> | ||
43 | </event> | ||
44 | |||
45 | <event name="prepare_lock_surface"> | ||
46 | <description summary="tell the client to create, set the lock surface"> | ||
47 | Tell the client we want it to create and set the lock surface, which is | ||
48 | a GUI asking the user to unlock the screen. The lock surface is | ||
49 | announced with 'set_lock_surface'. Whether or not the client actually | ||
50 | implements locking, it MUST send 'unlock' request to let the normal | ||
51 | desktop resume. | ||
52 | </description> | ||
53 | </event> | ||
54 | |||
55 | <event name="grab_cursor"> | ||
56 | <description summary="tell client what cursor to show during a grab"> | ||
57 | This event will be sent immediately before a fake enter event on the | ||
58 | grab surface. | ||
59 | </description> | ||
60 | <arg name="cursor" type="uint"/> | ||
61 | </event> | ||
62 | |||
63 | <enum name="cursor"> | ||
64 | <entry name="none" value="0"/> | ||
65 | |||
66 | <entry name="resize_top" value="1"/> | ||
67 | <entry name="resize_bottom" value="2"/> | ||
68 | |||
69 | <entry name="arrow" value="3"/> | ||
70 | |||
71 | <entry name="resize_left" value="4"/> | ||
72 | <entry name="resize_top_left" value="5"/> | ||
73 | <entry name="resize_bottom_left" value="6"/> | ||
74 | |||
75 | <entry name="move" value="7"/> | ||
76 | |||
77 | <entry name="resize_right" value="8"/> | ||
78 | <entry name="resize_top_right" value="9"/> | ||
79 | <entry name="resize_bottom_right" value="10"/> | ||
80 | |||
81 | <entry name="busy" value="11"/> | ||
82 | </enum> | ||
83 | |||
84 | <!-- Version 2 additions --> | ||
85 | |||
86 | <request name="desktop_ready" since="2"> | ||
87 | <description summary="desktop is ready to be shown"> | ||
88 | Tell the server, that enough desktop elements have been drawn | ||
89 | to make the desktop look ready for use. During start-up, the | ||
90 | server can wait for this request with a black screen before | ||
91 | starting to fade in the desktop, for instance. If the client | ||
92 | parts of a desktop take a long time to initialize, we avoid | ||
93 | showing temporary garbage. | ||
94 | </description> | ||
95 | </request> | ||
96 | |||
97 | <!-- Version 3 additions --> | ||
98 | |||
99 | <enum name="panel_position"> | ||
100 | <entry name="top" value="0"/> | ||
101 | <entry name="bottom" value="1"/> | ||
102 | <entry name="left" value="2"/> | ||
103 | <entry name="right" value="3"/> | ||
104 | </enum> | ||
105 | |||
106 | <enum name="error"> | ||
107 | <entry name="invalid_argument" value="0" | ||
108 | summary="an invalid argument was provided in a request"/> | ||
109 | </enum> | ||
110 | |||
111 | <request name="set_panel_position" since="3"> | ||
112 | <description summary="set panel position"> | ||
113 | Tell the shell which side of the screen the panel is | ||
114 | located. This is so that new windows do not overlap the panel | ||
115 | and maximized windows maximize properly. | ||
116 | </description> | ||
117 | <arg name="position" type="uint"/> | ||
118 | </request> | ||
119 | |||
120 | </interface> | ||
121 | |||
122 | <interface name="screensaver" version="1"> | ||
123 | <description summary="interface for implementing screensavers"> | ||
124 | Only one client can bind this interface at a time. | ||
125 | </description> | ||
126 | |||
127 | <request name="set_surface"> | ||
128 | <description summary="set the surface type as a screensaver"> | ||
129 | A screensaver surface is normally hidden, and only visible after an | ||
130 | idle timeout. | ||
131 | </description> | ||
132 | |||
133 | <arg name="surface" type="object" interface="wl_surface"/> | ||
134 | <arg name="output" type="object" interface="wl_output"/> | ||
135 | </request> | ||
136 | |||
137 | </interface> | ||
138 | </protocol> | ||
diff --git a/protocols/gamma-control.xml b/protocols/gamma-control.xml deleted file mode 100644 index e6e33265..00000000 --- a/protocols/gamma-control.xml +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <protocol name="gamma_control"> | ||
3 | |||
4 | <copyright> | ||
5 | Copyright © 2015 Giulio camuffo | ||
6 | |||
7 | Permission to use, copy, modify, distribute, and sell this | ||
8 | software and its documentation for any purpose is hereby granted | ||
9 | without fee, provided that the above copyright notice appear in | ||
10 | all copies and that both that copyright notice and this permission | ||
11 | notice appear in supporting documentation, and that the name of | ||
12 | the copyright holders not be used in advertising or publicity | ||
13 | pertaining to distribution of the software without specific, | ||
14 | written prior permission. The copyright holders make no | ||
15 | representations about the suitability of this software for any | ||
16 | purpose. It is provided "as is" without express or implied | ||
17 | warranty. | ||
18 | |||
19 | THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS | ||
20 | SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
21 | FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
22 | SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
23 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN | ||
24 | AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | ||
25 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF | ||
26 | THIS SOFTWARE. | ||
27 | </copyright> | ||
28 | |||
29 | <interface name="gamma_control_manager" version="1"> | ||
30 | <request name="destroy" type="destructor"/> | ||
31 | |||
32 | <request name="get_gamma_control"> | ||
33 | <arg name="id" type="new_id" interface="gamma_control"/> | ||
34 | <arg name="output" type="object" interface="wl_output"/> | ||
35 | </request> | ||
36 | </interface> | ||
37 | |||
38 | <interface name="gamma_control" version="1"> | ||
39 | <enum name="error"> | ||
40 | <entry name="invalid_gamma" value="0"/> | ||
41 | </enum> | ||
42 | |||
43 | <request name="destroy" type="destructor"/> | ||
44 | |||
45 | <request name="set_gamma"> | ||
46 | <arg name="red" type="array"/> | ||
47 | <arg name="green" type="array"/> | ||
48 | <arg name="blue" type="array"/> | ||
49 | </request> | ||
50 | |||
51 | <request name="reset_gamma"/> | ||
52 | |||
53 | <event name="gamma_size"> | ||
54 | <arg name="size" type="uint"/> | ||
55 | </event> | ||
56 | </interface> | ||
57 | </protocol> | ||
diff --git a/protocols/meson.build b/protocols/meson.build new file mode 100644 index 00000000..7f83b16b --- /dev/null +++ b/protocols/meson.build | |||
@@ -0,0 +1,73 @@ | |||
1 | wl_protocol_dir = wayland_protos.get_pkgconfig_variable('pkgdatadir') | ||
2 | |||
3 | wayland_scanner = find_program('wayland-scanner') | ||
4 | |||
5 | wayland_scanner_code = generator( | ||
6 | wayland_scanner, | ||
7 | output: '@BASENAME@-protocol.c', | ||
8 | arguments: ['code', '@INPUT@', '@OUTPUT@'], | ||
9 | ) | ||
10 | |||
11 | wayland_scanner_client = generator( | ||
12 | wayland_scanner, | ||
13 | output: '@BASENAME@-client-protocol.h', | ||
14 | arguments: ['client-header', '@INPUT@', '@OUTPUT@'], | ||
15 | ) | ||
16 | |||
17 | wayland_scanner_server = generator( | ||
18 | wayland_scanner, | ||
19 | output: '@BASENAME@-protocol.h', | ||
20 | arguments: ['server-header', '@INPUT@', '@OUTPUT@'], | ||
21 | ) | ||
22 | |||
23 | client_protocols = [ | ||
24 | [wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'], | ||
25 | ['wlr-layer-shell-unstable-v1.xml'], | ||
26 | ['wlr-input-inhibitor-unstable-v1.xml'] | ||
27 | ] | ||
28 | |||
29 | server_protocols = [ | ||
30 | [wl_protocol_dir, 'unstable/xdg-shell/xdg-shell-unstable-v6.xml'], | ||
31 | ['wlr-layer-shell-unstable-v1.xml'], | ||
32 | ['wlr-input-inhibitor-unstable-v1.xml'] | ||
33 | ] | ||
34 | |||
35 | client_protos_src = [] | ||
36 | client_protos_headers = [] | ||
37 | |||
38 | server_protos_src = [] | ||
39 | server_protos_headers = [] | ||
40 | |||
41 | foreach p : client_protocols | ||
42 | xml = join_paths(p) | ||
43 | client_protos_src += wayland_scanner_code.process(xml) | ||
44 | client_protos_headers += wayland_scanner_client.process(xml) | ||
45 | endforeach | ||
46 | |||
47 | foreach p : server_protocols | ||
48 | xml = join_paths(p) | ||
49 | server_protos_src += wayland_scanner_code.process(xml) | ||
50 | server_protos_headers += wayland_scanner_server.process(xml) | ||
51 | endforeach | ||
52 | |||
53 | lib_client_protos = static_library( | ||
54 | 'client_protos', | ||
55 | client_protos_src + client_protos_headers, | ||
56 | dependencies: [wayland_client] | ||
57 | ) # for the include directory | ||
58 | |||
59 | client_protos = declare_dependency( | ||
60 | link_with: lib_client_protos, | ||
61 | sources: client_protos_headers, | ||
62 | ) | ||
63 | |||
64 | lib_server_protos = static_library( | ||
65 | 'server_protos', | ||
66 | server_protos_src + server_protos_headers, | ||
67 | dependencies: [wayland_client] | ||
68 | ) # for the include directory | ||
69 | |||
70 | server_protos = declare_dependency( | ||
71 | link_with: lib_server_protos, | ||
72 | sources: server_protos_headers, | ||
73 | ) | ||
diff --git a/protocols/server-decoration.xml b/protocols/server-decoration.xml deleted file mode 100644 index 8bc106c7..00000000 --- a/protocols/server-decoration.xml +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <protocol name="server_decoration"> | ||
3 | <copyright><![CDATA[ | ||
4 | Copyright (C) 2015 Martin Gräßlin | ||
5 | |||
6 | This program is free software: you can redistribute it and/or modify | ||
7 | it under the terms of the GNU Lesser General Public License as published by | ||
8 | the Free Software Foundation, either version 2.1 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU Lesser General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU Lesser General Public License | ||
17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
18 | ]]></copyright> | ||
19 | <interface name="org_kde_kwin_server_decoration_manager" version="1"> | ||
20 | <description summary="Server side window decoration manager"> | ||
21 | This interface allows to coordinate whether the server should create | ||
22 | a server-side window decoration around a wl_surface representing a | ||
23 | shell surface (wl_shell_surface or similar). By announcing support | ||
24 | for this interface the server indicates that it supports server | ||
25 | side decorations. | ||
26 | </description> | ||
27 | <request name="create"> | ||
28 | <description summary="Create a server-side decoration object for a given surface"> | ||
29 | When a client creates a server-side decoration object it indicates | ||
30 | that it supports the protocol. The client is supposed to tell the | ||
31 | server whether it wants server-side decorations or will provide | ||
32 | client-side decorations. | ||
33 | |||
34 | If the client does not create a server-side decoration object for | ||
35 | a surface the server interprets this as lack of support for this | ||
36 | protocol and considers it as client-side decorated. Nevertheless a | ||
37 | client-side decorated surface should use this protocol to indicate | ||
38 | to the server that it does not want a server-side deco. | ||
39 | </description> | ||
40 | <arg name="id" type="new_id" interface="org_kde_kwin_server_decoration"/> | ||
41 | <arg name="surface" type="object" interface="wl_surface"/> | ||
42 | </request> | ||
43 | <enum name="mode"> | ||
44 | <description summary="Possible values to use in request_mode and the event mode."/> | ||
45 | <entry name="None" value="0" summary="Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated."/> | ||
46 | <entry name="Client" value="1" summary="Client-side decoration: The decoration is part of the surface and the client."/> | ||
47 | <entry name="Server" value="2" summary="Server-side decoration: The server embeds the surface into a decoration frame."/> | ||
48 | </enum> | ||
49 | <event name="default_mode"> | ||
50 | <description summary="The default mode used on the server"> | ||
51 | This event is emitted directly after binding the interface. It contains | ||
52 | the default mode for the decoration. When a new server decoration object | ||
53 | is created this new object will be in the default mode until the first | ||
54 | request_mode is requested. | ||
55 | |||
56 | The server may change the default mode at any time. | ||
57 | </description> | ||
58 | <arg name="mode" type="uint" summary="The default decoration mode applied to newly created server decorations."/> | ||
59 | </event> | ||
60 | </interface> | ||
61 | <interface name="org_kde_kwin_server_decoration" version="1"> | ||
62 | <request name="release" type="destructor"> | ||
63 | <description summary="release the server decoration object"/> | ||
64 | </request> | ||
65 | <enum name="mode"> | ||
66 | <description summary="Possible values to use in request_mode and the event mode."/> | ||
67 | <entry name="None" value="0" summary="Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated."/> | ||
68 | <entry name="Client" value="1" summary="Client-side decoration: The decoration is part of the surface and the client."/> | ||
69 | <entry name="Server" value="2" summary="Server-side decoration: The server embeds the surface into a decoration frame."/> | ||
70 | </enum> | ||
71 | <request name="request_mode"> | ||
72 | <description summary="The decoration mode the surface wants to use."/> | ||
73 | <arg name="mode" type="uint" summary="The mode this surface wants to use."/> | ||
74 | </request> | ||
75 | <event name="mode"> | ||
76 | <description summary="The new decoration mode applied by the server"> | ||
77 | This event is emitted directly after the decoration is created and | ||
78 | represents the base decoration policy by the server. E.g. a server | ||
79 | which wants all surfaces to be client-side decorated will send Client, | ||
80 | a server which wants server-side decoration will send Server. | ||
81 | |||
82 | The client can request a different mode through the decoration request. | ||
83 | The server will acknowledge this by another event with the same mode. So | ||
84 | even if a server prefers server-side decoration it's possible to force a | ||
85 | client-side decoration. | ||
86 | |||
87 | The server may emit this event at any time. In this case the client can | ||
88 | again request a different mode. It's the responsibility of the server to | ||
89 | prevent a feedback loop. | ||
90 | </description> | ||
91 | <arg name="mode" type="uint" summary="The decoration mode applied to the surface by the server."/> | ||
92 | </event> | ||
93 | </interface> | ||
94 | </protocol> | ||
diff --git a/protocols/swaylock.xml b/protocols/swaylock.xml deleted file mode 100644 index c7a102dd..00000000 --- a/protocols/swaylock.xml +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | <protocol name="lock"> | ||
2 | |||
3 | <interface name="lock" version="1"> | ||
4 | <description summary="create lock screen UIs"> | ||
5 | The Weston desktop-shell protocol's locking functionality depends more | ||
6 | on the behavior of the compositor than of a screen locking client, so | ||
7 | another protocol is necessary. | ||
8 | </description> | ||
9 | |||
10 | <request name="set_lock_surface"> | ||
11 | <arg name="output" type="object" interface="wl_output"/> | ||
12 | <arg name="surface" type="object" interface="wl_surface"/> | ||
13 | </request> | ||
14 | |||
15 | <request name="unlock"/> | ||
16 | |||
17 | </interface> | ||
18 | </protocol> | ||
diff --git a/protocols/wlr-input-inhibitor-unstable-v1.xml b/protocols/wlr-input-inhibitor-unstable-v1.xml new file mode 100644 index 00000000..b62d1bb4 --- /dev/null +++ b/protocols/wlr-input-inhibitor-unstable-v1.xml | |||
@@ -0,0 +1,67 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <protocol name="wlr_input_inhibit_unstable_v1"> | ||
3 | <copyright> | ||
4 | Copyright © 2018 Drew DeVault | ||
5 | |||
6 | Permission to use, copy, modify, distribute, and sell this | ||
7 | software and its documentation for any purpose is hereby granted | ||
8 | without fee, provided that the above copyright notice appear in | ||
9 | all copies and that both that copyright notice and this permission | ||
10 | notice appear in supporting documentation, and that the name of | ||
11 | the copyright holders not be used in advertising or publicity | ||
12 | pertaining to distribution of the software without specific, | ||
13 | written prior permission. The copyright holders make no | ||
14 | representations about the suitability of this software for any | ||
15 | purpose. It is provided "as is" without express or implied | ||
16 | warranty. | ||
17 | |||
18 | THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS | ||
19 | SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
20 | FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
21 | SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
22 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN | ||
23 | AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | ||
24 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF | ||
25 | THIS SOFTWARE. | ||
26 | </copyright> | ||
27 | |||
28 | <interface name="zwlr_input_inhibit_manager_v1" version="1"> | ||
29 | <description summary="inhibits input events to other clients"> | ||
30 | Clients can use this interface to prevent input events from being sent to | ||
31 | any surfaces but its own, which is useful for example in lock screen | ||
32 | software. It is assumed that access to this interface will be locked down | ||
33 | to whitelisted clients by the compositor. | ||
34 | </description> | ||
35 | |||
36 | <request name="get_inhibitor"> | ||
37 | <description summary="inhibit input to other clients"> | ||
38 | Activates the input inhibitor. As long as the inhibitor is active, the | ||
39 | compositor will not send input events to other clients. | ||
40 | </description> | ||
41 | <arg name="id" type="new_id" interface="zwlr_input_inhibitor_v1"/> | ||
42 | </request> | ||
43 | |||
44 | <enum name="error"> | ||
45 | <entry name="already_inhibited" value="0" summary="an input inhibitor is already in use on the compositor"/> | ||
46 | </enum> | ||
47 | </interface> | ||
48 | |||
49 | <interface name="zwlr_input_inhibitor_v1" version="1"> | ||
50 | <description summary="inhibits input to other clients"> | ||
51 | While this resource exists, input to clients other than the owner of the | ||
52 | inhibitor resource will not receive input events. The client that owns | ||
53 | this resource will receive all input events normally. The compositor will | ||
54 | also disable all of its own input processing (such as keyboard shortcuts) | ||
55 | while the inhibitor is active. | ||
56 | |||
57 | The compositor may continue to send input events to selected clients, | ||
58 | such as an on-screen keyboard (via the input-method protocol). | ||
59 | </description> | ||
60 | |||
61 | <request name="destroy" type="destructor"> | ||
62 | <description summary="destroy the input inhibitor object"> | ||
63 | Destroy the inhibitor and allow other clients to receive input. | ||
64 | </description> | ||
65 | </request> | ||
66 | </interface> | ||
67 | </protocol> | ||
diff --git a/protocols/wlr-layer-shell-unstable-v1.xml b/protocols/wlr-layer-shell-unstable-v1.xml new file mode 100644 index 00000000..3181c0bb --- /dev/null +++ b/protocols/wlr-layer-shell-unstable-v1.xml | |||
@@ -0,0 +1,281 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <protocol name="wlr_layer_shell_unstable_v1"> | ||
3 | <copyright> | ||
4 | Copyright © 2017 Drew DeVault | ||
5 | |||
6 | Permission to use, copy, modify, distribute, and sell this | ||
7 | software and its documentation for any purpose is hereby granted | ||
8 | without fee, provided that the above copyright notice appear in | ||
9 | all copies and that both that copyright notice and this permission | ||
10 | notice appear in supporting documentation, and that the name of | ||
11 | the copyright holders not be used in advertising or publicity | ||
12 | pertaining to distribution of the software without specific, | ||
13 | written prior permission. The copyright holders make no | ||
14 | representations about the suitability of this software for any | ||
15 | purpose. It is provided "as is" without express or implied | ||
16 | warranty. | ||
17 | |||
18 | THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS | ||
19 | SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
20 | FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
21 | SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
22 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN | ||
23 | AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | ||
24 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF | ||
25 | THIS SOFTWARE. | ||
26 | </copyright> | ||
27 | |||
28 | <interface name="zwlr_layer_shell_v1" version="1"> | ||
29 | <description summary="create surfaces that are layers of the desktop"> | ||
30 | Clients can use this interface to assign the surface_layer role to | ||
31 | wl_surfaces. Such surfaces are assigned to a "layer" of the output and | ||
32 | rendered with a defined z-depth respective to each other. They may also be | ||
33 | anchored to the edges and corners of a screen and specify input handling | ||
34 | semantics. This interface should be suitable for the implementation of | ||
35 | many desktop shell components, and a broad number of other applications | ||
36 | that interact with the desktop. | ||
37 | </description> | ||
38 | |||
39 | <request name="get_layer_surface"> | ||
40 | <description summary="create a layer_surface from a surface"> | ||
41 | Create a layer surface for an existing surface. This assigns the role of | ||
42 | layer_surface, or raises a protocol error if another role is already | ||
43 | assigned. | ||
44 | |||
45 | Creating a layer surface from a wl_surface which has a buffer attached | ||
46 | or committed is a client error, and any attempts by a client to attach | ||
47 | or manipulate a buffer prior to the first layer_surface.configure call | ||
48 | must also be treated as errors. | ||
49 | |||
50 | Clients can specify a namespace that defines the purpose of the layer | ||
51 | surface. | ||
52 | </description> | ||
53 | <arg name="id" type="new_id" interface="zwlr_layer_surface_v1"/> | ||
54 | <arg name="surface" type="object" interface="wl_surface"/> | ||
55 | <arg name="output" type="object" interface="wl_output"/> | ||
56 | <arg name="layer" type="uint" enum="layer" summary="layer to add this surface to"/> | ||
57 | <arg name="namespace" type="string" summary="namespace for the layer surface"/> | ||
58 | </request> | ||
59 | |||
60 | <enum name="error"> | ||
61 | <entry name="role" value="0" summary="wl_surface has another role"/> | ||
62 | <entry name="invalid_layer" value="1" summary="layer value is invalid"/> | ||
63 | <entry name="already_constructed" value="2" summary="wl_surface has a buffer attached or committed"/> | ||
64 | </enum> | ||
65 | |||
66 | <enum name="layer"> | ||
67 | <description summary="available layers for surfaces"> | ||
68 | These values indicate which layers a surface can be rendered in. They | ||
69 | are ordered by z depth, bottom-most first. Traditional shell surfaces | ||
70 | will typically be rendered between the bottom and top layers. | ||
71 | Fullscreen shell surfaces are typically rendered at the top layer. | ||
72 | Multiple surfaces can share a single layer, and ordering within a | ||
73 | single layer is undefined. | ||
74 | </description> | ||
75 | |||
76 | <entry name="background" value="0"/> | ||
77 | <entry name="bottom" value="1"/> | ||
78 | <entry name="top" value="2"/> | ||
79 | <entry name="overlay" value="3"/> | ||
80 | </enum> | ||
81 | </interface> | ||
82 | |||
83 | <interface name="zwlr_layer_surface_v1" version="1"> | ||
84 | <description summary="layer metadata interface"> | ||
85 | An interface that may be implemented by a wl_surface, for surfaces that | ||
86 | are designed to be rendered as a layer of a stacked desktop-like | ||
87 | environment. | ||
88 | |||
89 | Layer surface state (size, anchor, exclusive zone, margin, interactivity) | ||
90 | is double-buffered, and will be applied at the time wl_surface.commit of | ||
91 | the corresponding wl_surface is called. | ||
92 | </description> | ||
93 | |||
94 | <request name="set_size"> | ||
95 | <description summary="sets the size of the surface"> | ||
96 | Sets the size of the surface in surface-local coordinates. The | ||
97 | compositor will display the surface centered with respect to its | ||
98 | anchors. | ||
99 | |||
100 | If you pass 0 for either value, the compositor will assign it and | ||
101 | inform you of the assignment in the configure event. You must set your | ||
102 | anchor to opposite edges in the dimensions you omit; not doing so is a | ||
103 | protocol error. Both values are 0 by default. | ||
104 | |||
105 | Size is double-buffered, see wl_surface.commit. | ||
106 | </description> | ||
107 | <arg name="width" type="uint"/> | ||
108 | <arg name="height" type="uint"/> | ||
109 | </request> | ||
110 | |||
111 | <request name="set_anchor"> | ||
112 | <description summary="configures the anchor point of the surface"> | ||
113 | Requests that the compositor anchor the surface to the specified edges | ||
114 | and corners. If two orthoginal edges are specified (e.g. 'top' and | ||
115 | 'left'), then the anchor point will be the intersection of the edges | ||
116 | (e.g. the top left corner of the output); otherwise the anchor point | ||
117 | will be centered on that edge, or in the center if none is specified. | ||
118 | |||
119 | Anchor is double-buffered, see wl_surface.commit. | ||
120 | </description> | ||
121 | <arg name="anchor" type="uint" enum="anchor"/> | ||
122 | </request> | ||
123 | |||
124 | <request name="set_exclusive_zone"> | ||
125 | <description summary="configures the exclusive geometry of this surface"> | ||
126 | Requests that the compositor avoids occluding an area of the surface | ||
127 | with other surfaces. The compositor's use of this information is | ||
128 | implementation-dependent - do not assume that this region will not | ||
129 | actually be occluded. | ||
130 | |||
131 | A positive value is only meaningful if the surface is anchored to an | ||
132 | edge, rather than a corner. The zone is the number of surface-local | ||
133 | coordinates from the edge that are considered exclusive. | ||
134 | |||
135 | Surfaces that do not wish to have an exclusive zone may instead specify | ||
136 | how they should interact with surfaces that do. If set to zero, the | ||
137 | surface indicates that it would like to be moved to avoid occluding | ||
138 | surfaces with a positive excluzive zone. If set to -1, the surface | ||
139 | indicates that it would not like to be moved to accomodate for other | ||
140 | surfaces, and the compositor should extend it all the way to the edges | ||
141 | it is anchored to. | ||
142 | |||
143 | For example, a panel might set its exclusive zone to 10, so that | ||
144 | maximized shell surfaces are not shown on top of it. A notification | ||
145 | might set its exclusive zone to 0, so that it is moved to avoid | ||
146 | occluding the panel, but shell surfaces are shown underneath it. A | ||
147 | wallpaper or lock screen might set their exclusive zone to -1, so that | ||
148 | they stretch below or over the panel. | ||
149 | |||
150 | The default value is 0. | ||
151 | |||
152 | Exclusive zone is double-buffered, see wl_surface.commit. | ||
153 | </description> | ||
154 | <arg name="zone" type="int"/> | ||
155 | </request> | ||
156 | |||
157 | <request name="set_margin"> | ||
158 | <description summary="sets a margin from the anchor point"> | ||
159 | Requests that the surface be placed some distance away from the anchor | ||
160 | point on the output, in surface-local coordinates. Setting this value | ||
161 | for edges you are not anchored to has no effect. | ||
162 | |||
163 | The exclusive zone includes the margin. | ||
164 | |||
165 | Margin is double-buffered, see wl_surface.commit. | ||
166 | </description> | ||
167 | <arg name="top" type="int"/> | ||
168 | <arg name="right" type="int"/> | ||
169 | <arg name="bottom" type="int"/> | ||
170 | <arg name="left" type="int"/> | ||
171 | </request> | ||
172 | |||
173 | <request name="set_keyboard_interactivity"> | ||
174 | <description summary="requests keyboard events"> | ||
175 | Set to 1 to request that the seat send keyboard events to this layer | ||
176 | surface. For layers below the shell surface layer, the seat will use | ||
177 | normal focus semantics. For layers above the shell surface layers, the | ||
178 | seat will always give exclusive keyboard focus to the top-most layer | ||
179 | which has keyboard interactivity set to true. | ||
180 | |||
181 | Layer surfaces receive pointer, touch, and tablet events normally. If | ||
182 | you do not want to receive them, set the input region on your surface | ||
183 | to an empty region. | ||
184 | |||
185 | Events is double-buffered, see wl_surface.commit. | ||
186 | </description> | ||
187 | <arg name="keyboard_interactivity" type="uint"/> | ||
188 | </request> | ||
189 | |||
190 | <request name="get_popup"> | ||
191 | <description summary="assign this layer_surface as an xdg_popup parent"> | ||
192 | This assigns an xdg_popup's parent to this layer_surface. This popup | ||
193 | should have been created via xdg_surface::get_popup with the parent set | ||
194 | to NULL, and this request must be invoked before committing the popup's | ||
195 | initial state. | ||
196 | |||
197 | See the documentation of xdg_popup for more details about what an | ||
198 | xdg_popup is and how it is used. | ||
199 | </description> | ||
200 | <arg name="popup" type="object" interface="xdg_popup"/> | ||
201 | </request> | ||
202 | |||
203 | <request name="ack_configure"> | ||
204 | <description summary="ack a configure event"> | ||
205 | When a configure event is received, if a client commits the | ||
206 | surface in response to the configure event, then the client | ||
207 | must make an ack_configure request sometime before the commit | ||
208 | request, passing along the serial of the configure event. | ||
209 | |||
210 | If the client receives multiple configure events before it | ||
211 | can respond to one, it only has to ack the last configure event. | ||
212 | |||
213 | A client is not required to commit immediately after sending | ||
214 | an ack_configure request - it may even ack_configure several times | ||
215 | before its next surface commit. | ||
216 | |||
217 | A client may send multiple ack_configure requests before committing, but | ||
218 | only the last request sent before a commit indicates which configure | ||
219 | event the client really is responding to. | ||
220 | </description> | ||
221 | <arg name="serial" type="uint" summary="the serial from the configure event"/> | ||
222 | </request> | ||
223 | |||
224 | <request name="destroy" type="destructor"> | ||
225 | <description summary="destroy the layer_surface"> | ||
226 | This request destroys the layer surface. | ||
227 | </description> | ||
228 | </request> | ||
229 | |||
230 | <event name="configure"> | ||
231 | <description summary="suggest a surface change"> | ||
232 | The configure event asks the client to resize its surface. | ||
233 | |||
234 | Clients should arrange their surface for the new states, and then send | ||
235 | an ack_configure request with the serial sent in this configure event at | ||
236 | some point before committing the new surface. | ||
237 | |||
238 | The client is free to dismiss all but the last configure event it | ||
239 | received. | ||
240 | |||
241 | The width and height arguments specify the size of the window in | ||
242 | surface-local coordinates. | ||
243 | |||
244 | The size is a hint, in the sense that the client is free to ignore it if | ||
245 | it doesn't resize, pick a smaller size (to satisfy aspect ratio or | ||
246 | resize in steps of NxM pixels). If the client picks a smaller size and | ||
247 | is anchored to two opposite anchors (e.g. 'top' and 'bottom'), the | ||
248 | surface will be centered on this axis. | ||
249 | |||
250 | If the width or height arguments are zero, it means the client should | ||
251 | decide its own window dimension. | ||
252 | </description> | ||
253 | <arg name="serial" type="uint"/> | ||
254 | <arg name="width" type="uint"/> | ||
255 | <arg name="height" type="uint"/> | ||
256 | </event> | ||
257 | |||
258 | <event name="closed"> | ||
259 | <description summary="surface should be closed"> | ||
260 | The closed event is sent by the compositor when the surface will no | ||
261 | longer be shown. The output may have been destroyed or the user may | ||
262 | have asked for it to be removed. Further changes to the surface will be | ||
263 | ignored. The client should destroy the resource after receiving this | ||
264 | event, and create a new surface if they so choose. | ||
265 | </description> | ||
266 | </event> | ||
267 | |||
268 | <enum name="error"> | ||
269 | <entry name="invalid_surface_state" value="0" summary="provided surface state is invalid"/> | ||
270 | <entry name="invalid_size" value="1" summary="size is invalid"/> | ||
271 | <entry name="invalid_anchor" value="2" summary="anchor bitfield is invalid"/> | ||
272 | </enum> | ||
273 | |||
274 | <enum name="anchor" bitfield="true"> | ||
275 | <entry name="top" value="1" summary="the top edge of the anchor rectangle"/> | ||
276 | <entry name="bottom" value="2" summary="the bottom edge of the anchor rectangle"/> | ||
277 | <entry name="left" value="4" summary="the left edge of the anchor rectangle"/> | ||
278 | <entry name="right" value="8" summary="the right edge of the anchor rectangle"/> | ||
279 | </enum> | ||
280 | </interface> | ||
281 | </protocol> | ||
diff --git a/protocols/xdg-shell.xml b/protocols/xdg-shell.xml deleted file mode 100644 index 7bf4ae3a..00000000 --- a/protocols/xdg-shell.xml +++ /dev/null | |||
@@ -1,430 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <protocol name="xdg_shell"> | ||
3 | |||
4 | <copyright> | ||
5 | Copyright © 2008-2013 Kristian Høgsberg | ||
6 | Copyright © 2013 Rafael Antognolli | ||
7 | Copyright © 2013 Jasper St. Pierre | ||
8 | Copyright © 2010-2013 Intel Corporation | ||
9 | |||
10 | Permission to use, copy, modify, distribute, and sell this | ||
11 | software and its documentation for any purpose is hereby granted | ||
12 | without fee, provided that the above copyright notice appear in | ||
13 | all copies and that both that copyright notice and this permission | ||
14 | notice appear in supporting documentation, and that the name of | ||
15 | the copyright holders not be used in advertising or publicity | ||
16 | pertaining to distribution of the software without specific, | ||
17 | written prior permission. The copyright holders make no | ||
18 | representations about the suitability of this software for any | ||
19 | purpose. It is provided "as is" without express or implied | ||
20 | warranty. | ||
21 | |||
22 | THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS | ||
23 | SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
24 | FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
25 | SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
26 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN | ||
27 | AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | ||
28 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF | ||
29 | THIS SOFTWARE. | ||
30 | </copyright> | ||
31 | |||
32 | <interface name="xdg_shell" version="1"> | ||
33 | <description summary="create desktop-style surfaces"> | ||
34 | This interface is implemented by servers that provide | ||
35 | desktop-style user interfaces. | ||
36 | |||
37 | It allows clients to associate a xdg_surface with | ||
38 | a basic surface. | ||
39 | </description> | ||
40 | |||
41 | <enum name="version"> | ||
42 | <description summary="latest protocol version"> | ||
43 | The 'current' member of this enum gives the version of the | ||
44 | protocol. Implementations can compare this to the version | ||
45 | they implement using static_assert to ensure the protocol and | ||
46 | implementation versions match. | ||
47 | </description> | ||
48 | <entry name="current" value="4" summary="Always the latest version"/> | ||
49 | </enum> | ||
50 | |||
51 | <enum name="error"> | ||
52 | <entry name="role" value="0" summary="given wl_surface has another role"/> | ||
53 | </enum> | ||
54 | |||
55 | <request name="use_unstable_version"> | ||
56 | <description summary="enable use of this unstable version"> | ||
57 | Negotiate the unstable version of the interface. This | ||
58 | mechanism is in place to ensure client and server agree on the | ||
59 | unstable versions of the protocol that they speak or exit | ||
60 | cleanly if they don't agree. This request will go away once | ||
61 | the xdg-shell protocol is stable. | ||
62 | </description> | ||
63 | <arg name="version" type="int"/> | ||
64 | </request> | ||
65 | |||
66 | <request name="get_xdg_surface"> | ||
67 | <description summary="create a shell surface from a surface"> | ||
68 | Create a shell surface for an existing surface. | ||
69 | |||
70 | This request gives the surface the role of xdg_surface. If the | ||
71 | surface already has another role, it raises a protocol error. | ||
72 | |||
73 | Only one shell or popup surface can be associated with a given | ||
74 | surface. | ||
75 | </description> | ||
76 | <arg name="id" type="new_id" interface="xdg_surface"/> | ||
77 | <arg name="surface" type="object" interface="wl_surface"/> | ||
78 | </request> | ||
79 | |||
80 | <request name="get_xdg_popup"> | ||
81 | <description summary="create a shell surface from a surface"> | ||
82 | Create a popup surface for an existing surface. | ||
83 | |||
84 | This request gives the surface the role of xdg_popup. If the | ||
85 | surface already has another role, it raises a protocol error. | ||
86 | |||
87 | Only one shell or popup surface can be associated with a given | ||
88 | surface. | ||
89 | </description> | ||
90 | <arg name="id" type="new_id" interface="xdg_popup"/> | ||
91 | <arg name="surface" type="object" interface="wl_surface"/> | ||
92 | <arg name="parent" type="object" interface="wl_surface"/> | ||
93 | <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat whose pointer is used"/> | ||
94 | <arg name="serial" type="uint" summary="serial of the implicit grab on the pointer"/> | ||
95 | <arg name="x" type="int"/> | ||
96 | <arg name="y" type="int"/> | ||
97 | <arg name="flags" type="uint"/> | ||
98 | </request> | ||
99 | |||
100 | <event name="ping"> | ||
101 | <description summary="check if the client is alive"> | ||
102 | The ping event asks the client if it's still alive. Pass the | ||
103 | serial specified in the event back to the compositor by sending | ||
104 | a "pong" request back with the specified serial. | ||
105 | |||
106 | Compositors can use this to determine if the client is still | ||
107 | alive. It's unspecified what will happen if the client doesn't | ||
108 | respond to the ping request, or in what timeframe. Clients should | ||
109 | try to respond in a reasonable amount of time. | ||
110 | </description> | ||
111 | <arg name="serial" type="uint" summary="pass this to the callback"/> | ||
112 | </event> | ||
113 | |||
114 | <request name="pong"> | ||
115 | <description summary="respond to a ping event"> | ||
116 | A client must respond to a ping event with a pong request or | ||
117 | the client may be deemed unresponsive. | ||
118 | </description> | ||
119 | <arg name="serial" type="uint" summary="serial of the ping event"/> | ||
120 | </request> | ||
121 | </interface> | ||
122 | |||
123 | <interface name="xdg_surface" version="1"> | ||
124 | |||
125 | <description summary="desktop-style metadata interface"> | ||
126 | An interface that may be implemented by a wl_surface, for | ||
127 | implementations that provide a desktop-style user interface. | ||
128 | |||
129 | It provides requests to treat surfaces like windows, allowing to set | ||
130 | properties like maximized, fullscreen, minimized, and to move and resize | ||
131 | them, and associate metadata like title and app id. | ||
132 | |||
133 | On the server side the object is automatically destroyed when | ||
134 | the related wl_surface is destroyed. On client side, | ||
135 | xdg_surface.destroy() must be called before destroying | ||
136 | the wl_surface object. | ||
137 | </description> | ||
138 | |||
139 | <request name="destroy" type="destructor"> | ||
140 | <description summary="remove xdg_surface interface"> | ||
141 | The xdg_surface interface is removed from the wl_surface object | ||
142 | that was turned into a xdg_surface with | ||
143 | xdg_shell.get_xdg_surface request. The xdg_surface properties, | ||
144 | like maximized and fullscreen, are lost. The wl_surface loses | ||
145 | its role as a xdg_surface. The wl_surface is unmapped. | ||
146 | </description> | ||
147 | </request> | ||
148 | |||
149 | <request name="set_parent"> | ||
150 | <description summary="surface is a child of another surface"> | ||
151 | Child surfaces are stacked above their parents, and will be | ||
152 | unmapped if the parent is unmapped too. They should not appear | ||
153 | on task bars and alt+tab. | ||
154 | </description> | ||
155 | <arg name="parent" type="object" interface="wl_surface" allow-null="true"/> | ||
156 | </request> | ||
157 | |||
158 | <request name="set_title"> | ||
159 | <description summary="set surface title"> | ||
160 | Set a short title for the surface. | ||
161 | |||
162 | This string may be used to identify the surface in a task bar, | ||
163 | window list, or other user interface elements provided by the | ||
164 | compositor. | ||
165 | |||
166 | The string must be encoded in UTF-8. | ||
167 | </description> | ||
168 | <arg name="title" type="string"/> | ||
169 | </request> | ||
170 | |||
171 | <request name="set_app_id"> | ||
172 | <description summary="set surface class"> | ||
173 | Set an id for the surface. | ||
174 | |||
175 | The app id identifies the general class of applications to which | ||
176 | the surface belongs. | ||
177 | |||
178 | It should be the ID that appears in the new desktop entry | ||
179 | specification, the interface name. | ||
180 | </description> | ||
181 | <arg name="app_id" type="string"/> | ||
182 | </request> | ||
183 | |||
184 | <request name="show_window_menu"> | ||
185 | <description summary="show the window menu"> | ||
186 | Clients implementing client-side decorations might want to show | ||
187 | a context menu when right-clicking on the decorations, giving the | ||
188 | user a menu that they can use to maximize or minimize the window. | ||
189 | |||
190 | This request asks the compositor to pop up such a window menu at | ||
191 | the given position, relative to the parent surface. There are | ||
192 | no guarantees as to what the window menu contains. | ||
193 | |||
194 | Your surface must have focus on the seat passed in to pop up the | ||
195 | window menu. | ||
196 | </description> | ||
197 | |||
198 | <arg name="seat" type="object" interface="wl_seat" summary="the seat to pop the window up on"/> | ||
199 | <arg name="serial" type="uint" summary="serial of the event to pop up the window for"/> | ||
200 | <arg name="x" type="int" summary="the x position to pop up the window menu at"/> | ||
201 | <arg name="y" type="int" summary="the y position to pop up the window menu at"/> | ||
202 | </request> | ||
203 | |||
204 | <request name="move"> | ||
205 | <description summary="start an interactive move"> | ||
206 | Start a pointer-driven move of the surface. | ||
207 | |||
208 | This request must be used in response to a button press event. | ||
209 | The server may ignore move requests depending on the state of | ||
210 | the surface (e.g. fullscreen or maximized). | ||
211 | </description> | ||
212 | <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat whose pointer is used"/> | ||
213 | <arg name="serial" type="uint" summary="serial of the implicit grab on the pointer"/> | ||
214 | </request> | ||
215 | |||
216 | <enum name="resize_edge"> | ||
217 | <description summary="edge values for resizing"> | ||
218 | These values are used to indicate which edge of a surface | ||
219 | is being dragged in a resize operation. The server may | ||
220 | use this information to adapt its behavior, e.g. choose | ||
221 | an appropriate cursor image. | ||
222 | </description> | ||
223 | <entry name="none" value="0"/> | ||
224 | <entry name="top" value="1"/> | ||
225 | <entry name="bottom" value="2"/> | ||
226 | <entry name="left" value="4"/> | ||
227 | <entry name="top_left" value="5"/> | ||
228 | <entry name="bottom_left" value="6"/> | ||
229 | <entry name="right" value="8"/> | ||
230 | <entry name="top_right" value="9"/> | ||
231 | <entry name="bottom_right" value="10"/> | ||
232 | </enum> | ||
233 | |||
234 | <request name="resize"> | ||
235 | <description summary="start an interactive resize"> | ||
236 | Start a pointer-driven resizing of the surface. | ||
237 | |||
238 | This request must be used in response to a button press event. | ||
239 | The server may ignore resize requests depending on the state of | ||
240 | the surface (e.g. fullscreen or maximized). | ||
241 | </description> | ||
242 | <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat whose pointer is used"/> | ||
243 | <arg name="serial" type="uint" summary="serial of the implicit grab on the pointer"/> | ||
244 | <arg name="edges" type="uint" summary="which edge or corner is being dragged"/> | ||
245 | </request> | ||
246 | |||
247 | <enum name="state"> | ||
248 | <description summary="types of state on the surface"> | ||
249 | The different state values used on the surface. This is designed for | ||
250 | state values like maximized, fullscreen. It is paired with the | ||
251 | configure event to ensure that both the client and the compositor | ||
252 | setting the state can be synchronized. | ||
253 | |||
254 | States set in this way are double-buffered. They will get applied on | ||
255 | the next commit. | ||
256 | |||
257 | Desktop environments may extend this enum by taking up a range of | ||
258 | values and documenting the range they chose in this description. | ||
259 | They are not required to document the values for the range that they | ||
260 | chose. Ideally, any good extensions from a desktop environment should | ||
261 | make its way into standardization into this enum. | ||
262 | |||
263 | The current reserved ranges are: | ||
264 | |||
265 | 0x0000 - 0x0FFF: xdg-shell core values, documented below. | ||
266 | 0x1000 - 0x1FFF: GNOME | ||
267 | </description> | ||
268 | <entry name="maximized" value="1"> | ||
269 | <description summary="the surface is maximized"> | ||
270 | The surface is maximized. The window geometry specified in the configure | ||
271 | event must be obeyed by the client. | ||
272 | </description> | ||
273 | </entry> | ||
274 | <entry name="fullscreen" value="2"> | ||
275 | <description summary="the surface is fullscreen"> | ||
276 | The surface is fullscreen. The window geometry specified in the configure | ||
277 | event must be obeyed by the client. | ||
278 | </description> | ||
279 | </entry> | ||
280 | <entry name="resizing" value="3"> | ||
281 | <description summary="the surface is being resized"> | ||
282 | The surface is being resized. The window geometry specified in the | ||
283 | configure event is a maximum; the client cannot resize beyond it. | ||
284 | Clients that have aspect ratio or cell sizing configuration can use | ||
285 | a smaller size, however. | ||
286 | </description> | ||
287 | </entry> | ||
288 | <entry name="activated" value="4"> | ||
289 | <description summary="the client window is active"> | ||
290 | Client window decorations should be painted as if the window is | ||
291 | active. Do not assume this means that the window actually has | ||
292 | keyboard or pointer focus. | ||
293 | </description> | ||
294 | </entry> | ||
295 | </enum> | ||
296 | |||
297 | <event name="configure"> | ||
298 | <description summary="suggest a surface change"> | ||
299 | The configure event asks the client to resize its surface. | ||
300 | |||
301 | The width and height arguments specify a hint to the window | ||
302 | about how its surface should be resized in window geometry | ||
303 | coordinates. The states listed in the event specify how the | ||
304 | width/height arguments should be interpreted. | ||
305 | |||
306 | A client should arrange a new surface, and then send a | ||
307 | ack_configure request with the serial sent in this configure | ||
308 | event before attaching a new surface. | ||
309 | |||
310 | If the client receives multiple configure events before it | ||
311 | can respond to one, it is free to discard all but the last | ||
312 | event it received. | ||
313 | </description> | ||
314 | |||
315 | <arg name="width" type="int"/> | ||
316 | <arg name="height" type="int"/> | ||
317 | <arg name="states" type="array"/> | ||
318 | <arg name="serial" type="uint"/> | ||
319 | </event> | ||
320 | |||
321 | <request name="ack_configure"> | ||
322 | <description summary="ack a configure event"> | ||
323 | When a configure event is received, a client should then ack it | ||
324 | using the ack_configure request to ensure that the compositor | ||
325 | knows the client has seen the event. | ||
326 | |||
327 | By this point, the state is confirmed, and the next attach should | ||
328 | contain the buffer drawn for the configure event you are acking. | ||
329 | </description> | ||
330 | <arg name="serial" type="uint" summary="a serial to configure for"/> | ||
331 | </request> | ||
332 | |||
333 | <request name="set_window_geometry"> | ||
334 | <description summary="set the new window geometry"> | ||
335 | The window geometry of a window is its "visible bounds" from the | ||
336 | user's perspective. Client-side decorations often have invisible | ||
337 | portions like drop-shadows which should be ignored for the | ||
338 | purposes of aligning, placing and constraining windows. | ||
339 | |||
340 | The default value is the full bounds of the surface, including any | ||
341 | subsurfaces. Once the window geometry of the surface is set once, | ||
342 | it is not possible to unset it, and it will remain the same until | ||
343 | set_window_geometry is called again, even if a new subsurface or | ||
344 | buffer is attached. | ||
345 | |||
346 | If responding to a configure event, the window geometry in here | ||
347 | must respect the sizing negotiations specified by the states in | ||
348 | the configure event. | ||
349 | </description> | ||
350 | <arg name="x" type="int"/> | ||
351 | <arg name="y" type="int"/> | ||
352 | <arg name="width" type="int"/> | ||
353 | <arg name="height" type="int"/> | ||
354 | </request> | ||
355 | |||
356 | <request name="set_maximized" /> | ||
357 | <request name="unset_maximized" /> | ||
358 | |||
359 | <request name="set_fullscreen"> | ||
360 | <description summary="set the window as fullscreen on a monitor"> | ||
361 | Make the surface fullscreen. | ||
362 | |||
363 | You can specify an output that you would prefer to be fullscreen. | ||
364 | If this value is NULL, it's up to the compositor to choose which | ||
365 | display will be used to map this surface. | ||
366 | </description> | ||
367 | <arg name="output" type="object" interface="wl_output" allow-null="true"/> | ||
368 | </request> | ||
369 | <request name="unset_fullscreen" /> | ||
370 | |||
371 | <request name="set_minimized" /> | ||
372 | |||
373 | <event name="close"> | ||
374 | <description summary="surface wants to be closed"> | ||
375 | The close event is sent by the compositor when the user | ||
376 | wants the surface to be closed. This should be equivalent to | ||
377 | the user clicking the close button in client-side decorations, | ||
378 | if your application has any... | ||
379 | |||
380 | This is only a request that the user intends to close your | ||
381 | window. The client may choose to ignore this request, or show | ||
382 | a dialog to ask the user to save their data... | ||
383 | </description> | ||
384 | </event> | ||
385 | </interface> | ||
386 | |||
387 | <interface name="xdg_popup" version="1"> | ||
388 | <description summary="desktop-style metadata interface"> | ||
389 | An interface that may be implemented by a wl_surface, for | ||
390 | implementations that provide a desktop-style popups/menus. A popup | ||
391 | surface is a transient surface with an added pointer grab. | ||
392 | |||
393 | An existing implicit grab will be changed to owner-events mode, | ||
394 | and the popup grab will continue after the implicit grab ends | ||
395 | (i.e. releasing the mouse button does not cause the popup to be | ||
396 | unmapped). | ||
397 | |||
398 | The popup grab continues until the window is destroyed or a mouse | ||
399 | button is pressed in any other clients window. A click in any of | ||
400 | the clients surfaces is reported as normal, however, clicks in | ||
401 | other clients surfaces will be discarded and trigger the callback. | ||
402 | |||
403 | The x and y arguments specify the locations of the upper left | ||
404 | corner of the surface relative to the upper left corner of the | ||
405 | parent surface, in surface local coordinates. | ||
406 | |||
407 | xdg_popup surfaces are always transient for another surface. | ||
408 | </description> | ||
409 | |||
410 | <request name="destroy" type="destructor"> | ||
411 | <description summary="remove xdg_surface interface"> | ||
412 | The xdg_surface interface is removed from the wl_surface object | ||
413 | that was turned into a xdg_surface with | ||
414 | xdg_shell.get_xdg_surface request. The xdg_surface properties, | ||
415 | like maximized and fullscreen, are lost. The wl_surface loses | ||
416 | its role as a xdg_surface. The wl_surface is unmapped. | ||
417 | </description> | ||
418 | </request> | ||
419 | |||
420 | <event name="popup_done"> | ||
421 | <description summary="popup interaction is done"> | ||
422 | The popup_done event is sent out when a popup grab is broken, | ||
423 | that is, when the users clicks a surface that doesn't belong | ||
424 | to the client owning the popup surface. | ||
425 | </description> | ||
426 | <arg name="serial" type="uint" summary="serial of the implicit grab on the pointer"/> | ||
427 | </event> | ||
428 | |||
429 | </interface> | ||
430 | </protocol> | ||