KWayland

wayland-xdg-shell-v5-server-protocol.h
1 /*
2  * This file is *NOT* autogenerated.
3  * It contains XDGShellV5 with method names modified to be not clashing with XDG stable
4  * Strings inside the sent protocol remain the same
5  */
6 #ifndef ZXDG_SHELL_V5_UNSTABLE_V5_SERVER_PROTOCOL_H
7 #define ZXDG_SHELL_V5_UNSTABLE_V5_SERVER_PROTOCOL_H
8 
9 #include "wayland-server.h"
10 #include <stddef.h>
11 #include <stdint.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 struct wl_client;
18 struct wl_resource;
19 
20 /**
21  * @page page_zxdg_shell_v5_unstable_v5 The zxdg_shell_v5_unstable_v5 protocol
22  * @section page_ifaces_zxdg_shell_v5_unstable_v5 Interfaces
23  * - @subpage page_iface_xdg_shell - create desktop-style surfaces
24  * - @subpage page_iface_xdg_surface - A desktop window
25  * - @subpage page_iface_xdg_popup - short-lived, popup surfaces for menus
26  * @section page_copyright_zxdg_shell_v5_unstable_v5 Copyright
27  * <pre>
28  *
29  * SPDX-FileCopyrightText: 2008-2013 Kristian Høgsberg
30  * SPDX-FileCopyrightText: 2013 Rafael Antognolli
31  * SPDX-FileCopyrightText: 2013 Jasper St. Pierre
32  * SPDX-FileCopyrightText: 2010-2013 Intel Corporation
33  *
34  * SPDX-License-Identifier: MIT
35  * </pre>
36  */
37 struct wl_output;
38 struct wl_seat;
39 struct wl_surface;
40 struct zxdg_popup_v5;
41 struct zxdg_shell_v5;
42 struct zxdg_surface_v5;
43 
44 /**
45  * @page page_iface_zxdg_shell xdg_v5_shell
46  * @section page_iface_zxdg_shell_v5_desc Description
47  *
48  * zxdg_shell allows clients to turn a wl_v5_surface into a "real window"
49  * which can be dragged, resized, stacked, and moved around by the
50  * user. Everything about this interface is suited towards traditional
51  * desktop environments.
52  * @section page_iface_zxdg_shell_v5_api API
53  * See @ref iface_xdg_shell.
54  */
55 /**
56  * @defgroup iface_zxdg_shell The xdg_v5_shell interface
57  *
58  * zxdg_shell allows clients to turn a wl_v5_surface into a "real window"
59  * which can be dragged, resized, stacked, and moved around by the
60  * user. Everything about this interface is suited towards traditional
61  * desktop environments.
62  */
63 extern const struct wl_interface zxdg_shell_v5_interface;
64 /**
65  * @page page_iface_zxdg_surface xdg_v5_surface
66  * @section page_iface_zxdg_surface_v5_desc Description
67  *
68  * An interface that may be implemented by a wl_surface, for
69  * implementations that provide a desktop-style user interface.
70  *
71  * It provides requests to treat surfaces like windows, allowing to set
72  * properties like maximized, fullscreen, minimized, and to move and resize
73  * them, and associate metadata like title and app id.
74  *
75  * The client must call wl_surface.commit on the corresponding wl_surface
76  * for the xdg_surface state to take effect. Prior to committing the new
77  * state, it can set up initial configuration, such as maximizing or setting
78  * a window geometry.
79  *
80  * Even without attaching a buffer the compositor must respond to initial
81  * committed configuration, for instance sending a configure event with
82  * expected window geometry if the client maximized its surface during
83  * initialization.
84  *
85  * For a surface to be mapped by the compositor the client must have
86  * committed both an xdg_surface state and a buffer.
87  * @section page_iface_zxdg_surface_v5_api API
88  * See @ref iface_xdg_surface.
89  */
90 /**
91  * @defgroup iface_zxdg_surface The xdg_v5_surface interface
92  *
93  * An interface that may be implemented by a wl_surface, for
94  * implementations that provide a desktop-style user interface.
95  *
96  * It provides requests to treat surfaces like windows, allowing to set
97  * properties like maximized, fullscreen, minimized, and to move and resize
98  * them, and associate metadata like title and app id.
99  *
100  * The client must call wl_surface.commit on the corresponding wl_surface
101  * for the xdg_surface state to take effect. Prior to committing the new
102  * state, it can set up initial configuration, such as maximizing or setting
103  * a window geometry.
104  *
105  * Even without attaching a buffer the compositor must respond to initial
106  * committed configuration, for instance sending a configure event with
107  * expected window geometry if the client maximized its surface during
108  * initialization.
109  *
110  * For a surface to be mapped by the compositor the client must have
111  * committed both an xdg_surface state and a buffer.
112  */
113 extern const struct wl_interface zxdg_surface_v5_interface;
114 /**
115  * @page page_iface_zxdg_popup xdg_v5_popup
116  * @section page_iface_zxdg_popup_v5_desc Description
117  *
118  * A popup surface is a short-lived, temporary surface that can be
119  * used to implement menus. It takes an explicit grab on the surface
120  * that will be dismissed when the user dismisses the popup. This can
121  * be done by the user clicking outside the surface, using the keyboard,
122  * or even locking the screen through closing the lid or a timeout.
123  *
124  * When the popup is dismissed, a popup_done event will be sent out,
125  * and at the same time the surface will be unmapped. The xdg_popup
126  * object is now inert and cannot be reactivated, so clients should
127  * destroy it. Explicitly destroying the xdg_popup object will also
128  * dismiss the popup and unmap the surface.
129  *
130  * Clients will receive events for all their surfaces during this
131  * grab (which is an "owner-events" grab in X11 parlance). This is
132  * done so that users can navigate through submenus and other
133  * "nested" popup windows without having to dismiss the topmost
134  * popup.
135  *
136  * Clients that want to dismiss the popup when another surface of
137  * their own is clicked should dismiss the popup using the destroy
138  * request.
139  *
140  * The parent surface must have either an zxdg_surface or xdg_v5_popup
141  * role.
142  *
143  * Specifying an xdg_popup for the parent means that the popups are
144  * nested, with this popup now being the topmost popup. Nested
145  * popups must be destroyed in the reverse order they were created
146  * in, e.g. the only popup you are allowed to destroy at all times
147  * is the topmost one.
148  *
149  * If there is an existing popup when creating a new popup, the
150  * parent must be the current topmost popup.
151  *
152  * A parent surface must be mapped before the new popup is mapped.
153  *
154  * When compositors choose to dismiss a popup, they will likely
155  * dismiss every nested popup as well. When a compositor dismisses
156  * popups, it will follow the same dismissing order as required
157  * from the client.
158  *
159  * The x and y arguments passed when creating the popup object specify
160  * where the top left of the popup should be placed, relative to the
161  * local surface coordinates of the parent surface. See
162  * zxdg_shell.get_v5_xdg_popup.
163  *
164  * The client must call wl_surface.commit on the corresponding wl_surface
165  * for the xdg_popup state to take effect.
166  *
167  * For a surface to be mapped by the compositor the client must have
168  * committed both the xdg_popup state and a buffer.
169  * @section page_iface_zxdg_popup_v5_api API
170  * See @ref iface_xdg_popup.
171  */
172 /**
173  * @defgroup iface_zxdg_popup The xdg_v5_popup interface
174  *
175  * A popup surface is a short-lived, temporary surface that can be
176  * used to implement menus. It takes an explicit grab on the surface
177  * that will be dismissed when the user dismisses the popup. This can
178  * be done by the user clicking outside the surface, using the keyboard,
179  * or even locking the screen through closing the lid or a timeout.
180  *
181  * When the popup is dismissed, a popup_done event will be sent out,
182  * and at the same time the surface will be unmapped. The xdg_popup
183  * object is now inert and cannot be reactivated, so clients should
184  * destroy it. Explicitly destroying the xdg_popup object will also
185  * dismiss the popup and unmap the surface.
186  *
187  * Clients will receive events for all their surfaces during this
188  * grab (which is an "owner-events" grab in X11 parlance). This is
189  * done so that users can navigate through submenus and other
190  * "nested" popup windows without having to dismiss the topmost
191  * popup.
192  *
193  * Clients that want to dismiss the popup when another surface of
194  * their own is clicked should dismiss the popup using the destroy
195  * request.
196  *
197  * The parent surface must have either an zxdg_surface or xdg_v5_popup
198  * role.
199  *
200  * Specifying an xdg_popup for the parent means that the popups are
201  * nested, with this popup now being the topmost popup. Nested
202  * popups must be destroyed in the reverse order they were created
203  * in, e.g. the only popup you are allowed to destroy at all times
204  * is the topmost one.
205  *
206  * If there is an existing popup when creating a new popup, the
207  * parent must be the current topmost popup.
208  *
209  * A parent surface must be mapped before the new popup is mapped.
210  *
211  * When compositors choose to dismiss a popup, they will likely
212  * dismiss every nested popup as well. When a compositor dismisses
213  * popups, it will follow the same dismissing order as required
214  * from the client.
215  *
216  * The x and y arguments passed when creating the popup object specify
217  * where the top left of the popup should be placed, relative to the
218  * local surface coordinates of the parent surface. See
219  * zxdg_shell.get_v5_xdg_popup.
220  *
221  * The client must call wl_surface.commit on the corresponding wl_surface
222  * for the xdg_popup state to take effect.
223  *
224  * For a surface to be mapped by the compositor the client must have
225  * committed both the xdg_popup state and a buffer.
226  */
227 extern const struct wl_interface zxdg_popup_v5_interface;
228 
229 #ifndef ZXDG_SHELL_V5_VERSION_ENUM
230 #define ZXDG_SHELL_V5_VERSION_ENUM
231 /**
232  * @ingroup iface_xdg_shell
233  * latest protocol version
234  *
235  * The 'current' member of this enum gives the version of the
236  * protocol. Implementations can compare this to the version
237  * they implement using static_assert to ensure the protocol and
238  * implementation versions match.
239  */
240 enum zxdg_shell_v5_version {
241  /**
242  * Always the latest version
243  */
245 };
246 #endif /* ZXDG_SHELL_V5_VERSION_ENUM */
247 
248 #ifndef ZXDG_SHELL_V5_ERROR_ENUM
249 #define ZXDG_SHELL_V5_ERROR_ENUM
250 enum zxdg_shell_v5_error {
251  /**
252  * given wl_surface has another role
253  */
254  ZXDG_SHELL_V5_ERROR_ROLE = 0,
255  /**
256  * xdg_shell was destroyed before children
257  */
258  ZXDG_SHELL_V5_ERROR_DEFUNCT_SURFACES = 1,
259  /**
260  * the client tried to map or destroy a non-topmost popup
261  */
262  ZXDG_SHELL_V5_ERROR_NOT_THE_TOPMOST_POPUP = 2,
263  /**
264  * the client specified an invalid popup parent surface
265  */
266  ZXDG_SHELL_V5_ERROR_INVALID_POPUP_PARENT = 3,
267 };
268 #endif /* ZXDG_SHELL_V5_ERROR_ENUM */
269 
270 /**
271  * @ingroup iface_xdg_shell
272  * @struct zxdg_shell_v5_interface
273  */
274 struct zxdg_shell_v5_interface {
275  /**
276  * destroy xdg_shell
277  *
278  * Destroy this xdg_shell object.
279  *
280  * Destroying a bound xdg_shell object while there are surfaces
281  * still alive created by this xdg_shell object instance is illegal
282  * and will result in a protocol error.
283  */
284  void (*destroy)(struct wl_client *client, struct wl_resource *resource);
285  /**
286  * enable use of this unstable version
287  *
288  * Negotiate the unstable version of the interface. This
289  * mechanism is in place to ensure client and server agree on the
290  * unstable versions of the protocol that they speak or exit
291  * cleanly if they don't agree. This request will go away once the
292  * xdg-shell protocol is stable.
293  */
294  void (*use_unstable_version)(struct wl_client *client, struct wl_resource *resource, int32_t version);
295  /**
296  * create a shell surface from a surface
297  *
298  * This creates an xdg_surface for the given surface and gives it
299  * the zxdg_surface role. A wl_v5_surface can only be given an
300  * zxdg_surface role once. If get_v5_xdg_surface is called with a
301  * wl_surface that already has an active xdg_surface associated
302  * with it, or if it had any other role, an error is raised.
303  *
304  * See the documentation of xdg_surface for more details about what
305  * an xdg_surface is and how it is used.
306  */
307  void (*get_zxdg_surface)(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface);
308  /**
309  * create a popup for a surface
310  *
311  * This creates an xdg_popup for the given surface and gives it
312  * the zxdg_popup role. A wl_v5_surface can only be given an xdg_popup
313  * role once. If get_zxdg_popup is called with a wl_v5_surface that
314  * already has an active xdg_popup associated with it, or if it had
315  * any other role, an error is raised.
316  *
317  * This request must be used in response to some sort of user
318  * action like a button press, key press, or touch down event.
319  *
320  * See the documentation of xdg_popup for more details about what
321  * an xdg_popup is and how it is used.
322  * @param seat the wl_seat of the user event
323  * @param serial the serial of the user event
324  */
325  void (*get_zxdg_popup)(struct wl_client *client,
326  struct wl_resource *resource,
327  uint32_t id,
328  struct wl_resource *surface,
329  struct wl_resource *parent,
330  struct wl_resource *seat,
331  uint32_t serial,
332  int32_t x,
333  int32_t y);
334  /**
335  * respond to a ping event
336  *
337  * A client must respond to a ping event with a pong request or
338  * the client may be deemed unresponsive.
339  * @param serial serial of the ping event
340  */
341  void (*pong)(struct wl_client *client, struct wl_resource *resource, uint32_t serial);
342 };
343 
344 #define ZXDG_SHELL_V5_PING 0
345 
346 /**
347  * @ingroup iface_xdg_shell
348  */
349 #define ZXDG_SHELL_V5_PING_SINCE_VERSION 1
350 
351 /**
352  * @ingroup iface_xdg_shell
353  */
354 #define ZXDG_SHELL_V5_DESTROY_SINCE_VERSION 1
355 /**
356  * @ingroup iface_xdg_shell
357  */
358 #define ZXDG_SHELL_V5_USE_UNSTABLE_VERSION_SINCE_VERSION 1
359 /**
360  * @ingroup iface_xdg_shell
361  */
362 #define ZXDG_SHELL_V5_GET_ZXDG_SURFACE_V5_SINCE_VERSION 1
363 /**
364  * @ingroup iface_xdg_shell
365  */
366 #define ZXDG_SHELL_V5_GET_ZXDG_POPUP_v5_SINCE_VERSION 1
367 /**
368  * @ingroup iface_xdg_shell
369  */
370 #define ZXDG_SHELL_V5_PONG_SINCE_VERSION 1
371 
372 /**
373  * @ingroup iface_xdg_shell
374  * Sends an ping event to the client owning the resource.
375  * @param resource_ The client's resource
376  * @param serial pass this to the pong request
377  */
378 static inline void zxdg_shell_v5_send_ping(struct wl_resource *resource_, uint32_t serial)
379 {
380  wl_resource_post_event(resource_, ZXDG_SHELL_V5_PING, serial);
381 }
382 
383 #ifndef ZXDG_SURFACE_V5_RESIZE_EDGE_ENUM
384 #define ZXDG_SURFACE_V5_RESIZE_EDGE_ENUM
385 /**
386  * @ingroup iface_xdg_surface
387  * edge values for resizing
388  *
389  * These values are used to indicate which edge of a surface
390  * is being dragged in a resize operation.
391  */
392 enum zxdg_surface_v5_resize_edge {
393  ZXDG_SURFACE_V5_RESIZE_EDGE_NONE = 0,
394  ZXDG_SURFACE_V5_RESIZE_EDGE_TOP = 1,
395  ZXDG_SURFACE_V5_RESIZE_EDGE_BOTTOM = 2,
396  ZXDG_SURFACE_V5_RESIZE_EDGE_LEFT = 4,
397  ZXDG_SURFACE_V5_RESIZE_EDGE_TOP_LEFT = 5,
398  ZXDG_SURFACE_V5_RESIZE_EDGE_BOTTOM_LEFT = 6,
399  ZXDG_SURFACE_V5_RESIZE_EDGE_RIGHT = 8,
400  ZXDG_SURFACE_V5_RESIZE_EDGE_TOP_RIGHT = 9,
401  ZXDG_SURFACE_V5_RESIZE_EDGE_BOTTOM_RIGHT = 10,
402 };
403 #endif /* ZXDG_SURFACE_V5_RESIZE_EDGE_ENUM */
404 
405 #ifndef ZXDG_SURFACE_V5_STATE_ENUM
406 #define ZXDG_SURFACE_V5_STATE_ENUM
407 /**
408  * @ingroup iface_xdg_surface
409  * the surface is now activated
410  *
411  * Client window decorations should be painted as if the window is
412  * active. Do not assume this means that the window actually has
413  * keyboard or pointer focus.
414  */
415 enum zxdg_surface_v5_state {
416  /**
417  * the surface is maximized
418  */
420  /**
421  * the surface is fullscreen
422  */
424  /**
425  * the surface is being resized
426  */
428  /**
429  * the surface is now activated
430  */
432 };
433 #endif /* ZXDG_SURFACE_V5_STATE_ENUM */
434 
435 /**
436  * @ingroup iface_xdg_surface
437  * @struct zxdg_surface_v5_interface
438  */
439 struct zxdg_surface_v5_interface {
440  /**
441  * Destroy the xdg_surface
442  *
443  * Unmap and destroy the window. The window will be effectively
444  * hidden from the user's point of view, and all state like
445  * maximization, fullscreen, and so on, will be lost.
446  */
447  void (*destroy)(struct wl_client *client, struct wl_resource *resource);
448  /**
449  * set the parent of this surface
450  *
451  * Set the "parent" of this surface. This window should be
452  * stacked above a parent. The parent surface must be mapped as
453  * long as this surface is mapped.
454  *
455  * Parent windows should be set on dialogs, toolboxes, or other
456  * "auxiliary" surfaces, so that the parent is raised when the
457  * dialog is raised.
458  */
459  void (*set_parent)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *parent);
460  /**
461  * set surface title
462  *
463  * Set a short title for the surface.
464  *
465  * This string may be used to identify the surface in a task bar,
466  * window list, or other user interface elements provided by the
467  * compositor.
468  *
469  * The string must be encoded in UTF-8.
470  */
471  void (*set_title)(struct wl_client *client, struct wl_resource *resource, const char *title);
472  /**
473  * set application ID
474  *
475  * Set an application identifier for the surface.
476  *
477  * The app ID identifies the general class of applications to which
478  * the surface belongs. The compositor can use this to group
479  * multiple surfaces together, or to determine how to launch a new
480  * application.
481  *
482  * For D-Bus activatable applications, the app ID is used as the
483  * D-Bus service name.
484  *
485  * The compositor shell will try to group application surfaces
486  * together by their app ID. As a best practice, it is suggested to
487  * select app ID's that match the basename of the application's
488  * .desktop file. For example, "org.freedesktop.FooViewer" where
489  * the .desktop file is "org.freedesktop.FooViewer.desktop".
490  *
491  * See the desktop-entry specification [0] for more details on
492  * application identifiers and how they relate to well-known D-Bus
493  * names and .desktop files.
494  *
495  * [0] http://standards.freedesktop.org/desktop-entry-spec/
496  */
497  void (*set_app_id)(struct wl_client *client, struct wl_resource *resource, const char *app_id);
498  /**
499  * show the window menu
500  *
501  * Clients implementing client-side decorations might want to
502  * show a context menu when right-clicking on the decorations,
503  * giving the user a menu that they can use to maximize or minimize
504  * the window.
505  *
506  * This request asks the compositor to pop up such a window menu at
507  * the given position, relative to the local surface coordinates of
508  * the parent surface. There are no guarantees as to what menu
509  * items the window menu contains.
510  *
511  * This request must be used in response to some sort of user
512  * action like a button press, key press, or touch down event.
513  * @param seat the wl_seat of the user event
514  * @param serial the serial of the user event
515  * @param x the x position to pop up the window menu at
516  * @param y the y position to pop up the window menu at
517  */
518  void (*show_window_menu)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat, uint32_t serial, int32_t x, int32_t y);
519  /**
520  * start an interactive move
521  *
522  * Start an interactive, user-driven move of the surface.
523  *
524  * This request must be used in response to some sort of user
525  * action like a button press, key press, or touch down event. The
526  * passed serial is used to determine the type of interactive move
527  * (touch, pointer, etc).
528  *
529  * The server may ignore move requests depending on the state of
530  * the surface (e.g. fullscreen or maximized), or if the passed
531  * serial is no longer valid.
532  *
533  * If triggered, the surface will lose the focus of the device
534  * (wl_pointer, wl_touch, etc) used for the move. It is up to the
535  * compositor to visually indicate that the move is taking place,
536  * such as updating a pointer cursor, during the move. There is no
537  * guarantee that the device focus will return when the move is
538  * completed.
539  * @param seat the wl_seat of the user event
540  * @param serial the serial of the user event
541  */
542  void (*move)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat, uint32_t serial);
543  /**
544  * start an interactive resize
545  *
546  * Start a user-driven, interactive resize of the surface.
547  *
548  * This request must be used in response to some sort of user
549  * action like a button press, key press, or touch down event. The
550  * passed serial is used to determine the type of interactive
551  * resize (touch, pointer, etc).
552  *
553  * The server may ignore resize requests depending on the state of
554  * the surface (e.g. fullscreen or maximized).
555  *
556  * If triggered, the client will receive configure events with the
557  * "resize" state enum value and the expected sizes. See the
558  * "resize" enum value for more details about what is required. The
559  * client must also acknowledge configure events using
560  * "ack_configure". After the resize is completed, the client will
561  * receive another "configure" event without the resize state.
562  *
563  * If triggered, the surface also will lose the focus of the device
564  * (wl_pointer, wl_touch, etc) used for the resize. It is up to the
565  * compositor to visually indicate that the resize is taking place,
566  * such as updating a pointer cursor, during the resize. There is
567  * no guarantee that the device focus will return when the resize
568  * is completed.
569  *
570  * The edges parameter specifies how the surface should be resized,
571  * and is one of the values of the resize_edge enum. The compositor
572  * may use this information to update the surface position for
573  * example when dragging the top left corner. The compositor may
574  * also use this information to adapt its behavior, e.g. choose an
575  * appropriate cursor image.
576  * @param seat the wl_seat of the user event
577  * @param serial the serial of the user event
578  * @param edges which edge or corner is being dragged
579  */
580  void (*resize)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat, uint32_t serial, uint32_t edges);
581  /**
582  * ack a configure event
583  *
584  * When a configure event is received, if a client commits the
585  * surface in response to the configure event, then the client must
586  * make an ack_configure request sometime before the commit
587  * request, passing along the serial of the configure event.
588  *
589  * For instance, the compositor might use this information to move
590  * a surface to the top left only when the client has drawn itself
591  * for the maximized or fullscreen state.
592  *
593  * If the client receives multiple configure events before it can
594  * respond to one, it only has to ack the last configure event.
595  *
596  * A client is not required to commit immediately after sending an
597  * ack_configure request - it may even ack_configure several times
598  * before its next surface commit.
599  *
600  * The compositor expects that the most recently received
601  * ack_configure request at the time of a commit indicates which
602  * configure event the client is responding to.
603  * @param serial the serial from the configure event
604  */
605  void (*ack_configure)(struct wl_client *client, struct wl_resource *resource, uint32_t serial);
606  /**
607  * set the new window geometry
608  *
609  * The window geometry of a window is its "visible bounds" from
610  * the user's perspective. Client-side decorations often have
611  * invisible portions like drop-shadows which should be ignored for
612  * the purposes of aligning, placing and constraining windows.
613  *
614  * The window geometry is double buffered, and will be applied at
615  * the time wl_surface.commit of the corresponding wl_surface is
616  * called.
617  *
618  * Once the window geometry of the surface is set once, it is not
619  * possible to unset it, and it will remain the same until
620  * set_window_geometry is called again, even if a new subsurface or
621  * buffer is attached.
622  *
623  * If never set, the value is the full bounds of the surface,
624  * including any subsurfaces. This updates dynamically on every
625  * commit. This unset mode is meant for extremely simple clients.
626  *
627  * If responding to a configure event, the window geometry in here
628  * must respect the sizing negotiations specified by the states in
629  * the configure event.
630  *
631  * The arguments are given in the surface local coordinate space of
632  * the wl_surface associated with this xdg_surface.
633  *
634  * The width and height must be greater than zero.
635  */
636  void (*set_window_geometry)(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y, int32_t width, int32_t height);
637  /**
638  * maximize the window
639  *
640  * Maximize the surface.
641  *
642  * After requesting that the surface should be maximized, the
643  * compositor will respond by emitting a configure event with the
644  * "maximized" state and the required window geometry. The client
645  * should then update its content, drawing it in a maximized state,
646  * i.e. without shadow or other decoration outside of the window
647  * geometry. The client must also acknowledge the configure when
648  * committing the new content (see ack_configure).
649  *
650  * It is up to the compositor to decide how and where to maximize
651  * the surface, for example which output and what region of the
652  * screen should be used.
653  *
654  * If the surface was already maximized, the compositor will still
655  * emit a configure event with the "maximized" state.
656  */
657  void (*set_maximized)(struct wl_client *client, struct wl_resource *resource);
658  /**
659  * unmaximize the window
660  *
661  * Unmaximize the surface.
662  *
663  * After requesting that the surface should be unmaximized, the
664  * compositor will respond by emitting a configure event without
665  * the "maximized" state. If available, the compositor will include
666  * the window geometry dimensions the window had prior to being
667  * maximized in the configure request. The client must then update
668  * its content, drawing it in a regular state, i.e. potentially
669  * with shadow, etc. The client must also acknowledge the configure
670  * when committing the new content (see ack_configure).
671  *
672  * It is up to the compositor to position the surface after it was
673  * unmaximized; usually the position the surface had before
674  * maximizing, if applicable.
675  *
676  * If the surface was already not maximized, the compositor will
677  * still emit a configure event without the "maximized" state.
678  */
679  void (*unset_maximized)(struct wl_client *client, struct wl_resource *resource);
680  /**
681  * set the window as fullscreen on a monitor
682  *
683  * Make the surface fullscreen.
684  *
685  * You can specify an output that you would prefer to be
686  * fullscreen. If this value is NULL, it's up to the compositor to
687  * choose which display will be used to map this surface.
688  *
689  * If the surface doesn't cover the whole output, the compositor
690  * will position the surface in the center of the output and
691  * compensate with black borders filling the rest of the output.
692  */
693  void (*set_fullscreen)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *output);
694  /**
695  */
696  void (*unset_fullscreen)(struct wl_client *client, struct wl_resource *resource);
697  /**
698  * set the window as minimized
699  *
700  * Request that the compositor minimize your surface. There is no
701  * way to know if the surface is currently minimized, nor is there
702  * any way to unset minimization on this surface.
703  *
704  * If you are looking to throttle redrawing when minimized, please
705  * instead use the wl_surface.frame event for this, as this will
706  * also work with live previews on windows in Alt-Tab, Expose or
707  * similar compositor features.
708  */
709  void (*set_minimized)(struct wl_client *client, struct wl_resource *resource);
710 };
711 
712 #define ZXDG_SURFACE_V5_CONFIGURE 0
713 #define ZXDG_SURFACE_V5_CLOSE 1
714 
715 /**
716  * @ingroup iface_xdg_surface
717  */
718 #define ZXDG_SURFACE_V5_CONFIGURE_SINCE_VERSION 1
719 /**
720  * @ingroup iface_xdg_surface
721  */
722 #define ZXDG_SURFACE_V5_CLOSE_SINCE_VERSION 1
723 
724 /**
725  * @ingroup iface_xdg_surface
726  */
727 #define ZXDG_SURFACE_V5_DESTROY_SINCE_VERSION 1
728 /**
729  * @ingroup iface_xdg_surface
730  */
731 #define ZXDG_SURFACE_V5_SET_PARENT_SINCE_VERSION 1
732 /**
733  * @ingroup iface_xdg_surface
734  */
735 #define ZXDG_SURFACE_V5_SET_TITLE_SINCE_VERSION 1
736 /**
737  * @ingroup iface_xdg_surface
738  */
739 #define ZXDG_SURFACE_V5_SET_APP_ID_SINCE_VERSION 1
740 /**
741  * @ingroup iface_xdg_surface
742  */
743 #define ZXDG_SURFACE_V5_SHOW_WINDOW_MENU_SINCE_VERSION 1
744 /**
745  * @ingroup iface_xdg_surface
746  */
747 #define ZXDG_SURFACE_V5_MOVE_SINCE_VERSION 1
748 /**
749  * @ingroup iface_xdg_surface
750  */
751 #define ZXDG_SURFACE_V5_RESIZE_SINCE_VERSION 1
752 /**
753  * @ingroup iface_xdg_surface
754  */
755 #define ZXDG_SURFACE_V5_ACK_CONFIGURE_SINCE_VERSION 1
756 /**
757  * @ingroup iface_xdg_surface
758  */
759 #define ZXDG_SURFACE_V5_SET_WINDOW_GEOMETRY_SINCE_VERSION 1
760 /**
761  * @ingroup iface_xdg_surface
762  */
763 #define ZXDG_SURFACE_V5_SET_MAXIMIZED_SINCE_VERSION 1
764 /**
765  * @ingroup iface_xdg_surface
766  */
767 #define ZXDG_SURFACE_V5_UNSET_MAXIMIZED_SINCE_VERSION 1
768 /**
769  * @ingroup iface_xdg_surface
770  */
771 #define ZXDG_SURFACE_V5_SET_FULLSCREEN_SINCE_VERSION 1
772 /**
773  * @ingroup iface_xdg_surface
774  */
775 #define ZXDG_SURFACE_V5_UNSET_FULLSCREEN_SINCE_VERSION 1
776 /**
777  * @ingroup iface_xdg_surface
778  */
779 #define ZXDG_SURFACE_V5_SET_MINIMIZED_SINCE_VERSION 1
780 
781 /**
782  * @ingroup iface_xdg_surface
783  * Sends an configure event to the client owning the resource.
784  * @param resource_ The client's resource
785  */
786 static inline void zxdg_surface_v5_send_configure(struct wl_resource *resource_, int32_t width, int32_t height, struct wl_array *states, uint32_t serial)
787 {
788  wl_resource_post_event(resource_, ZXDG_SURFACE_V5_CONFIGURE, width, height, states, serial);
789 }
790 
791 /**
792  * @ingroup iface_xdg_surface
793  * Sends an close event to the client owning the resource.
794  * @param resource_ The client's resource
795  */
796 static inline void zxdg_surface_v5_send_close(struct wl_resource *resource_)
797 {
798  wl_resource_post_event(resource_, ZXDG_SURFACE_V5_CLOSE);
799 }
800 
801 /**
802  * @ingroup iface_xdg_popup
803  * @struct zxdg_popup_v5_interface
804  */
805 struct zxdg_popup_v5_interface {
806  /**
807  * remove xdg_popup interface
808  *
809  * This destroys the popup. Explicitly destroying the xdg_popup
810  * object will also dismiss the popup, and unmap the surface.
811  *
812  * If this xdg_popup is not the "topmost" popup, a protocol error
813  * will be sent.
814  */
815  void (*destroy)(struct wl_client *client, struct wl_resource *resource);
816 };
817 
818 #define ZXDG_POPUP_v5_POPUP_DONE 0
819 
820 /**
821  * @ingroup iface_xdg_popup
822  */
823 #define ZXDG_POPUP_v5_POPUP_DONE_SINCE_VERSION 1
824 
825 /**
826  * @ingroup iface_xdg_popup
827  */
828 #define ZXDG_POPUP_v5_DESTROY_SINCE_VERSION 1
829 
830 /**
831  * @ingroup iface_xdg_popup
832  * Sends an popup_done event to the client owning the resource.
833  * @param resource_ The client's resource
834  */
835 static inline void zxdg_popup_v5_send_popup_done(struct wl_resource *resource_)
836 {
837  wl_resource_post_event(resource_, ZXDG_POPUP_v5_POPUP_DONE);
838 }
839 
840 #ifdef __cplusplus
841 }
842 #endif
843 
844 #endif
static void zxdg_popup_v5_send_popup_done(struct wl_resource *resource_)
@ ZXDG_SURFACE_V5_STATE_MAXIMIZED
the surface is maximized
static void zxdg_surface_v5_send_configure(struct wl_resource *resource_, int32_t width, int32_t height, struct wl_array *states, uint32_t serial)
@ ZXDG_SHELL_V5_VERSION_CURRENT
Always the latest version.
static void zxdg_shell_v5_send_ping(struct wl_resource *resource_, uint32_t serial)
KIOCORE_EXPORT CopyJob * move(const QList< QUrl > &src, const QUrl &dest, JobFlags flags=DefaultFlags)
unsigned int version()
@ ZXDG_SURFACE_V5_STATE_RESIZING
the surface is being resized
@ ZXDG_SURFACE_V5_STATE_FULLSCREEN
the surface is fullscreen
static void zxdg_surface_v5_send_close(struct wl_resource *resource_)
@ ZXDG_SURFACE_V5_STATE_ACTIVATED
the surface is now activated
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 03:56:22 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.