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 "gdkx11screen.h"
26#include <X11/X.h>
27#include <X11/Xlib.h>
28
29G_BEGIN_DECLS
30
31struct _GdkX11Screen
32{
33 GObject parent_instance;
34
35 GdkDisplay *display;
36 Display *xdisplay;
37 Screen *xscreen;
38 Window xroot_window;
39 int screen_num;
40
41 int surface_scale;
42 gboolean fixed_surface_scale;
43
44 /* Xft resources for the display, used for default values for
45 * the Xft/ XSETTINGS
46 */
47 int xft_hintstyle;
48 int xft_rgba;
49 int xft_dpi;
50
51 /* Window manager */
52 gint64 last_wmspec_check_time;
53 Window wmspec_check_window;
54 char *window_manager_name;
55
56 /* X Settings */
57 Window xsettings_manager_window;
58 Atom xsettings_selection_atom;
59 GHashTable *xsettings; /* string of GDK settings name => GValue */
60
61 /* TRUE if wmspec_check_window has changed since last
62 * fetch of _NET_SUPPORTED
63 */
64 guint need_refetch_net_supported : 1;
65 /* TRUE if wmspec_check_window has changed since last
66 * fetch of window manager name
67 */
68 guint need_refetch_wm_name : 1;
69 guint xft_init : 1; /* Whether we've initialized these values yet */
70 guint xft_antialias : 1;
71 guint xft_hinting : 1;
72
73 /* cache for window->translate vfunc */
74 GC subwindow_gcs[32];
75};
76
77struct _GdkX11ScreenClass
78{
79 GObjectClass parent_class;
80
81 void (* window_manager_changed) (GdkX11Screen *x11_screen);
82};
83
84GType _gdk_x11_screen_get_type (void);
85GdkX11Screen *_gdk_x11_screen_new (GdkDisplay *display,
86 int screen_number);
87
88void _gdk_x11_screen_window_manager_changed (GdkX11Screen *screen);
89void _gdk_x11_screen_size_changed (GdkX11Screen *screen,
90 const XEvent *event);
91void _gdk_x11_screen_get_edge_monitors (GdkX11Screen *screen,
92 int *top,
93 int *bottom,
94 int *left,
95 int *right);
96void _gdk_x11_screen_set_surface_scale (GdkX11Screen *x11_screen,
97 int scale);
98gboolean _gdk_x11_screen_get_monitor_work_area (GdkX11Screen *screen,
99 GdkMonitor *monitor,
100 GdkRectangle *area);
101void gdk_x11_screen_get_work_area (GdkX11Screen *screen,
102 GdkRectangle *area);
103gboolean gdk_x11_screen_get_setting (GdkX11Screen *screen,
104 const char *name,
105 GValue *value);
106gboolean
107_gdk_x11_screen_get_xft_setting (GdkX11Screen *screen,
108 const char *name,
109 GValue *value);
110
111G_END_DECLS
112
113#endif /* __GDK_X11_SCREEN__ */
114

source code of gtk/gdk/x11/gdkscreen-x11.h