SDL  2.0
org-kde-kwin-server-decoration-manager-client-protocol.h
Go to the documentation of this file.
1 /* Generated by wayland-scanner 1.16.0 */
2 
3 #ifndef SERVER_DECORATION_CLIENT_PROTOCOL_H
4 #define SERVER_DECORATION_CLIENT_PROTOCOL_H
5 
6 #include <stdint.h>
7 #include <stddef.h>
8 #include "wayland-client.h"
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 /**
15  * @page page_server_decoration The server_decoration protocol
16  * @section page_ifaces_server_decoration Interfaces
17  * - @subpage page_iface_org_kde_kwin_server_decoration_manager - Server side window decoration manager
18  * - @subpage page_iface_org_kde_kwin_server_decoration -
19  * @section page_copyright_server_decoration Copyright
20  * <pre>
21  *
22  * Copyright (C) 2015 Martin Gräßlin
23  *
24  * This program is free software: you can redistribute it and/or modify
25  * it under the terms of the GNU Lesser General Public License as published by
26  * the Free Software Foundation, either version 2.1 of the License, or
27  * (at your option) any later version.
28  *
29  * This program is distributed in the hope that it will be useful,
30  * but WITHOUT ANY WARRANTY; without even the implied warranty of
31  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32  * GNU Lesser General Public License for more details.
33  *
34  * You should have received a copy of the GNU Lesser General Public License
35  * along with this program. If not, see <http://www.gnu.org/licenses/>.
36  * </pre>
37  */
38 struct org_kde_kwin_server_decoration;
39 struct org_kde_kwin_server_decoration_manager;
40 struct wl_surface;
41 
42 /**
43  * @page page_iface_org_kde_kwin_server_decoration_manager org_kde_kwin_server_decoration_manager
44  * @section page_iface_org_kde_kwin_server_decoration_manager_desc Description
45  *
46  * This interface allows to coordinate whether the server should create
47  * a server-side window decoration around a wl_surface representing a
48  * shell surface (wl_shell_surface or similar). By announcing support
49  * for this interface the server indicates that it supports server
50  * side decorations.
51  * @section page_iface_org_kde_kwin_server_decoration_manager_api API
52  * See @ref iface_org_kde_kwin_server_decoration_manager.
53  */
54 /**
55  * @defgroup iface_org_kde_kwin_server_decoration_manager The org_kde_kwin_server_decoration_manager interface
56  *
57  * This interface allows to coordinate whether the server should create
58  * a server-side window decoration around a wl_surface representing a
59  * shell surface (wl_shell_surface or similar). By announcing support
60  * for this interface the server indicates that it supports server
61  * side decorations.
62  */
63 extern const struct wl_interface org_kde_kwin_server_decoration_manager_interface;
64 /**
65  * @page page_iface_org_kde_kwin_server_decoration org_kde_kwin_server_decoration
66  * @section page_iface_org_kde_kwin_server_decoration_api API
67  * See @ref iface_org_kde_kwin_server_decoration.
68  */
69 /**
70  * @defgroup iface_org_kde_kwin_server_decoration The org_kde_kwin_server_decoration interface
71  */
72 extern const struct wl_interface org_kde_kwin_server_decoration_interface;
73 
74 #ifndef ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_ENUM
75 #define ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_ENUM
76 /**
77  * @ingroup iface_org_kde_kwin_server_decoration_manager
78  * Possible values to use in request_mode and the event mode.
79  */
81  /**
82  * Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated.
83  */
85  /**
86  * Client-side decoration: The decoration is part of the surface and the client.
87  */
89  /**
90  * Server-side decoration: The server embeds the surface into a decoration frame.
91  */
93 };
94 #endif /* ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_ENUM */
95 
96 /**
97  * @ingroup iface_org_kde_kwin_server_decoration_manager
98  * @struct org_kde_kwin_server_decoration_manager_listener
99  */
101  /**
102  * The default mode used on the server
103  *
104  * This event is emitted directly after binding the interface. It
105  * contains the default mode for the decoration. When a new server
106  * decoration object is created this new object will be in the
107  * default mode until the first request_mode is requested.
108  *
109  * The server may change the default mode at any time.
110  * @param mode The default decoration mode applied to newly created server decorations.
111  */
113  struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager,
114  uint32_t mode);
115 };
116 
117 /**
118  * @ingroup iface_org_kde_kwin_server_decoration_manager
119  */
120 static inline int
121 org_kde_kwin_server_decoration_manager_add_listener(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager,
122  const struct org_kde_kwin_server_decoration_manager_listener *listener, void *data)
123 {
124  return wl_proxy_add_listener((struct wl_proxy *) org_kde_kwin_server_decoration_manager,
125  (void (**)(void)) listener, data);
126 }
127 
128 #define ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_CREATE 0
129 
130 /**
131  * @ingroup iface_org_kde_kwin_server_decoration_manager
132  */
133 #define ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_DEFAULT_MODE_SINCE_VERSION 1
134 
135 /**
136  * @ingroup iface_org_kde_kwin_server_decoration_manager
137  */
138 #define ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_CREATE_SINCE_VERSION 1
139 
140 /** @ingroup iface_org_kde_kwin_server_decoration_manager */
141 static inline void
142 org_kde_kwin_server_decoration_manager_set_user_data(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager, void *user_data)
143 {
144  wl_proxy_set_user_data((struct wl_proxy *) org_kde_kwin_server_decoration_manager, user_data);
145 }
146 
147 /** @ingroup iface_org_kde_kwin_server_decoration_manager */
148 static inline void *
149 org_kde_kwin_server_decoration_manager_get_user_data(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager)
150 {
151  return wl_proxy_get_user_data((struct wl_proxy *) org_kde_kwin_server_decoration_manager);
152 }
153 
154 static inline uint32_t
155 org_kde_kwin_server_decoration_manager_get_version(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager)
156 {
157  return wl_proxy_get_version((struct wl_proxy *) org_kde_kwin_server_decoration_manager);
158 }
159 
160 /** @ingroup iface_org_kde_kwin_server_decoration_manager */
161 static inline void
162 org_kde_kwin_server_decoration_manager_destroy(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager)
163 {
164  wl_proxy_destroy((struct wl_proxy *) org_kde_kwin_server_decoration_manager);
165 }
166 
167 /**
168  * @ingroup iface_org_kde_kwin_server_decoration_manager
169  *
170  * When a client creates a server-side decoration object it indicates
171  * that it supports the protocol. The client is supposed to tell the
172  * server whether it wants server-side decorations or will provide
173  * client-side decorations.
174  *
175  * If the client does not create a server-side decoration object for
176  * a surface the server interprets this as lack of support for this
177  * protocol and considers it as client-side decorated. Nevertheless a
178  * client-side decorated surface should use this protocol to indicate
179  * to the server that it does not want a server-side deco.
180  */
181 static inline struct org_kde_kwin_server_decoration *
182 org_kde_kwin_server_decoration_manager_create(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager, struct wl_surface *surface)
183 {
184  struct wl_proxy *id;
185 
186  id = wl_proxy_marshal_constructor((struct wl_proxy *) org_kde_kwin_server_decoration_manager,
188 
189  return (struct org_kde_kwin_server_decoration *) id;
190 }
191 
192 #ifndef ORG_KDE_KWIN_SERVER_DECORATION_MODE_ENUM
193 #define ORG_KDE_KWIN_SERVER_DECORATION_MODE_ENUM
194 /**
195  * @ingroup iface_org_kde_kwin_server_decoration
196  * Possible values to use in request_mode and the event mode.
197  */
199  /**
200  * Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated.
201  */
203  /**
204  * Client-side decoration: The decoration is part of the surface and the client.
205  */
207  /**
208  * Server-side decoration: The server embeds the surface into a decoration frame.
209  */
211 };
212 #endif /* ORG_KDE_KWIN_SERVER_DECORATION_MODE_ENUM */
213 
214 /**
215  * @ingroup iface_org_kde_kwin_server_decoration
216  * @struct org_kde_kwin_server_decoration_listener
217  */
219  /**
220  * The new decoration mode applied by the server
221  *
222  * This event is emitted directly after the decoration is created
223  * and represents the base decoration policy by the server. E.g. a
224  * server which wants all surfaces to be client-side decorated will
225  * send Client, a server which wants server-side decoration will
226  * send Server.
227  *
228  * The client can request a different mode through the decoration
229  * request. The server will acknowledge this by another event with
230  * the same mode. So even if a server prefers server-side
231  * decoration it's possible to force a client-side decoration.
232  *
233  * The server may emit this event at any time. In this case the
234  * client can again request a different mode. It's the
235  * responsibility of the server to prevent a feedback loop.
236  * @param mode The decoration mode applied to the surface by the server.
237  */
238  void (*mode)(void *data,
239  struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration,
240  uint32_t mode);
241 };
242 
243 /**
244  * @ingroup iface_org_kde_kwin_server_decoration
245  */
246 static inline int
247 org_kde_kwin_server_decoration_add_listener(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration,
248  const struct org_kde_kwin_server_decoration_listener *listener, void *data)
249 {
250  return wl_proxy_add_listener((struct wl_proxy *) org_kde_kwin_server_decoration,
251  (void (**)(void)) listener, data);
252 }
253 
254 #define ORG_KDE_KWIN_SERVER_DECORATION_RELEASE 0
255 #define ORG_KDE_KWIN_SERVER_DECORATION_REQUEST_MODE 1
256 
257 /**
258  * @ingroup iface_org_kde_kwin_server_decoration
259  */
260 #define ORG_KDE_KWIN_SERVER_DECORATION_MODE_SINCE_VERSION 1
261 
262 /**
263  * @ingroup iface_org_kde_kwin_server_decoration
264  */
265 #define ORG_KDE_KWIN_SERVER_DECORATION_RELEASE_SINCE_VERSION 1
266 /**
267  * @ingroup iface_org_kde_kwin_server_decoration
268  */
269 #define ORG_KDE_KWIN_SERVER_DECORATION_REQUEST_MODE_SINCE_VERSION 1
270 
271 /** @ingroup iface_org_kde_kwin_server_decoration */
272 static inline void
273 org_kde_kwin_server_decoration_set_user_data(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration, void *user_data)
274 {
275  wl_proxy_set_user_data((struct wl_proxy *) org_kde_kwin_server_decoration, user_data);
276 }
277 
278 /** @ingroup iface_org_kde_kwin_server_decoration */
279 static inline void *
280 org_kde_kwin_server_decoration_get_user_data(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
281 {
282  return wl_proxy_get_user_data((struct wl_proxy *) org_kde_kwin_server_decoration);
283 }
284 
285 static inline uint32_t
286 org_kde_kwin_server_decoration_get_version(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
287 {
288  return wl_proxy_get_version((struct wl_proxy *) org_kde_kwin_server_decoration);
289 }
290 
291 /** @ingroup iface_org_kde_kwin_server_decoration */
292 static inline void
293 org_kde_kwin_server_decoration_destroy(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
294 {
295  wl_proxy_destroy((struct wl_proxy *) org_kde_kwin_server_decoration);
296 }
297 
298 /**
299  * @ingroup iface_org_kde_kwin_server_decoration
300  */
301 static inline void
302 org_kde_kwin_server_decoration_release(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
303 {
304  wl_proxy_marshal((struct wl_proxy *) org_kde_kwin_server_decoration,
306 
307  wl_proxy_destroy((struct wl_proxy *) org_kde_kwin_server_decoration);
308 }
309 
310 /**
311  * @ingroup iface_org_kde_kwin_server_decoration
312  */
313 static inline void
314 org_kde_kwin_server_decoration_request_mode(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration, uint32_t mode)
315 {
316  wl_proxy_marshal((struct wl_proxy *) org_kde_kwin_server_decoration,
318 }
319 
320 #ifdef __cplusplus
321 }
322 #endif
323 
324 #endif
GLuint id
static void * org_kde_kwin_server_decoration_manager_get_user_data(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager)
static void org_kde_kwin_server_decoration_request_mode(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration, uint32_t mode)
const struct wl_interface org_kde_kwin_server_decoration_manager_interface
EGLSurface surface
Definition: eglext.h:248
void(* default_mode)(void *data, struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager, uint32_t mode)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
static void org_kde_kwin_server_decoration_set_user_data(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration, void *user_data)
static void org_kde_kwin_server_decoration_manager_destroy(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager)
static struct org_kde_kwin_server_decoration * org_kde_kwin_server_decoration_manager_create(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager, struct wl_surface *surface)
const struct wl_interface org_kde_kwin_server_decoration_interface
static int org_kde_kwin_server_decoration_add_listener(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration, const struct org_kde_kwin_server_decoration_listener *listener, void *data)
static uint32_t org_kde_kwin_server_decoration_get_version(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
static void org_kde_kwin_server_decoration_destroy(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
GLenum mode
static void * org_kde_kwin_server_decoration_get_user_data(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
#define NULL
Definition: begin_code.h:167
unsigned int uint32_t
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 void
static void org_kde_kwin_server_decoration_manager_set_user_data(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager, void *user_data)
static uint32_t org_kde_kwin_server_decoration_manager_get_version(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager)
static void org_kde_kwin_server_decoration_release(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
static int org_kde_kwin_server_decoration_manager_add_listener(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager, const struct org_kde_kwin_server_decoration_manager_listener *listener, void *data)