xwm: Check whether the seat is NULL when needed in weston_wm_handle_button
[profile/ivi/weston-ivi-shell.git] / protocol / fullscreen-shell.xml
1 <protocol name="fullscreen_shell">
2   <interface name="_wl_fullscreen_shell" version="1">
3     <description summary="Displays a single surface per output">
4       Displays a single surface per output.
5
6       This interface provides a mechanism for a single client to display
7       simple full-screen surfaces.  While there technically may be multiple
8       clients bound to this interface, only one of those clients should be
9       shown at a time.
10
11       To present a surface, the client uses either the present_surface or
12       present_surface_for_mode requests.  Presenting a surface takes effect
13       on the next wl_surface.commit.  See the individual requests for
14       details about scaling and mode switches.
15
16       The client can have at most one surface per output at any time.
17       Requesting a surface be presented on an output that already has a
18       surface replaces the previously presented surface.  Presenting a null
19       surface removes its content and effectively disables the output.
20       Exactly what happens when an output is "disabled" is
21       compositor-specific.  The same surface may be presented on multiple
22       outputs simultaneously.
23
24       Once a surface is presented on an output, it stays on that output
25       until either the client removes it or the compositor destroys the
26       output.  This way, the client can update the output's contents by
27       simply attaching a new buffer.
28     </description>
29
30     <request name="release" type="destructor">
31       <description summary="release the wl_fullscreen_shell interface">
32         Release the binding from the wl_fullscreen_shell interface
33
34         This destroys the server-side object and frees this binding.  If
35         the client binds to wl_fullscreen_shell multiple times, it may wish
36         to free some of those bindings.
37       </description>
38     </request>
39
40     <enum name="capability">
41       <description summary="capabilities advertised by the compositor">
42         Various capabilities that can be advertised by the compositor.  They
43         are advertised one-at-a-time when the wl_fullscreen_shell interface is
44         bound.  See the wl_fullscreen_shell.capability event for more details.
45
46         ARBITRARY_MODE:
47         This is a hint to the client that indicates that the compositor is
48         capable of setting practially any mode on its outputs.  If this
49         capability is provided, wl_fullscreen_shell.present_surface_for_mode
50         will almost never fail and clients should feel free to set whatever
51         mode they like.  If the compositor does not advertise this, it may
52         still support some modes that are not advertised through wl_global.mode
53         but it is less likely.
54
55         CURSOR_PLANE:
56         This is a hint to the client that indicates that the compositor can
57         handle a cursor surface from the client without actually compositing.
58         This may be because of a hardware cursor plane or some other mechanism.
59         If the compositor does not advertise this capability then setting
60         wl_pointer.cursor may degrade performance or be ignored entirely.  If
61         CURSOR_PLANE is not advertised, it is recommended that the client draw
62         its own cursor and set wl_pointer.cursor(NULL).
63       </description>
64       <entry name="arbitrary_modes" value="1" summary="compositor is capable of almost any output mode"/>
65       <entry name="cursor_plane" value="2" summary="compositor has a seperate cursor plane"/>
66     </enum>
67
68     <event name="capability">
69       <description summary="advertises a capability of the compositor">
70         Advertises a single capability of the compositor.
71
72         When the wl_fullscreen_shell interface is bound, this event is emitted
73         once for each capability advertised.  Valid capabilities are given by
74         the wl_fullscreen_shell.capability enum.  If clients want to take
75         advantage of any of these capabilities, they sould use a
76         wl_display.sync request immediatly after binding to ensure that they
77         recieve all the capability events.
78       </description>
79       <arg name="capabilty" type="uint"/>
80     </event>
81
82     <enum name="present_method">
83       <description summary="different method to set the surface fullscreen">
84         Hints to indicate to the compositor how to deal with a conflict
85         between the dimensions of the surface and the dimensions of the
86         output. The compositor is free to ignore this parameter.
87       </description>
88       <entry name="default" value="0" summary="no preference, apply default policy"/>
89       <entry name="center" value="1" summary="center the surface on the output"/>
90       <entry name="zoom" value="2" summary="scale the surface, preserving aspect ratio, to the largest size that will fit on the output" />
91       <entry name="zoom_crop" value="3" summary="scale the surface, preserving aspect ratio, to fully fill the output cropping if needed" />
92       <entry name="stretch" value="4" summary="scale the surface to the size of the output ignoring aspect ratio" />
93     </enum>
94
95     <request name="present_surface">
96       <description summary="present surface for display">
97         Present a surface on the given output.
98
99         If the output is null, the compositor will present the surface on
100         whatever display (or displays) it thinks best.  In particular, this
101         may replace any or all surfaces currently presented so it should
102         not be used in combination with placing surfaces on specific
103         outputs.
104
105         The method parameter is a hint to the compositor for how the surface
106         is to be presented.  In particular, it tells the compostior how to
107         handle a size mismatch between the presented surface and the
108         output.  The compositor is free to ignore this parameter.
109
110         The "zoom", "zoom_crop", and "stretch" methods imply a scaling
111         operation on the surface.  This will override any kind of output
112         scaling, so the buffer_scale property of the surface is effectively
113         ignored.
114       </description>
115       <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
116       <arg name="method" type="uint"/>
117       <arg name="output" type="object" interface="wl_output" allow-null="true"/>
118     </request>
119
120     <request name="present_surface_for_mode">
121       <description summary="present surface for display at a particular mode">
122         Presents a surface on the given output for a particular mode.
123
124         If the current size of the output differs from that of the surface,
125         the compositor will attempt to change the size of the output to
126         match the surface.  The result of the mode-switch operation will be
127         returned via the provided wl_fullscreen_shell_mode_feedback object.
128
129         If the current output mode matches the one requested or if the
130         compositor successfully switches the mode to match the surface,
131         then the mode_successful event will be sent and the output will
132         contain the contents of the given surface.  If the compositor
133         cannot match the output size to the surface size, the mode_failed
134         will be sent and the output will contain the contents of the
135         previously presented surface (if any).  If another surface is
136         presented on the given output before either of these has a chance
137         to happen, the present_cancelled event will be sent.
138
139         Due to race conditions and other issues unknown to the client, no
140         mode-switch operation is guaranteed to succeed.  However, if the
141         mode is one advertised by wl_output.mode or if the compositor
142         advertises the ARBITRARY_MODES capability, then the client should
143         expect that the mode-switch operation will usually succeed.
144
145         If the size of the presented surface changes, the resulting output
146         is undefined.  The compositor may attempt to change the output mode
147         to compensate.  However, there is no guarantee that a suitable mode
148         will be found and the client has no way to be notified of success
149         or failure.
150
151         The framerate parameter specifies the desired framerate for the
152         output in mHz.  The compositor is free to ignore this parameter.  A
153         value of 0 indicates that the client has no preference.
154
155         If the value of wl_output.scale differs from wl_surface.buffer_scale,
156         then the compositor may choose a mode that matches either the buffer
157         size or the surface size.  In either case, the surface will fill the
158         output.
159       </description>
160       <arg name="surface" type="object" interface="wl_surface"/>
161       <arg name="output" type="object" interface="wl_output"/>
162       <arg name="framerate" type="int"/>
163       <arg name="feedback" type="new_id" interface="_wl_fullscreen_shell_mode_feedback"/>
164     </request>
165
166     <enum name="error">
167       <description summary="wl_fullscreen_shell error values">
168         These errors can be emitted in response to wl_fullscreen_shell requests
169       </description>
170       <entry name="invalid_method" value="0" summary="present_method is not known"/>
171     </enum>
172   </interface>
173
174   <interface name="_wl_fullscreen_shell_mode_feedback" version="1">
175     <event name="mode_successful">
176       <description summary="mode switch succeeded">
177         This event indicates that the attempted mode switch operation was
178         successful.  A surface of the size requested in the mode switch
179         will fill the output without scaling.
180
181         Upon receiving this event, the client should destroy the
182         wl_fullscreen_shell_mode_feedback object.
183       </description>
184     </event>
185     <event name="mode_failed">
186       <description summary="mode switch failed">
187         This event indicates that the attempted mode switch operation
188         failed. This may be because the requested output mode is not
189         possible or it may mean that the compositor does not want to allow it.
190
191         Upon receiving this event, the client should destroy the
192         wl_fullscreen_shell_mode_feedback object.
193       </description>
194     </event>
195     <event name="present_cancelled">
196       <description summary="mode switch cancelled">
197         This event indicates that the attempted mode switch operation was
198         cancelled.  Most likely this is because the client requested a
199         second mode switch before the first one completed.
200
201         Upon receiving this event, the client should destroy the
202         wl_fullscreen_shell_mode_feedback object.
203       </description>
204     </event>
205   </interface>
206 </protocol>