• 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="16">
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	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="id_hi" type="uint"/>
155      <arg name="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  </interface>
186
187  <interface name="zcr_remote_surface_v1" version="15">
188    <description summary="A desktop window">
189      An interface that may be implemented by a wl_surface, for
190      implementations that provide a desktop-style user interface
191      and allows for remotely managed windows.
192
193      It provides requests to treat surfaces like windows, allowing to set
194      properties like app id and geometry.
195
196      The client must call wl_surface.commit on the corresponding wl_surface
197      for the remote_surface state to take effect.
198
199      For a surface to be mapped by the compositor the client must have
200      committed both an remote_surface state and a buffer.
201    </description>
202
203    <enum name="systemui_visibility_state">
204      <description summary="systemui visibility behavior">
205	Determine the visibility behavior of the system UI.
206      </description>
207      <entry name="visible" value="1" summary="system ui is visible"/>
208      <entry name="autohide_non_sticky" value="2" summary="system ui autohides and is not sticky"/>
209      <entry name="autohide_sticky" value="3" summary="system ui autohides and is sticky"/>
210    </enum>
211
212    <enum name="orientation">
213      <description summary="window orientation">
214	The orientation of the window.
215      </description>
216      <entry name="portrait" value="1" summary="portrait"/>
217      <entry name="landscape" value="2" summary="landscape"/>
218    </enum>
219
220    <enum name="window_type">
221      <description summary="window type">
222	The type of the window.
223      </description>
224      <entry name="normal" value="1" summary="normal app window"/>
225      <entry name="system_ui" value="2" summary="window is treated as systemui"/>
226    </enum>
227
228    <request name="destroy" type="destructor">
229      <description summary="Destroy the remote_surface">
230	Unmap and destroy the window. The window will be effectively
231	hidden from the user's point of view, and all state will be lost.
232      </description>
233    </request>
234
235    <request name="set_app_id">
236      <description summary="set application ID">
237	Set an application identifier for the surface.
238      </description>
239      <arg name="app_id" type="string"/>
240    </request>
241
242    <request name="set_window_geometry">
243      <description summary="set the new window geometry">
244	The window geometry of a window is its "visible bounds" from the
245	user's perspective. Client-side decorations often have invisible
246	portions like drop-shadows which should be ignored for the
247	purposes of aligning, placing and constraining windows.
248
249	The window geometry is double buffered, and will be applied at the
250	time wl_surface.commit of the corresponding wl_surface is called.
251
252	Once the window geometry of the surface is set once, it is not
253	possible to unset it, and it will remain the same until
254	set_window_geometry is called again, even if a new subsurface or
255	buffer is attached.
256
257	If never set, the value is the full bounds of the output. This
258	updates dynamically on every commit.
259
260	The arguments are given in the output coordinate space.
261
262	The width and height must be greater than zero.
263      </description>
264      <arg name="x" type="int"/>
265      <arg name="y" type="int"/>
266      <arg name="width" type="int"/>
267      <arg name="height" type="int"/>
268    </request>
269
270    <request name="set_scale">
271      <description summary="set scale">
272	Set a scale factor that will be applied to surface and all descendants.
273      </description>
274      <arg name="scale" type="fixed"/>
275    </request>
276
277    <request name="set_rectangular_shadow">
278      <description summary="set a rectangular shadow">
279	[Deprecated] Request that surface needs a rectangular shadow.
280
281	This is only a request that the surface should have a rectangular
282	shadow. The compositor may choose to ignore this request.
283
284	The arguments are given in the output coordinate space and specifies
285	the inner bounds of the shadow.
286
287	The arguments are given in the output coordinate space.
288	Specifying zero width and height will disable the shadow.
289      </description>
290      <arg name="x" type="int"/>
291      <arg name="y" type="int"/>
292      <arg name="width" type="int"/>
293      <arg name="height" type="int"/>
294    </request>
295
296    <request name="set_rectangular_shadow_background_opacity">
297      <description summary="suggests the window's background opacity">
298	[Deprecated] Suggests the window's background opacity when the shadow is requested.
299      </description>
300      <arg name="opacity" type="fixed"/>
301    </request>
302
303    <request name="set_title">
304      <description summary="set surface title">
305	Set a short title for the surface.
306
307	This string may be used to identify the surface in a task bar,
308	window list, or other user interface elements provided by the
309	compositor.
310
311	The string must be encoded in UTF-8.
312      </description>
313      <arg name="title" type="string"/>
314    </request>
315
316    <request name="set_top_inset">
317      <description summary="set top inset for surface">
318	Set distance from the top of the surface to the contents.
319
320	This distance typically represents the size of the window caption.
321      </description>
322      <arg name="height" type="int"/>
323    </request>
324
325    <request name="activate">
326      <description summary="make the surface active">
327	Make the surface active and bring it to the front.
328      </description>
329      <arg name="serial" type="uint" summary="the serial of the user event"/>
330    </request>
331
332    <request name="maximize">
333      <description summary="maximize">
334	Request that surface is maximized. The window geometry will be updated
335	to whatever the compositor finds appropriate for a maximized window.
336
337	This is only a request that the window should be maximized. The
338	compositor may choose to ignore this request. The client should
339	listen to set_maximized events to determine if the window was
340	maximized or not.
341      </description>
342    </request>
343
344    <request name="minimize">
345      <description summary="minimize">
346	Request that surface is minimized.
347
348	This is only a request that the window should be minimized. The
349	compositor may choose to ignore this request. The client should
350	listen to set_minimized events to determine if the window was
351	minimized or not.
352      </description>
353    </request>
354
355    <request name="restore">
356      <description summary="restore">
357	Request that surface is restored. This restores the window geometry
358	to what it was before the window was minimized, maximized or made
359	fullscreen.
360
361	This is only a request that the window should be restored. The
362	compositor may choose to ignore this request. The client should
363	listen to unset_maximized, unset_minimize and unset_fullscreen
364	events to determine if the window was restored or not.
365      </description>
366    </request>
367
368    <request name="fullscreen">
369      <description summary="fullscreen">
370	Request that surface is made fullscreen.
371
372	This is only a request that the window should be made fullscreen.
373	The compositor may choose to ignore this request. The client should
374	listen to set_fullscreen events to determine if the window was
375	made fullscreen or not.
376      </description>
377    </request>
378
379    <request name="unfullscreen">
380      <description summary="unfullscreen">
381	Request that surface is made unfullscreen.
382
383	This is only a request that the window should be made unfullscreen.
384	The compositor may choose to ignore this request. The client should
385	listen to unset_fullscreen events to determine if the window was
386	made unfullscreen or not.
387      </description>
388    </request>
389
390    <request name="pin">
391      <description summary="pin">
392	Request that surface is pinned.
393
394	This is only a request that the window should be pinned.
395	The compositor may choose to ignore this request. The client should
396	listen to state_changed events to determine if the window was
397	pinned or not. If trusted flag is non-zero, the app can prevent users
398	from exiting the pinned mode.
399      </description>
400      <arg name="trusted" type="int"/>
401    </request>
402
403    <request name="unpin">
404      <description summary="unpin">
405	Request that surface is unpinned.
406
407	This is only a request that the window should be unpinned.
408	The compositor may choose to ignore this request. The client should
409	listen to unset_pinned events to determine if the window was
410	unpinned or not.
411      </description>
412    </request>
413
414    <request name="set_system_modal">
415      <description summary="suggests a re-layout of remote shell input area">
416	Suggests a surface should become system modal.
417      </description>
418    </request>
419
420    <request name="unset_system_modal">
421      <description summary="suggests a re-layout of remote shell input area">
422	Suggests a surface should become non system modal.
423      </description>
424    </request>
425
426    <event name="close">
427      <description summary="surface wants to be closed">
428	The close event is sent by the compositor when the user
429	wants the surface to be closed. This should be equivalent to
430	the user clicking the close button in client-side decorations,
431	if your application has any...
432
433	This is only a request that the user intends to close your
434	window. The client may choose to ignore this request, or show
435	a dialog to ask the user to save their data...
436      </description>
437    </event>
438
439    <event name="state_type_changed">
440      <description summary="surface state type changed">
441	[Deprecated] The state_type_changed event is sent by the compositor when
442	the surface state changed.
443
444	This is an event to notify that the window state changed in compositor.
445	The state change may be triggered by a client's request, or some user
446	action directly handled by the compositor. The client may choose to
447	ignore this event.
448      </description>
449      <arg name="state_type" type="uint"/>
450    </event>
451
452    <!-- Version 2 additions -->
453
454    <request name="set_rectangular_surface_shadow" since="2">
455      <description summary="set a rectangular shadow">
456	Request that surface needs a rectangular shadow.
457
458	This is only a request that the surface should have a rectangular
459	shadow. The compositor may choose to ignore this request.
460
461	The arguments are given in the remote surface coordinate space and
462	specifies inner bounds of the shadow. Specifying zero width and height
463	will disable the shadow.
464      </description>
465      <arg name="x" type="int"/>
466      <arg name="y" type="int"/>
467      <arg name="width" type="int"/>
468      <arg name="height" type="int"/>
469    </request>
470
471    <!-- Version 3 additions -->
472
473    <request name="set_systemui_visibility" since="3">
474      <description summary="requests the system ui visibility behavior for the surface">
475	Requests how the surface will change the visibility of the system UI when it is made active.
476      </description>
477      <arg name="visibility" type="uint"/>
478    </request>
479
480    <!-- Version 4 additions -->
481
482    <request name="set_always_on_top" since="4">
483      <description summary="set always on top">
484	Request that surface is made to be always on top.
485
486	This is only a request that the window should be always on top.
487	The compositor may choose to ignore this request.
488
489      </description>
490    </request>
491
492    <request name="unset_always_on_top" since="4">
493      <description summary="unset always on top">
494	Request that surface is made to be not always on top.
495
496	This is only a request that the window should be not always on top.
497	The compositor may choose to ignore this request.
498      </description>
499    </request>
500
501    <!-- Version 5 additions -->
502
503    <event name="configure" since="5">
504      <description summary="suggest a surface change">
505	The configure event asks the client to change surface state.
506
507	The client must apply the origin offset to window positions in
508	set_window_geometry requests.
509
510	The states listed in the event are state_type values, and might change
511	due to a client request or an event directly handled by the compositor.
512
513	Clients should arrange their surface for the new state, and then send an
514	ack_configure request with the serial sent in this configure event at
515	some point before committing the new surface.
516
517	If the client receives multiple configure events before it can respond
518	to one, it is free to discard all but the last event it received.
519      </description>
520      <arg name="origin_offset_x" type="int"/>
521      <arg name="origin_offset_y" type="int"/>
522      <arg name="states" type="array"/>
523      <arg name="serial" type="uint"/>
524    </event>
525
526    <request name="ack_configure" since="5">
527      <description summary="ack a configure event">
528	When a configure event is received, if a client commits the
529	surface in response to the configure event, then the client
530	must make an ack_configure request sometime before the commit
531	request, passing along the serial of the configure event.
532
533	For instance, the compositor might use this information during display
534	configuration to change its coordinate space for set_window_geometry
535	requests only when the client has switched to the new coordinate space.
536
537	If the client receives multiple configure events before it
538	can respond to one, it only has to ack the last configure event.
539
540	A client is not required to commit immediately after sending
541	an ack_configure request - it may even ack_configure several times
542	before its next surface commit.
543
544	A client may send multiple ack_configure requests before committing, but
545	only the last request sent before a commit indicates which configure
546	event the client really is responding to.
547      </description>
548      <arg name="serial" type="uint" summary="the serial from the configure event"/>
549    </request>
550
551    <request name="move" since="5">
552      <description summary="start an interactive move">
553	Start an interactive, user-driven move of the surface.
554
555	The compositor responds to this request with a configure event that
556	transitions to the "moving" state. The client must only initiate motion
557	after acknowledging the state change. The compositor can assume that
558	subsequent set_window_geometry requests are position updates until the
559	next state transition is acknowledged.
560
561	The compositor may ignore move requests depending on the state of the
562	surface, e.g. fullscreen or maximized.
563      </description>
564    </request>
565
566    <!-- Version 6 additions -->
567
568    <request name="set_orientation" since="6">
569      <description summary="set orientation">
570	Set an orientation for the surface.
571      </description>
572      <arg name="orientation" type="int"/>
573    </request>
574
575    <!-- Version 7 additions -->
576
577    <request name="set_window_type" since="7">
578      <description summary="set the type of the window">
579	Set the type of window. This is only a hint to the compositor and the
580	compositor is free to ignore it.
581      </description>
582      <arg name="type" type="uint" summary="type of the window"/>
583    </request>
584
585    <!-- Version 9 additions -->
586
587    <request name="resize" since="9">
588      <description summary="start an interactive resize">
589	[Deprecated] Start an interactive, user-driven resize of the surface.
590
591	The compositor responds to this request with a configure event that
592	transitions to the "resizing" state. The client must only initiate
593	resizing after acknowledging the state change. The compositor can assume
594	that subsequent set_window_geometry requests are resizes until the next
595	state transition is acknowledged.
596
597	The compositor may ignore resize requests depending on the state of the
598	surface, e.g. fullscreen or maximized.
599      </description>
600    </request>
601
602    <request name="set_resize_outset" since="9">
603      <description summary="expand input region for resizing">
604	Expand input region of surface with resize outset.
605
606	The compositor clips the input region of each surface to its bounds,
607	unless the client requests a resize outset. In that case, the input
608	region of the root surface is expanded to allow for some leeway around
609	visible bounds when starting a user-driven resize.
610      </description>
611      <arg name="outset" type="int"/>
612    </request>
613
614    <event name="window_geometry_changed" since="9">
615      <description summary="announce window geometry commit">
616	Notify the client of committed window geometry.
617
618	The compositor sends this event when it commits window geometry. The
619	client may use this information to convert coordinates of input events
620	using the latest committed geometry.
621      </description>
622      <arg name="x" type="int"/>
623      <arg name="y" type="int"/>
624      <arg name="width" type="int"/>
625      <arg name="height" type="int"/>
626    </event>
627
628    <!-- Version 10 additions -->
629
630    <enum name="bounds_change_reason">
631      <description summary="bounds_change_reason">
632	Specifies the cause of the window bounds change event.
633      </description>
634      <entry name="drag_move" value="1" summary="the window is being moved by drag operation"/>
635      <entry name="drag_resize" value="2" summary="the window is being resized by drag operation."/>
636      <entry name="snap_to_left" value="3"
637	     summary="the window is resized to left snapped state"/>
638      <entry name="snap_to_right" value="4"
639	     summary="the window is resized to right snapped state"/>
640      <entry name="move" value="5"
641	     summary="the window bounds is moved due to other WM operations"/>
642      <entry name="resize" value="6"
643	     summary="the window bounds is reiszed due to other WM operations"/>
644    </enum>
645
646    <event name="bounds_changed" since="10">
647      <description summary="The compositor requested to change the bounds">
648	The compositor requested to change its
649	bounds. "bounds_change_reason" specifies the cause of the
650	bounds change. The client may apply the different move/resize
651	strategy depending on the reason.
652
653	"display_id_hi", "display_id_lo" specifies in which workspace
654	the surface should live in.
655
656	The client responds with set_window_geometry request, with the
657	bounds it is resized to (this may be different from the bounds
658	requested).
659
660	The client may ignore move request depending on the state,
661	e.g, if it becomes resizable or other constrants.
662      </description>
663      <arg name="workspace_id_hi" type="uint"/>
664      <arg name="workspace_id_lo" type="uint"/>
665      <arg name="x" type="int"/>
666      <arg name="y" type="int"/>
667      <arg name="width" type="int"/>
668      <arg name="height" type="int"/>
669      <arg name="bounds_change_reason" type="uint"/>
670    </event>
671
672    <request name="start_move" since="10">
673      <description summary="start an interactive move">
674	Request an interactive, user-driven move of the surface. "x"
675	and "y" specifies the starting point of the pointer device
676	that initiated the move.
677
678	The compositor responds to this request with a drag_started
679	event with "none" direction.  Please see drag_started event
680	for more details.
681
682	The compositor may ignore move requests depending on the state of the
683	surface, e.g. fullscreen or maximized.
684      </description>
685      <arg name="x" type="int"/>
686      <arg name="y" type="int"/>
687    </request>
688
689    <enum name="resize_direction">
690      <description summary="resize direction">
691	The resize direction for drag operation
692      </description>
693      <entry name="none" value="0" summary="move only, no resize"/>
694      <entry name="left" value="1" summary="resize to the left"/>
695      <entry name="topleft" value="2" summary="resize to the top left"/>
696      <entry name="top" value="3" summary="resize to the top"/>
697      <entry name="topright" value="4" summary="resize to the top right"/>
698      <entry name="right" value="5" summary="resize to the right"/>
699      <entry name="bottomright" value="6" summary="resize to the buttom right"/>
700      <entry name="bottom" value="7" summary="resize to the bottom"/>
701      <entry name="bottomleft" value="8" summary="resize to the bottom left"/>
702    </enum>
703
704    <event name="drag_started" since="10">
705      <description summary="Notifies that a drag to move/resize started.">
706	Notifies a client that the compositor started drag
707	operation. "direction" specifies which direction it is being
708	resized. "none" direction means just move but not resize.
709
710	This will be followed by series of the "bounds_changed" event
711	with "drag_resize" or "drag_move" reasons to update the window
712	bounds druing the drag operation.
713      </description>
714      <arg name="direction" type="uint"/>
715    </event>
716
717    <event name="drag_finished" since="10">
718      <description summary="Notifies that a drag operation has finished.">
719	Called when the drag operation is finished.  "x" and "y"
720	specifies the position of the pointer device used to drag.
721	"canceled" is true if the drag operation is aborted during
722	drag (e.g. by capture change or user action.)
723      </description>
724      <arg name="x" type="int"/>
725      <arg name="y" type="int"/>
726      <arg name="canceled" type="int" summary="true if the operation was canceled"/>
727    </event>
728
729    <request name="set_can_maximize" since="10">
730      <description summary="set can_maximize">
731	Request that surface can be in maximzied state.
732      </description>
733    </request>
734
735    <request name="unset_can_maximize" since="10">
736      <description summary="unset can_maximize">
737	Request that surface can not be in maximzied state.
738      </description>
739    </request>
740
741    <request name="set_min_size" since="10">
742      <description summary="set the minimum size">
743	Set a minimum size of the surface.
744
745	Values set in this way are double-buffered. They will get
746	applied on the next commit.
747      </description>
748      <arg name="width" type="int"/>
749      <arg name="height" type="int"/>
750    </request>
751
752    <request name="set_max_size" since="10">
753      <description summary="set the maximum size">
754	Set a maximum size of the surface.
755
756	Values set in this way are double-buffered. They will get
757	applied on the next commit.
758
759	Setting the same size as minimum size makes the surface
760	unresizable.
761      </description>
762      <arg name="width" type="int"/>
763      <arg name="height" type="int"/>
764    </request>
765
766    <!-- Version 11 additions -->
767
768    <request name="set_snapped_to_left" since="11">
769      <description summary="set the surface to left snapped">
770	Request that surface is snapped to left.
771      </description>
772    </request>
773
774    <request name="set_snapped_to_right" since="11">
775      <description summary="set the surface to right snapped">
776	Request that surface is snapped to right.
777      </description>
778    </request>
779
780    <!-- Version 12 additions -->
781
782    <request name="start_resize" since="12">
783      <description summary="start an interactive resize">
784	Request to start an interactive, user-driven resize of the surface.
785	"x" and "y" specifies the starting point of the pointer device
786	that initiated the reize.
787
788	The compositor responds to this request with a "drag_started"
789	event, followed by "bounds_changed" events, and ends the
790	resize operation with a "drag_finhsed" event. The compositor
791	determines the new bounds using the resize_direction and the
792	pointer event location.
793
794	The compositor may ignore resize requests depending on the state of the
795	surface, e.g. fullscreen or maximized, or no drag event is in pregress.
796      </description>
797      <arg name="resize_direction" type="uint" summary="the direction of resize"/>
798      <arg name="x" type="int"/>
799      <arg name="y" type="int"/>
800    </request>
801
802    <!-- Version 13 additions -->
803
804    <enum name="frame_type">
805      <description summary="frame types">
806	Frame type that can be used to decorate a surface.
807      </description>
808      <entry name="none" value="0" summary="no frame"/>
809      <entry name="normal" value="1" summary="caption with shadow" />
810      <entry name="shadow" value="2" summary="shadow only"/>
811      <entry name="autohide" value="3" summary="autohide frame with shadow"/>
812      <entry name="overlay" value="4" summary="overlay frame with shadow" />
813    </enum>
814
815    <request name="set_frame" since="13">
816      <description summary="request a frame for surface">
817	Enables compositor side frame decoration. |type|
818	specifies the type of frame to use for the surface.
819      </description>
820      <arg name="type" type="uint" summary="the frame type"/>
821    </request>
822
823    <enum name="frame_button_type">
824      <description summary="frame button types">
825	The mask that represents buttons on frame.
826      </description>
827      <entry name="back" value="1" summary="a button to naviate backwards"/>
828      <entry name="minimize" value="2" summary="a button to minimize the window"/>
829      <entry name="maximize_restore" value="4"
830	     summary="a button to maximize or restore"/>
831      <entry name="menu" value="8"
832	     summary="a button to activate application's menu"/>
833      <entry name="close" value="16" summary="a button to close the window"/>
834      <entry name="zoom" value="32"
835	     summary="a mask to turn the maximize_restore button to zoom button"/>
836    </enum>
837
838    <request name="set_frame_buttons" since="13">
839      <description summary="updates buttons' state on frame">
840	Updates the frame's button state. |visible_buttons| and |enabled_buttons|
841	are the union of button mask defined in |frame_button_type| enum.
842
843	The mask present in |enabled_buttons| but not in |visible_buttons| will
844	be ignored.
845      </description>
846      <arg name="visible_buttons" type="uint"/>
847      <arg name="enabled_buttons" type="uint"/>
848    </request>
849
850    <request name="set_extra_title" since="13">
851      <description summary="set extra title string">
852	The extra informational string about the surface. This can be
853	used to show the debug information in the title bar, or log
854	messages.
855
856	This is different from "set_title" which is used to identify
857	the surface.
858
859	The string must be encoded in UTF-8.
860      </description>
861      <arg name="extra_title" type="string"/>
862    </request>
863
864    <!-- Version 14 additions -->
865
866    <enum name="orientation_lock">
867      <description summary="orientation lock request for remote surfaces">
868	Defines orientation request when a remote surface is in foreground.
869      </description>
870      <entry name="none" value="1" summary="no orientation lock"/>
871      <entry name="portrait" value="2" summary="primary or secondary portrait"/>
872      <entry name="landscape" value="3" summary="primary or secondary landscape"/>
873      <entry name="current" value="4" summary="keep current orientation"/>
874      <entry name="portrait_primary" value="5" summary="primary portrait"/>
875      <entry name="landscape_primary" value="6" summary="primary landscape"/>
876      <entry name="portrait_secondary" value="7" summary="secondary portrait"/>
877      <entry name="landscape_secondary" value="8" summary="secondary landscape"/>
878    </enum>
879
880    <request name="set_orientation_lock" since="14">
881      <description summary="set orientation lock for a remote surface">
882	Request a specific orientation behavior when this surface is in foreground.
883      </description>
884      <arg name="orientation_lock" type="uint" summary="the orientation lock"/>
885    </request>
886
887    <!-- Version 15 additions -->
888
889    <request name="pip" since="15">
890      <description summary="set pip for a remote surface">
891	Request that surface is set to Picture-in-Picture (PIP).
892      </description>
893    </request>
894
895  </interface>
896
897  <interface name="zcr_notification_surface_v1" version="16">
898    <description summary="A notification window">
899      An interface that may be implemented by a wl_surface to host
900      notification contents.
901    </description>
902
903    <request name="destroy" type="destructor">
904      <description summary="Destroy the notification_surface">
905	Unmap and destroy the notification surface.
906      </description>
907    </request>
908
909    <!-- Version 16 additions -->
910
911    <request name="set_app_id" since="16">
912      <description summary="set application ID">
913	Set an application identifier for the notification surface.
914      </description>
915      <arg name="app_id" type="string"/>
916    </request>
917  </interface>
918
919</protocol>
920