[gtk+/gdk-backend] x11: Rename GdkScreenX11 to GdkX11Screen
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gdk-backend] x11: Rename GdkScreenX11 to GdkX11Screen
- Date: Tue, 21 Dec 2010 02:59:27 +0000 (UTC)
commit 885ae3e893eb5c73eb6ca700d40d8e9bc81ecd20
Author: Benjamin Otte <otte redhat com>
Date: Tue Dec 21 02:32:13 2010 +0100
x11: Rename GdkScreenX11 to GdkX11Screen
gdk/x11/gdkdisplay-x11.c | 24 +-
gdk/x11/gdkdnd-x11.c | 2 +-
gdk/x11/gdkgeometry-x11.c | 4 +-
gdk/x11/gdkprivate-x11.h | 32 ++--
gdk/x11/gdkscreen-x11.c | 518 ++++++++++++++++++++++----------------------
gdk/x11/gdkscreen-x11.h | 30 ++--
gdk/x11/gdktestutils-x11.c | 4 +-
gdk/x11/gdkvisual-x11.c | 128 ++++++------
gdk/x11/gdkwindow-x11.c | 56 +++---
gdk/x11/gdkxftdefaults.c | 40 ++--
10 files changed, 419 insertions(+), 419 deletions(-)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index fdd1038..cf0752a 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -381,7 +381,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
GdkWindow *window;
GdkWindowImplX11 *window_impl = NULL;
GdkScreen *screen = NULL;
- GdkScreenX11 *screen_x11 = NULL;
+ GdkX11Screen *x11_screen = NULL;
GdkToplevelX11 *toplevel = NULL;
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
gboolean return_val;
@@ -402,7 +402,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
return FALSE;
screen = GDK_WINDOW_SCREEN (window);
- screen_x11 = GDK_SCREEN_X11 (screen);
+ x11_screen = GDK_X11_SCREEN (screen);
toplevel = _gdk_x11_window_get_toplevel (window);
window_impl = GDK_WINDOW_IMPL_X11 (window->impl);
xwindow = GDK_WINDOW_XID (window);
@@ -430,14 +430,14 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
for (i = 0; i < n; i++)
{
screen = gdk_display_get_screen (display, i);
- screen_x11 = GDK_SCREEN_X11 (screen);
+ x11_screen = GDK_X11_SCREEN (screen);
- if (screen_x11->wmspec_check_window == xwindow)
+ if (x11_screen->wmspec_check_window == xwindow)
{
- screen_x11->wmspec_check_window = None;
- screen_x11->last_wmspec_check_time = 0;
- g_free (screen_x11->window_manager_name);
- screen_x11->window_manager_name = g_strdup ("unknown");
+ x11_screen->wmspec_check_window = None;
+ x11_screen->last_wmspec_check_time = 0;
+ g_free (x11_screen->window_manager_name);
+ x11_screen->window_manager_name = g_strdup ("unknown");
/* careful, reentrancy */
_gdk_x11_screen_window_manager_changed (screen);
@@ -592,7 +592,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
return_val = window && !GDK_WINDOW_DESTROYED (window);
- if (window && GDK_WINDOW_XID (window) != screen_x11->xroot_window)
+ if (window && GDK_WINDOW_XID (window) != x11_screen->xroot_window)
gdk_window_destroy_notify (window);
}
else
@@ -713,7 +713,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
gdk_x11_display_error_trap_push (display);
if (XTranslateCoordinates (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
- screen_x11->xroot_window,
+ x11_screen->xroot_window,
0, 0,
&tx, &ty,
&child_window))
@@ -1273,7 +1273,7 @@ _gdk_x11_display_open (const gchar *display_name)
attr.height = 10;
attr.event_mask = 0;
- display_x11->leader_gdk_window = gdk_window_new (GDK_SCREEN_X11 (display_x11->default_screen)->root_window,
+ display_x11->leader_gdk_window = gdk_window_new (GDK_X11_SCREEN (display_x11->default_screen)->root_window,
&attr, GDK_WA_X | GDK_WA_Y);
(_gdk_x11_window_get_toplevel (display_x11->leader_gdk_window))->is_leader = TRUE;
@@ -1349,7 +1349,7 @@ _gdk_x11_display_open (const gchar *display_name)
gdk_x11_display_error_trap_push (display);
XQueryPointer (display_x11->xdisplay,
- GDK_SCREEN_X11 (display_x11->default_screen)->xroot_window,
+ GDK_X11_SCREEN (display_x11->default_screen)->xroot_window,
&root, &child, &rootx, &rooty, &winx, &winy, &xmask);
if (G_UNLIKELY (gdk_x11_display_error_trap_pop (display) == BadWindow))
{
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 168c82c..d8e6eff 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -505,7 +505,7 @@ gdk_window_cache_new (GdkScreen *screen)
XGetWindowAttributes (xdisplay, GDK_WINDOW_XID (root_window), &xwa);
result->old_event_mask = xwa.your_event_mask;
- if (G_UNLIKELY (!GDK_X11_DISPLAY (GDK_SCREEN_X11 (screen)->display)->trusted_client))
+ if (G_UNLIKELY (!GDK_X11_DISPLAY (GDK_X11_SCREEN (screen)->display)->trusted_client))
{
GList *toplevel_windows, *list;
GdkWindow *window;
diff --git a/gdk/x11/gdkgeometry-x11.c b/gdk/x11/gdkgeometry-x11.c
index 8bbf123..6745e3d 100644
--- a/gdk/x11/gdkgeometry-x11.c
+++ b/gdk/x11/gdkgeometry-x11.c
@@ -224,12 +224,12 @@ gdk_window_queue (GdkWindow *window,
static GC
_get_scratch_gc (GdkWindow *window, cairo_region_t *clip_region)
{
- GdkScreenX11 *screen;
+ GdkX11Screen *screen;
XRectangle *rectangles;
gint n_rects;
gint depth;
- screen = GDK_SCREEN_X11 (gdk_window_get_screen (window));
+ screen = GDK_X11_SCREEN (gdk_window_get_screen (window));
depth = gdk_visual_get_depth (gdk_window_get_visual (window)) - 1;
if (!screen->subwindow_gcs[depth])
diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h
index da2a3c1..08d9cd8 100644
--- a/gdk/x11/gdkprivate-x11.h
+++ b/gdk/x11/gdkprivate-x11.h
@@ -45,24 +45,24 @@ void _gdk_x11_error_handler_pop (void);
Colormap _gdk_visual_get_x11_colormap (GdkVisual *visual);
-gint _gdk_screen_x11_visual_get_best_depth (GdkScreen *screen);
-GdkVisualType _gdk_screen_x11_visual_get_best_type (GdkScreen *screen);
-GdkVisual * _gdk_screen_x11_get_system_visual (GdkScreen *screen);
-GdkVisual* _gdk_screen_x11_visual_get_best (GdkScreen *screen);
-GdkVisual* _gdk_screen_x11_visual_get_best_with_depth (GdkScreen *screen,
+gint _gdk_x11_screen_visual_get_best_depth (GdkScreen *screen);
+GdkVisualType _gdk_x11_screen_visual_get_best_type (GdkScreen *screen);
+GdkVisual * _gdk_x11_screen_get_system_visual (GdkScreen *screen);
+GdkVisual* _gdk_x11_screen_visual_get_best (GdkScreen *screen);
+GdkVisual* _gdk_x11_screen_visual_get_best_with_depth (GdkScreen *screen,
gint depth);
-GdkVisual* _gdk_screen_x11_visual_get_best_with_type (GdkScreen *screen,
+GdkVisual* _gdk_x11_screen_visual_get_best_with_type (GdkScreen *screen,
GdkVisualType visual_type);
-GdkVisual* _gdk_screen_x11_visual_get_best_with_both (GdkScreen *screen,
+GdkVisual* _gdk_x11_screen_visual_get_best_with_both (GdkScreen *screen,
gint depth,
GdkVisualType visual_type);
-void _gdk_screen_x11_query_depths (GdkScreen *screen,
+void _gdk_x11_screen_query_depths (GdkScreen *screen,
gint **depths,
gint *count);
-void _gdk_screen_x11_query_visual_types (GdkScreen *screen,
+void _gdk_x11_screen_query_visual_types (GdkScreen *screen,
GdkVisualType **visual_types,
gint *count);
-GList * _gdk_screen_x11_list_visuals (GdkScreen *screen);
+GList * _gdk_x11_screen_list_visuals (GdkScreen *screen);
@@ -288,11 +288,11 @@ cairo_surface_t * _gdk_x11_window_create_bitmap_surface (GdkWindow *window,
extern const gint _gdk_x11_event_mask_table[];
extern const gint _gdk_x11_event_mask_table_size;
-#define GDK_SCREEN_DISPLAY(screen) (GDK_SCREEN_X11 (screen)->display)
-#define GDK_SCREEN_XROOTWIN(screen) (GDK_SCREEN_X11 (screen)->xroot_window)
+#define GDK_SCREEN_DISPLAY(screen) (GDK_X11_SCREEN (screen)->display)
+#define GDK_SCREEN_XROOTWIN(screen) (GDK_X11_SCREEN (screen)->xroot_window)
#define GDK_WINDOW_SCREEN(win) (gdk_window_get_screen (win))
-#define GDK_WINDOW_DISPLAY(win) (GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (win))->display)
-#define GDK_WINDOW_XROOTWIN(win) (GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (win))->xroot_window)
+#define GDK_WINDOW_DISPLAY(win) (GDK_X11_SCREEN (GDK_WINDOW_SCREEN (win))->display)
+#define GDK_WINDOW_XROOTWIN(win) (GDK_X11_SCREEN (GDK_WINDOW_SCREEN (win))->xroot_window)
#define GDK_GC_DISPLAY(gc) (GDK_SCREEN_DISPLAY (GDK_GC_X11(gc)->screen))
#define GDK_WINDOW_IS_X11(win) (GDK_IS_WINDOW_IMPL_X11 ((win)->impl))
@@ -303,8 +303,8 @@ extern const gint _gdk_x11_event_mask_table_size;
#undef GDK_SCREEN_XDISPLAY
#define GDK_DISPLAY_XDISPLAY(display) (GDK_X11_DISPLAY(display)->xdisplay)
-#define GDK_WINDOW_XDISPLAY(win) (GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (win))->xdisplay)
+#define GDK_WINDOW_XDISPLAY(win) (GDK_X11_SCREEN (GDK_WINDOW_SCREEN (win))->xdisplay)
#define GDK_WINDOW_XID(win) (GDK_WINDOW_IMPL_X11(GDK_WINDOW (win)->impl)->xid)
-#define GDK_SCREEN_XDISPLAY(screen) (GDK_SCREEN_X11 (screen)->xdisplay)
+#define GDK_SCREEN_XDISPLAY(screen) (GDK_X11_SCREEN (screen)->xdisplay)
#endif /* __GDK_PRIVATE_X11_H__ */
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index b086ee9..c6f54ca 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -51,8 +51,8 @@
#include "gdksettings.c"
-static void gdk_screen_x11_dispose (GObject *object);
-static void gdk_screen_x11_finalize (GObject *object);
+static void gdk_x11_screen_dispose (GObject *object);
+static void gdk_x11_screen_finalize (GObject *object);
static void init_randr_support (GdkScreen *screen);
static void deinit_multihead (GdkScreen *screen);
@@ -64,7 +64,7 @@ enum
static guint signals[LAST_SIGNAL] = { 0 };
-G_DEFINE_TYPE (GdkScreenX11, _gdk_screen_x11, GDK_TYPE_SCREEN)
+G_DEFINE_TYPE (GdkX11Screen, _gdk_x11_screen, GDK_TYPE_SCREEN)
typedef struct _NetWmSupportedAtoms NetWmSupportedAtoms;
@@ -86,182 +86,182 @@ struct _GdkX11Monitor
static void
-_gdk_screen_x11_init (GdkScreenX11 *screen)
+_gdk_x11_screen_init (GdkX11Screen *screen)
{
}
static GdkDisplay *
-gdk_screen_x11_get_display (GdkScreen *screen)
+gdk_x11_screen_get_display (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
- return GDK_SCREEN_X11 (screen)->display;
+ return GDK_X11_SCREEN (screen)->display;
}
static gint
-gdk_screen_x11_get_width (GdkScreen *screen)
+gdk_x11_screen_get_width (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
- return WidthOfScreen (GDK_SCREEN_X11 (screen)->xscreen);
+ return WidthOfScreen (GDK_X11_SCREEN (screen)->xscreen);
}
static gint
-gdk_screen_x11_get_height (GdkScreen *screen)
+gdk_x11_screen_get_height (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
- return HeightOfScreen (GDK_SCREEN_X11 (screen)->xscreen);
+ return HeightOfScreen (GDK_X11_SCREEN (screen)->xscreen);
}
static gint
-gdk_screen_x11_get_width_mm (GdkScreen *screen)
+gdk_x11_screen_get_width_mm (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
- return WidthMMOfScreen (GDK_SCREEN_X11 (screen)->xscreen);
+ return WidthMMOfScreen (GDK_X11_SCREEN (screen)->xscreen);
}
static gint
-gdk_screen_x11_get_height_mm (GdkScreen *screen)
+gdk_x11_screen_get_height_mm (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
- return HeightMMOfScreen (GDK_SCREEN_X11 (screen)->xscreen);
+ return HeightMMOfScreen (GDK_X11_SCREEN (screen)->xscreen);
}
static gint
-gdk_screen_x11_get_number (GdkScreen *screen)
+gdk_x11_screen_get_number (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
- return GDK_SCREEN_X11 (screen)->screen_num;
+ return GDK_X11_SCREEN (screen)->screen_num;
}
static GdkWindow *
-gdk_screen_x11_get_root_window (GdkScreen *screen)
+gdk_x11_screen_get_root_window (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
- return GDK_SCREEN_X11 (screen)->root_window;
+ return GDK_X11_SCREEN (screen)->root_window;
}
static void
-_gdk_screen_x11_events_uninit (GdkScreen *screen)
+_gdk_x11_screen_events_uninit (GdkScreen *screen)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
- if (screen_x11->xsettings_client)
+ if (x11_screen->xsettings_client)
{
- xsettings_client_destroy (screen_x11->xsettings_client);
- screen_x11->xsettings_client = NULL;
+ xsettings_client_destroy (x11_screen->xsettings_client);
+ x11_screen->xsettings_client = NULL;
}
}
static void
-gdk_screen_x11_dispose (GObject *object)
+gdk_x11_screen_dispose (GObject *object)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (object);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (object);
int i;
for (i = 0; i < 32; ++i)
{
- if (screen_x11->subwindow_gcs[i])
+ if (x11_screen->subwindow_gcs[i])
{
- XFreeGC (screen_x11->xdisplay, screen_x11->subwindow_gcs[i]);
- screen_x11->subwindow_gcs[i] = 0;
+ XFreeGC (x11_screen->xdisplay, x11_screen->subwindow_gcs[i]);
+ x11_screen->subwindow_gcs[i] = 0;
}
}
- _gdk_screen_x11_events_uninit (GDK_SCREEN (object));
+ _gdk_x11_screen_events_uninit (GDK_SCREEN (object));
- if (screen_x11->root_window)
- _gdk_window_destroy (screen_x11->root_window, TRUE);
+ if (x11_screen->root_window)
+ _gdk_window_destroy (x11_screen->root_window, TRUE);
- G_OBJECT_CLASS (_gdk_screen_x11_parent_class)->dispose (object);
+ G_OBJECT_CLASS (_gdk_x11_screen_parent_class)->dispose (object);
- screen_x11->xdisplay = NULL;
- screen_x11->xscreen = NULL;
- screen_x11->screen_num = -1;
- screen_x11->xroot_window = None;
- screen_x11->wmspec_check_window = None;
+ x11_screen->xdisplay = NULL;
+ x11_screen->xscreen = NULL;
+ x11_screen->screen_num = -1;
+ x11_screen->xroot_window = None;
+ x11_screen->wmspec_check_window = None;
}
static void
-gdk_screen_x11_finalize (GObject *object)
+gdk_x11_screen_finalize (GObject *object)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (object);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (object);
gint i;
- if (screen_x11->root_window)
- g_object_unref (screen_x11->root_window);
+ if (x11_screen->root_window)
+ g_object_unref (x11_screen->root_window);
/* Visual Part */
- for (i = 0; i < screen_x11->nvisuals; i++)
- g_object_unref (screen_x11->visuals[i]);
- g_free (screen_x11->visuals);
- g_hash_table_destroy (screen_x11->visual_hash);
+ for (i = 0; i < x11_screen->nvisuals; i++)
+ g_object_unref (x11_screen->visuals[i]);
+ g_free (x11_screen->visuals);
+ g_hash_table_destroy (x11_screen->visual_hash);
- g_free (screen_x11->window_manager_name);
+ g_free (x11_screen->window_manager_name);
deinit_multihead (GDK_SCREEN (object));
- G_OBJECT_CLASS (_gdk_screen_x11_parent_class)->finalize (object);
+ G_OBJECT_CLASS (_gdk_x11_screen_parent_class)->finalize (object);
}
static gint
-gdk_screen_x11_get_n_monitors (GdkScreen *screen)
+gdk_x11_screen_get_n_monitors (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
- return GDK_SCREEN_X11 (screen)->n_monitors;
+ return GDK_X11_SCREEN (screen)->n_monitors;
}
static gint
-gdk_screen_x11_get_primary_monitor (GdkScreen *screen)
+gdk_x11_screen_get_primary_monitor (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
- return GDK_SCREEN_X11 (screen)->primary_monitor;
+ return GDK_X11_SCREEN (screen)->primary_monitor;
}
static gint
-gdk_screen_x11_get_monitor_width_mm (GdkScreen *screen,
+gdk_x11_screen_get_monitor_width_mm (GdkScreen *screen,
gint monitor_num)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
g_return_val_if_fail (GDK_IS_SCREEN (screen), -1);
g_return_val_if_fail (monitor_num >= 0, -1);
- g_return_val_if_fail (monitor_num < screen_x11->n_monitors, -1);
+ g_return_val_if_fail (monitor_num < x11_screen->n_monitors, -1);
- return screen_x11->monitors[monitor_num].width_mm;
+ return x11_screen->monitors[monitor_num].width_mm;
}
static gint
-gdk_screen_x11_get_monitor_height_mm (GdkScreen *screen,
+gdk_x11_screen_get_monitor_height_mm (GdkScreen *screen,
gint monitor_num)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
g_return_val_if_fail (GDK_IS_SCREEN (screen), -1);
g_return_val_if_fail (monitor_num >= 0, -1);
- g_return_val_if_fail (monitor_num < screen_x11->n_monitors, -1);
+ g_return_val_if_fail (monitor_num < x11_screen->n_monitors, -1);
- return screen_x11->monitors[monitor_num].height_mm;
+ return x11_screen->monitors[monitor_num].height_mm;
}
static gchar *
-gdk_screen_x11_get_monitor_plug_name (GdkScreen *screen,
+gdk_x11_screen_get_monitor_plug_name (GdkScreen *screen,
gint monitor_num)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
g_return_val_if_fail (monitor_num >= 0, NULL);
- g_return_val_if_fail (monitor_num < screen_x11->n_monitors, NULL);
+ g_return_val_if_fail (monitor_num < x11_screen->n_monitors, NULL);
- return g_strdup (screen_x11->monitors[monitor_num].output_name);
+ return g_strdup (x11_screen->monitors[monitor_num].output_name);
}
/**
@@ -281,40 +281,40 @@ XID
gdk_x11_screen_get_monitor_output (GdkScreen *screen,
gint monitor_num)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
g_return_val_if_fail (GDK_IS_SCREEN (screen), None);
g_return_val_if_fail (monitor_num >= 0, None);
- g_return_val_if_fail (monitor_num < screen_x11->n_monitors, None);
+ g_return_val_if_fail (monitor_num < x11_screen->n_monitors, None);
- return screen_x11->monitors[monitor_num].output;
+ return x11_screen->monitors[monitor_num].output;
}
static void
-gdk_screen_x11_get_monitor_geometry (GdkScreen *screen,
+gdk_x11_screen_get_monitor_geometry (GdkScreen *screen,
gint monitor_num,
GdkRectangle *dest)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
g_return_if_fail (GDK_IS_SCREEN (screen));
g_return_if_fail (monitor_num >= 0);
- g_return_if_fail (monitor_num < screen_x11->n_monitors);
+ g_return_if_fail (monitor_num < x11_screen->n_monitors);
if (dest)
- *dest = screen_x11->monitors[monitor_num].geometry;
+ *dest = x11_screen->monitors[monitor_num].geometry;
}
static GdkVisual *
-gdk_screen_x11_get_rgba_visual (GdkScreen *screen)
+gdk_x11_screen_get_rgba_visual (GdkScreen *screen)
{
- GdkScreenX11 *screen_x11;
+ GdkX11Screen *x11_screen;
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
- screen_x11 = GDK_SCREEN_X11 (screen);
+ x11_screen = GDK_X11_SCREEN (screen);
- return screen_x11->rgba_visual;
+ return x11_screen->rgba_visual;
}
/**
@@ -329,7 +329,7 @@ gdk_screen_x11_get_rgba_visual (GdkScreen *screen)
Screen *
gdk_x11_screen_get_xscreen (GdkScreen *screen)
{
- return GDK_SCREEN_X11 (screen)->xscreen;
+ return GDK_X11_SCREEN (screen)->xscreen;
}
/**
@@ -345,14 +345,14 @@ gdk_x11_screen_get_xscreen (GdkScreen *screen)
int
gdk_x11_screen_get_screen_number (GdkScreen *screen)
{
- return GDK_SCREEN_X11 (screen)->screen_num;
+ return GDK_X11_SCREEN (screen)->screen_num;
}
static gboolean
check_is_composited (GdkDisplay *display,
- GdkScreenX11 *screen_x11)
+ GdkX11Screen *x11_screen)
{
- Atom xselection = gdk_x11_atom_to_xatom_for_display (display, screen_x11->cm_selection_atom);
+ Atom xselection = gdk_x11_atom_to_xatom_for_display (display, x11_screen->cm_selection_atom);
Window xwindow;
xwindow = XGetSelectionOwner (GDK_DISPLAY_XDISPLAY (display), xselection);
@@ -389,7 +389,7 @@ static gboolean
init_fake_xinerama (GdkScreen *screen)
{
#ifdef G_ENABLE_DEBUG
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
XSetWindowAttributes atts;
Window win;
gint w, h;
@@ -400,36 +400,36 @@ init_fake_xinerama (GdkScreen *screen)
/* Fake Xinerama mode by splitting the screen into 4 monitors.
* Also draw a little cross to make the monitor boundaries visible.
*/
- w = WidthOfScreen (screen_x11->xscreen);
- h = HeightOfScreen (screen_x11->xscreen);
-
- screen_x11->n_monitors = 4;
- screen_x11->monitors = g_new0 (GdkX11Monitor, 4);
- init_monitor_geometry (&screen_x11->monitors[0], 0, 0, w / 2, h / 2);
- init_monitor_geometry (&screen_x11->monitors[1], w / 2, 0, w / 2, h / 2);
- init_monitor_geometry (&screen_x11->monitors[2], 0, h / 2, w / 2, h / 2);
- init_monitor_geometry (&screen_x11->monitors[3], w / 2, h / 2, w / 2, h / 2);
+ w = WidthOfScreen (x11_screen->xscreen);
+ h = HeightOfScreen (x11_screen->xscreen);
+
+ x11_screen->n_monitors = 4;
+ x11_screen->monitors = g_new0 (GdkX11Monitor, 4);
+ init_monitor_geometry (&x11_screen->monitors[0], 0, 0, w / 2, h / 2);
+ init_monitor_geometry (&x11_screen->monitors[1], w / 2, 0, w / 2, h / 2);
+ init_monitor_geometry (&x11_screen->monitors[2], 0, h / 2, w / 2, h / 2);
+ init_monitor_geometry (&x11_screen->monitors[3], w / 2, h / 2, w / 2, h / 2);
atts.override_redirect = 1;
atts.background_pixel = WhitePixel(GDK_SCREEN_XDISPLAY (screen),
- screen_x11->screen_num);
+ x11_screen->screen_num);
win = XCreateWindow(GDK_SCREEN_XDISPLAY (screen),
- screen_x11->xroot_window, 0, h / 2, w, 1, 0,
+ x11_screen->xroot_window, 0, h / 2, w, 1, 0,
DefaultDepth(GDK_SCREEN_XDISPLAY (screen),
- screen_x11->screen_num),
+ x11_screen->screen_num),
InputOutput,
DefaultVisual(GDK_SCREEN_XDISPLAY (screen),
- screen_x11->screen_num),
+ x11_screen->screen_num),
CWOverrideRedirect|CWBackPixel,
&atts);
XMapRaised(GDK_SCREEN_XDISPLAY (screen), win);
win = XCreateWindow(GDK_SCREEN_XDISPLAY (screen),
- screen_x11->xroot_window, w/2 , 0, 1, h, 0,
+ x11_screen->xroot_window, w/2 , 0, 1, h, 0,
DefaultDepth(GDK_SCREEN_XDISPLAY (screen),
- screen_x11->screen_num),
+ x11_screen->screen_num),
InputOutput,
DefaultVisual(GDK_SCREEN_XDISPLAY (screen),
- screen_x11->screen_num),
+ x11_screen->screen_num),
CWOverrideRedirect|CWBackPixel,
&atts);
XMapRaised(GDK_SCREEN_XDISPLAY (screen), win);
@@ -487,7 +487,7 @@ init_randr13 (GdkScreen *screen)
#ifdef HAVE_RANDR
GdkDisplay *display = gdk_screen_get_display (screen);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
Display *dpy = GDK_SCREEN_XDISPLAY (screen);
XRRScreenResources *resources;
RROutput primary_output;
@@ -499,8 +499,8 @@ init_randr13 (GdkScreen *screen)
if (!display_x11->have_randr13)
return FALSE;
- resources = XRRGetScreenResourcesCurrent (screen_x11->xdisplay,
- screen_x11->xroot_window);
+ resources = XRRGetScreenResourcesCurrent (x11_screen->xdisplay,
+ x11_screen->xroot_window);
if (!resources)
return FALSE;
@@ -564,36 +564,36 @@ init_randr13 (GdkScreen *screen)
g_array_sort (monitors,
(GCompareFunc) monitor_compare_function);
- screen_x11->n_monitors = monitors->len;
- screen_x11->monitors = (GdkX11Monitor *)g_array_free (monitors, FALSE);
+ x11_screen->n_monitors = monitors->len;
+ x11_screen->monitors = (GdkX11Monitor *)g_array_free (monitors, FALSE);
- screen_x11->primary_monitor = 0;
+ x11_screen->primary_monitor = 0;
- primary_output = XRRGetOutputPrimary (screen_x11->xdisplay,
- screen_x11->xroot_window);
+ primary_output = XRRGetOutputPrimary (x11_screen->xdisplay,
+ x11_screen->xroot_window);
- for (i = 0; i < screen_x11->n_monitors; ++i)
+ for (i = 0; i < x11_screen->n_monitors; ++i)
{
- if (screen_x11->monitors[i].output == primary_output)
+ if (x11_screen->monitors[i].output == primary_output)
{
- screen_x11->primary_monitor = i;
+ x11_screen->primary_monitor = i;
break;
}
/* No RandR1.3+ available or no primary set, fall back to prefer LVDS as primary if present */
if (primary_output == None &&
- g_ascii_strncasecmp (screen_x11->monitors[i].output_name, "LVDS", 4) == 0)
+ g_ascii_strncasecmp (x11_screen->monitors[i].output_name, "LVDS", 4) == 0)
{
- screen_x11->primary_monitor = i;
+ x11_screen->primary_monitor = i;
break;
}
/* No primary specified and no LVDS found */
- if (screen_x11->monitors[i].output == first_output)
- screen_x11->primary_monitor = i;
+ if (x11_screen->monitors[i].output == first_output)
+ x11_screen->primary_monitor = i;
}
- return screen_x11->n_monitors > 0;
+ return x11_screen->n_monitors > 0;
#endif
return FALSE;
@@ -605,7 +605,7 @@ init_solaris_xinerama (GdkScreen *screen)
#ifdef HAVE_SOLARIS_XINERAMA
Display *dpy = GDK_SCREEN_XDISPLAY (screen);
int screen_no = gdk_screen_get_number (screen);
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
XRectangle monitors[MAXFRAMEBUFFERS];
unsigned char hints[16];
gint result;
@@ -625,17 +625,17 @@ init_solaris_xinerama (GdkScreen *screen)
return FALSE;
}
- screen_x11->monitors = g_new0 (GdkX11Monitor, n_monitors);
- screen_x11->n_monitors = n_monitors;
+ x11_screen->monitors = g_new0 (GdkX11Monitor, n_monitors);
+ x11_screen->n_monitors = n_monitors;
for (i = 0; i < n_monitors; i++)
{
- init_monitor_geometry (&screen_x11->monitors[i],
+ init_monitor_geometry (&x11_screen->monitors[i],
monitors[i].x, monitors[i].y,
monitors[i].width, monitors[i].height);
}
- screen_x11->primary_monitor = 0;
+ x11_screen->primary_monitor = 0;
return TRUE;
#endif /* HAVE_SOLARIS_XINERAMA */
@@ -648,7 +648,7 @@ init_xfree_xinerama (GdkScreen *screen)
{
#ifdef HAVE_XFREE_XINERAMA
Display *dpy = GDK_SCREEN_XDISPLAY (screen);
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
XineramaScreenInfo *monitors;
int i, n_monitors;
@@ -671,19 +671,19 @@ init_xfree_xinerama (GdkScreen *screen)
return FALSE;
}
- screen_x11->n_monitors = n_monitors;
- screen_x11->monitors = g_new0 (GdkX11Monitor, n_monitors);
+ x11_screen->n_monitors = n_monitors;
+ x11_screen->monitors = g_new0 (GdkX11Monitor, n_monitors);
for (i = 0; i < n_monitors; ++i)
{
- init_monitor_geometry (&screen_x11->monitors[i],
+ init_monitor_geometry (&x11_screen->monitors[i],
monitors[i].x_org, monitors[i].y_org,
monitors[i].width, monitors[i].height);
}
XFree (monitors);
- screen_x11->primary_monitor = 0;
+ x11_screen->primary_monitor = 0;
return TRUE;
#endif /* HAVE_XFREE_XINERAMA */
@@ -694,12 +694,12 @@ init_xfree_xinerama (GdkScreen *screen)
static void
deinit_multihead (GdkScreen *screen)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
- free_monitors (screen_x11->monitors, screen_x11->n_monitors);
+ free_monitors (x11_screen->monitors, x11_screen->n_monitors);
- screen_x11->n_monitors = 0;
- screen_x11->monitors = NULL;
+ x11_screen->n_monitors = 0;
+ x11_screen->monitors = NULL;
}
static gboolean
@@ -746,7 +746,7 @@ compare_monitors (GdkX11Monitor *monitors1, gint n_monitors1,
static void
init_multihead (GdkScreen *screen)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
int opcode, firstevent, firsterror;
/* There are four different implementations of multihead support:
@@ -775,13 +775,13 @@ init_multihead (GdkScreen *screen)
}
/* No multihead support of any kind for this screen */
- screen_x11->n_monitors = 1;
- screen_x11->monitors = g_new0 (GdkX11Monitor, 1);
- screen_x11->primary_monitor = 0;
+ x11_screen->n_monitors = 1;
+ x11_screen->monitors = g_new0 (GdkX11Monitor, 1);
+ x11_screen->primary_monitor = 0;
- init_monitor_geometry (screen_x11->monitors, 0, 0,
- WidthOfScreen (screen_x11->xscreen),
- HeightOfScreen (screen_x11->xscreen));
+ init_monitor_geometry (x11_screen->monitors, 0, 0,
+ WidthOfScreen (x11_screen->xscreen),
+ HeightOfScreen (x11_screen->xscreen));
}
GdkScreen *
@@ -789,20 +789,20 @@ _gdk_x11_screen_new (GdkDisplay *display,
gint screen_number)
{
GdkScreen *screen;
- GdkScreenX11 *screen_x11;
+ GdkX11Screen *x11_screen;
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
- screen = g_object_new (GDK_TYPE_SCREEN_X11, NULL);
+ screen = g_object_new (GDK_TYPE_X11_SCREEN, NULL);
- screen_x11 = GDK_SCREEN_X11 (screen);
- screen_x11->display = display;
- screen_x11->xdisplay = display_x11->xdisplay;
- screen_x11->xscreen = ScreenOfDisplay (display_x11->xdisplay, screen_number);
- screen_x11->screen_num = screen_number;
- screen_x11->xroot_window = RootWindow (display_x11->xdisplay,screen_number);
- screen_x11->wmspec_check_window = None;
+ x11_screen = GDK_X11_SCREEN (screen);
+ x11_screen->display = display;
+ x11_screen->xdisplay = display_x11->xdisplay;
+ x11_screen->xscreen = ScreenOfDisplay (display_x11->xdisplay, screen_number);
+ x11_screen->screen_num = screen_number;
+ x11_screen->xroot_window = RootWindow (display_x11->xdisplay,screen_number);
+ x11_screen->wmspec_check_window = None;
/* we want this to be always non-null */
- screen_x11->window_manager_name = g_strdup ("unknown");
+ x11_screen->window_manager_name = g_strdup ("unknown");
init_multihead (screen);
init_randr_support (screen);
@@ -821,38 +821,38 @@ _gdk_x11_screen_new (GdkDisplay *display,
void
_gdk_x11_screen_setup (GdkScreen *screen)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
- screen_x11->cm_selection_atom = make_cm_atom (screen_x11->screen_num);
- gdk_display_request_selection_notification (screen_x11->display,
- screen_x11->cm_selection_atom);
- screen_x11->is_composited = check_is_composited (screen_x11->display, screen_x11);
+ x11_screen->cm_selection_atom = make_cm_atom (x11_screen->screen_num);
+ gdk_display_request_selection_notification (x11_screen->display,
+ x11_screen->cm_selection_atom);
+ x11_screen->is_composited = check_is_composited (x11_screen->display, x11_screen);
}
static gboolean
-gdk_screen_x11_is_composited (GdkScreen *screen)
+gdk_x11_screen_is_composited (GdkScreen *screen)
{
- GdkScreenX11 *screen_x11;
+ GdkX11Screen *x11_screen;
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
- screen_x11 = GDK_SCREEN_X11 (screen);
+ x11_screen = GDK_X11_SCREEN (screen);
- return screen_x11->is_composited;
+ return x11_screen->is_composited;
}
static void
init_randr_support (GdkScreen * screen)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
XSelectInput (GDK_SCREEN_XDISPLAY (screen),
- screen_x11->xroot_window,
+ x11_screen->xroot_window,
StructureNotifyMask);
#ifdef HAVE_RANDR
XRRSelectInput (GDK_SCREEN_XDISPLAY (screen),
- screen_x11->xroot_window,
+ x11_screen->xroot_window,
RRScreenChangeNotifyMask |
RRCrtcChangeNotifyMask |
RROutputPropertyNotifyMask);
@@ -862,21 +862,21 @@ init_randr_support (GdkScreen * screen)
static void
process_monitors_change (GdkScreen *screen)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
gint n_monitors;
GdkX11Monitor *monitors;
gboolean changed;
- n_monitors = screen_x11->n_monitors;
- monitors = screen_x11->monitors;
+ n_monitors = x11_screen->n_monitors;
+ monitors = x11_screen->monitors;
- screen_x11->n_monitors = 0;
- screen_x11->monitors = NULL;
+ x11_screen->n_monitors = 0;
+ x11_screen->monitors = NULL;
init_multihead (screen);
changed = !compare_monitors (monitors, n_monitors,
- screen_x11->monitors, screen_x11->n_monitors);
+ x11_screen->monitors, x11_screen->n_monitors);
free_monitors (monitors, n_monitors);
@@ -938,17 +938,17 @@ _gdk_x11_screen_process_owner_change (GdkScreen *screen,
{
#ifdef HAVE_XFIXES
XFixesSelectionNotifyEvent *selection_event = (XFixesSelectionNotifyEvent *)event;
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
- Atom xcm_selection_atom = gdk_x11_atom_to_xatom_for_display (screen_x11->display,
- screen_x11->cm_selection_atom);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
+ Atom xcm_selection_atom = gdk_x11_atom_to_xatom_for_display (x11_screen->display,
+ x11_screen->cm_selection_atom);
if (selection_event->selection == xcm_selection_atom)
{
gboolean composited = selection_event->owner != None;
- if (composited != screen_x11->is_composited)
+ if (composited != x11_screen->is_composited)
{
- screen_x11->is_composited = composited;
+ x11_screen->is_composited = composited;
g_signal_emit_by_name (screen, "composited-changed");
}
@@ -975,7 +975,7 @@ substitute_screen_number (const gchar *display_name,
}
static gchar *
-gdk_screen_x11_make_display_name (GdkScreen *screen)
+gdk_x11_screen_make_display_name (GdkScreen *screen)
{
const gchar *old_display;
@@ -988,9 +988,9 @@ gdk_screen_x11_make_display_name (GdkScreen *screen)
}
static GdkWindow *
-gdk_screen_x11_get_active_window (GdkScreen *screen)
+gdk_x11_screen_get_active_window (GdkScreen *screen)
{
- GdkScreenX11 *screen_x11;
+ GdkX11Screen *x11_screen;
GdkWindow *ret = NULL;
Atom type_return;
gint format_return;
@@ -1004,10 +1004,10 @@ gdk_screen_x11_get_active_window (GdkScreen *screen)
gdk_atom_intern_static_string ("_NET_ACTIVE_WINDOW")))
return NULL;
- screen_x11 = GDK_SCREEN_X11 (screen);
+ x11_screen = GDK_X11_SCREEN (screen);
- if (XGetWindowProperty (screen_x11->xdisplay, screen_x11->xroot_window,
- gdk_x11_get_xatom_by_name_for_display (screen_x11->display,
+ if (XGetWindowProperty (x11_screen->xdisplay, x11_screen->xroot_window,
+ gdk_x11_get_xatom_by_name_for_display (x11_screen->display,
"_NET_ACTIVE_WINDOW"),
0, 1, False, XA_WINDOW, &type_return,
&format_return, &nitems_return,
@@ -1020,7 +1020,7 @@ gdk_screen_x11_get_active_window (GdkScreen *screen)
if (window != None)
{
- ret = gdk_x11_window_foreign_new_for_display (screen_x11->display,
+ ret = gdk_x11_window_foreign_new_for_display (x11_screen->display,
*(Window *) data);
}
}
@@ -1033,9 +1033,9 @@ gdk_screen_x11_get_active_window (GdkScreen *screen)
}
static GList *
-gdk_screen_x11_get_window_stack (GdkScreen *screen)
+gdk_x11_screen_get_window_stack (GdkScreen *screen)
{
- GdkScreenX11 *screen_x11;
+ GdkX11Screen *x11_screen;
GList *ret = NULL;
Atom type_return;
gint format_return;
@@ -1049,10 +1049,10 @@ gdk_screen_x11_get_window_stack (GdkScreen *screen)
gdk_atom_intern_static_string ("_NET_CLIENT_LIST_STACKING")))
return NULL;
- screen_x11 = GDK_SCREEN_X11 (screen);
+ x11_screen = GDK_X11_SCREEN (screen);
- if (XGetWindowProperty (screen_x11->xdisplay, screen_x11->xroot_window,
- gdk_x11_get_xatom_by_name_for_display (screen_x11->display,
+ if (XGetWindowProperty (x11_screen->xdisplay, x11_screen->xroot_window,
+ gdk_x11_get_xatom_by_name_for_display (x11_screen->display,
"_NET_CLIENT_LIST_STACKING"),
0, G_MAXLONG, False, XA_WINDOW, &type_return,
&format_return, &nitems_return,
@@ -1068,7 +1068,7 @@ gdk_screen_x11_get_window_stack (GdkScreen *screen)
for (i = 0; i < nitems_return; i++)
{
- win = gdk_x11_window_foreign_new_for_display (screen_x11->display,
+ win = gdk_x11_window_foreign_new_for_display (x11_screen->display,
(Window)stack[i]);
if (win != NULL)
@@ -1144,7 +1144,7 @@ gdk_event_send_client_message_to_all_recurse (GdkDisplay *display,
}
static void
-gdk_screen_x11_broadcast_client_message (GdkScreen *screen,
+gdk_x11_screen_broadcast_client_message (GdkScreen *screen,
GdkEvent *event)
{
XEvent sev;
@@ -1187,7 +1187,7 @@ check_transform (const gchar *xsettings_name,
}
static gboolean
-gdk_screen_x11_get_setting (GdkScreen *screen,
+gdk_x11_screen_get_setting (GdkScreen *screen,
const gchar *name,
GValue *value)
{
@@ -1195,14 +1195,14 @@ gdk_screen_x11_get_setting (GdkScreen *screen,
const char *xsettings_name = NULL;
XSettingsResult result;
XSettingsSetting *setting = NULL;
- GdkScreenX11 *screen_x11;
+ GdkX11Screen *x11_screen;
gboolean success = FALSE;
gint i;
GValue tmp_val = { 0, };
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
- screen_x11 = GDK_SCREEN_X11 (screen);
+ x11_screen = GDK_X11_SCREEN (screen);
for (i = 0; i < GDK_SETTINGS_N_ELEMENTS(); i++)
if (strcmp (GDK_SETTINGS_GDK_NAME (i), name) == 0)
@@ -1214,7 +1214,7 @@ gdk_screen_x11_get_setting (GdkScreen *screen,
if (!xsettings_name)
goto out;
- result = xsettings_client_get_setting (screen_x11->xsettings_client,
+ result = xsettings_client_get_setting (x11_screen->xsettings_client,
xsettings_name, &setting);
if (result != XSETTINGS_SUCCESS)
goto out;
@@ -1286,7 +1286,7 @@ cleanup_atoms(gpointer data)
static void
fetch_net_wm_check_window (GdkScreen *screen)
{
- GdkScreenX11 *screen_x11;
+ GdkX11Screen *x11_screen;
GdkDisplay *display;
Atom type;
gint format;
@@ -1297,20 +1297,20 @@ fetch_net_wm_check_window (GdkScreen *screen)
GTimeVal tv;
gint error;
- screen_x11 = GDK_SCREEN_X11 (screen);
- display = screen_x11->display;
+ x11_screen = GDK_X11_SCREEN (screen);
+ display = x11_screen->display;
g_return_if_fail (GDK_X11_DISPLAY (display)->trusted_client);
g_get_current_time (&tv);
- if (ABS (tv.tv_sec - screen_x11->last_wmspec_check_time) < 15)
+ if (ABS (tv.tv_sec - x11_screen->last_wmspec_check_time) < 15)
return; /* we've checked recently */
- screen_x11->last_wmspec_check_time = tv.tv_sec;
+ x11_screen->last_wmspec_check_time = tv.tv_sec;
data = NULL;
- XGetWindowProperty (screen_x11->xdisplay, screen_x11->xroot_window,
+ XGetWindowProperty (x11_screen->xdisplay, x11_screen->xroot_window,
gdk_x11_get_xatom_by_name_for_display (display, "_NET_SUPPORTING_WM_CHECK"),
0, G_MAXLONG, False, XA_WINDOW, &type, &format,
&n_items, &bytes_after, &data);
@@ -1324,7 +1324,7 @@ fetch_net_wm_check_window (GdkScreen *screen)
xwindow = (Window *)data;
- if (screen_x11->wmspec_check_window == *xwindow)
+ if (x11_screen->wmspec_check_window == *xwindow)
{
XFree (xwindow);
return;
@@ -1333,22 +1333,22 @@ fetch_net_wm_check_window (GdkScreen *screen)
gdk_x11_display_error_trap_push (display);
/* Find out if this WM goes away, so we can reset everything. */
- XSelectInput (screen_x11->xdisplay, *xwindow, StructureNotifyMask);
+ XSelectInput (x11_screen->xdisplay, *xwindow, StructureNotifyMask);
error = gdk_x11_display_error_trap_pop (display);
if (!error)
{
- screen_x11->wmspec_check_window = *xwindow;
- screen_x11->need_refetch_net_supported = TRUE;
- screen_x11->need_refetch_wm_name = TRUE;
+ x11_screen->wmspec_check_window = *xwindow;
+ x11_screen->need_refetch_net_supported = TRUE;
+ x11_screen->need_refetch_wm_name = TRUE;
/* Careful, reentrancy */
- _gdk_x11_screen_window_manager_changed (GDK_SCREEN (screen_x11));
+ _gdk_x11_screen_window_manager_changed (GDK_SCREEN (x11_screen));
}
else if (error == BadWindow)
{
/* Leftover property, try again immediately, new wm may be starting up */
- screen_x11->last_wmspec_check_time = 0;
+ x11_screen->last_wmspec_check_time = 0;
}
XFree (xwindow);
@@ -1383,14 +1383,14 @@ gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
GdkAtom property)
{
gulong i;
- GdkScreenX11 *screen_x11;
+ GdkX11Screen *x11_screen;
NetWmSupportedAtoms *supported_atoms;
GdkDisplay *display;
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
- screen_x11 = GDK_SCREEN_X11 (screen);
- display = screen_x11->display;
+ x11_screen = GDK_X11_SCREEN (screen);
+ display = x11_screen->display;
if (!G_LIKELY (GDK_X11_DISPLAY (display)->trusted_client))
return FALSE;
@@ -1404,10 +1404,10 @@ gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
fetch_net_wm_check_window (screen);
- if (screen_x11->wmspec_check_window == None)
+ if (x11_screen->wmspec_check_window == None)
return FALSE;
- if (screen_x11->need_refetch_net_supported)
+ if (x11_screen->need_refetch_net_supported)
{
/* WM has changed since we last got the supported list,
* refetch it.
@@ -1416,7 +1416,7 @@ gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
gint format;
gulong bytes_after;
- screen_x11->need_refetch_net_supported = FALSE;
+ x11_screen->need_refetch_net_supported = FALSE;
if (supported_atoms->atoms)
XFree (supported_atoms->atoms);
@@ -1424,7 +1424,7 @@ gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
supported_atoms->atoms = NULL;
supported_atoms->n_atoms = 0;
- XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), screen_x11->xroot_window,
+ XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), x11_screen->xroot_window,
gdk_x11_get_xatom_by_name_for_display (display, "_NET_SUPPORTED"),
0, G_MAXLONG, False, XA_ATOM, &type, &format,
&supported_atoms->n_atoms, &bytes_after,
@@ -1470,7 +1470,7 @@ gdk_xsettings_client_event_filter (GdkXEvent *xevent,
GdkEvent *event,
gpointer data)
{
- GdkScreenX11 *screen = data;
+ GdkX11Screen *screen = data;
if (xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent))
return GDK_FILTER_REMOVE;
@@ -1534,10 +1534,10 @@ gdk_xsettings_notify_cb (const char *name,
{
GdkEvent new_event;
GdkScreen *screen = data;
- GdkScreenX11 *screen_x11 = data;
+ GdkX11Screen *x11_screen = data;
int i;
- if (screen_x11->xsettings_in_init)
+ if (x11_screen->xsettings_in_init)
return;
new_event.type = GDK_SETTING;
@@ -1574,19 +1574,19 @@ gdk_xsettings_notify_cb (const char *name,
void
_gdk_x11_screen_init_events (GdkScreen *screen)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
/* Keep a flag to avoid extra notifies that we don't need
*/
- screen_x11->xsettings_in_init = TRUE;
- screen_x11->xsettings_client = xsettings_client_new_with_grab_funcs (screen_x11->xdisplay,
- screen_x11->screen_num,
+ x11_screen->xsettings_in_init = TRUE;
+ x11_screen->xsettings_client = xsettings_client_new_with_grab_funcs (x11_screen->xdisplay,
+ x11_screen->screen_num,
gdk_xsettings_notify_cb,
gdk_xsettings_watch_cb,
screen,
refcounted_grab_server,
refcounted_ungrab_server);
- screen_x11->xsettings_in_init = FALSE;
+ x11_screen->xsettings_in_init = FALSE;
}
/**
@@ -1604,26 +1604,26 @@ _gdk_x11_screen_init_events (GdkScreen *screen)
const char*
gdk_x11_screen_get_window_manager_name (GdkScreen *screen)
{
- GdkScreenX11 *screen_x11;
+ GdkX11Screen *x11_screen;
GdkDisplay *display;
- screen_x11 = GDK_SCREEN_X11 (screen);
- display = screen_x11->display;
+ x11_screen = GDK_X11_SCREEN (screen);
+ display = x11_screen->display;
if (!G_LIKELY (GDK_X11_DISPLAY (display)->trusted_client))
- return screen_x11->window_manager_name;
+ return x11_screen->window_manager_name;
fetch_net_wm_check_window (screen);
- if (screen_x11->need_refetch_wm_name)
+ if (x11_screen->need_refetch_wm_name)
{
/* Get the name of the window manager */
- screen_x11->need_refetch_wm_name = FALSE;
+ x11_screen->need_refetch_wm_name = FALSE;
- g_free (screen_x11->window_manager_name);
- screen_x11->window_manager_name = g_strdup ("unknown");
+ g_free (x11_screen->window_manager_name);
+ x11_screen->window_manager_name = g_strdup ("unknown");
- if (screen_x11->wmspec_check_window != None)
+ if (x11_screen->wmspec_check_window != None)
{
Atom type;
gint format;
@@ -1636,7 +1636,7 @@ gdk_x11_screen_get_window_manager_name (GdkScreen *screen)
gdk_x11_display_error_trap_push (display);
XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display),
- screen_x11->wmspec_check_window,
+ x11_screen->wmspec_check_window,
gdk_x11_get_xatom_by_name_for_display (display,
"_NET_WM_NAME"),
0, G_MAXLONG, False,
@@ -1650,61 +1650,61 @@ gdk_x11_screen_get_window_manager_name (GdkScreen *screen)
if (name != NULL)
{
- g_free (screen_x11->window_manager_name);
- screen_x11->window_manager_name = g_strdup (name);
+ g_free (x11_screen->window_manager_name);
+ x11_screen->window_manager_name = g_strdup (name);
XFree (name);
}
}
}
- return GDK_SCREEN_X11 (screen)->window_manager_name;
+ return GDK_X11_SCREEN (screen)->window_manager_name;
}
static void
-_gdk_screen_x11_class_init (GdkScreenX11Class *klass)
+_gdk_x11_screen_class_init (GdkX11ScreenClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GdkScreenClass *screen_class = GDK_SCREEN_CLASS (klass);
- object_class->dispose = gdk_screen_x11_dispose;
- object_class->finalize = gdk_screen_x11_finalize;
-
- screen_class->get_display = gdk_screen_x11_get_display;
- screen_class->get_width = gdk_screen_x11_get_width;
- screen_class->get_height = gdk_screen_x11_get_height;
- screen_class->get_width_mm = gdk_screen_x11_get_width_mm;
- screen_class->get_height_mm = gdk_screen_x11_get_height_mm;
- screen_class->get_number = gdk_screen_x11_get_number;
- screen_class->get_root_window = gdk_screen_x11_get_root_window;
- screen_class->get_n_monitors = gdk_screen_x11_get_n_monitors;
- screen_class->get_primary_monitor = gdk_screen_x11_get_primary_monitor;
- screen_class->get_monitor_width_mm = gdk_screen_x11_get_monitor_width_mm;
- screen_class->get_monitor_height_mm = gdk_screen_x11_get_monitor_height_mm;
- screen_class->get_monitor_plug_name = gdk_screen_x11_get_monitor_plug_name;
- screen_class->get_monitor_geometry = gdk_screen_x11_get_monitor_geometry;
- screen_class->get_system_visual = _gdk_screen_x11_get_system_visual;
- screen_class->get_rgba_visual = gdk_screen_x11_get_rgba_visual;
- screen_class->is_composited = gdk_screen_x11_is_composited;
- screen_class->make_display_name = gdk_screen_x11_make_display_name;
- screen_class->get_active_window = gdk_screen_x11_get_active_window;
- screen_class->get_window_stack = gdk_screen_x11_get_window_stack;
- screen_class->broadcast_client_message = gdk_screen_x11_broadcast_client_message;
- screen_class->get_setting = gdk_screen_x11_get_setting;
- screen_class->visual_get_best_depth = _gdk_screen_x11_visual_get_best_depth;
- screen_class->visual_get_best_type = _gdk_screen_x11_visual_get_best_type;
- screen_class->visual_get_best = _gdk_screen_x11_visual_get_best;
- screen_class->visual_get_best_with_depth = _gdk_screen_x11_visual_get_best_with_depth;
- screen_class->visual_get_best_with_type = _gdk_screen_x11_visual_get_best_with_type;
- screen_class->visual_get_best_with_both = _gdk_screen_x11_visual_get_best_with_both;
- screen_class->query_depths = _gdk_screen_x11_query_depths;
- screen_class->query_visual_types = _gdk_screen_x11_query_visual_types;
- screen_class->list_visuals = _gdk_screen_x11_list_visuals;
+ object_class->dispose = gdk_x11_screen_dispose;
+ object_class->finalize = gdk_x11_screen_finalize;
+
+ screen_class->get_display = gdk_x11_screen_get_display;
+ screen_class->get_width = gdk_x11_screen_get_width;
+ screen_class->get_height = gdk_x11_screen_get_height;
+ screen_class->get_width_mm = gdk_x11_screen_get_width_mm;
+ screen_class->get_height_mm = gdk_x11_screen_get_height_mm;
+ screen_class->get_number = gdk_x11_screen_get_number;
+ screen_class->get_root_window = gdk_x11_screen_get_root_window;
+ screen_class->get_n_monitors = gdk_x11_screen_get_n_monitors;
+ screen_class->get_primary_monitor = gdk_x11_screen_get_primary_monitor;
+ screen_class->get_monitor_width_mm = gdk_x11_screen_get_monitor_width_mm;
+ screen_class->get_monitor_height_mm = gdk_x11_screen_get_monitor_height_mm;
+ screen_class->get_monitor_plug_name = gdk_x11_screen_get_monitor_plug_name;
+ screen_class->get_monitor_geometry = gdk_x11_screen_get_monitor_geometry;
+ screen_class->get_system_visual = _gdk_x11_screen_get_system_visual;
+ screen_class->get_rgba_visual = gdk_x11_screen_get_rgba_visual;
+ screen_class->is_composited = gdk_x11_screen_is_composited;
+ screen_class->make_display_name = gdk_x11_screen_make_display_name;
+ screen_class->get_active_window = gdk_x11_screen_get_active_window;
+ screen_class->get_window_stack = gdk_x11_screen_get_window_stack;
+ screen_class->broadcast_client_message = gdk_x11_screen_broadcast_client_message;
+ screen_class->get_setting = gdk_x11_screen_get_setting;
+ screen_class->visual_get_best_depth = _gdk_x11_screen_visual_get_best_depth;
+ screen_class->visual_get_best_type = _gdk_x11_screen_visual_get_best_type;
+ screen_class->visual_get_best = _gdk_x11_screen_visual_get_best;
+ screen_class->visual_get_best_with_depth = _gdk_x11_screen_visual_get_best_with_depth;
+ screen_class->visual_get_best_with_type = _gdk_x11_screen_visual_get_best_with_type;
+ screen_class->visual_get_best_with_both = _gdk_x11_screen_visual_get_best_with_both;
+ screen_class->query_depths = _gdk_x11_screen_query_depths;
+ screen_class->query_visual_types = _gdk_x11_screen_query_visual_types;
+ screen_class->list_visuals = _gdk_x11_screen_list_visuals;
signals[WINDOW_MANAGER_CHANGED] =
g_signal_new (g_intern_static_string ("window_manager_changed"),
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GdkScreenX11Class, window_manager_changed),
+ G_STRUCT_OFFSET (GdkX11ScreenClass, window_manager_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
diff --git a/gdk/x11/gdkscreen-x11.h b/gdk/x11/gdkscreen-x11.h
index f8471dc..6755478 100644
--- a/gdk/x11/gdkscreen-x11.h
+++ b/gdk/x11/gdkscreen-x11.h
@@ -21,8 +21,8 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef __GDK_SCREEN_X11_H__
-#define __GDK_SCREEN_X11_H__
+#ifndef __GDK_X11_SCREEN__
+#define __GDK_X11_SCREEN__
#include "gdkscreenprivate.h"
#include "gdkvisual.h"
@@ -32,19 +32,19 @@
G_BEGIN_DECLS
-typedef struct _GdkScreenX11 GdkScreenX11;
-typedef struct _GdkScreenX11Class GdkScreenX11Class;
+typedef struct _GdkX11Screen GdkX11Screen;
+typedef struct _GdkX11ScreenClass GdkX11ScreenClass;
-#define GDK_TYPE_SCREEN_X11 (_gdk_screen_x11_get_type ())
-#define GDK_SCREEN_X11(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_SCREEN_X11, GdkScreenX11))
-#define GDK_SCREEN_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_SCREEN_X11, GdkScreenX11Class))
-#define GDK_IS_SCREEN_X11(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_SCREEN_X11))
-#define GDK_IS_SCREEN_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_SCREEN_X11))
-#define GDK_SCREEN_X11_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_SCREEN_X11, GdkScreenX11Class))
+#define GDK_TYPE_X11_SCREEN (_gdk_x11_screen_get_type ())
+#define GDK_X11_SCREEN(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_X11_SCREEN, GdkX11Screen))
+#define GDK_X11_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_X11_SCREEN, GdkX11ScreenClass))
+#define GDK_IS_X11_SCREEN(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_X11_SCREEN))
+#define GDK_IS_X11_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_X11_SCREEN))
+#define GDK_X11_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_X11_SCREEN, GdkX11ScreenClass))
typedef struct _GdkX11Monitor GdkX11Monitor;
-struct _GdkScreenX11
+struct _GdkX11Screen
{
GdkScreen parent_instance;
@@ -105,14 +105,14 @@ struct _GdkScreenX11
gboolean is_composited;
};
-struct _GdkScreenX11Class
+struct _GdkX11ScreenClass
{
GdkScreenClass parent_class;
- void (* window_manager_changed) (GdkScreenX11 *screen_x11);
+ void (* window_manager_changed) (GdkX11Screen *x11_screen);
};
-GType _gdk_screen_x11_get_type (void);
+GType _gdk_x11_screen_get_type (void);
GdkScreen * _gdk_x11_screen_new (GdkDisplay *display,
gint screen_number);
@@ -125,4 +125,4 @@ void _gdk_x11_screen_process_owner_change (GdkScreen *screen,
G_END_DECLS
-#endif /* __GDK_SCREEN_X11_H__ */
+#endif /* __GDK_X11_SCREEN__ */
diff --git a/gdk/x11/gdktestutils-x11.c b/gdk/x11/gdktestutils-x11.c
index 7b5916f..4450c08 100644
--- a/gdk/x11/gdktestutils-x11.c
+++ b/gdk/x11/gdktestutils-x11.c
@@ -79,7 +79,7 @@ _gdk_x11_window_simulate_key (GdkWindow *window,
xev.type = key_pressrelease == GDK_KEY_PRESS ? KeyPress : KeyRelease;
xev.display = GDK_WINDOW_XDISPLAY (window);
xev.window = GDK_WINDOW_XID (window);
- xev.root = RootWindow (xev.display, GDK_SCREEN_X11 (screen)->screen_num);
+ xev.root = RootWindow (xev.display, GDK_X11_SCREEN (screen)->screen_num);
xev.subwindow = 0;
xev.time = 0;
xev.x = MAX (x, 0);
@@ -157,7 +157,7 @@ _gdk_x11_window_simulate_button (GdkWindow *window,
xev.type = button_pressrelease == GDK_BUTTON_PRESS ? ButtonPress : ButtonRelease;
xev.display = GDK_WINDOW_XDISPLAY (window);
xev.window = GDK_WINDOW_XID (window);
- xev.root = RootWindow (xev.display, GDK_SCREEN_X11 (screen)->screen_num);
+ xev.root = RootWindow (xev.display, GDK_X11_SCREEN (screen)->screen_num);
xev.subwindow = 0;
xev.time = 0;
xev.x = x;
diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
index ba3b4cc..eb394f6 100644
--- a/gdk/x11/gdkvisual-x11.c
+++ b/gdk/x11/gdkvisual-x11.c
@@ -111,7 +111,7 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen)
GDK_VISUAL_STATIC_GRAY
};
- GdkScreenX11 *screen_x11;
+ GdkX11Screen *x11_screen;
XVisualInfo *visual_list;
XVisualInfo visual_template;
GdkVisual *temp_visual;
@@ -122,17 +122,17 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen)
int i, j;
g_return_if_fail (GDK_IS_SCREEN (screen));
- screen_x11 = GDK_SCREEN_X11 (screen);
+ x11_screen = GDK_X11_SCREEN (screen);
nxvisuals = 0;
- visual_template.screen = screen_x11->screen_num;
- visual_list = XGetVisualInfo (screen_x11->xdisplay, VisualScreenMask, &visual_template, &nxvisuals);
+ visual_template.screen = x11_screen->screen_num;
+ visual_list = XGetVisualInfo (x11_screen->xdisplay, VisualScreenMask, &visual_template, &nxvisuals);
visuals = g_new (GdkVisual *, nxvisuals);
for (i = 0; i < nxvisuals; i++)
visuals[i] = g_object_new (GDK_TYPE_X11_VISUAL, NULL);
- default_xvisual = DefaultVisual (screen_x11->xdisplay, screen_x11->screen_num);
+ default_xvisual = DefaultVisual (x11_screen->xdisplay, x11_screen->screen_num);
nvisuals = 0;
for (i = 0; i < nxvisuals; i++)
@@ -169,7 +169,7 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen)
visuals[nvisuals]->depth = visual_list[i].depth;
visuals[nvisuals]->byte_order =
- (ImageByteOrder(screen_x11->xdisplay) == LSBFirst) ?
+ (ImageByteOrder(x11_screen->xdisplay) == LSBFirst) ?
GDK_LSB_FIRST : GDK_MSB_FIRST;
visuals[nvisuals]->red_mask = visual_list[i].red_mask;
visuals[nvisuals]->green_mask = visual_list[i].green_mask;
@@ -253,9 +253,9 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen)
{
if (default_xvisual->visualid == GDK_X11_VISUAL (visuals[i])->xvisual->visualid)
{
- screen_x11->system_visual = visuals[i];
+ x11_screen->system_visual = visuals[i];
GDK_X11_VISUAL (visuals[i])->colormap =
- DefaultColormap (screen_x11->xdisplay, screen_x11->screen_num);
+ DefaultColormap (x11_screen->xdisplay, x11_screen->screen_num);
}
/* For now, we only support 8888 ARGB for the "rgba visual".
@@ -267,7 +267,7 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen)
visuals[i]->green_mask == 0x00ff00 &&
visuals[i]->blue_mask == 0x0000ff))
{
- screen_x11->rgba_visual = visuals[i];
+ x11_screen->rgba_visual = visuals[i];
}
}
@@ -289,30 +289,30 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen)
}
#endif /* G_ENABLE_DEBUG */
- screen_x11->navailable_depths = 0;
+ x11_screen->navailable_depths = 0;
for (i = 0; i < G_N_ELEMENTS (possible_depths); i++)
{
for (j = 0; j < nvisuals; j++)
{
if (visuals[j]->depth == possible_depths[i])
{
- screen_x11->available_depths[screen_x11->navailable_depths++] = visuals[j]->depth;
+ x11_screen->available_depths[x11_screen->navailable_depths++] = visuals[j]->depth;
break;
}
}
}
- if (screen_x11->navailable_depths == 0)
+ if (x11_screen->navailable_depths == 0)
g_error ("unable to find a usable depth");
- screen_x11->navailable_types = 0;
+ x11_screen->navailable_types = 0;
for (i = 0; i < G_N_ELEMENTS (possible_types); i++)
{
for (j = 0; j < nvisuals; j++)
{
if (visuals[j]->type == possible_types[i])
{
- screen_x11->available_types[screen_x11->navailable_types++] = visuals[j]->type;
+ x11_screen->available_types[x11_screen->navailable_types++] = visuals[j]->type;
break;
}
}
@@ -321,54 +321,54 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen)
for (i = 0; i < nvisuals; i++)
gdk_visual_add (visuals[i]);
- if (screen_x11->navailable_types == 0)
+ if (x11_screen->navailable_types == 0)
g_error ("unable to find a usable visual type");
- screen_x11->visuals = visuals;
- screen_x11->nvisuals = nvisuals;
+ x11_screen->visuals = visuals;
+ x11_screen->nvisuals = nvisuals;
}
gint
-_gdk_screen_x11_visual_get_best_depth (GdkScreen *screen)
+_gdk_x11_screen_visual_get_best_depth (GdkScreen *screen)
{
- return GDK_SCREEN_X11 (screen)->available_depths[0];
+ return GDK_X11_SCREEN (screen)->available_depths[0];
}
GdkVisualType
-_gdk_screen_x11_visual_get_best_type (GdkScreen *screen)
+_gdk_x11_screen_visual_get_best_type (GdkScreen *screen)
{
- return GDK_SCREEN_X11 (screen)->available_types[0];
+ return GDK_X11_SCREEN (screen)->available_types[0];
}
GdkVisual *
-_gdk_screen_x11_get_system_visual (GdkScreen *screen)
+_gdk_x11_screen_get_system_visual (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
- return ((GdkVisual *) GDK_SCREEN_X11 (screen)->system_visual);
+ return ((GdkVisual *) GDK_X11_SCREEN (screen)->system_visual);
}
GdkVisual*
-_gdk_screen_x11_visual_get_best (GdkScreen *screen)
+_gdk_x11_screen_visual_get_best (GdkScreen *screen)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
- return screen_x11->visuals[0];
+ return x11_screen->visuals[0];
}
GdkVisual*
-_gdk_screen_x11_visual_get_best_with_depth (GdkScreen *screen,
+_gdk_x11_screen_visual_get_best_with_depth (GdkScreen *screen,
gint depth)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
GdkVisual *return_val;
int i;
return_val = NULL;
- for (i = 0; i < screen_x11->nvisuals; i++)
- if (depth == screen_x11->visuals[i]->depth)
+ for (i = 0; i < x11_screen->nvisuals; i++)
+ if (depth == x11_screen->visuals[i]->depth)
{
- return_val = screen_x11->visuals[i];
+ return_val = x11_screen->visuals[i];
break;
}
@@ -376,18 +376,18 @@ _gdk_screen_x11_visual_get_best_with_depth (GdkScreen *screen,
}
GdkVisual*
-_gdk_screen_x11_visual_get_best_with_type (GdkScreen *screen,
+_gdk_x11_screen_visual_get_best_with_type (GdkScreen *screen,
GdkVisualType visual_type)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
GdkVisual *return_val;
int i;
return_val = NULL;
- for (i = 0; i < screen_x11->nvisuals; i++)
- if (visual_type == screen_x11->visuals[i]->type)
+ for (i = 0; i < x11_screen->nvisuals; i++)
+ if (visual_type == x11_screen->visuals[i]->type)
{
- return_val = screen_x11->visuals[i];
+ return_val = x11_screen->visuals[i];
break;
}
@@ -395,20 +395,20 @@ _gdk_screen_x11_visual_get_best_with_type (GdkScreen *screen,
}
GdkVisual*
-_gdk_screen_x11_visual_get_best_with_both (GdkScreen *screen,
+_gdk_x11_screen_visual_get_best_with_both (GdkScreen *screen,
gint depth,
GdkVisualType visual_type)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
GdkVisual *return_val;
int i;
return_val = NULL;
- for (i = 0; i < screen_x11->nvisuals; i++)
- if ((depth == screen_x11->visuals[i]->depth) &&
- (visual_type == screen_x11->visuals[i]->type))
+ for (i = 0; i < x11_screen->nvisuals; i++)
+ if ((depth == x11_screen->visuals[i]->depth) &&
+ (visual_type == x11_screen->visuals[i]->type))
{
- return_val = screen_x11->visuals[i];
+ return_val = x11_screen->visuals[i];
break;
}
@@ -416,41 +416,41 @@ _gdk_screen_x11_visual_get_best_with_both (GdkScreen *screen,
}
void
-_gdk_screen_x11_query_depths (GdkScreen *screen,
+_gdk_x11_screen_query_depths (GdkScreen *screen,
gint **depths,
gint *count)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
- *count = screen_x11->navailable_depths;
- *depths = screen_x11->available_depths;
+ *count = x11_screen->navailable_depths;
+ *depths = x11_screen->available_depths;
}
void
-_gdk_screen_x11_query_visual_types (GdkScreen *screen,
+_gdk_x11_screen_query_visual_types (GdkScreen *screen,
GdkVisualType **visual_types,
gint *count)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
- *count = screen_x11->navailable_types;
- *visual_types = screen_x11->available_types;
+ *count = x11_screen->navailable_types;
+ *visual_types = x11_screen->available_types;
}
GList *
-_gdk_screen_x11_list_visuals (GdkScreen *screen)
+_gdk_x11_screen_list_visuals (GdkScreen *screen)
{
GList *list;
- GdkScreenX11 *screen_x11;
+ GdkX11Screen *x11_screen;
guint i;
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
- screen_x11 = GDK_SCREEN_X11 (screen);
+ x11_screen = GDK_X11_SCREEN (screen);
list = NULL;
- for (i = 0; i < screen_x11->nvisuals; ++i)
- list = g_list_append (list, screen_x11->visuals[i]);
+ for (i = 0; i < x11_screen->nvisuals; ++i)
+ list = g_list_append (list, x11_screen->visuals[i]);
return list;
}
@@ -472,13 +472,13 @@ gdk_x11_screen_lookup_visual (GdkScreen *screen,
VisualID xvisualid)
{
int i;
- GdkScreenX11 *screen_x11;
+ GdkX11Screen *x11_screen;
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
- screen_x11 = GDK_SCREEN_X11 (screen);
+ x11_screen = GDK_X11_SCREEN (screen);
- for (i = 0; i < screen_x11->nvisuals; i++)
- if (xvisualid == GDK_X11_VISUAL (screen_x11->visuals[i])->xvisual->visualid)
- return screen_x11->visuals[i];
+ for (i = 0; i < x11_screen->nvisuals; i++)
+ if (xvisualid == GDK_X11_VISUAL (x11_screen->visuals[i])->xvisual->visualid)
+ return x11_screen->visuals[i];
return NULL;
}
@@ -486,13 +486,13 @@ gdk_x11_screen_lookup_visual (GdkScreen *screen,
static void
gdk_visual_add (GdkVisual *visual)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (visual->screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (visual->screen);
- if (!screen_x11->visual_hash)
- screen_x11->visual_hash = g_hash_table_new ((GHashFunc) gdk_visual_hash,
+ if (!x11_screen->visual_hash)
+ x11_screen->visual_hash = g_hash_table_new ((GHashFunc) gdk_visual_hash,
(GEqualFunc) gdk_visual_equal);
- g_hash_table_insert (screen_x11->visual_hash, GDK_X11_VISUAL (visual)->xvisual, visual);
+ g_hash_table_insert (x11_screen->visual_hash, GDK_X11_VISUAL (visual)->xvisual, visual);
}
static void
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 1fce606..bf07ece 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -312,7 +312,7 @@ _gdk_x11_window_create_bitmap_surface (GdkWindow *window,
width, height, 1);
surface = cairo_xlib_surface_create_for_bitmap (GDK_WINDOW_XDISPLAY (window),
pixmap,
- GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (window))->xscreen,
+ GDK_X11_SCREEN (GDK_WINDOW_SCREEN (window))->xscreen,
width, height);
attach_free_pixmap_handler (surface, GDK_WINDOW_DISPLAY (window), pixmap);
@@ -454,13 +454,13 @@ _gdk_x11_screen_init_root_window (GdkScreen *screen)
{
GdkWindow *window;
GdkWindowImplX11 *impl;
- GdkScreenX11 *screen_x11;
+ GdkX11Screen *x11_screen;
- screen_x11 = GDK_SCREEN_X11 (screen);
+ x11_screen = GDK_X11_SCREEN (screen);
- g_assert (screen_x11->root_window == NULL);
+ g_assert (x11_screen->root_window == NULL);
- window = screen_x11->root_window = g_object_new (GDK_TYPE_WINDOW, NULL);
+ window = x11_screen->root_window = g_object_new (GDK_TYPE_WINDOW, NULL);
window->impl = g_object_new (GDK_TYPE_WINDOW_IMPL_X11, NULL);
window->impl_window = window;
@@ -468,28 +468,28 @@ _gdk_x11_screen_init_root_window (GdkScreen *screen)
impl = GDK_WINDOW_IMPL_X11 (window->impl);
- impl->xid = screen_x11->xroot_window;
+ impl->xid = x11_screen->xroot_window;
impl->wrapper = window;
window->window_type = GDK_WINDOW_ROOT;
- window->depth = DefaultDepthOfScreen (screen_x11->xscreen);
+ window->depth = DefaultDepthOfScreen (x11_screen->xscreen);
window->x = 0;
window->y = 0;
window->abs_x = 0;
window->abs_y = 0;
- window->width = WidthOfScreen (screen_x11->xscreen);
- window->height = HeightOfScreen (screen_x11->xscreen);
+ window->width = WidthOfScreen (x11_screen->xscreen);
+ window->height = HeightOfScreen (x11_screen->xscreen);
window->viewable = TRUE;
/* see init_randr_support() in gdkscreen-x11.c */
window->event_mask = GDK_STRUCTURE_MASK;
- _gdk_window_update_size (screen_x11->root_window);
+ _gdk_window_update_size (x11_screen->root_window);
- _gdk_x11_display_add_window (screen_x11->display,
- &screen_x11->xroot_window,
- screen_x11->root_window);
+ _gdk_x11_display_add_window (x11_screen->display,
+ &x11_screen->xroot_window,
+ x11_screen->root_window);
}
static void
@@ -615,7 +615,7 @@ setup_toplevel_window (GdkWindow *window,
GdkDisplay *display = gdk_window_get_display (window);
Display *xdisplay = GDK_WINDOW_XDISPLAY (window);
XID xid = GDK_WINDOW_XID (window);
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (parent));
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (GDK_WINDOW_SCREEN (parent));
XSizeHints size_hints;
long pid;
Window leader_window;
@@ -628,12 +628,12 @@ setup_toplevel_window (GdkWindow *window,
* press events so they don't get sent to child windows.
*/
toplevel->focus_window = create_focus_window (display, xid);
- _gdk_x11_display_add_window (screen_x11->display,
+ _gdk_x11_display_add_window (x11_screen->display,
&toplevel->focus_window,
window);
}
- check_leader_window_title (screen_x11->display);
+ check_leader_window_title (x11_screen->display);
/* FIXME: Is there any point in doing this? Do any WM's pay
* attention to PSize, and even if they do, is this the
@@ -650,29 +650,29 @@ setup_toplevel_window (GdkWindow *window,
pid = getpid ();
XChangeProperty (xdisplay, xid,
- gdk_x11_get_xatom_by_name_for_display (screen_x11->display, "_NET_WM_PID"),
+ gdk_x11_get_xatom_by_name_for_display (x11_screen->display, "_NET_WM_PID"),
XA_CARDINAL, 32,
PropModeReplace,
(guchar *)&pid, 1);
- leader_window = GDK_X11_DISPLAY (screen_x11->display)->leader_window;
+ leader_window = GDK_X11_DISPLAY (x11_screen->display)->leader_window;
if (!leader_window)
leader_window = xid;
XChangeProperty (xdisplay, xid,
- gdk_x11_get_xatom_by_name_for_display (screen_x11->display, "WM_CLIENT_LEADER"),
+ gdk_x11_get_xatom_by_name_for_display (x11_screen->display, "WM_CLIENT_LEADER"),
XA_WINDOW, 32, PropModeReplace,
(guchar *) &leader_window, 1);
if (toplevel->focus_window != None)
XChangeProperty (xdisplay, xid,
- gdk_x11_get_xatom_by_name_for_display (screen_x11->display, "_NET_WM_USER_TIME_WINDOW"),
+ gdk_x11_get_xatom_by_name_for_display (x11_screen->display, "_NET_WM_USER_TIME_WINDOW"),
XA_WINDOW, 32, PropModeReplace,
(guchar *) &toplevel->focus_window, 1);
if (!window->focus_on_map)
gdk_x11_window_set_user_time (window, 0);
- else if (GDK_X11_DISPLAY (screen_x11->display)->user_time != 0)
- gdk_x11_window_set_user_time (window, GDK_X11_DISPLAY (screen_x11->display)->user_time);
+ else if (GDK_X11_DISPLAY (x11_screen->display)->user_time != 0)
+ gdk_x11_window_set_user_time (window, GDK_X11_DISPLAY (x11_screen->display)->user_time);
ensure_sync_counter (window);
}
@@ -687,7 +687,7 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
gint attributes_mask)
{
GdkWindowImplX11 *impl;
- GdkScreenX11 *screen_x11;
+ GdkX11Screen *x11_screen;
GdkX11Display *display_x11;
Window xparent;
@@ -703,13 +703,13 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
display_x11 = GDK_X11_DISPLAY (display);
xparent = GDK_WINDOW_XID (real_parent);
- screen_x11 = GDK_SCREEN_X11 (screen);
+ x11_screen = GDK_X11_SCREEN (screen);
impl = g_object_new (GDK_TYPE_WINDOW_IMPL_X11, NULL);
window->impl = GDK_WINDOW_IMPL (impl);
impl->wrapper = GDK_WINDOW (window);
- xdisplay = screen_x11->xdisplay;
+ xdisplay = x11_screen->xdisplay;
xattributes_mask = 0;
@@ -748,9 +748,9 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
{
class = InputOutput;
- xattributes.background_pixel = BlackPixel (xdisplay, screen_x11->screen_num);
+ xattributes.background_pixel = BlackPixel (xdisplay, x11_screen->screen_num);
- xattributes.border_pixel = BlackPixel (xdisplay, screen_x11->screen_num);
+ xattributes.border_pixel = BlackPixel (xdisplay, x11_screen->screen_num);
xattributes_mask |= CWBorderPixel | CWBackPixel;
if (window->guffaw_gravity)
@@ -797,7 +797,7 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
xattributes_mask, &xattributes);
g_object_ref (window);
- _gdk_x11_display_add_window (screen_x11->display, &impl->xid, window);
+ _gdk_x11_display_add_window (x11_screen->display, &impl->xid, window);
switch (GDK_WINDOW_TYPE (window))
{
diff --git a/gdk/x11/gdkxftdefaults.c b/gdk/x11/gdkxftdefaults.c
index 850c33f..ca598e6 100644
--- a/gdk/x11/gdkxftdefaults.c
+++ b/gdk/x11/gdkxftdefaults.c
@@ -151,32 +151,32 @@ get_integer_default (Display *dpy,
static void
init_xft_settings (GdkScreen *screen)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
Display *xdisplay = GDK_SCREEN_XDISPLAY (screen);
double dpi_double;
- if (screen_x11->xft_init)
+ if (x11_screen->xft_init)
return;
- screen_x11->xft_init = TRUE;
+ x11_screen->xft_init = TRUE;
- if (!get_boolean_default (xdisplay, "antialias", &screen_x11->xft_antialias))
- screen_x11->xft_antialias = TRUE;
+ if (!get_boolean_default (xdisplay, "antialias", &x11_screen->xft_antialias))
+ x11_screen->xft_antialias = TRUE;
- if (!get_boolean_default (xdisplay, "hinting", &screen_x11->xft_hinting))
- screen_x11->xft_hinting = TRUE;
+ if (!get_boolean_default (xdisplay, "hinting", &x11_screen->xft_hinting))
+ x11_screen->xft_hinting = TRUE;
- if (!get_integer_default (xdisplay, "hintstyle", &screen_x11->xft_hintstyle))
- screen_x11->xft_hintstyle = FC_HINT_FULL;
+ if (!get_integer_default (xdisplay, "hintstyle", &x11_screen->xft_hintstyle))
+ x11_screen->xft_hintstyle = FC_HINT_FULL;
- if (!get_integer_default (xdisplay, "rgba", &screen_x11->xft_rgba))
- screen_x11->xft_rgba = FC_RGBA_UNKNOWN;
+ if (!get_integer_default (xdisplay, "rgba", &x11_screen->xft_rgba))
+ x11_screen->xft_rgba = FC_RGBA_UNKNOWN;
if (!get_double_default (xdisplay, "dpi", &dpi_double))
- dpi_double = (((double) DisplayHeight (xdisplay, screen_x11->screen_num) * 25.4) /
- (double) DisplayHeightMM (xdisplay, screen_x11->screen_num));
+ dpi_double = (((double) DisplayHeight (xdisplay, x11_screen->screen_num) * 25.4) /
+ (double) DisplayHeightMM (xdisplay, x11_screen->screen_num));
- screen_x11->xft_dpi = (int)(0.5 + PANGO_SCALE * dpi_double);
+ x11_screen->xft_dpi = (int)(0.5 + PANGO_SCALE * dpi_double);
}
gboolean
@@ -184,7 +184,7 @@ _gdk_x11_get_xft_setting (GdkScreen *screen,
const gchar *name,
GValue *value)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
+ GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
if (strncmp (name, "gtk-xft-", 8) != 0)
return FALSE;
@@ -195,19 +195,19 @@ _gdk_x11_get_xft_setting (GdkScreen *screen,
if (strcmp (name, "antialias") == 0)
{
- g_value_set_int (value, screen_x11->xft_antialias);
+ g_value_set_int (value, x11_screen->xft_antialias);
return TRUE;
}
else if (strcmp (name, "hinting") == 0)
{
- g_value_set_int (value, screen_x11->xft_hinting);
+ g_value_set_int (value, x11_screen->xft_hinting);
return TRUE;
}
else if (strcmp (name, "hintstyle") == 0)
{
const char *str;
- switch (screen_x11->xft_hintstyle)
+ switch (x11_screen->xft_hintstyle)
{
case FC_HINT_NONE:
str = "hintnone";
@@ -232,7 +232,7 @@ _gdk_x11_get_xft_setting (GdkScreen *screen,
{
const char *str;
- switch (screen_x11->xft_rgba)
+ switch (x11_screen->xft_rgba)
{
case FC_RGBA_NONE:
str = "none";
@@ -259,7 +259,7 @@ _gdk_x11_get_xft_setting (GdkScreen *screen,
}
else if (strcmp (name, "dpi") == 0)
{
- g_value_set_int (value, screen_x11->xft_dpi);
+ g_value_set_int (value, x11_screen->xft_dpi);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]