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, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #ifndef __GDK_DISPLAY_WAYLAND__
25 #define __GDK_DISPLAY_WAYLAND__
28 #include <wayland-client.h>
29 #include <wayland-egl.h>
31 #include <EGL/eglext.h>
36 #include <gdk/gdkkeys.h>
37 #include <gdk/gdkwindow.h>
38 #include <gdk/gdkinternals.h>
39 #include <gdk/gdk.h> /* For gdk_get_program_class() */
41 #include "gdkdisplayprivate.h"
45 typedef struct _GdkDisplayWayland GdkDisplayWayland;
46 typedef struct _GdkDisplayWaylandClass GdkDisplayWaylandClass;
48 #define GDK_TYPE_DISPLAY_WAYLAND (_gdk_display_wayland_get_type())
49 #define GDK_DISPLAY_WAYLAND(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY_WAYLAND, GdkDisplayWayland))
50 #define GDK_DISPLAY_WAYLAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY_WAYLAND, GdkDisplayWaylandClass))
51 #define GDK_IS_DISPLAY_WAYLAND(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DISPLAY_WAYLAND))
52 #define GDK_IS_DISPLAY_WAYLAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY_WAYLAND))
53 #define GDK_DISPLAY_WAYLAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY_WAYLAND, GdkDisplayWaylandClass))
55 struct _GdkDisplayWayland
57 GdkDisplay parent_instance;
60 /* Keyboard related information */
63 /* input GdkDevice list */
66 /* Startup notification */
67 gchar *startup_notification_id;
69 /* Time of most recent user interaction. */
72 /* Wayland fields below */
73 struct wl_display *wl_display;
74 struct wl_compositor *compositor;
76 struct wl_shell *shell;
77 struct wl_output *output;
78 struct wl_input_device *input_device;
79 GSource *event_source;
80 EGLDisplay egl_display;
81 EGLContext egl_context;
82 cairo_device_t *cairo_device;
86 PFNGLEGLIMAGETARGETTEXTURE2DOESPROC image_target_texture_2d;
87 PFNEGLCREATEIMAGEKHRPROC create_image;
88 PFNEGLDESTROYIMAGEKHRPROC destroy_image;
91 struct _GdkDisplayWaylandClass
93 GdkDisplayClass parent_class;
96 GType _gdk_display_wayland_get_type (void);
100 #endif /* __GDK_DISPLAY_WAYLAND__ */