2002-04-25 22:29:14 +00:00
|
|
|
/*
|
|
|
|
* gdkscreen-x11.h
|
2010-12-11 05:14:53 +00:00
|
|
|
*
|
|
|
|
* Copyright 2001 Sun Microsystems Inc.
|
2002-04-25 22:29:14 +00:00
|
|
|
*
|
|
|
|
* Erwann Chenede <erwann.chenede@sun.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
2012-02-27 13:01:10 +00:00
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2002-04-25 22:29:14 +00:00
|
|
|
*/
|
|
|
|
|
2010-12-21 01:32:13 +00:00
|
|
|
#ifndef __GDK_X11_SCREEN__
|
|
|
|
#define __GDK_X11_SCREEN__
|
2002-04-25 22:29:14 +00:00
|
|
|
|
2010-12-21 01:40:45 +00:00
|
|
|
#include "gdkx11screen.h"
|
2017-11-17 18:03:11 +00:00
|
|
|
#include "gdkvisual-x11.h"
|
2002-04-25 22:29:14 +00:00
|
|
|
#include <X11/X.h>
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
2017-11-17 15:18:20 +00:00
|
|
|
|
2010-12-21 01:32:13 +00:00
|
|
|
struct _GdkX11Screen
|
2002-04-25 22:29:14 +00:00
|
|
|
{
|
2017-11-17 15:37:52 +00:00
|
|
|
GObject parent_instance;
|
2011-04-12 14:38:38 +00:00
|
|
|
|
2002-04-25 22:29:14 +00:00
|
|
|
GdkDisplay *display;
|
|
|
|
Display *xdisplay;
|
|
|
|
Screen *xscreen;
|
|
|
|
Window xroot_window;
|
2020-07-24 13:54:49 +00:00
|
|
|
int screen_num;
|
2011-04-12 14:38:38 +00:00
|
|
|
|
2020-07-24 13:54:49 +00:00
|
|
|
int surface_scale;
|
2018-03-20 11:05:26 +00:00
|
|
|
gboolean fixed_surface_scale;
|
2013-06-20 09:40:07 +00:00
|
|
|
|
2011-04-12 14:38:38 +00:00
|
|
|
/* Xft resources for the display, used for default values for
|
|
|
|
* the Xft/ XSETTINGS
|
|
|
|
*/
|
2020-07-24 13:54:49 +00:00
|
|
|
int xft_hintstyle;
|
|
|
|
int xft_rgba;
|
|
|
|
int xft_dpi;
|
2002-09-25 19:16:46 +00:00
|
|
|
|
|
|
|
/* Window manager */
|
2020-07-31 14:54:41 +00:00
|
|
|
gint64 last_wmspec_check_time;
|
2002-04-25 22:29:14 +00:00
|
|
|
Window wmspec_check_window;
|
2002-09-25 19:16:46 +00:00
|
|
|
char *window_manager_name;
|
2011-04-12 14:38:38 +00:00
|
|
|
|
2013-02-19 13:31:03 +00:00
|
|
|
/* X Settings */
|
2017-08-22 19:08:14 +00:00
|
|
|
Window xsettings_manager_window;
|
2013-02-19 13:31:03 +00:00
|
|
|
Atom xsettings_selection_atom;
|
|
|
|
GHashTable *xsettings; /* string of GDK settings name => GValue */
|
|
|
|
|
2002-09-25 19:16:46 +00:00
|
|
|
/* TRUE if wmspec_check_window has changed since last
|
|
|
|
* fetch of _NET_SUPPORTED
|
|
|
|
*/
|
|
|
|
guint need_refetch_net_supported : 1;
|
|
|
|
/* TRUE if wmspec_check_window has changed since last
|
|
|
|
* fetch of window manager name
|
|
|
|
*/
|
|
|
|
guint need_refetch_wm_name : 1;
|
2020-05-28 08:00:03 +00:00
|
|
|
guint xft_init : 1; /* Whether we've initialized these values yet */
|
2011-04-12 14:38:38 +00:00
|
|
|
guint xft_antialias : 1;
|
|
|
|
guint xft_hinting : 1;
|
|
|
|
|
2002-04-25 22:29:14 +00:00
|
|
|
/* Visual Part */
|
2020-07-24 13:54:49 +00:00
|
|
|
int nvisuals;
|
2017-11-01 02:44:15 +00:00
|
|
|
GdkX11Visual **visuals;
|
|
|
|
GdkX11Visual *system_visual;
|
2020-07-24 13:54:49 +00:00
|
|
|
int available_depths[7];
|
2002-04-25 22:29:14 +00:00
|
|
|
GdkVisualType available_types[6];
|
2011-04-12 14:38:38 +00:00
|
|
|
gint16 navailable_depths;
|
|
|
|
gint16 navailable_types;
|
2017-11-01 02:44:15 +00:00
|
|
|
GdkX11Visual *rgba_visual;
|
2011-04-12 14:38:38 +00:00
|
|
|
|
2010-07-22 00:26:05 +00:00
|
|
|
/* cache for window->translate vfunc */
|
|
|
|
GC subwindow_gcs[32];
|
2002-04-25 22:29:14 +00:00
|
|
|
};
|
2011-04-12 14:38:38 +00:00
|
|
|
|
2010-12-21 01:32:13 +00:00
|
|
|
struct _GdkX11ScreenClass
|
2002-04-25 22:29:14 +00:00
|
|
|
{
|
2017-11-17 15:37:52 +00:00
|
|
|
GObjectClass parent_class;
|
2002-09-25 19:16:46 +00:00
|
|
|
|
2010-12-21 01:32:13 +00:00
|
|
|
void (* window_manager_changed) (GdkX11Screen *x11_screen);
|
2002-04-25 22:29:14 +00:00
|
|
|
};
|
|
|
|
|
2010-12-21 01:32:13 +00:00
|
|
|
GType _gdk_x11_screen_get_type (void);
|
2017-11-17 15:18:20 +00:00
|
|
|
GdkX11Screen *_gdk_x11_screen_new (GdkDisplay *display,
|
2020-07-24 13:54:49 +00:00
|
|
|
int screen_number,
|
2017-11-17 15:18:20 +00:00
|
|
|
gboolean setup_display);
|
|
|
|
|
|
|
|
void _gdk_x11_screen_window_manager_changed (GdkX11Screen *screen);
|
|
|
|
void _gdk_x11_screen_size_changed (GdkX11Screen *screen,
|
2017-12-12 23:39:32 +00:00
|
|
|
const XEvent *event);
|
2017-11-17 15:18:20 +00:00
|
|
|
void _gdk_x11_screen_get_edge_monitors (GdkX11Screen *screen,
|
2020-07-24 13:54:49 +00:00
|
|
|
int *top,
|
|
|
|
int *bottom,
|
|
|
|
int *left,
|
|
|
|
int *right);
|
2018-03-21 08:06:31 +00:00
|
|
|
void _gdk_x11_screen_set_surface_scale (GdkX11Screen *x11_screen,
|
2017-11-17 15:18:20 +00:00
|
|
|
int scale);
|
2020-01-12 22:38:12 +00:00
|
|
|
gboolean _gdk_x11_screen_get_monitor_work_area (GdkX11Screen *screen,
|
|
|
|
GdkMonitor *monitor,
|
|
|
|
GdkRectangle *area);
|
2017-11-17 15:18:20 +00:00
|
|
|
void gdk_x11_screen_get_work_area (GdkX11Screen *screen,
|
2016-04-03 04:12:39 +00:00
|
|
|
GdkRectangle *area);
|
2017-11-17 15:18:20 +00:00
|
|
|
gboolean gdk_x11_screen_get_setting (GdkX11Screen *screen,
|
|
|
|
const char *name,
|
|
|
|
GValue *value);
|
|
|
|
gboolean
|
|
|
|
_gdk_x11_screen_get_xft_setting (GdkX11Screen *screen,
|
2017-10-30 20:44:18 +00:00
|
|
|
const char *name,
|
|
|
|
GValue *value);
|
2002-09-25 19:16:46 +00:00
|
|
|
|
2017-11-17 15:18:20 +00:00
|
|
|
void _gdk_x11_screen_init_visuals (GdkX11Screen *screen,
|
|
|
|
gboolean setup_display);
|
|
|
|
|
2002-04-25 22:29:14 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
2010-12-21 01:32:13 +00:00
|
|
|
#endif /* __GDK_X11_SCREEN__ */
|