summaryrefslogtreecommitdiff
path: root/libdecor/build
diff options
context:
space:
mode:
Diffstat (limited to 'libdecor/build')
-rw-r--r--libdecor/build/fl_libdecor-plugins.c311
-rw-r--r--libdecor/build/fl_libdecor.c145
-rw-r--r--libdecor/build/fl_libdecor.h93
-rw-r--r--libdecor/build/gtk-shell.xml109
4 files changed, 0 insertions, 658 deletions
diff --git a/libdecor/build/fl_libdecor-plugins.c b/libdecor/build/fl_libdecor-plugins.c
deleted file mode 100644
index 4197ea8f0..000000000
--- a/libdecor/build/fl_libdecor-plugins.c
+++ /dev/null
@@ -1,311 +0,0 @@
-//
-// Interface with the libdecor library for the Fast Light Tool Kit (FLTK).
-//
-// Copyright 2022-2024 by Bill Spitzak and others.
-//
-// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
-// file is missing or damaged, see the license at:
-//
-// https://www.fltk.org/COPYING.php
-//
-// Please see the following page on how to report bugs and issues:
-//
-// https://www.fltk.org/bugs.php
-//
-
-/* Support of interactions between FLTK and libdecor plugins, either dynamically
- loaded by dlopen() or built-in FLTK.
-
- Under USE_SYSTEM_LIBDECOR, the plugin can only be dynamically loaded.
- Under ! USE_SYSTEM_LIBDECOR, it can be dynamically loaded from a directory
- given in environment variable LIBDECOR_PLUGIN_DIR, or the built-in one is used.
- */
-
-#include <dlfcn.h>
-#include <string.h>
-#include "fl_libdecor.h"
-#include <pango/pangocairo.h>
-#include <dlfcn.h>
-
-#ifndef HAVE_GTK
-# define HAVE_GTK 0
-#endif
-
-enum plugin_kind { UNKNOWN, SSD, CAIRO, GTK3 };
-
-#if USE_SYSTEM_LIBDECOR
-# include "../src/libdecor-plugin.h"
-
-enum component {NONE}; /* details are not necessary*/
-enum decoration_type {DECORATION_TYPE_NONE}; /* details are not necessary*/
-
-struct buffer { // identical in libdecor-cairo.c and libdecor-gtk.c
- struct wl_buffer *wl_buffer;
- bool in_use;
- bool is_detached;
-
- void *data;
- size_t data_size;
- int width;
- int height;
- int scale;
- int buffer_width;
- int buffer_height;
-};
-
-#else // !USE_SYSTEM_LIBDECOR
-
-const struct libdecor_plugin_description *fl_libdecor_plugin_description = NULL;
-
-# if HAVE_GTK
-# include "../src/plugins/gtk/libdecor-gtk.c"
-# else
-# include "../src/plugins/cairo/libdecor-cairo.c"
-# endif // HAVE_GTK
-
-#endif // USE_SYSTEM_LIBDECOR
-
-
-#if USE_SYSTEM_LIBDECOR || HAVE_GTK
-/* these definitions derive from libdecor/src/plugins/cairo/libdecor-cairo.c */
-
-enum composite_mode {COMPOSITE_SERVER}; /* details are not necessary*/
-
-struct border_component_cairo {
- enum component type;
-
- bool is_hidden;
- bool opaque;
-
- enum composite_mode composite_mode;
- struct {
- struct wl_surface *wl_surface;
- struct wl_subsurface *wl_subsurface;
- struct buffer *buffer;
- struct wl_list output_list;
- int scale;
- } server;
- struct {
- cairo_surface_t *image;
- struct border_component_cairo *parent_component;
- } client;
-
- struct wl_list child_components; /* border_component::link */
- struct wl_list link; /* border_component::child_components */
-};
-
-struct libdecor_frame_cairo {
- struct libdecor_frame frame;
-
- struct libdecor_plugin_cairo *plugin_cairo;
-
- int content_width;
- int content_height;
-
- enum decoration_type decoration_type;
-
- enum libdecor_window_state window_state;
-
- char *title;
-
- enum libdecor_capabilities capabilities;
-
- struct border_component_cairo *focus;
- struct border_component_cairo *active;
- struct border_component_cairo *grab;
-
- bool shadow_showing;
- struct border_component_cairo shadow;
-
- struct {
- bool is_showing;
- struct border_component_cairo title;
- struct border_component_cairo min;
- struct border_component_cairo max;
- struct border_component_cairo close;
- } title_bar;
-
- /* store pre-processed shadow tile */
- cairo_surface_t *shadow_blur;
-
- struct wl_list link;
-};
-#endif // USE_SYSTEM_LIBDECOR || HAVE_GTK
-
-
-#if USE_SYSTEM_LIBDECOR || !HAVE_GTK
-
-/* Definitions derived from libdecor-gtk.c */
-
-typedef struct _GtkWidget GtkWidget;
-enum header_element { HEADER_NONE }; /* details are not needed */
-
-typedef enum { GTK_STATE_FLAG_NORMAL = 0 } GtkStateFlags;
-
-struct border_component_gtk {
- enum component type;
- struct wl_surface *wl_surface;
- struct wl_subsurface *wl_subsurface;
- struct buffer *buffer;
- bool opaque;
- struct wl_list output_list;
- int scale;
- struct wl_list child_components; /* border_component::link */
- struct wl_list link; /* border_component::child_components */
-};
-
-struct header_element_data {
- const char* name;
- enum header_element type;
- GtkWidget *widget;
- GtkStateFlags state;
-};
-
-struct libdecor_frame_gtk {
- struct libdecor_frame frame;
- struct libdecor_plugin_gtk *plugin_gtk;
- int content_width;
- int content_height;
- enum libdecor_window_state window_state;
- enum decoration_type decoration_type;
- char *title;
- enum libdecor_capabilities capabilities;
- struct border_component_gtk *active;
- struct border_component_gtk *touch_active;
- struct border_component_gtk *focus;
- struct border_component_gtk *grab;
- bool shadow_showing;
- struct border_component_gtk shadow;
- GtkWidget *window; /* offscreen window for rendering */
- GtkWidget *header; /* header bar with widgets */
- struct border_component_gtk headerbar;
- struct header_element_data hdr_focus;
- cairo_surface_t *shadow_blur;
- struct wl_list link;
- struct {
- enum titlebar_gesture_state {TITLEBAR_GESTURE_STATE_INIT} state;
- int button_pressed_count;
- uint32_t first_pressed_button;
- uint32_t first_pressed_time;
- double pressed_x;
- double pressed_y;
- uint32_t pressed_serial;
- } titlebar_gesture;
-};
-
-#endif // USE_SYSTEM_LIBDECOR || !HAVE_GTK
-
-
-static unsigned char *gtk_titlebar_buffer(struct libdecor_frame *frame,
- int *width, int *height, int *stride)
-{
- struct libdecor_frame_gtk *lfg = (struct libdecor_frame_gtk *)frame;
- struct buffer *buffer = lfg->headerbar.buffer;
- *width = buffer->buffer_width;
- *height = buffer->buffer_height;
- *stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, buffer->buffer_width);
- return (unsigned char*)buffer->data;
-}
-
-
-static unsigned char *cairo_titlebar_buffer(struct libdecor_frame *frame,
- int *width, int *height, int *stride)
-{
- struct libdecor_frame_cairo *lfc = (struct libdecor_frame_cairo *)frame;
- struct buffer *buffer = lfc->title_bar.title.server.buffer;
- *width = buffer->buffer_width;
- *height = buffer->buffer_height;
- *stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, buffer->buffer_width);
- return (unsigned char*)buffer->data;
-}
-
-
-/*
- Although each plugin declares an exported global variable
- LIBDECOR_EXPORT const struct libdecor_plugin_description libdecor_plugin_description;
- these plugins are dlopen()'ed in libdecor.c without the RTLD_GLOBAL flag.
- Consequently their symbols are not discovered by dlsym(RTLD_DEFAULT, "symbol-name").
-
- Under USE_SYSTEM_LIBDECOR, we repeat the dlopen() for the same plugin
- then dlsym() will report the address of libdecor_plugin_description.
-
- Under !USE_SYSTEM_LIBDECOR, we compile fl_libdecor.c which modifies the dlopen()
- to call dlsym(ld, "libdecor_plugin_description") just after the dlopen and memorizes
- this address.
-
- A plugin is loaded also if SSD.
- KWin has its own size limit, similar to that of GDK plugin
- */
-static const char *get_libdecor_plugin_description() {
- static const struct libdecor_plugin_description *plugin_description = NULL;
- if (!plugin_description) {
-#if USE_SYSTEM_LIBDECOR
- char fname[PATH_MAX];
- const char *dir = getenv("LIBDECOR_PLUGIN_DIR");
- if (!dir) dir = LIBDECOR_PLUGIN_DIR;
- snprintf(fname, PATH_MAX, "%s/libdecor-gtk.so", dir);
- void *dl = dlopen(fname, RTLD_LAZY | RTLD_LOCAL);
- if (!dl) {
- snprintf(fname, PATH_MAX, "%s/libdecor-cairo.so", dir);
- dl = dlopen(fname, RTLD_LAZY | RTLD_LOCAL);
- }
- if (dl) plugin_description = (const struct libdecor_plugin_description*)dlsym(dl, "libdecor_plugin_description");
-#else
- plugin_description = fl_libdecor_plugin_description;
- extern const struct libdecor_plugin_description libdecor_plugin_description;
- if (!plugin_description) plugin_description = &libdecor_plugin_description;
-#endif
- //if (plugin_description) puts(plugin_description->description);
- }
- return plugin_description ? plugin_description->description : NULL;
-}
-
-
-static enum plugin_kind get_plugin_kind(struct libdecor_frame *frame) {
- static enum plugin_kind kind = UNKNOWN;
- if (kind == UNKNOWN) {
- if (frame) {
- int X, Y = 0;
- libdecor_frame_translate_coordinate(frame, 0, 0, &X, &Y);
- if (Y == 0) {
- return SSD;
- }
- }
- const char *name = get_libdecor_plugin_description();
- if (name && !strcmp(name, "GTK3 plugin")) kind = GTK3;
- else if (name && !strcmp(name, "libdecor plugin using Cairo")) kind = CAIRO;
- }
- return kind;
-}
-
-/*
- FLTK-added utility function to give access to the pixel array representing
- the titlebar of a window decorated by the cairo plugin of libdecor.
- frame: a libdecor-defined pointer given by fl_xid(win)->frame (with Fl_Window *win);
- *width, *height: returned assigned to the width and height in pixels of the titlebar;
- *stride: returned assigned to the number of bytes per line of the pixel array;
- return value: start of the pixel array, which is in BGRA order, or NULL.
- */
-unsigned char *fl_libdecor_titlebar_buffer(struct libdecor_frame *frame,
- int *width, int *height, int *stride)
-{
- enum plugin_kind kind = get_plugin_kind(frame);
- if (kind == GTK3) {
- return gtk_titlebar_buffer(frame, width, height, stride);
- }
- else if (kind == CAIRO) {
- return cairo_titlebar_buffer(frame, width, height, stride);
- }
- return NULL;
-}
-
-
-/* Returns whether surface is the libdecor-created GTK-titlebar of frame */
-bool fl_is_surface_from_GTK_titlebar (struct wl_surface *surface, struct libdecor_frame *frame,
- bool *using_GTK) {
- *using_GTK = (get_plugin_kind(NULL) == GTK3);
- if (!*using_GTK) return false;
- struct libdecor_frame_gtk *frame_gtk = (struct libdecor_frame_gtk*)frame;
- return (frame_gtk->headerbar.wl_surface == surface);
-}
diff --git a/libdecor/build/fl_libdecor.c b/libdecor/build/fl_libdecor.c
deleted file mode 100644
index c7105bd85..000000000
--- a/libdecor/build/fl_libdecor.c
+++ /dev/null
@@ -1,145 +0,0 @@
-//
-// Interface with the libdecor library for the Fast Light Tool Kit (FLTK).
-//
-// Copyright 2022-2024 by Bill Spitzak and others.
-//
-// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
-// file is missing or damaged, see the license at:
-//
-// https://www.fltk.org/COPYING.php
-//
-// Please see the following page on how to report bugs and issues:
-//
-// https://www.fltk.org/bugs.php
-//
-
-/* Improvements to libdecor.c without modifying libdecor.c itself */
-#if ! USE_SYSTEM_LIBDECOR
-
-#include <dlfcn.h>
-#include <stdlib.h>
-static void *dlopen_corrected(const char *, int);
-#define dlopen(A, B) dlopen_corrected(A, B)
-#include "fl_libdecor.h"
-#undef libdecor_new
-#define libdecor_new libdecor_new_orig
-#undef libdecor_frame_set_minimized
-#define libdecor_frame_set_minimized libdecor_frame_set_minimized_orig
-#include "../src/libdecor.c"
-#undef dlopen
-#undef libdecor_frame_set_minimized
-#undef libdecor_new
-#define libdecor_new fl_libdecor_new
-#define libdecor_frame_set_minimized fl_libdecor_frame_set_minimized
-
-extern bool fl_libdecor_using_weston(void);
-extern const struct libdecor_plugin_description *fl_libdecor_plugin_description;
-//#include <stdio.h>
-
-// we have a built-in plugin so don't need a fallback one
-struct libdecor_plugin *libdecor_fallback_plugin_new(struct libdecor *context) {
- return NULL;
-}
-
-// see get_libdecor_plugin_description() explaining why this is useful
-static void *dlopen_corrected(const char *filename, int flags) {
- static int best_priority = -1;
- void *retval = dlopen(filename, flags);
- if (retval) {
- const struct libdecor_plugin_description *description =
- (const struct libdecor_plugin_description*)dlsym(retval, "libdecor_plugin_description");
- if (description && description->priorities->priority > best_priority) {
- fl_libdecor_plugin_description = description;
- best_priority = description->priorities->priority;
- }
- }
- return retval;
-}
-
-
-void fl_libdecor_frame_set_minimized(struct libdecor_frame *frame)
-{
- static bool done = false;
- static bool using_weston = false;
- if (!done) {
- typedef bool (*ext_f)(void);
- volatile ext_f ext = fl_libdecor_using_weston;
- done = true;
- if (ext) using_weston = fl_libdecor_using_weston();
-//fprintf(stderr, "fl_libdecor_using_weston=%p using_weston=%d\n", fl_libdecor_using_weston, using_weston);
- if (using_weston) { // determine the version of the running Weston compositor
- FILE *pipe = popen("weston --version", "r");
- if (pipe) {
- char line[50], *p;
- int version = 0;
- p = fgets(line, sizeof(line), pipe);
- pclose(pipe);
- if (p) p = strchr(line, ' ');
- if (p) {
- sscanf(p, "%d", &version);
- // Weston version 10 has fixed the bug handled here
- if (version >= 10) using_weston = false;
- }
- }
- }
- }
- if (using_weston) libdecor_frame_set_visibility(frame, false);
- libdecor_frame_set_minimized_orig(frame);
-}
-
-
-/*
- By default, FLTK modifies libdecor's libdecor_new() function to determine the plugin as follows :
- 1) the directory pointed by environment variable LIBDECOR_PLUGIN_DIR or, in absence of this variable,
- by -DLIBDECOR_PLUGIN_DIR=xxx at build time is searched for a libdecor plugin;
- 2) if this directory does not exist or contains no plugin, the built-in plugin is used.
- * if FLTK was built with package libgtk-3-dev, the GTK plugin is used
- * if FLTK was built without package libgtk-3-dev, the Cairo plugin is used
-
- If FLTK was built with FLTK_USE_SYSTEM_LIBDECOR turned ON, the present modification
- isn't compiled, so the plugin-searching algorithm of libdecor_new() in libdecor-0.so is used.
- This corresponds to step 1) above and to use no titlebar is no plugin is found.
-
- N.B.: only the system package is built with a meaningful value of -DLIBDECOR_PLUGIN_DIR=
- so a plugin may be loaded that way only if FLTK was built with FLTK_USE_SYSTEM_LIBDECOR turned ON.
-
- */
-struct libdecor *fl_libdecor_new(struct wl_display *wl_display, const struct libdecor_interface *iface)
-{
- struct libdecor *context;
- context = zalloc(sizeof *context);
- context->ref_count = 1;
- context->iface = iface;
- context->wl_display = wl_display;
- context->wl_registry = wl_display_get_registry(wl_display);
- wl_registry_add_listener(context->wl_registry, &registry_listener, context);
- context->init_callback = wl_display_sync(context->wl_display);
- wl_callback_add_listener(context->init_callback, &init_wl_display_callback_listener, context);
- wl_list_init(&context->frames);
- // attempt to dynamically load a libdecor plugin with dlopen()
- if (init_plugins(context) != 0) { // attempt to load plugin by dlopen()
- // no plug-in was found by dlopen(), use built-in plugin instead
- // defined in the source code of the built-in plugin: libdecor-cairo.c or libdecor-gtk.c
- extern const struct libdecor_plugin_description libdecor_plugin_description;
-#if HAVE_GTK
- bool gdk_caution = false;
- if (getenv("GDK_BACKEND") && strcmp(getenv("GDK_BACKEND"), "x11") == 0) {
- // Environment variable GDK_BACKEND=x11 makes the .constructor below fail
- // for the built-in GTK plugin and then FLTK crashes (#1029).
- // Temporarily unset GDK_BACKEND to prevent that.
- gdk_caution = true;
- unsetenv("GDK_BACKEND");
- }
-#endif
- context->plugin = libdecor_plugin_description.constructor(context);
-#if HAVE_GTK
- if (gdk_caution) putenv("GDK_BACKEND=x11");
-#endif
- }
-
- wl_display_flush(wl_display);
- return context;
-}
-
-#endif //! USE_SYSTEM_LIBDECOR
diff --git a/libdecor/build/fl_libdecor.h b/libdecor/build/fl_libdecor.h
deleted file mode 100644
index 97041c885..000000000
--- a/libdecor/build/fl_libdecor.h
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// Interface with the libdecor library for the Fast Light Tool Kit (FLTK).
-//
-// Copyright 2024 by Bill Spitzak and others.
-//
-// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
-// file is missing or damaged, see the license at:
-//
-// https://www.fltk.org/COPYING.php
-//
-// Please see the following page on how to report bugs and issues:
-//
-// https://www.fltk.org/bugs.php
-//
-
-#ifndef FL_LIBDECOR_H
-#define FL_LIBDECOR_H
-
-#if ! USE_SYSTEM_LIBDECOR
-
-// add "fl_" prefix to libdecor.h symbols
-#define libdecor_unref fl_libdecor_unref
-#define libdecor_new fl_libdecor_new
-#define libdecor_new_with_user_data fl_libdecor_new_with_user_data
-#define libdecor_get_user_data fl_libdecor_get_user_data
-#define libdecor_set_user_data fl_libdecor_set_user_data
-#define libdecor_get_fd fl_libdecor_get_fd
-#define libdecor_dispatch fl_libdecor_dispatch
-#define libdecor_decorate fl_libdecor_decorate
-#define libdecor_frame_ref fl_libdecor_frame_ref
-#define libdecor_frame_unref fl_libdecor_frame_unref
-#define libdecor_frame_get_user_data fl_libdecor_frame_get_user_data
-#define libdecor_frame_set_user_data fl_libdecor_frame_set_user_data
-#define libdecor_frame_set_visibility fl_libdecor_frame_set_visibility
-#define libdecor_frame_is_visible fl_libdecor_frame_is_visible
-#define libdecor_frame_set_parent fl_libdecor_frame_set_parent
-#define libdecor_frame_set_title fl_libdecor_frame_set_title
-#define libdecor_frame_get_title fl_libdecor_frame_get_title
-#define libdecor_frame_set_app_id fl_libdecor_frame_set_app_id
-#define libdecor_frame_set_capabilities fl_libdecor_frame_set_capabilities
-#define libdecor_frame_unset_capabilities fl_libdecor_frame_unset_capabilitiesf
-#define libdecor_frame_has_capability fl_libdecor_frame_has_capability
-#define libdecor_frame_show_window_menu fl_libdecor_frame_show_window_menu
-#define libdecor_frame_popup_grab fl_libdecor_frame_popup_grab
-#define libdecor_frame_popup_ungrab fl_libdecor_frame_popup_ungrab
-#define libdecor_frame_translate_coordinate fl_libdecor_frame_translate_coordinate
-#define libdecor_frame_set_min_content_size fl_libdecor_frame_set_min_content_size
-#define libdecor_frame_set_max_content_size fl_libdecor_frame_set_max_content_size
-#define libdecor_frame_get_min_content_size fl_libdecor_frame_get_min_content_size
-#define libdecor_frame_get_max_content_size fl_libdecor_frame_get_max_content_size
-#define libdecor_frame_resize fl_libdecor_frame_resize
-#define libdecor_frame_move fl_libdecor_frame_move
-#define libdecor_frame_commit fl_libdecor_frame_commit
-#define libdecor_frame_set_minimized fl_libdecor_frame_set_minimized
-#define libdecor_frame_set_maximized fl_libdecor_frame_set_maximized
-#define libdecor_frame_unset_maximized fl_libdecor_frame_unset_maximized
-#define libdecor_frame_set_fullscreen fl_libdecor_frame_set_fullscreen
-#define libdecor_frame_unset_fullscreen fl_libdecor_frame_unset_fullscreen
-#define libdecor_frame_is_floating fl_libdecor_frame_is_floating
-#define libdecor_frame_close fl_libdecor_frame_close
-#define libdecor_frame_map fl_libdecor_frame_map
-#define libdecor_frame_get_xdg_surface fl_libdecor_frame_get_xdg_surface
-#define libdecor_frame_get_xdg_toplevel fl_libdecor_frame_get_xdg_toplevel
-#define libdecor_frame_get_wm_capabilities fl_libdecor_frame_get_wm_capabilities
-#define libdecor_set_handle_application_cursor fl_libdecor_set_handle_application_cursor
-#define libdecor_state_new fl_libdecor_state_new
-#define libdecor_state_free fl_libdecor_state_free
-#define libdecor_configuration_get_content_size fl_libdecor_configuration_get_content_size
-#define libdecor_configuration_get_window_state fl_libdecor_configuration_get_window_state
-
-// add "fl_" prefix to libdecor-plugin.h symbols
-#define libdecor_frame_get_wl_surface fl_libdecor_frame_get_wl_surface
-#define libdecor_frame_get_content_width fl_libdecor_frame_get_content_width
-#define libdecor_frame_get_content_height fl_libdecor_frame_get_content_height
-#define libdecor_frame_get_window_state fl_libdecor_frame_get_window_state
-#define libdecor_frame_get_capabilities fl_libdecor_frame_get_capabilities
-#define libdecor_frame_dismiss_popup fl_libdecor_frame_dismiss_popup
-#define libdecor_frame_toplevel_commit fl_libdecor_frame_toplevel_commit
-#define libdecor_get_wl_display fl_libdecor_get_wl_display
-#define libdecor_notify_plugin_ready fl_libdecor_notify_plugin_ready
-#define libdecor_notify_plugin_error fl_libdecor_notify_plugin_error
-#define libdecor_state_get_content_width fl_libdecor_state_get_content_width
-#define libdecor_state_get_content_height fl_libdecor_state_get_content_height
-#define libdecor_state_get_window_state fl_libdecor_state_get_window_state
-#define libdecor_plugin_init fl_libdecor_plugin_init
-#define libdecor_plugin_release fl_libdecor_plugin_release
-
-#endif // ! USE_SYSTEM_LIBDECOR
-
-#include "../src/libdecor.h"
-
-#endif // ! FL_LIBDECOR_H
diff --git a/libdecor/build/gtk-shell.xml b/libdecor/build/gtk-shell.xml
deleted file mode 100644
index f00684679..000000000
--- a/libdecor/build/gtk-shell.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<!-- found at: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gdk/wayland/protocol/gtk-shell.xml -->
-<protocol name="gtk">
-
- <interface name="gtk_shell1" version="5">
- <description summary="gtk specific extensions">
- gtk_shell is a protocol extension providing additional features for
- clients implementing it.
- </description>
-
- <enum name="capability">
- <entry name="global_app_menu" value="1"/>
- <entry name="global_menu_bar" value="2"/>
- <entry name="desktop_icons" value="3"/>
- </enum>
-
- <event name="capabilities">
- <arg name="capabilities" type="uint"/>
- </event>
-
- <request name="get_gtk_surface">
- <arg name="gtk_surface" type="new_id" interface="gtk_surface1"/>
- <arg name="surface" type="object" interface="wl_surface"/>
- </request>
-
- <request name="set_startup_id">
- <arg name="startup_id" type="string" allow-null="true"/>
- </request>
-
- <request name="system_bell">
- <arg name="surface" type="object" interface="gtk_surface1" allow-null="true"/>
- </request>
-
- <!-- Version 3 additions -->
- <request name="notify_launch" since="3">
- <arg name="startup_id" type="string"/>
- </request>
- </interface>
-
- <interface name="gtk_surface1" version="5">
- <request name="set_dbus_properties">
- <arg name="application_id" type="string" allow-null="true"/>
- <arg name="app_menu_path" type="string" allow-null="true"/>
- <arg name="menubar_path" type="string" allow-null="true"/>
- <arg name="window_object_path" type="string" allow-null="true"/>
- <arg name="application_object_path" type="string" allow-null="true"/>
- <arg name="unique_bus_name" type="string" allow-null="true"/>
- </request>
-
- <request name="set_modal"/>
- <request name="unset_modal"/>
-
- <request name="present">
- <arg name="time" type="uint"/>
- </request>
-
- <!-- Version 2 additions -->
-
- <enum name="state">
- <entry name="tiled" value="1"/>
-
- <entry name="tiled_top" value="2" since="2" />
- <entry name="tiled_right" value="3" since="2" />
- <entry name="tiled_bottom" value="4" since="2" />
- <entry name="tiled_left" value="5" since="2" />
- </enum>
-
- <enum name="edge_constraint" since="2">
- <entry name="resizable_top" value="1"/>
- <entry name="resizable_right" value="2"/>
- <entry name="resizable_bottom" value="3"/>
- <entry name="resizable_left" value="4"/>
- </enum>
-
- <event name="configure">
- <arg name="states" type="array"/>
- </event>
-
- <event name="configure_edges" since="2">
- <arg name="constraints" type="array"/>
- </event>
-
- <!-- Version 3 additions -->
- <request name="request_focus" since="3">
- <arg name="startup_id" type="string" allow-null="true"/>
- </request>
-
- <!-- Version 4 additions -->
- <request name="release" type="destructor" since="4"/>
-
- <!-- Version 5 additions -->
- <enum name="gesture" since="5">
- <entry name="double_click" value="1"/>
- <entry name="right_click" value="2"/>
- <entry name="middle_click" value="3"/>
- </enum>
-
- <enum name="error" since="5">
- <entry name="invalid_gesture" value="0"/>
- </enum>
-
- <request name="titlebar_gesture" since="5">
- <arg name="serial" type="uint"/>
- <arg name="seat" type="object" interface="wl_seat"/>
- <arg name="gesture" type="uint" enum="gesture"/>
- </request>
- </interface>
-
-</protocol>
-