3#ifndef GTK_CLIENT_PROTOCOL_H
4#define GTK_CLIENT_PROTOCOL_H
8#include "wayland-client.h"
25#ifndef GTK_SHELL1_INTERFACE
26#define GTK_SHELL1_INTERFACE
42extern const struct wl_interface gtk_shell1_interface;
44#ifndef GTK_SURFACE1_INTERFACE
45#define GTK_SURFACE1_INTERFACE
54extern const struct wl_interface gtk_surface1_interface;
57#ifndef GTK_SHELL1_CAPABILITY_ENUM
58#define GTK_SHELL1_CAPABILITY_ENUM
59enum gtk_shell1_capability {
60 GTK_SHELL1_CAPABILITY_GLOBAL_APP_MENU = 1,
61 GTK_SHELL1_CAPABILITY_GLOBAL_MENU_BAR = 2,
62 GTK_SHELL1_CAPABILITY_DESKTOP_ICONS = 3,
73 void (*capabilities)(
void *data,
74 struct gtk_shell1 *gtk_shell1,
75 uint32_t capabilities);
82gtk_shell1_add_listener(
struct gtk_shell1 *gtk_shell1,
85 return wl_proxy_add_listener((
struct wl_proxy *) gtk_shell1,
86 (
void (**)(
void)) listener, data);
89#define GTK_SHELL1_GET_GTK_SURFACE 0
90#define GTK_SHELL1_SET_STARTUP_ID 1
91#define GTK_SHELL1_SYSTEM_BELL 2
92#define GTK_SHELL1_NOTIFY_LAUNCH 3
97#define GTK_SHELL1_CAPABILITIES_SINCE_VERSION 1
102#define GTK_SHELL1_GET_GTK_SURFACE_SINCE_VERSION 1
106#define GTK_SHELL1_SET_STARTUP_ID_SINCE_VERSION 1
110#define GTK_SHELL1_SYSTEM_BELL_SINCE_VERSION 1
114#define GTK_SHELL1_NOTIFY_LAUNCH_SINCE_VERSION 3
118gtk_shell1_set_user_data(
struct gtk_shell1 *gtk_shell1,
void *user_data)
120 wl_proxy_set_user_data((
struct wl_proxy *) gtk_shell1, user_data);
125gtk_shell1_get_user_data(
struct gtk_shell1 *gtk_shell1)
127 return wl_proxy_get_user_data((
struct wl_proxy *) gtk_shell1);
130static inline uint32_t
131gtk_shell1_get_version(
struct gtk_shell1 *gtk_shell1)
133 return wl_proxy_get_version((
struct wl_proxy *) gtk_shell1);
138gtk_shell1_destroy(
struct gtk_shell1 *gtk_shell1)
140 wl_proxy_destroy((
struct wl_proxy *) gtk_shell1);
146static inline struct gtk_surface1 *
147gtk_shell1_get_gtk_surface(
struct gtk_shell1 *gtk_shell1,
struct wl_surface *surface)
149 struct wl_proxy *gtk_surface;
151 gtk_surface = wl_proxy_marshal_flags((
struct wl_proxy *) gtk_shell1,
152 GTK_SHELL1_GET_GTK_SURFACE, >k_surface1_interface, wl_proxy_get_version((
struct wl_proxy *) gtk_shell1), 0, NULL, surface);
154 return (
struct gtk_surface1 *) gtk_surface;
161gtk_shell1_set_startup_id(
struct gtk_shell1 *gtk_shell1,
const char *startup_id)
163 wl_proxy_marshal_flags((
struct wl_proxy *) gtk_shell1,
164 GTK_SHELL1_SET_STARTUP_ID, NULL, wl_proxy_get_version((
struct wl_proxy *) gtk_shell1), 0, startup_id);
171gtk_shell1_system_bell(
struct gtk_shell1 *gtk_shell1,
struct gtk_surface1 *surface)
173 wl_proxy_marshal_flags((
struct wl_proxy *) gtk_shell1,
174 GTK_SHELL1_SYSTEM_BELL, NULL, wl_proxy_get_version((
struct wl_proxy *) gtk_shell1), 0, surface);
181gtk_shell1_notify_launch(
struct gtk_shell1 *gtk_shell1,
const char *startup_id)
183 wl_proxy_marshal_flags((
struct wl_proxy *) gtk_shell1,
184 GTK_SHELL1_NOTIFY_LAUNCH, NULL, wl_proxy_get_version((
struct wl_proxy *) gtk_shell1), 0, startup_id);
187#ifndef GTK_SURFACE1_STATE_ENUM
188#define GTK_SURFACE1_STATE_ENUM
189enum gtk_surface1_state {
190 GTK_SURFACE1_STATE_TILED = 1,
194 GTK_SURFACE1_STATE_TILED_TOP = 2,
198 GTK_SURFACE1_STATE_TILED_RIGHT = 3,
202 GTK_SURFACE1_STATE_TILED_BOTTOM = 4,
206 GTK_SURFACE1_STATE_TILED_LEFT = 5,
211#define GTK_SURFACE1_STATE_TILED_TOP_SINCE_VERSION 2
215#define GTK_SURFACE1_STATE_TILED_RIGHT_SINCE_VERSION 2
219#define GTK_SURFACE1_STATE_TILED_BOTTOM_SINCE_VERSION 2
223#define GTK_SURFACE1_STATE_TILED_LEFT_SINCE_VERSION 2
226#ifndef GTK_SURFACE1_EDGE_CONSTRAINT_ENUM
227#define GTK_SURFACE1_EDGE_CONSTRAINT_ENUM
228enum gtk_surface1_edge_constraint {
229 GTK_SURFACE1_EDGE_CONSTRAINT_RESIZABLE_TOP = 1,
230 GTK_SURFACE1_EDGE_CONSTRAINT_RESIZABLE_RIGHT = 2,
231 GTK_SURFACE1_EDGE_CONSTRAINT_RESIZABLE_BOTTOM = 3,
232 GTK_SURFACE1_EDGE_CONSTRAINT_RESIZABLE_LEFT = 4,
236#ifndef GTK_SURFACE1_GESTURE_ENUM
237#define GTK_SURFACE1_GESTURE_ENUM
238enum gtk_surface1_gesture {
239 GTK_SURFACE1_GESTURE_DOUBLE_CLICK = 1,
240 GTK_SURFACE1_GESTURE_RIGHT_CLICK = 2,
241 GTK_SURFACE1_GESTURE_MIDDLE_CLICK = 3,
245#ifndef GTK_SURFACE1_ERROR_ENUM
246#define GTK_SURFACE1_ERROR_ENUM
247enum gtk_surface1_error {
248 GTK_SURFACE1_ERROR_INVALID_GESTURE = 0,
259 void (*configure)(
void *data,
260 struct gtk_surface1 *gtk_surface1,
261 struct wl_array *states);
266 struct gtk_surface1 *gtk_surface1,
267 struct wl_array *constraints);
274gtk_surface1_add_listener(
struct gtk_surface1 *gtk_surface1,
277 return wl_proxy_add_listener((
struct wl_proxy *) gtk_surface1,
278 (
void (**)(
void)) listener, data);
281#define GTK_SURFACE1_SET_DBUS_PROPERTIES 0
282#define GTK_SURFACE1_SET_MODAL 1
283#define GTK_SURFACE1_UNSET_MODAL 2
284#define GTK_SURFACE1_PRESENT 3
285#define GTK_SURFACE1_REQUEST_FOCUS 4
286#define GTK_SURFACE1_RELEASE 5
287#define GTK_SURFACE1_TITLEBAR_GESTURE 6
292#define GTK_SURFACE1_CONFIGURE_SINCE_VERSION 1
296#define GTK_SURFACE1_CONFIGURE_EDGES_SINCE_VERSION 2
301#define GTK_SURFACE1_SET_DBUS_PROPERTIES_SINCE_VERSION 1
305#define GTK_SURFACE1_SET_MODAL_SINCE_VERSION 1
309#define GTK_SURFACE1_UNSET_MODAL_SINCE_VERSION 1
313#define GTK_SURFACE1_PRESENT_SINCE_VERSION 1
317#define GTK_SURFACE1_REQUEST_FOCUS_SINCE_VERSION 3
321#define GTK_SURFACE1_RELEASE_SINCE_VERSION 4
325#define GTK_SURFACE1_TITLEBAR_GESTURE_SINCE_VERSION 5
329gtk_surface1_set_user_data(
struct gtk_surface1 *gtk_surface1,
void *user_data)
331 wl_proxy_set_user_data((
struct wl_proxy *) gtk_surface1, user_data);
336gtk_surface1_get_user_data(
struct gtk_surface1 *gtk_surface1)
338 return wl_proxy_get_user_data((
struct wl_proxy *) gtk_surface1);
341static inline uint32_t
342gtk_surface1_get_version(
struct gtk_surface1 *gtk_surface1)
344 return wl_proxy_get_version((
struct wl_proxy *) gtk_surface1);
349gtk_surface1_destroy(
struct gtk_surface1 *gtk_surface1)
351 wl_proxy_destroy((
struct wl_proxy *) gtk_surface1);
358gtk_surface1_set_dbus_properties(
struct gtk_surface1 *gtk_surface1,
const char *application_id,
const char *app_menu_path,
const char *menubar_path,
const char *window_object_path,
const char *application_object_path,
const char *unique_bus_name)
360 wl_proxy_marshal_flags((
struct wl_proxy *) gtk_surface1,
361 GTK_SURFACE1_SET_DBUS_PROPERTIES, NULL, wl_proxy_get_version((
struct wl_proxy *) gtk_surface1), 0, application_id, app_menu_path, menubar_path, window_object_path, application_object_path, unique_bus_name);
368gtk_surface1_set_modal(
struct gtk_surface1 *gtk_surface1)
370 wl_proxy_marshal_flags((
struct wl_proxy *) gtk_surface1,
371 GTK_SURFACE1_SET_MODAL, NULL, wl_proxy_get_version((
struct wl_proxy *) gtk_surface1), 0);
378gtk_surface1_unset_modal(
struct gtk_surface1 *gtk_surface1)
380 wl_proxy_marshal_flags((
struct wl_proxy *) gtk_surface1,
381 GTK_SURFACE1_UNSET_MODAL, NULL, wl_proxy_get_version((
struct wl_proxy *) gtk_surface1), 0);
388gtk_surface1_present(
struct gtk_surface1 *gtk_surface1, uint32_t time)
390 wl_proxy_marshal_flags((
struct wl_proxy *) gtk_surface1,
391 GTK_SURFACE1_PRESENT, NULL, wl_proxy_get_version((
struct wl_proxy *) gtk_surface1), 0, time);
398gtk_surface1_request_focus(
struct gtk_surface1 *gtk_surface1,
const char *startup_id)
400 wl_proxy_marshal_flags((
struct wl_proxy *) gtk_surface1,
401 GTK_SURFACE1_REQUEST_FOCUS, NULL, wl_proxy_get_version((
struct wl_proxy *) gtk_surface1), 0, startup_id);
408gtk_surface1_release(
struct gtk_surface1 *gtk_surface1)
410 wl_proxy_marshal_flags((
struct wl_proxy *) gtk_surface1,
411 GTK_SURFACE1_RELEASE, NULL, wl_proxy_get_version((
struct wl_proxy *) gtk_surface1), WL_MARSHAL_FLAG_DESTROY);
418gtk_surface1_titlebar_gesture(
struct gtk_surface1 *gtk_surface1, uint32_t serial,
struct wl_seat *seat, uint32_t gesture)
420 wl_proxy_marshal_flags((
struct wl_proxy *) gtk_surface1,
421 GTK_SURFACE1_TITLEBAR_GESTURE, NULL, wl_proxy_get_version((
struct wl_proxy *) gtk_surface1), 0, serial, seat, gesture);
Definition gtk-shell-client-protocol.h:70
Definition gtk-shell-client-protocol.h:256
void(* configure_edges)(void *data, struct gtk_surface1 *gtk_surface1, struct wl_array *constraints)
Definition gtk-shell-client-protocol.h:265