]> Pileus Git - ~andy/gtk/blob - gdk/x11/gdkscreen-x11.h
Change FSF Address
[~andy/gtk] / gdk / x11 / gdkscreen-x11.h
1 /*
2  * gdkscreen-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, see <http://www.gnu.org/licenses/>.
20  */
21
22 #ifndef __GDK_X11_SCREEN__
23 #define __GDK_X11_SCREEN__
24
25 #include "gdkscreenprivate.h"
26 #include "gdkx11screen.h"
27 #include "gdkvisual.h"
28 #include "xsettings-client.h"
29 #include <X11/X.h>
30 #include <X11/Xlib.h>
31
32 G_BEGIN_DECLS
33   
34 typedef struct _GdkX11Monitor GdkX11Monitor;
35
36 struct _GdkX11Screen
37 {
38   GdkScreen parent_instance;
39
40   GdkDisplay *display;
41   Display *xdisplay;
42   Screen *xscreen;
43   Window xroot_window;
44   GdkWindow *root_window;
45   gint screen_num;
46   /* Xinerama/RandR 1.2 */
47   gint  n_monitors;
48   GdkX11Monitor *monitors;
49   gint primary_monitor;
50
51   /* Xft resources for the display, used for default values for
52    * the Xft/ XSETTINGS
53    */
54   gint xft_hintstyle;
55   gint xft_rgba;
56   gint xft_dpi;
57
58   /* Window manager */
59   GdkAtom cm_selection_atom;
60   long last_wmspec_check_time;
61   Window wmspec_check_window;
62   char *window_manager_name;
63
64   /* TRUE if wmspec_check_window has changed since last
65    * fetch of _NET_SUPPORTED
66    */
67   guint need_refetch_net_supported : 1;
68   /* TRUE if wmspec_check_window has changed since last
69    * fetch of window manager name
70    */
71   guint need_refetch_wm_name : 1;
72   guint xsettings_in_init : 1;
73   guint is_composited : 1;
74   guint xft_init : 1; /* Whether we've intialized these values yet */
75   guint xft_antialias : 1;
76   guint xft_hinting : 1;
77
78   /* Visual Part */
79   gint nvisuals;
80   GdkVisual **visuals;
81   GdkVisual *system_visual;
82   gint available_depths[7];
83   GdkVisualType available_types[6];
84   gint16 navailable_depths;
85   gint16 navailable_types;
86   GHashTable *visual_hash;
87   GdkVisual *rgba_visual;
88
89   /* X settings */
90   XSettingsClient *xsettings_client;
91
92   /* cache for window->translate vfunc */
93   GC subwindow_gcs[32];
94 };
95
96 struct _GdkX11ScreenClass
97 {
98   GdkScreenClass parent_class;
99
100   void (* window_manager_changed) (GdkX11Screen *x11_screen);
101 };
102
103 GType       _gdk_x11_screen_get_type (void);
104 GdkScreen * _gdk_x11_screen_new      (GdkDisplay *display,
105                                       gint        screen_number);
106
107 void _gdk_x11_screen_setup                  (GdkScreen *screen);
108 void _gdk_x11_screen_window_manager_changed (GdkScreen *screen);
109 void _gdk_x11_screen_size_changed           (GdkScreen *screen,
110                                              XEvent    *event);
111 void _gdk_x11_screen_process_owner_change   (GdkScreen *screen,
112                                              XEvent    *event);
113
114 G_END_DECLS
115
116 #endif /* __GDK_X11_SCREEN__ */