]> Pileus Git - ~andy/gtk/blob - gdk/wayland/gdkdisplay-wayland.h
db98824dcc24df765a7c788f897cbc866ec91efa
[~andy/gtk] / gdk / wayland / gdkdisplay-wayland.h
1 /*
2  * gdkdisplay-wayland.h
3  * 
4  * Copyright 2001 Sun Microsystems Inc. 
5  *
6  * Erwann Chenede <erwann.chenede@sun.com>
7  *
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.
12  *
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.
17  *
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.
22  */
23
24 #ifndef __GDK_DISPLAY_WAYLAND__
25 #define __GDK_DISPLAY_WAYLAND__
26
27 #include <stdint.h>
28 #include <wayland-client.h>
29 #include <wayland-egl.h>
30 #include <EGL/egl.h>
31 #include <EGL/eglext.h>
32 #include <GL/gl.h>
33 #include <GL/glext.h>
34 #include <cairo-gl.h>
35 #include <glib.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() */
40
41 #include "gdkdisplayprivate.h"
42
43 G_BEGIN_DECLS
44
45 typedef struct _GdkDisplayWayland GdkDisplayWayland;
46 typedef struct _GdkDisplayWaylandClass GdkDisplayWaylandClass;
47
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))
54
55 struct _GdkDisplayWayland
56 {
57   GdkDisplay parent_instance;
58   GdkScreen *screen;
59
60   /* Keyboard related information */
61   GdkKeymap *keymap;
62
63   /* input GdkDevice list */
64   GList *input_devices;
65
66   /* Startup notification */
67   gchar *startup_notification_id;
68
69   /* Time of most recent user interaction. */
70   gulong user_time;
71
72   /* Wayland fields below */
73   struct wl_display *wl_display;
74   struct wl_compositor *compositor;
75   struct wl_shm *shm;
76   struct wl_shell *shell;
77   struct wl_output *output;
78   struct wl_input_device *input_device;
79   struct wl_data_device_manager *data_device_manager;
80   GSource *event_source;
81   EGLDisplay egl_display;
82   EGLContext egl_context;
83   cairo_device_t *cairo_device;
84
85   GdkCursor **cursors;
86
87   PFNGLEGLIMAGETARGETTEXTURE2DOESPROC image_target_texture_2d;
88   PFNEGLCREATEIMAGEKHRPROC create_image;
89   PFNEGLDESTROYIMAGEKHRPROC destroy_image;
90 };
91
92 struct _GdkDisplayWaylandClass
93 {
94   GdkDisplayClass parent_class;
95 };
96
97 GType      _gdk_display_wayland_get_type            (void);
98
99 G_END_DECLS
100
101 #endif                          /* __GDK_DISPLAY_WAYLAND__ */