4 * Copyright 2001 Sun Microsystems Inc.
6 * Erwann Chenede <erwann.chenede@sun.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef __GDK_WAYLAND_DISPLAY__
23 #define __GDK_WAYLAND_DISPLAY__
27 #include <wayland-client.h>
29 #ifdef GDK_WAYLAND_USE_EGL
30 #include <wayland-egl.h>
32 #include <EGL/eglext.h>
39 #include <gdk/gdkkeys.h>
40 #include <gdk/gdkwindow.h>
41 #include <gdk/gdkinternals.h>
42 #include <gdk/gdk.h> /* For gdk_get_program_class() */
44 #include "gdkdisplayprivate.h"
48 typedef struct _GdkWaylandDisplay GdkWaylandDisplay;
49 typedef struct _GdkWaylandDisplayClass GdkWaylandDisplayClass;
51 #define GDK_TYPE_WAYLAND_DISPLAY (_gdk_wayland_display_get_type())
52 #define GDK_WAYLAND_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WAYLAND_DISPLAY, GdkWaylandDisplay))
53 #define GDK_WAYLAND_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WAYLAND_DISPLAY, GdkWaylandDisplayClass))
54 #define GDK_IS_WAYLAND_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_DISPLAY))
55 #define GDK_IS_WAYLAND_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WAYLAND_DISPLAY))
56 #define GDK_WAYLAND_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WAYLAND_DISPLAY, GdkWaylandDisplayClass))
58 struct _GdkWaylandDisplay
60 GdkDisplay parent_instance;
63 /* Keyboard related information */
66 /* input GdkDevice list */
69 /* Startup notification */
70 gchar *startup_notification_id;
72 /* Time of most recent user interaction. */
75 /* Wayland fields below */
76 struct wl_display *wl_display;
77 struct wl_compositor *compositor;
79 struct wl_shell *shell;
80 struct wl_output *output;
81 struct wl_input_device *input_device;
82 struct wl_data_device_manager *data_device_manager;
83 GSource *event_source;
85 #ifdef GDK_WAYLAND_USE_EGL
86 EGLDisplay egl_display;
87 EGLContext egl_context;
88 cairo_device_t *cairo_device;
93 #ifdef GDK_WAYLAND_USE_EGL
94 PFNGLEGLIMAGETARGETTEXTURE2DOESPROC image_target_texture_2d;
95 PFNEGLCREATEIMAGEKHRPROC create_image;
96 PFNEGLDESTROYIMAGEKHRPROC destroy_image;
100 struct _GdkWaylandDisplayClass
102 GdkDisplayClass parent_class;
105 GType _gdk_wayland_display_get_type (void);
109 #endif /* __GDK_WAYLAND_DISPLAY__ */