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
|
|
|
|
2007-12-13 18:27:05 +00:00
|
|
|
typedef struct _GdkX11Monitor GdkX11Monitor;
|
|
|
|
|
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;
|
2011-04-12 14:38:38 +00:00
|
|
|
gint screen_num;
|
|
|
|
|
2013-06-20 09:40:07 +00:00
|
|
|
gint window_scale;
|
2013-07-01 18:50:44 +00:00
|
|
|
gboolean fixed_window_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
|
|
|
|
*/
|
|
|
|
gint xft_hintstyle;
|
|
|
|
gint xft_rgba;
|
|
|
|
gint xft_dpi;
|
2002-09-25 19:16:46 +00:00
|
|
|
|
|
|
|
/* Window manager */
|
2009-01-04 04:50:36 +00:00
|
|
|
long 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;
|
2011-04-12 14:38:38 +00:00
|
|
|
guint xft_init : 1; /* Whether we've intialized these values yet */
|
|
|
|
guint xft_antialias : 1;
|
|
|
|
guint xft_hinting : 1;
|
|
|
|
|
2002-04-25 22:29:14 +00:00
|
|
|
/* Visual Part */
|
|
|
|
gint nvisuals;
|
2017-11-01 02:44:15 +00:00
|
|
|
GdkX11Visual **visuals;
|
|
|
|
GdkX11Visual *system_visual;
|
2002-04-25 22:29:14 +00:00
|
|
|
gint available_depths[7];
|
|
|
|
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,
|
|
|
|
gint screen_number,
|
|
|
|
gboolean setup_display);
|
|
|
|
|
|
|
|
void _gdk_x11_screen_update_visuals_for_gl (GdkX11Screen *screen);
|
|
|
|
void _gdk_x11_screen_window_manager_changed (GdkX11Screen *screen);
|
|
|
|
void _gdk_x11_screen_size_changed (GdkX11Screen *screen,
|
|
|
|
XEvent *event);
|
|
|
|
void _gdk_x11_screen_get_edge_monitors (GdkX11Screen *screen,
|
|
|
|
gint *top,
|
|
|
|
gint *bottom,
|
|
|
|
gint *left,
|
|
|
|
gint *right);
|
2013-06-27 20:45:40 +00:00
|
|
|
void _gdk_x11_screen_set_window_scale (GdkX11Screen *x11_screen,
|
2017-11-17 15:18:20 +00:00
|
|
|
int scale);
|
|
|
|
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__ */
|