Ardour  9.0-pre0-582-g084a23a80d
gdkdisplay-x11.h
Go to the documentation of this file.
1 /*
2  * gdkdisplay-x11.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_X11__
25 #define __GDK_DISPLAY_X11__
26 
27 #include <X11/X.h>
28 #include <X11/Xlib.h>
29 #include <glib.h>
30 #include <gdk/gdkdisplay.h>
31 #include <gdk/gdkkeys.h>
32 #include <gdk/gdkwindow.h>
33 #include <gdk/gdkinternals.h>
34 #include <gdk/gdk.h> /* For gdk_get_program_class() */
35 
36 G_BEGIN_DECLS
37 
38 typedef struct _GdkDisplayX11 GdkDisplayX11;
39 typedef struct _GdkXInput2Fn GdkXInput2Fn;
41 
42 #define GDK_TYPE_DISPLAY_X11 (_gdk_display_x11_get_type())
43 #define GDK_DISPLAY_X11(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY_X11, GdkDisplayX11))
44 #define GDK_DISPLAY_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY_X11, GdkDisplayX11Class))
45 #define GDK_IS_DISPLAY_X11(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DISPLAY_X11))
46 #define GDK_IS_DISPLAY_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY_X11))
47 #define GDK_DISPLAY_X11_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY_X11, GdkDisplayX11Class))
48 
49 typedef enum
50 {
53  GDK_YES
55 
56 #ifdef HAVE_XINPUT2
57 #include <X11/extensions/XInput2.h>
58 
59 struct _GdkXInput2Fn
60 {
61  int (*XISelectEvents)(Display*, Window, XIEventMask*, int);
62  XIDeviceInfo* (*XIQueryDevice)(Display*, int, int*);
63  void (*XIFreeDeviceInfo)(XIDeviceInfo*);
64  void* libxi;
65 };
66 
67 #endif
68 
70 {
72  Display *xdisplay;
75 
76  GSource *event_source;
77 
78  gint grab_count;
79 
80  /* Keyboard related information */
81 
83  gboolean use_xkb;
84 
85  /* Whether we were able to turn on detectable-autorepeat using
86  * XkbSetDetectableAutorepeat. If FALSE, we'll fall back
87  * to checking the next event with XPending(). */
89 
92 
93  gboolean use_xshm;
94  gboolean have_shm_pixmaps;
96  gboolean have_xfixes;
98 
99  gboolean have_xcomposite;
100  gboolean have_xdamage;
102 
103  gboolean have_randr13;
104  gboolean have_randr15;
106 
107  /* If the SECURITY extension is in place, whether this client holds
108  * a trusted authorization and so is allowed to make various requests
109  * (grabs, properties etc.) Otherwise always TRUE. */
110  gboolean trusted_client;
111 
112  /* drag and drop information */
114 
115  /* data needed for MOTIF DnD */
116 
121 
122  /* Mapping to/from virtual atoms */
123 
124  GHashTable *atom_from_virtual;
125  GHashTable *atom_to_virtual;
126 
127  /* Session Management leader window see ICCCM */
131 
132  /* list of filters for client messages */
134 
135  /* List of functions to go from extension event => X window */
136  GSList *event_types;
137 
138  /* X ID hashtable */
139  GHashTable *xid_ht;
140 
141  /* translation queue */
143 
144  /* Input device */
145  /* input GdkDevice list */
147 
148  /* input GdkWindow list */
150 
151  /* Startup notification */
153 
154  /* Time of most recent user interaction. */
155  gulong user_time;
156 
157  /* Sets of atoms for DND */
161  guint use_sync : 1;
162 
163  guint have_shapes : 1;
164  guint have_input_shapes : 1;
166 
167  /* Alpha mask picture format */
168  XRenderPictFormat *mask_format;
169 
170  /* The offscreen window that has the pointer in it (if any) */
172 
173 #ifdef HAVE_XINPUT2
174  int xid_opcode;
175  GHashTable* touch_devices;
176  GdkXInput2Fn xi;
177 #endif
178 };
179 
181 {
183 };
184 
187  Window xrootwin);
188 
189 G_END_DECLS
190 
191 #endif /* __GDK_DISPLAY_X11__ */
Definition: Window.h:41
struct _GdkXInput2Fn GdkXInput2Fn
GdkScreen * _gdk_x11_display_screen_for_xrootwin(GdkDisplay *display, Window xrootwin)
GdkTristate
@ GDK_NO
@ GDK_YES
@ GDK_UNKNOWN
typedefG_BEGIN_DECLS struct _GdkDisplayX11 GdkDisplayX11
GType _gdk_display_x11_get_type(void)
typedefG_BEGIN_DECLS struct _GdkDisplayClass GdkDisplayClass
Definition: gdkdisplay.h:36
typedefG_BEGIN_DECLS struct _GdkDragContext GdkDragContext
Definition: gdkdnd.h:38
GdkDisplayClass parent_class
GdkTristate have_render
GQueue * translate_queue
GList * input_windows
GdkWindow * leader_gdk_window
gboolean have_randr13
gboolean trusted_client
guint xdnd_atoms_precached
XRenderPictFormat * mask_format
GdkWindow * active_offscreen_window
GList * input_devices
Display * xdisplay
GdkDragContext * current_dest_drag
GdkScreen * default_screen
GSList * event_types
Window motif_drag_window
gboolean have_shm_pixmaps
GdkWindow * motif_drag_gdk_window
GdkDisplay parent_instance
guint motif_atoms_precached
GdkKeymap * keymap
gboolean have_xdamage
GHashTable * atom_from_virtual
guint base_dnd_atoms_precached
GdkScreen ** screens
gboolean have_xkb_autorepeat
gboolean have_xfixes
gchar * startup_notification_id
gboolean have_randr15
gboolean use_xshm
GHashTable * xid_ht
gboolean leader_window_title_set
GList ** motif_target_lists
GSource * event_source
gboolean use_xkb
GHashTable * atom_to_virtual
gboolean have_xcomposite
GList * client_filters