]> Pileus Git - ~andy/gtk/blob - gdk/wayland/gdkdisplay-wayland.h
ebe67d648002c45fea9b9c407c30ccd7fd91faf7
[~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 *default_screen;
59   GdkScreen **screens;
60
61   gint grab_count;
62
63   /* Keyboard related information */
64   GdkKeymap *keymap;
65   guint     keymap_serial;
66
67   /* drag and drop information */
68   GdkDragContext *current_dest_drag;
69
70   /* input GdkDevice list */
71   GList *input_devices;
72
73   /* input GdkWindow list */
74   GList *input_windows;
75
76   /* Startup notification */
77   gchar *startup_notification_id;
78
79   /* Time of most recent user interaction. */
80   gulong user_time;
81
82   /* The offscreen window that has the pointer in it (if any) */
83   GdkWindow *active_offscreen_window;
84
85   /* Wayland fields below */
86   struct wl_display *wl_display;
87   struct wl_egl_display *native_display;
88   struct wl_compositor *compositor;
89   struct wl_shm *shm;
90   struct wl_shell *shell;
91   struct wl_output *output;
92   struct wl_input_device *input_device;
93   GSource *event_source;
94   EGLDisplay egl_display;
95   EGLContext egl_context;
96   cairo_device_t *cairo_device;
97
98   GdkCursor **cursors;
99
100   PFNGLEGLIMAGETARGETTEXTURE2DOESPROC image_target_texture_2d;
101   PFNEGLCREATEIMAGEKHRPROC create_image;
102   PFNEGLDESTROYIMAGEKHRPROC destroy_image;
103 };
104
105 struct _GdkDisplayWaylandClass
106 {
107   GdkDisplayClass parent_class;
108 };
109
110 GType      _gdk_display_wayland_get_type            (void);
111
112 G_END_DECLS
113
114 #endif                          /* __GDK_DISPLAY_WAYLAND__ */