gtk2/gdk/wayland/gdkdisplay-wayland.h

136 lines
3.7 KiB
C
Raw Normal View History

2010-12-18 20:38:49 +00:00
/*
* gdkdisplay-wayland.h
2015-02-28 03:28:28 +00:00
*
* Copyright 2001 Sun Microsystems Inc.
2010-12-18 20:38:49 +00:00
*
* Erwann Chenede <erwann.chenede@sun.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
2012-02-27 13:01:10 +00:00
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
2010-12-18 20:38:49 +00:00
*/
#ifndef __GDK_WAYLAND_DISPLAY__
#define __GDK_WAYLAND_DISPLAY__
2010-12-18 20:38:49 +00:00
#include <config.h>
2010-12-18 20:38:49 +00:00
#include <stdint.h>
#include <wayland-client.h>
#include <wayland-cursor.h>
#include <wayland-egl.h>
#include <gdk/wayland/tablet-unstable-v2-client-protocol.h>
#include <gdk/wayland/gtk-shell-client-protocol.h>
#include <gdk/wayland/xdg-shell-unstable-v6-client-protocol.h>
#include <gdk/wayland/xdg-foreign-unstable-v1-client-protocol.h>
2010-12-18 20:38:49 +00:00
#include <glib.h>
#include <gdk/gdkkeys.h>
#include <gdk/gdkwindow.h>
#include <gdk/gdkinternals.h>
#include <gdk/gdk.h> /* For gdk_get_program_class() */
#include "gdkdisplayprivate.h"
#include <epoxy/egl.h>
2010-12-18 20:38:49 +00:00
G_BEGIN_DECLS
#define GDK_WAYLAND_MAX_THEME_SCALE 2
#define GDK_WAYLAND_THEME_SCALES_COUNT GDK_WAYLAND_MAX_THEME_SCALE
#define GDK_ZWP_POINTER_GESTURES_V1_VERSION 1
typedef struct _GdkWaylandSelection GdkWaylandSelection;
struct _GdkWaylandDisplay
2010-12-18 20:38:49 +00:00
{
GdkDisplay parent_instance;
2011-02-11 14:56:58 +00:00
GdkScreen *screen;
2010-12-18 20:38:49 +00:00
/* Startup notification */
gchar *startup_notification_id;
2014-05-15 22:11:20 +00:00
/* Most recent serial */
guint32 serial;
2010-12-18 20:38:49 +00:00
/* Wayland fields below */
struct wl_display *wl_display;
struct wl_registry *wl_registry;
2010-12-18 20:38:49 +00:00
struct wl_compositor *compositor;
struct wl_shm *shm;
struct zxdg_shell_v6 *xdg_shell;
struct gtk_shell1 *gtk_shell;
2010-12-18 20:38:49 +00:00
struct wl_input_device *input_device;
struct wl_data_device_manager *data_device_manager;
struct wl_subcompositor *subcompositor;
struct zwp_pointer_gestures_v1 *pointer_gestures;
struct gtk_primary_selection_device_manager *primary_selection_manager;
struct zwp_tablet_manager_v2 *tablet_manager;
struct zxdg_exporter_v1 *xdg_exporter;
struct zxdg_importer_v1 *xdg_importer;
GList *async_roundtrips;
/* Keep track of the ID's of the known globals and their corresponding
* names. This way we can check whether an interface is known, and
* remove globals given its ID. This table is not expected to be very
* large, meaning the lookup by interface name time is insignificant. */
GHashTable *known_globals;
GList *on_has_globals_closures;
/* Keep a list of orphaned dialogs (i.e. without parent) */
GList *orphan_dialogs;
GList *current_popups;
struct wl_cursor_theme *scaled_cursor_themes[GDK_WAYLAND_THEME_SCALES_COUNT];
gchar *cursor_theme_name;
int cursor_theme_size;
GHashTable *cursor_cache;
2010-12-18 20:38:49 +00:00
GSource *event_source;
int compositor_version;
int seat_version;
int data_device_manager_version;
int gtk_shell_version;
struct xkb_context *xkb_context;
GdkWaylandSelection *selection;
2016-04-02 14:18:56 +00:00
GPtrArray *monitors;
gint64 last_bell_time_ms;
/* egl info */
EGLDisplay egl_display;
int egl_major_version;
int egl_minor_version;
guint have_egl : 1;
guint have_egl_khr_create_context : 1;
guint have_egl_buffer_age : 1;
guint have_egl_swap_buffers_with_damage : 1;
guint have_egl_surfaceless_context : 1;
EGLint egl_min_swap_interval;
2010-12-18 20:38:49 +00:00
};
struct _GdkWaylandDisplayClass
2010-12-18 20:38:49 +00:00
{
GdkDisplayClass parent_class;
};
G_END_DECLS
2015-02-28 03:28:28 +00:00
#endif /* __GDK_WAYLAND_DISPLAY__ */