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_X11__
25 #define __GDK_DISPLAY_X11__
30 #include <gdk/gdkdisplay.h>
31 #include <gdk/gdkkeys.h>
32 #include <gdk/gdkwindow.h>
33 #include <gdk/gdk.h> /* For gdk_get_program_class() */
37 typedef struct _GdkDisplayX11 GdkDisplayX11;
38 typedef struct _GdkDisplayX11Class GdkDisplayX11Class;
40 #define GDK_TYPE_DISPLAY_X11 (_gdk_display_x11_get_type())
41 #define GDK_DISPLAY_X11(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY_X11, GdkDisplayX11))
42 #define GDK_DISPLAY_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY_X11, GdkDisplayX11Class))
43 #define GDK_IS_DISPLAY_X11(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DISPLAY_X11))
44 #define GDK_IS_DISPLAY_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY_X11))
45 #define GDK_DISPLAY_X11_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY_X11, GdkDisplayX11Class))
56 GdkDisplay parent_instance;
58 GdkScreen *default_screen;
61 GSource *event_source;
65 /* Keyboard related information */
70 /* Whether we were able to turn on detectable-autorepeat using
71 * XkbSetDetectableAutorepeat. If FALSE, we'll fall back
72 * to checking the next event with XPending(). */
73 gboolean have_xkb_autorepeat;
79 gboolean have_shm_pixmaps;
80 GdkTristate have_render;
81 GdkTristate have_render_with_trapezoids;
83 gint xfixes_event_base;
85 /* Information about current pointer and keyboard grabs held by this
86 * client. If gdk_pointer_xgrab_window or gdk_keyboard_xgrab_window
87 * window is NULL, then the other associated fields are ignored
89 GdkWindowObject *pointer_xgrab_window;
90 gulong pointer_xgrab_serial;
91 gboolean pointer_xgrab_owner_events;
93 GdkWindowObject *keyboard_xgrab_window;
94 gulong keyboard_xgrab_serial;
95 gboolean keyboard_xgrab_owner_events;
97 /* drag and drop information */
98 GdkDragContext *current_dest_drag;
100 /* data needed for MOTIF DnD */
102 Window motif_drag_window;
103 GdkWindow *motif_drag_gdk_window;
104 GList **motif_target_lists;
105 gint motif_n_target_lists;
107 /* Mapping to/from virtual atoms */
109 GHashTable *atom_from_virtual;
110 GHashTable *atom_to_virtual;
112 /* Session Management leader window see ICCCM */
113 Window leader_window;
114 GdkWindow *leader_gdk_window;
115 gboolean leader_window_title_set;
117 /* list of filters for client messages */
118 GList *client_filters;
120 /* List of functions to go from extension event => X window */
126 /* translation queue */
127 GQueue *translate_queue;
130 /* input GdkDevice list */
131 GList *input_devices;
133 /* input GdkWindow list */
134 GList *input_windows;
136 gint input_ignore_core;
137 /* information about network port and host for gxid daemon */
138 gchar *input_gxid_host;
139 gint input_gxid_port;
141 /* Startup notification */
142 gchar *startup_notification_id;
144 /* Time of most recent user interaction. */
147 /* Sets of atoms for DND */
148 guint base_dnd_atoms_precached : 1;
149 guint xdnd_atoms_precached : 1;
150 guint motif_atoms_precached : 1;
153 /* Alpha mask picture format */
154 XRenderPictFormat *mask_format;
157 struct _GdkDisplayX11Class
159 GdkDisplayClass parent_class;
162 GType _gdk_display_x11_get_type (void);
163 GdkScreen *_gdk_x11_display_screen_for_xrootwin (GdkDisplay *display,
168 #endif /* __GDK_DISPLAY_X11__ */