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_SCREEN_X11_H__
25 #define __GDK_SCREEN_X11_H__
27 #include "gdkscreenprivate.h"
28 #include "gdkvisual.h"
29 #include "xsettings-client.h"
35 typedef struct _GdkScreenX11 GdkScreenX11;
36 typedef struct _GdkScreenX11Class GdkScreenX11Class;
38 #define GDK_TYPE_SCREEN_X11 (_gdk_screen_x11_get_type ())
39 #define GDK_SCREEN_X11(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_SCREEN_X11, GdkScreenX11))
40 #define GDK_SCREEN_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_SCREEN_X11, GdkScreenX11Class))
41 #define GDK_IS_SCREEN_X11(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_SCREEN_X11))
42 #define GDK_IS_SCREEN_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_SCREEN_X11))
43 #define GDK_SCREEN_X11_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_SCREEN_X11, GdkScreenX11Class))
45 typedef struct _GdkX11Monitor GdkX11Monitor;
49 GdkScreen parent_instance;
56 GdkWindow *root_window;
59 long last_wmspec_check_time;
60 Window wmspec_check_window;
61 char *window_manager_name;
62 /* TRUE if wmspec_check_window has changed since last
63 * fetch of _NET_SUPPORTED
65 guint need_refetch_net_supported : 1;
66 /* TRUE if wmspec_check_window has changed since last
67 * fetch of window manager name
69 guint need_refetch_wm_name : 1;
72 GdkVisual *system_visual;
75 gint available_depths[7];
76 gint navailable_depths;
77 GdkVisualType available_types[6];
78 gint navailable_types;
79 GHashTable *visual_hash;
80 GdkVisual *rgba_visual;
83 XSettingsClient *xsettings_client;
84 guint xsettings_in_init : 1;
86 /* Xinerama/RandR 1.2 */
88 GdkX11Monitor *monitors;
91 /* cache for window->translate vfunc */
94 /* Xft resources for the display, used for default values for
97 gboolean xft_init; /* Whether we've intialized these values yet */
98 gboolean xft_antialias;
104 GdkAtom cm_selection_atom;
105 gboolean is_composited;
108 struct _GdkScreenX11Class
110 GdkScreenClass parent_class;
112 void (* window_manager_changed) (GdkScreenX11 *screen_x11);
115 GType _gdk_screen_x11_get_type (void);
116 GdkScreen * _gdk_x11_screen_new (GdkDisplay *display,
119 void _gdk_x11_screen_setup (GdkScreen *screen);
120 void _gdk_x11_screen_window_manager_changed (GdkScreen *screen);
121 void _gdk_x11_screen_size_changed (GdkScreen *screen,
123 void _gdk_x11_screen_process_owner_change (GdkScreen *screen,
128 #endif /* __GDK_SCREEN_X11_H__ */