OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The Chromium Authors. | 2 * Copyright 2016 The Chromium Authors. |
3 * | 3 * |
4 * Permission is hereby granted, free of charge, to any person obtaining a | 4 * Permission is hereby granted, free of charge, to any person obtaining a |
5 * copy of this software and associated documentation files (the "Software"), | 5 * copy of this software and associated documentation files (the "Software"), |
6 * to deal in the Software without restriction, including without limitation | 6 * to deal in the Software without restriction, including without limitation |
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
8 * and/or sell copies of the Software, and to permit persons to whom the | 8 * and/or sell copies of the Software, and to permit persons to whom the |
9 * Software is furnished to do so, subject to the following conditions: | 9 * Software is furnished to do so, subject to the following conditions: |
10 * | 10 * |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 ZWP_REMOTE_SHELL_V1_GET_REMOTE_SURFACE, &zwp_remote_sur
face_v1_interface, NULL, surface, container); | 147 ZWP_REMOTE_SHELL_V1_GET_REMOTE_SURFACE, &zwp_remote_sur
face_v1_interface, NULL, surface, container); |
148 | 148 |
149 return (struct zwp_remote_surface_v1 *) id; | 149 return (struct zwp_remote_surface_v1 *) id; |
150 } | 150 } |
151 | 151 |
152 /** | 152 /** |
153 * zwp_remote_surface_v1 - A desktop window | 153 * zwp_remote_surface_v1 - A desktop window |
154 * @set_fullscreen: surface wants to be fullscreen | 154 * @set_fullscreen: surface wants to be fullscreen |
155 * @unset_fullscreen: surface wants to be non-fullscreen | 155 * @unset_fullscreen: surface wants to be non-fullscreen |
156 * @close: surface wants to be closed | 156 * @close: surface wants to be closed |
| 157 * @set_maximized: surface wants to be maximized |
| 158 * @unset_maximized: surface wants to be restored |
| 159 * @set_minimized: surface wants to be minimized |
| 160 * @unset_minimized: surface wants to be restored |
157 * | 161 * |
158 * An interface that may be implemented by a wl_surface, for | 162 * An interface that may be implemented by a wl_surface, for |
159 * implementations that provide a desktop-style user interface and allows | 163 * implementations that provide a desktop-style user interface and allows |
160 * for remotely managed windows. | 164 * for remotely managed windows. |
161 * | 165 * |
162 * It provides requests to treat surfaces like windows, allowing to set | 166 * It provides requests to treat surfaces like windows, allowing to set |
163 * properties like app id and geometry. | 167 * properties like app id and geometry. |
164 * | 168 * |
165 * The client must call wl_surface.commit on the corresponding wl_surface | 169 * The client must call wl_surface.commit on the corresponding wl_surface |
166 * for the remote_surface state to take effect. | 170 * for the remote_surface state to take effect. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 * the surface to be closed. This should be equivalent to the user | 202 * the surface to be closed. This should be equivalent to the user |
199 * clicking the close button in client-side decorations, if your | 203 * clicking the close button in client-side decorations, if your |
200 * application has any... | 204 * application has any... |
201 * | 205 * |
202 * This is only a request that the user intends to close your | 206 * This is only a request that the user intends to close your |
203 * window. The client may choose to ignore this request, or show a | 207 * window. The client may choose to ignore this request, or show a |
204 * dialog to ask the user to save their data... | 208 * dialog to ask the user to save their data... |
205 */ | 209 */ |
206 void (*close)(void *data, | 210 void (*close)(void *data, |
207 struct zwp_remote_surface_v1 *zwp_remote_surface_v1); | 211 struct zwp_remote_surface_v1 *zwp_remote_surface_v1); |
| 212 /** |
| 213 * set_maximized - surface wants to be maximized |
| 214 * |
| 215 * The set_maximized event is sent by the compositor when the |
| 216 * user wants the surface to be maximized. |
| 217 * |
| 218 * This is only a request that the user intends to maximized the |
| 219 * window. The client may choose to ignore this request. |
| 220 * @since: 2 |
| 221 */ |
| 222 void (*set_maximized)(void *data, |
| 223 struct zwp_remote_surface_v1 *zwp_remote_surface_v
1); |
| 224 /** |
| 225 * unset_maximized - surface wants to be restored |
| 226 * |
| 227 * The unset_maximized event is sent by the compositor when the |
| 228 * user wants the surface to be made visible. |
| 229 * |
| 230 * This is only a request that the user intends to make your window |
| 231 * visible. The client may choose to ignore this request. |
| 232 * @since: 2 |
| 233 */ |
| 234 void (*unset_maximized)(void *data, |
| 235 struct zwp_remote_surface_v1 *zwp_remote_surface
_v1); |
| 236 /** |
| 237 * set_minimized - surface wants to be minimized |
| 238 * |
| 239 * The set_minimized event is sent by the compositor when the |
| 240 * user wants the surface to be minimized. |
| 241 * |
| 242 * This is only a request that the user intends to minimize the |
| 243 * window. The client may choose to ignore this request. |
| 244 * @since: 2 |
| 245 */ |
| 246 void (*set_minimized)(void *data, |
| 247 struct zwp_remote_surface_v1 *zwp_remote_surface_v
1); |
| 248 /** |
| 249 * unset_minimized - surface wants to be restored |
| 250 * |
| 251 * The unset_minimized event is sent by the compositor when the |
| 252 * user wants the surface to be made visible. |
| 253 * |
| 254 * This is only a request that the user intends to make your window |
| 255 * visible. The client may choose to ignore this request. |
| 256 * @since: 2 |
| 257 */ |
| 258 void (*unset_minimized)(void *data, |
| 259 struct zwp_remote_surface_v1 *zwp_remote_surface
_v1); |
208 }; | 260 }; |
209 | 261 |
210 static inline int | 262 static inline int |
211 zwp_remote_surface_v1_add_listener(struct zwp_remote_surface_v1 *zwp_remote_surf
ace_v1, | 263 zwp_remote_surface_v1_add_listener(struct zwp_remote_surface_v1 *zwp_remote_surf
ace_v1, |
212 const struct zwp_remote_surface_v1_listener *
listener, void *data) | 264 const struct zwp_remote_surface_v1_listener *
listener, void *data) |
213 { | 265 { |
214 return wl_proxy_add_listener((struct wl_proxy *) zwp_remote_surface_v1, | 266 return wl_proxy_add_listener((struct wl_proxy *) zwp_remote_surface_v1, |
215 (void (**)(void)) listener, data); | 267 (void (**)(void)) listener, data); |
216 } | 268 } |
217 | 269 |
218 #define ZWP_REMOTE_SURFACE_V1_DESTROY 0 | 270 #define ZWP_REMOTE_SURFACE_V1_DESTROY 0 |
219 #define ZWP_REMOTE_SURFACE_V1_SET_APP_ID 1 | 271 #define ZWP_REMOTE_SURFACE_V1_SET_APP_ID 1 |
220 #define ZWP_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY 2 | 272 #define ZWP_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY 2 |
221 #define ZWP_REMOTE_SURFACE_V1_SET_SCALE 3 | 273 #define ZWP_REMOTE_SURFACE_V1_SET_SCALE 3 |
| 274 #define ZWP_REMOTE_SURFACE_V1_FULLSCREEN 4 |
| 275 #define ZWP_REMOTE_SURFACE_V1_MAXIMIZE 5 |
| 276 #define ZWP_REMOTE_SURFACE_V1_MINIMIZE 6 |
| 277 #define ZWP_REMOTE_SURFACE_V1_RESTORE 7 |
222 | 278 |
223 static inline void | 279 static inline void |
224 zwp_remote_surface_v1_set_user_data(struct zwp_remote_surface_v1 *zwp_remote_sur
face_v1, void *user_data) | 280 zwp_remote_surface_v1_set_user_data(struct zwp_remote_surface_v1 *zwp_remote_sur
face_v1, void *user_data) |
225 { | 281 { |
226 wl_proxy_set_user_data((struct wl_proxy *) zwp_remote_surface_v1, user_d
ata); | 282 wl_proxy_set_user_data((struct wl_proxy *) zwp_remote_surface_v1, user_d
ata); |
227 } | 283 } |
228 | 284 |
229 static inline void * | 285 static inline void * |
230 zwp_remote_surface_v1_get_user_data(struct zwp_remote_surface_v1 *zwp_remote_sur
face_v1) | 286 zwp_remote_surface_v1_get_user_data(struct zwp_remote_surface_v1 *zwp_remote_sur
face_v1) |
231 { | 287 { |
(...skipping 23 matching lines...) Expand all Loading... |
255 ZWP_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY, x, y, width,
height); | 311 ZWP_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY, x, y, width,
height); |
256 } | 312 } |
257 | 313 |
258 static inline void | 314 static inline void |
259 zwp_remote_surface_v1_set_scale(struct zwp_remote_surface_v1 *zwp_remote_surface
_v1, wl_fixed_t scale) | 315 zwp_remote_surface_v1_set_scale(struct zwp_remote_surface_v1 *zwp_remote_surface
_v1, wl_fixed_t scale) |
260 { | 316 { |
261 wl_proxy_marshal((struct wl_proxy *) zwp_remote_surface_v1, | 317 wl_proxy_marshal((struct wl_proxy *) zwp_remote_surface_v1, |
262 ZWP_REMOTE_SURFACE_V1_SET_SCALE, scale); | 318 ZWP_REMOTE_SURFACE_V1_SET_SCALE, scale); |
263 } | 319 } |
264 | 320 |
| 321 static inline void |
| 322 zwp_remote_surface_v1_fullscreen(struct zwp_remote_surface_v1 *zwp_remote_surfac
e_v1) |
| 323 { |
| 324 wl_proxy_marshal((struct wl_proxy *) zwp_remote_surface_v1, |
| 325 ZWP_REMOTE_SURFACE_V1_FULLSCREEN); |
| 326 } |
| 327 |
| 328 static inline void |
| 329 zwp_remote_surface_v1_maximize(struct zwp_remote_surface_v1 *zwp_remote_surface_
v1) |
| 330 { |
| 331 wl_proxy_marshal((struct wl_proxy *) zwp_remote_surface_v1, |
| 332 ZWP_REMOTE_SURFACE_V1_MAXIMIZE); |
| 333 } |
| 334 |
| 335 static inline void |
| 336 zwp_remote_surface_v1_minimize(struct zwp_remote_surface_v1 *zwp_remote_surface_
v1) |
| 337 { |
| 338 wl_proxy_marshal((struct wl_proxy *) zwp_remote_surface_v1, |
| 339 ZWP_REMOTE_SURFACE_V1_MINIMIZE); |
| 340 } |
| 341 |
| 342 static inline void |
| 343 zwp_remote_surface_v1_restore(struct zwp_remote_surface_v1 *zwp_remote_surface_v
1) |
| 344 { |
| 345 wl_proxy_marshal((struct wl_proxy *) zwp_remote_surface_v1, |
| 346 ZWP_REMOTE_SURFACE_V1_RESTORE); |
| 347 } |
| 348 |
265 #ifdef __cplusplus | 349 #ifdef __cplusplus |
266 } | 350 } |
267 #endif | 351 #endif |
268 | 352 |
269 #endif | 353 #endif |
OLD | NEW |