]> Pileus Git - ~andy/gtk/blob - gdk/x11/gdkscreen-x11.h
Delete unused private gdk_visual_lookup(), make gdk_colormap_lookup()
[~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, write to the
20  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23
24 #ifndef __GDK_SCREEN_X11_H__
25 #define __GDK_SCREEN_X11_H__
26
27 #include "gdkprivate-x11.h"
28 #include "xsettings-client.h"
29 #include <gdk/gdkscreen.h>
30 #include <gdk/gdkvisual.h>
31 #include <X11/X.h>
32 #include <X11/Xlib.h>
33
34 G_BEGIN_DECLS
35   
36 typedef struct _GdkScreenX11 GdkScreenX11;
37 typedef struct _GdkScreenX11Class GdkScreenX11Class;
38
39 #define GDK_TYPE_SCREEN_X11              (_gdk_screen_x11_get_type ())
40 #define GDK_SCREEN_X11(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_SCREEN_X11, GdkScreenX11))
41 #define GDK_SCREEN_X11_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_SCREEN_X11, GdkScreenX11Class))
42 #define GDK_IS_SCREEN_X11(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_SCREEN_X11))
43 #define GDK_IS_SCREEN_X11_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_SCREEN_X11))
44 #define GDK_SCREEN_X11_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_SCREEN_X11, GdkScreenX11Class))
45
46 struct _GdkScreenX11
47 {
48   GdkScreen parent_instance;
49   
50   GdkDisplay *display;
51   Display *xdisplay;
52   Screen *xscreen;
53   gint screen_num;
54   Window xroot_window;
55   GdkWindow *root_window;
56   Window wmspec_check_window;
57   
58   /* Visual Part */
59   GdkVisualPrivate *system_visual;
60   GdkVisualPrivate **visuals;
61   gint nvisuals;
62   gint available_depths[7];
63   gint navailable_depths;
64   GdkVisualType available_types[6];
65   gint navailable_types;
66   GHashTable *visual_hash;
67   GHashTable *colormap_hash;
68   
69   /* Colormap Part */
70   GdkColormap *default_colormap;
71   GdkColormap *system_colormap;
72   
73   /* X settings */
74   XSettingsClient *xsettings_client;
75   guint xsettings_in_init : 1;
76   
77   /* Xinerama */
78   gint     num_monitors;
79   GdkRectangle *monitors;
80 };
81   
82 struct _GdkScreenX11Class
83 {
84   GdkScreenClass parent_class;
85 };
86
87 GType       _gdk_screen_x11_get_type (void);
88 GdkScreen * _gdk_x11_screen_new      (GdkDisplay *display,
89                                       gint        screen_number);
90
91 G_END_DECLS
92
93 #endif /* __GDK_SCREEN_X11_H__ */