• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="remote_shell_unstable_v1">
3
4  <copyright>
5    Copyright 2016 The Chromium Authors.
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="Create remote desktop-style surfaces">
28    remote_shell allows clients to turn a wl_surface into a "real window"
29    which can be stacked and activated by the user.
30
31    Warning! The protocol described in this file is experimental and backward
32    incompatible changes may be made. Backward compatible changes may be added
33    together with the corresponding interface version bump. Backward
34    incompatible changes are done by bumping the version number in the protocol
35    and interface names and resetting the interface version. Once the protocol
36    is to be declared stable, the 'z' prefix and the version number in the
37    protocol and interface names are removed and the interface version number is
38    reset.
39  </description>
40
41  <interface name="zcr_remote_shell_v1" version="20">
42    <description summary="remote_shell">
43      The global interface that allows clients to turn a wl_surface into a
44      "real window" which is remotely managed but can be stacked, activated
45      and made fullscreen by the user.
46    </description>
47
48    <enum name="container">
49      <description summary="containers for remote surfaces">
50	Determine how a remote surface should be stacked relative to other
51	shell surfaces.
52      </description>
53      <entry name="default" value="1" summary="default container"/>
54      <entry name="overlay" value="2" summary="system modal container"/>
55    </enum>
56
57    <enum name="state_type">
58      <description summary="state types for remote surfaces">
59	Defines common show states for shell surfaces.
60      </description>
61      <entry name="normal" value="1" summary="normal window state"/>
62      <entry name="minimized" value="2" summary="minimized window state"/>
63      <entry name="maximized" value="3" summary="maximized window state"/>
64      <entry name="fullscreen" value="4" summary="fullscreen window state"/>
65      <entry name="pinned" value="5" summary="pinned window state"/>
66      <entry name="trusted_pinned" value="6" summary="trusted pinned window state"/>
67      <entry name="moving" value="7" summary="moving window state"/>
68      <entry name="resizing" value="8" summary="resizing window state"/>
69      <entry name="left_snapped" value="9" summary="left snapped window state"/>
70      <entry name="right_snapped" value="10" summary="right snapped window state"/>
71      <entry name="pip" value="11" summary="pip window state"/>
72    </enum>
73
74    <enum name="error">
75      <entry name="role" value="0" summary="given wl_surface has another role"/>
76      <entry name="invalid_notification_key" value="1"
77	     summary="invalid notification key"/>
78    </enum>
79
80    <enum name="layout_mode">
81      <description summary="the layout mode">
82	Determine how a client should layout surfaces.
83      </description>
84      <entry name="windowed" value="1" summary="multiple windows"/>
85      <entry name="tablet" value="2" summary="restricted mode for tablet"/>
86    </enum>
87
88    <request name="destroy" type="destructor">
89      <description summary="destroy remote_shell">
90	Destroy this remote_shell object.
91
92	Destroying a bound remote_shell object while there are surfaces
93	still alive created by this remote_shell object instance is illegal
94	and will result in a protocol error.
95      </description>
96    </request>
97
98    <request name="get_remote_surface">
99      <description summary="create a remote shell surface from a surface">
100	This creates an remote_surface for the given surface and gives it the
101	remote_surface role. A wl_surface can only be given a remote_surface
102	role once. If get_remote_surface is called with a wl_surface that
103	already has an active remote_surface associated with it, or if it had
104	any other role, an error is raised.
105
106	See the documentation of remote_surface for more details about what an
107	remote_surface is and how it is used.
108      </description>
109      <arg name="id" type="new_id" interface="zcr_remote_surface_v1"/>
110      <arg name="surface" type="object" interface="wl_surface"/>
111      <arg name="container" type="uint"/>
112    </request>
113
114    <event name="activated">
115      <description summary="activated surface changed">
116	Notifies client that the activated surface changed.
117      </description>
118      <arg name="gained_active" type="object" interface="wl_surface" allow-null="true"/>
119      <arg name="lost_active" type="object" interface="wl_surface" allow-null="true"/>
120    </event>
121
122    <request name="get_notification_surface">
123      <description summary="create a notification surface from a surface">
124	Creates a notification_surface for the given surface, gives it the
125	notification_surface role and associated it with a notification id.
126      </description>
127      <arg name="id" type="new_id" interface="zcr_notification_surface_v1"/>
128      <arg name="surface" type="object" interface="wl_surface"/>
129      <arg name="notification_key" type="string" />
130    </request>
131
132    <event name="configuration_changed">
133      <description summary="suggests a re-configuration of remote shell">
134	[Deprecated] Suggests a re-configuration of remote shell.
135      </description>
136      <arg name="width" type="int"/>
137      <arg name="height" type="int"/>
138      <arg name="transform" type="int"/>
139      <arg name="scale_factor" type="fixed"/>
140      <arg name="work_area_inset_left" type="int"/>
141      <arg name="work_area_inset_top" type="int"/>
142      <arg name="work_area_inset_right" type="int"/>
143      <arg name="work_area_inset_bottom" type="int"/>
144      <arg name="layout_mode" type="uint"/>
145    </event>
146
147    <!-- Version 5 additions -->
148
149    <event name="workspace" since="5">
150      <description summary="area of remote shell">
151	[Deprecated] Defines an area of the remote shell used for layout. Each series of
152	"workspace" events must be terminated by a "configure" event.
153      </description>
154      <arg name="display_id_hi" type="uint"/>
155      <arg name="display_id_lo" type="uint"/>
156      <arg name="x" type="int"/>
157      <arg name="y" type="int"/>
158      <arg name="width" type="int"/>
159      <arg name="height" type="int"/>
160      <arg name="inset_left" type="int"/>
161      <arg name="inset_top" type="int"/>
162      <arg name="inset_right" type="int"/>
163      <arg name="inset_bottom" type="int"/>
164      <arg name="transform" type="int"/>
165      <arg name="scale_factor" type="fixed"/>
166      <arg name="is_internal" type="uint" summary="1 if screen is built-in"/>
167    </event>
168
169    <event name="configure" since="5">
170      <description summary="suggests configuration of remote shell">
171	Suggests a new configuration of the remote shell. Preceded by a series
172	of "workspace" events.
173      </description>
174      <arg name="layout_mode" type="uint"/>
175    </event>
176
177    <!-- Version 8 additions -->
178
179    <event name="default_device_scale_factor" since="8">
180      <description summary="initialize scale configuration">
181	Sends the default device scale factor.
182      </description>
183      <arg name="scale" type="int" summary="DP to pixels ratio, in 8.24 fixed point format"/>
184    </event>
185
186    <!-- Version 17 additions -->
187
188    <request name="get_input_method_surface" since="17">
189      <description summary="Create a input method surface from a surface">
190	Creates an input_method_surface for the given surface, gives it
191	the input_method_surface role.
192      </description>
193      <arg name="id" type="new_id" interface="zcr_input_method_surface_v1"/>
194      <arg name="surface" type="object" interface="wl_surface"/>
195    </request>
196
197    <!-- Version 19 additions -->
198
199    <event name="display_info" since="19">
200      <description summary="extra display information">
201	[Deprecated] Sends display size in pixels and display identification data, typically
202	in EDID format. Followed by a "workspace_info" event for the same display.
203      </description>
204      <arg name="display_id_hi" type="uint"/>
205      <arg name="display_id_lo" type="uint"/>
206      <arg name="width" type="int"/>
207      <arg name="height" type="int"/>
208      <arg name="identification_data" type="array"/>
209    </event>
210
211    <!-- Version 20 additions -->
212
213    <event name="workspace_info" since="20">
214      <description summary="area of remote shell in pixels">
215	Sends display information such as size, work area and its related information.
216	Each series of "workspace_info" events must be terminated by a "configure" event.
217      </description>
218      <arg name="display_id_hi" type="uint"/>
219      <arg name="display_id_lo" type="uint"/>
220      <arg name="x" type="int"/>
221      <arg name="y" type="int"/>
222      <arg name="width" type="int"/>
223      <arg name="height" type="int"/>
224      <arg name="inset_left" type="int"/>
225      <arg name="inset_top" type="int"/>
226      <arg name="inset_right" type="int"/>
227      <arg name="inset_bottom" type="int"/>
228      <arg name="stable_inset_left" type="int"/>
229      <arg name="stable_inset_top" type="int"/>
230      <arg name="stable_inset_right" type="int"/>
231      <arg name="stable_inset_bottom" type="int"/>
232      <arg name="systemui_visibility" type="int" summary="systemui_visibility_state"/>
233      <arg name="transform" type="int"/>
234      <arg name="is_internal" type="uint" summary="1 if screen is built-in"/>
235      <arg name="identification_data" type="array" summary="EDID blob data"/>
236    </event>
237
238  </interface>
239
240  <interface name="zcr_remote_surface_v1" version="20">
241    <description summary="A desktop window">
242      An interface that may be implemented by a wl_surface, for
243      implementations that provide a desktop-style user interface
244      and allows for remotely managed windows.
245
246      It provides requests to treat surfaces like windows, allowing to set
247      properties like app id and geometry.
248
249      The client must call wl_surface.commit on the corresponding wl_surface
250      for the remote_surface state to take effect.
251
252      For a surface to be mapped by the compositor the client must have
253      committed both an remote_surface state and a buffer.
254    </description>
255
256    <enum name="systemui_visibility_state">
257      <description summary="systemui visibility behavior">
258	Determine the visibility behavior of the system UI.
259      </description>
260      <entry name="visible" value="1" summary="system ui is visible"/>
261      <entry name="autohide_non_sticky" value="2" summary="system ui autohides and is not sticky"/>
262      <entry name="autohide_sticky" value="3" summary="system ui autohides and is sticky"/>
263    </enum>
264
265    <enum name="orientation">
266      <description summary="window orientation">
267	The orientation of the window.
268      </description>
269      <entry name="portrait" value="1" summary="portrait"/>
270      <entry name="landscape" value="2" summary="landscape"/>
271    </enum>
272
273    <enum name="window_type">
274      <description summary="window type">
275	The type of the window.
276      </description>
277      <entry name="normal" value="1" summary="normal app window"/>
278      <entry name="system_ui" value="2" summary="window is treated as systemui"/>
279    </enum>
280
281    <request name="destroy" type="destructor">
282      <description summary="Destroy the remote_surface">
283	Unmap and destroy the window. The window will be effectively
284	hidden from the user's point of view, and all state will be lost.
285      </description>
286    </request>
287
288    <request name="set_app_id">
289      <description summary="set application ID">
290	Set an application identifier for the surface.
291      </description>
292      <arg name="app_id" type="string"/>
293    </request>
294
295    <request name="set_window_geometry">
296      <description summary="set the new window geometry">
297	[Deprecated] The window geometry of a window is its "visible bounds"
298	from the user's perspective. Client-side decorations often have
299	invisible portions like drop-shadows which should be ignored for the
300	purposes of aligning, placing and constraining windows.
301
302	The window geometry is double buffered, and will be applied at the
303	time wl_surface.commit of the corresponding wl_surface is called.
304
305	Once the window geometry of the surface is set once, it is not
306	possible to unset it, and it will remain the same until
307	set_window_geometry is called again, even if a new subsurface or
308	buffer is attached.
309
310	If never set, the value is the full bounds of the output. This
311	updates dynamically on every commit.
312
313	The arguments are given in the output coordinate space.
314
315	The width and height must be greater than zero.
316      </description>
317      <arg name="x" type="int"/>
318      <arg name="y" type="int"/>
319      <arg name="width" type="int"/>
320      <arg name="height" type="int"/>
321    </request>
322
323    <request name="set_scale">
324      <description summary="set scale">
325	Set a scale factor that will be applied to surface and all descendants.
326      </description>
327      <arg name="scale" type="fixed"/>
328    </request>
329
330    <request name="set_rectangular_shadow">
331      <description summary="set a rectangular shadow">
332	[Deprecated] Request that surface needs a rectangular shadow.
333
334	This is only a request that the surface should have a rectangular
335	shadow. The compositor may choose to ignore this request.
336
337	The arguments are given in the output coordinate space and specifies
338	the inner bounds of the shadow.
339
340	The arguments are given in the output coordinate space.
341	Specifying zero width and height will disable the shadow.
342      </description>
343      <arg name="x" type="int"/>
344      <arg name="y" type="int"/>
345      <arg name="width" type="int"/>
346      <arg name="height" type="int"/>
347    </request>
348
349    <request name="set_rectangular_shadow_background_opacity">
350      <description summary="suggests the window's background opacity">
351	[Deprecated] Suggests the window's background opacity when the shadow is requested.
352      </description>
353      <arg name="opacity" type="fixed"/>
354    </request>
355
356    <request name="set_title">
357      <description summary="set surface title">
358	Set a short title for the surface.
359
360	This string may be used to identify the surface in a task bar,
361	window list, or other user interface elements provided by the
362	compositor.
363
364	The string must be encoded in UTF-8.
365      </description>
366      <arg name="title" type="string"/>
367    </request>
368
369    <request name="set_top_inset">
370      <description summary="set top inset for surface">
371	Set distance from the top of the surface to the contents.
372
373	This distance typically represents the size of the window caption.
374      </description>
375      <arg name="height" type="int"/>
376    </request>
377
378    <request name="activate">
379      <description summary="make the surface active">
380	Make the surface active and bring it to the front.
381      </description>
382      <arg name="serial" type="uint" summary="the serial of the user event"/>
383    </request>
384
385    <request name="maximize">
386      <description summary="maximize">
387	Request that surface is maximized. The window geometry will be updated
388	to whatever the compositor finds appropriate for a maximized window.
389
390	This is only a request that the window should be maximized. The
391	compositor may choose to ignore this request. The client should
392	listen to set_maximized events to determine if the window was
393	maximized or not.
394      </description>
395    </request>
396
397    <request name="minimize">
398      <description summary="minimize">
399	Request that surface is minimized.
400
401	This is only a request that the window should be minimized. The
402	compositor may choose to ignore this request. The client should
403	listen to set_minimized events to determine if the window was
404	minimized or not.
405      </description>
406    </request>
407
408    <request name="restore">
409      <description summary="restore">
410	Request that surface is restored. This restores the window geometry
411	to what it was before the window was minimized, maximized or made
412	fullscreen.
413
414	This is only a request that the window should be restored. The
415	compositor may choose to ignore this request. The client should
416	listen to unset_maximized, unset_minimize and unset_fullscreen
417	events to determine if the window was restored or not.
418      </description>
419    </request>
420
421    <request name="fullscreen">
422      <description summary="fullscreen">
423	Request that surface is made fullscreen.
424
425	This is only a request that the window should be made fullscreen.
426	The compositor may choose to ignore this request. The client should
427	listen to set_fullscreen events to determine if the window was
428	made fullscreen or not.
429      </description>
430    </request>
431
432    <request name="unfullscreen">
433      <description summary="unfullscreen">
434	Request that surface is made unfullscreen.
435
436	This is only a request that the window should be made unfullscreen.
437	The compositor may choose to ignore this request. The client should
438	listen to unset_fullscreen events to determine if the window was
439	made unfullscreen or not.
440      </description>
441    </request>
442
443    <request name="pin">
444      <description summary="pin">
445	Request that surface is pinned.
446
447	This is only a request that the window should be pinned.
448	The compositor may choose to ignore this request. The client should
449	listen to state_changed events to determine if the window was
450	pinned or not. If trusted flag is non-zero, the app can prevent users
451	from exiting the pinned mode.
452      </description>
453      <arg name="trusted" type="int"/>
454    </request>
455
456    <request name="unpin">
457      <description summary="unpin">
458	Request that surface is unpinned.
459
460	This is only a request that the window should be unpinned.
461	The compositor may choose to ignore this request. The client should
462	listen to unset_pinned events to determine if the window was
463	unpinned or not.
464      </description>
465    </request>
466
467    <request name="set_system_modal">
468      <description summary="suggests a re-layout of remote shell input area">
469	Suggests a surface should become system modal.
470      </description>
471    </request>
472
473    <request name="unset_system_modal">
474      <description summary="suggests a re-layout of remote shell input area">
475	Suggests a surface should become non system modal.
476      </description>
477    </request>
478
479    <event name="close">
480      <description summary="surface wants to be closed">
481	The close event is sent by the compositor when the user
482	wants the surface to be closed. This should be equivalent to
483	the user clicking the close button in client-side decorations,
484	if your application has any...
485
486	This is only a request that the user intends to close your
487	window. The client may choose to ignore this request, or show
488	a dialog to ask the user to save their data...
489      </description>
490    </event>
491
492    <event name="state_type_changed">
493      <description summary="surface state type changed">
494	[Deprecated] The state_type_changed event is sent by the compositor when
495	the surface state changed.
496
497	This is an event to notify that the window state changed in compositor.
498	The state change may be triggered by a client's request, or some user
499	action directly handled by the compositor. The client may choose to
500	ignore this event.
501      </description>
502      <arg name="state_type" type="uint"/>
503    </event>
504
505    <!-- Version 2 additions -->
506
507    <request name="set_rectangular_surface_shadow" since="2">
508      <description summary="set a rectangular shadow">
509	Request that surface needs a rectangular shadow.
510
511	This is only a request that the surface should have a rectangular
512	shadow. The compositor may choose to ignore this request.
513
514	The arguments are given in the remote surface coordinate space and
515	specifies inner bounds of the shadow. Specifying zero width and height
516	will disable the shadow.
517      </description>
518      <arg name="x" type="int"/>
519      <arg name="y" type="int"/>
520      <arg name="width" type="int"/>
521      <arg name="height" type="int"/>
522    </request>
523
524    <!-- Version 3 additions -->
525
526    <request name="set_systemui_visibility" since="3">
527      <description summary="requests the system ui visibility behavior for the surface">
528	Requests how the surface will change the visibility of the system UI when it is made active.
529      </description>
530      <arg name="visibility" type="uint"/>
531    </request>
532
533    <!-- Version 4 additions -->
534
535    <request name="set_always_on_top" since="4">
536      <description summary="set always on top">
537	Request that surface is made to be always on top.
538
539	This is only a request that the window should be always on top.
540	The compositor may choose to ignore this request.
541
542      </description>
543    </request>
544
545    <request name="unset_always_on_top" since="4">
546      <description summary="unset always on top">
547	Request that surface is made to be not always on top.
548
549	This is only a request that the window should be not always on top.
550	The compositor may choose to ignore this request.
551      </description>
552    </request>
553
554    <!-- Version 5 additions -->
555
556    <event name="configure" since="5">
557      <description summary="suggest a surface change">
558	The configure event asks the client to change surface state.
559
560	The client must apply the origin offset to window positions in
561	set_window_geometry requests.
562
563	The states listed in the event are state_type values, and might change
564	due to a client request or an event directly handled by the compositor.
565
566	Clients should arrange their surface for the new state, and then send an
567	ack_configure request with the serial sent in this configure event at
568	some point before committing the new surface.
569
570	If the client receives multiple configure events before it can respond
571	to one, it is free to discard all but the last event it received.
572      </description>
573      <arg name="origin_offset_x" type="int"/>
574      <arg name="origin_offset_y" type="int"/>
575      <arg name="states" type="array"/>
576      <arg name="serial" type="uint"/>
577    </event>
578
579    <request name="ack_configure" since="5">
580      <description summary="ack a configure event">
581	When a configure event is received, if a client commits the
582	surface in response to the configure event, then the client
583	must make an ack_configure request sometime before the commit
584	request, passing along the serial of the configure event.
585
586	For instance, the compositor might use this information during display
587	configuration to change its coordinate space for set_window_geometry
588	requests only when the client has switched to the new coordinate space.
589
590	If the client receives multiple configure events before it
591	can respond to one, it only has to ack the last configure event.
592
593	A client is not required to commit immediately after sending
594	an ack_configure request - it may even ack_configure several times
595	before its next surface commit.
596
597	A client may send multiple ack_configure requests before committing, but
598	only the last request sent before a commit indicates which configure
599	event the client really is responding to.
600      </description>
601      <arg name="serial" type="uint" summary="the serial from the configure event"/>
602    </request>
603
604    <request name="move" since="5">
605      <description summary="start an interactive move">
606	[Deprecated] Start an interactive, user-driven move of the surface.
607
608	The compositor responds to this request with a configure event that
609	transitions to the "moving" state. The client must only initiate motion
610	after acknowledging the state change. The compositor can assume that
611	subsequent set_window_geometry requests are position updates until the
612	next state transition is acknowledged.
613
614	The compositor may ignore move requests depending on the state of the
615	surface, e.g. fullscreen or maximized.
616      </description>
617    </request>
618
619    <!-- Version 6 additions -->
620
621    <request name="set_orientation" since="6">
622      <description summary="set orientation">
623	Set an orientation for the surface.
624      </description>
625      <arg name="orientation" type="int"/>
626    </request>
627
628    <!-- Version 7 additions -->
629
630    <request name="set_window_type" since="7">
631      <description summary="set the type of the window">
632	Set the type of window. This is only a hint to the compositor and the
633	compositor is free to ignore it.
634      </description>
635      <arg name="type" type="uint" summary="type of the window"/>
636    </request>
637
638    <!-- Version 9 additions -->
639
640    <request name="resize" since="9">
641      <description summary="start an interactive resize">
642	[Deprecated] Start an interactive, user-driven resize of the surface.
643
644	The compositor responds to this request with a configure event that
645	transitions to the "resizing" state. The client must only initiate
646	resizing after acknowledging the state change. The compositor can assume
647	that subsequent set_window_geometry requests are resizes until the next
648	state transition is acknowledged.
649
650	The compositor may ignore resize requests depending on the state of the
651	surface, e.g. fullscreen or maximized.
652      </description>
653    </request>
654
655    <request name="set_resize_outset" since="9">
656      <description summary="expand input region for resizing">
657	Expand input region of surface with resize outset.
658
659	The compositor clips the input region of each surface to its bounds,
660	unless the client requests a resize outset. In that case, the input
661	region of the root surface is expanded to allow for some leeway around
662	visible bounds when starting a user-driven resize.
663      </description>
664      <arg name="outset" type="int"/>
665    </request>
666
667    <event name="window_geometry_changed" since="9">
668      <description summary="announce window geometry commit">
669	Notify the client of committed window geometry.
670
671	The compositor sends this event when it commits window geometry. The
672	client may use this information to convert coordinates of input events
673	using the latest committed geometry.
674      </description>
675      <arg name="x" type="int"/>
676      <arg name="y" type="int"/>
677      <arg name="width" type="int"/>
678      <arg name="height" type="int"/>
679    </event>
680
681    <!-- Version 10 additions -->
682
683    <enum name="bounds_change_reason">
684      <description summary="bounds_change_reason">
685	Specifies the cause of the window bounds change event.
686      </description>
687      <entry name="drag_move" value="1" summary="the window is being moved by drag operation"/>
688      <entry name="drag_resize" value="2" summary="the window is being resized by drag operation."/>
689      <entry name="snap_to_left" value="3"
690	     summary="the window is resized to left snapped state"/>
691      <entry name="snap_to_right" value="4"
692	     summary="the window is resized to right snapped state"/>
693      <entry name="move" value="5"
694	     summary="the window bounds is moved due to other WM operations"/>
695      <entry name="resize" value="6"
696	     summary="the window bounds is reiszed due to other WM operations"/>
697    </enum>
698
699    <event name="bounds_changed" since="10">
700      <description summary="The compositor requested to change the bounds">
701	The compositor requested to change its
702	bounds. "bounds_change_reason" specifies the cause of the
703	bounds change. The client may apply the different move/resize
704	strategy depending on the reason.
705
706	"display_id_hi", "display_id_lo" specifies in which workspace
707	the surface should live in.
708
709	The client responds with set_window_geometry request, with the
710	bounds it is resized to (this may be different from the bounds
711	requested).
712
713	The client may ignore move request depending on the state,
714	e.g, if it becomes resizable or other constrants.
715      </description>
716      <arg name="display_id_hi" type="uint"/>
717      <arg name="display_id_lo" type="uint"/>
718      <arg name="x" type="int"/>
719      <arg name="y" type="int"/>
720      <arg name="width" type="int"/>
721      <arg name="height" type="int"/>
722      <arg name="bounds_change_reason" type="uint"/>
723    </event>
724
725    <request name="start_move" since="10">
726      <description summary="start an interactive move">
727	Request an interactive, user-driven move of the surface. "x"
728	and "y" specifies the starting point of the pointer device
729	that initiated the move.
730
731	The compositor responds to this request with a drag_started
732	event with "none" direction.  Please see drag_started event
733	for more details.
734
735	The compositor may ignore move requests depending on the state of the
736	surface, e.g. fullscreen or maximized.
737      </description>
738      <arg name="x" type="int"/>
739      <arg name="y" type="int"/>
740    </request>
741
742    <enum name="resize_direction">
743      <description summary="resize direction">
744	The resize direction for drag operation
745      </description>
746      <entry name="none" value="0" summary="move only, no resize"/>
747      <entry name="left" value="1" summary="resize to the left"/>
748      <entry name="topleft" value="2" summary="resize to the top left"/>
749      <entry name="top" value="3" summary="resize to the top"/>
750      <entry name="topright" value="4" summary="resize to the top right"/>
751      <entry name="right" value="5" summary="resize to the right"/>
752      <entry name="bottomright" value="6" summary="resize to the buttom right"/>
753      <entry name="bottom" value="7" summary="resize to the bottom"/>
754      <entry name="bottomleft" value="8" summary="resize to the bottom left"/>
755    </enum>
756
757    <event name="drag_started" since="10">
758      <description summary="Notifies that a drag to move/resize started.">
759	Notifies a client that the compositor started drag
760	operation. "direction" specifies which direction it is being
761	resized. "none" direction means just move but not resize.
762
763	This will be followed by series of the "bounds_changed" event
764	with "drag_resize" or "drag_move" reasons to update the window
765	bounds druing the drag operation.
766      </description>
767      <arg name="direction" type="uint"/>
768    </event>
769
770    <event name="drag_finished" since="10">
771      <description summary="Notifies that a drag operation has finished.">
772	Called when the drag operation is finished.  "x" and "y"
773	specifies the position of the pointer device used to drag.
774	"canceled" is true if the drag operation is aborted during
775	drag (e.g. by capture change or user action.)
776      </description>
777      <arg name="x" type="int"/>
778      <arg name="y" type="int"/>
779      <arg name="canceled" type="int" summary="true if the operation was canceled"/>
780    </event>
781
782    <request name="set_can_maximize" since="10">
783      <description summary="set can_maximize">
784	Request that surface can be in maximzied state.
785      </description>
786    </request>
787
788    <request name="unset_can_maximize" since="10">
789      <description summary="unset can_maximize">
790	Request that surface can not be in maximzied state.
791      </description>
792    </request>
793
794    <request name="set_min_size" since="10">
795      <description summary="set the minimum size">
796	Set a minimum size of the surface.
797
798	Values set in this way are double-buffered. They will get
799	applied on the next commit.
800      </description>
801      <arg name="width" type="int"/>
802      <arg name="height" type="int"/>
803    </request>
804
805    <request name="set_max_size" since="10">
806      <description summary="set the maximum size">
807	Set a maximum size of the surface.
808
809	Values set in this way are double-buffered. They will get
810	applied on the next commit.
811
812	Setting the same size as minimum size makes the surface
813	unresizable.
814      </description>
815      <arg name="width" type="int"/>
816      <arg name="height" type="int"/>
817    </request>
818
819    <!-- Version 11 additions -->
820
821    <request name="set_snapped_to_left" since="11">
822      <description summary="set the surface to left snapped">
823	Request that surface is snapped to left.
824      </description>
825    </request>
826
827    <request name="set_snapped_to_right" since="11">
828      <description summary="set the surface to right snapped">
829	Request that surface is snapped to right.
830      </description>
831    </request>
832
833    <!-- Version 12 additions -->
834
835    <request name="start_resize" since="12">
836      <description summary="start an interactive resize">
837	Request to start an interactive, user-driven resize of the surface.
838	"x" and "y" specifies the starting point of the pointer device
839	that initiated the reize.
840
841	The compositor responds to this request with a "drag_started"
842	event, followed by "bounds_changed" events, and ends the
843	resize operation with a "drag_finhsed" event. The compositor
844	determines the new bounds using the resize_direction and the
845	pointer event location.
846
847	The compositor may ignore resize requests depending on the state of the
848	surface, e.g. fullscreen or maximized, or no drag event is in pregress.
849      </description>
850      <arg name="resize_direction" type="uint" summary="the direction of resize"/>
851      <arg name="x" type="int"/>
852      <arg name="y" type="int"/>
853    </request>
854
855    <!-- Version 13 additions -->
856
857    <enum name="frame_type">
858      <description summary="frame types">
859	Frame type that can be used to decorate a surface.
860      </description>
861      <entry name="none" value="0" summary="no frame"/>
862      <entry name="normal" value="1" summary="caption with shadow" />
863      <entry name="shadow" value="2" summary="shadow only"/>
864      <entry name="autohide" value="3" summary="autohide frame with shadow"/>
865      <entry name="overlay" value="4" summary="overlay frame with shadow" />
866    </enum>
867
868    <request name="set_frame" since="13">
869      <description summary="request a frame for surface">
870	Enables compositor side frame decoration. |type|
871	specifies the type of frame to use for the surface.
872      </description>
873      <arg name="type" type="uint" summary="the frame type"/>
874    </request>
875
876    <enum name="frame_button_type">
877      <description summary="frame button types">
878	The mask that represents buttons on frame.
879      </description>
880      <entry name="back" value="1" summary="a button to naviate backwards"/>
881      <entry name="minimize" value="2" summary="a button to minimize the window"/>
882      <entry name="maximize_restore" value="4"
883	     summary="a button to maximize or restore"/>
884      <entry name="menu" value="8"
885	     summary="a button to activate application's menu"/>
886      <entry name="close" value="16" summary="a button to close the window"/>
887      <entry name="zoom" value="32"
888	     summary="a mask to turn the maximize_restore button to zoom button"/>
889    </enum>
890
891    <request name="set_frame_buttons" since="13">
892      <description summary="updates buttons' state on frame">
893	Updates the frame's button state. |visible_buttons| and |enabled_buttons|
894	are the union of button mask defined in |frame_button_type| enum.
895
896	The mask present in |enabled_buttons| but not in |visible_buttons| will
897	be ignored.
898      </description>
899      <arg name="visible_buttons" type="uint"/>
900      <arg name="enabled_buttons" type="uint"/>
901    </request>
902
903    <request name="set_extra_title" since="13">
904      <description summary="set extra title string">
905	The extra informational string about the surface. This can be
906	used to show the debug information in the title bar, or log
907	messages.
908
909	This is different from "set_title" which is used to identify
910	the surface.
911
912	The string must be encoded in UTF-8.
913      </description>
914      <arg name="extra_title" type="string"/>
915    </request>
916
917    <!-- Version 14 additions -->
918
919    <enum name="orientation_lock">
920      <description summary="orientation lock request for remote surfaces">
921	Defines orientation request when a remote surface is in foreground.
922      </description>
923      <entry name="none" value="1" summary="no orientation lock"/>
924      <entry name="portrait" value="2" summary="primary or secondary portrait"/>
925      <entry name="landscape" value="3" summary="primary or secondary landscape"/>
926      <entry name="current" value="4" summary="keep current orientation"/>
927      <entry name="portrait_primary" value="5" summary="primary portrait"/>
928      <entry name="landscape_primary" value="6" summary="primary landscape"/>
929      <entry name="portrait_secondary" value="7" summary="secondary portrait"/>
930      <entry name="landscape_secondary" value="8" summary="secondary landscape"/>
931    </enum>
932
933    <request name="set_orientation_lock" since="14">
934      <description summary="set orientation lock for a remote surface">
935	Request a specific orientation behavior when this surface is in foreground.
936      </description>
937      <arg name="orientation_lock" type="uint" summary="the orientation lock"/>
938    </request>
939
940    <!-- Version 15 additions -->
941
942    <request name="pip" since="15">
943      <description summary="set pip for a remote surface">
944	Request that surface is set to Picture-in-Picture (PIP).
945      </description>
946    </request>
947
948    <!-- Version 18 additions -->
949
950    <request name="set_bounds" since="18">
951      <description summary="set window bounds">
952	Set the "visible bounds" of a window from the user's perspective.
953	Client-side decorations often have invisible portions like drop shadows
954	which should be ignored for the purposes of aligning, placing and
955	constraining windows.
956
957	The bounds are double buffered, and will be applied at the
958	time wl_surface.commit of the corresponding wl_surface is called.
959
960	Once the bounds are set, it is not possible to unset them, and they will
961	remain the same until set_bounds is called again, even if a new sub-
962	surface or buffer is attached.
963
964	If never set, the value is the surface content bounds. This updates
965	dynamically on every commit.
966
967	The bounds are relative to the given display. If the display is invalid,
968	they are assumed to be relative to the primary display.
969
970	The width and height must be greater than zero.
971      </description>
972      <arg name="display_id_hi" type="uint"/>
973      <arg name="display_id_lo" type="uint"/>
974      <arg name="x" type="int"/>
975      <arg name="y" type="int"/>
976      <arg name="width" type="int"/>
977      <arg name="height" type="int"/>
978    </request>
979
980    <!-- Version 19 additions -->
981
982    <request name="set_aspect_ratio" since="19">
983      <description summary="set the maximum size">
984	Set an aspect ratio of the surface.
985
986	Values set in this way are double-buffered. They will get
987	applied on the next commit.
988
989	Setting the aspect ratio of the surface. The ratio of the values is used
990	for the ratio of width to height of the surface. The size of surface is
991	restricted to the ratio. If any value is zero, the restriction on aspect
992	ratio is unset.
993      </description>
994      <arg name="width" type="int"/>
995      <arg name="height" type="int"/>
996    </request>
997
998    <!-- Version 20 additions -->
999
1000    <request name="block_ime" since="20">
1001      <description summary="block server side IME">
1002	Block server side IME and always send key events through Wayland.
1003
1004	For some client, it's possible that server side IME is connected to the
1005	client through other mechanism e.g. ime.mojom. When set_ime_blocked
1006	is requested, server side IME should give up handling key events and
1007	forward those events through Wayland protocol.
1008      </description>
1009    </request>
1010
1011    <request name="unblock_ime" since="20">
1012      <description summary="unblock host side IME">
1013	Unblock server side IME. Some events can be handled by server side IME,
1014	while others can still be sent through Wayland protocol. See the
1015	description of set_ime_blocked for detail.
1016      </description>
1017    </request>
1018  </interface>
1019
1020  <interface name="zcr_notification_surface_v1" version="16">
1021    <description summary="A notification window">
1022      An interface that may be implemented by a wl_surface to host
1023      notification contents.
1024    </description>
1025
1026    <request name="destroy" type="destructor">
1027      <description summary="Destroy the notification_surface">
1028	Unmap and destroy the notification surface.
1029      </description>
1030    </request>
1031
1032    <!-- Version 16 additions -->
1033
1034    <request name="set_app_id" since="16">
1035      <description summary="set application ID">
1036	Set an application identifier for the notification surface.
1037      </description>
1038      <arg name="app_id" type="string"/>
1039    </request>
1040  </interface>
1041
1042  <interface name="zcr_input_method_surface_v1" version="18">
1043    <description summary="An input method window">
1044      An interface that may be implemented by a wl_surface to host IME contents.
1045    </description>
1046
1047    <request name="destroy" type="destructor">
1048      <description summary="Destroy the ime_surface">
1049	Unmap and destroy the input mtehod surface.
1050      </description>
1051    </request>
1052
1053    <!-- Version 18 additions -->
1054
1055    <request name="set_bounds" since="18">
1056      <description summary="set window bounds">
1057	Set the "visible bounds" of a window from the user's perspective.
1058
1059	The bounds are double buffered, and will be applied at the
1060	time wl_surface.commit of the corresponding wl_surface is called.
1061
1062	Once the bounds are set, it is not possible to unset them, and they will
1063	remain the same until set_bounds is called again, even if a new sub-
1064	surface or buffer is attached.
1065
1066	If never set, the value is the surface content bounds. This updates
1067	dynamically on every commit.
1068
1069	The bounds are relative to the given display. If the display is invalid,
1070	they are assumed to be relative to the primary display.
1071
1072	The width and height must be greater than zero.
1073      </description>
1074      <arg name="display_id_hi" type="uint"/>
1075      <arg name="display_id_lo" type="uint"/>
1076      <arg name="x" type="int"/>
1077      <arg name="y" type="int"/>
1078      <arg name="width" type="int"/>
1079      <arg name="height" type="int"/>
1080    </request>
1081  </interface>
1082
1083</protocol>
1084