[broadway] Rename X11 -> Broadway in all code

This just runs:
for i in *.[ch]; do
 sed -i s/DisplayX11/DisplayBroadway/g $i;
 sed -i s/PrivateX11/PrivateBroadway/g $i;
 sed -i s/ImplX11/ImplBroadway/g $i;
 sed -i s/KeymapX11/KeymapBroadway/g $i;
 sed -i s/ScreenX11/ScreenBroadway/g $i;
 sed -i s/GdkX11Monitor/GdkBroadwayMonitor/g $i;
 sed -i s/_X11/_BROADWAY/g $i;
 sed -i s/x11/broadway/g $i;
done
This commit is contained in:
Alexander Larsson 2010-11-16 12:33:02 +01:00
parent ce6ae54607
commit d707d057c2
18 changed files with 379 additions and 396 deletions

View File

@ -1,4 +1,4 @@
/* gdkapplaunchcontext-x11.c - Gtk+ implementation for GAppLaunchContext
/* gdkapplaunchcontext-broadway.c - Gtk+ implementation for GAppLaunchContext
Copyright (C) 2007 Red Hat, Inc.

View File

@ -39,11 +39,11 @@
#include <errno.h>
/* Called by gdk_display_x11_finalize to flush any cached cursors
/* Called by gdk_display_broadway_finalize to flush any cached cursors
* for a dead display.
*/
void
_gdk_x11_cursor_display_finalize (GdkDisplay *display)
_gdk_broadway_cursor_display_finalize (GdkDisplay *display)
{
}
@ -108,7 +108,7 @@ gdk_cursor_get_image (GdkCursor *cursor)
}
void
gdk_x11_display_set_cursor_theme (GdkDisplay *display,
gdk_broadway_display_set_cursor_theme (GdkDisplay *display,
const gchar *theme,
const gint size)
{
@ -116,7 +116,7 @@ gdk_x11_display_set_cursor_theme (GdkDisplay *display,
}
void
_gdk_x11_cursor_update_theme (GdkCursor *cursor)
_gdk_broadway_cursor_update_theme (GdkCursor *cursor)
{
g_return_if_fail (cursor != NULL);
}

View File

@ -1,5 +1,5 @@
/* GDK - The GIMP Drawing Kit
* gdkdisplay-x11.c
* gdkdisplay-broadway.c
*
* Copyright 2001 Sun Microsystems Inc.
* Copyright (C) 2004 Nokia Corporation
@ -41,44 +41,44 @@
#include <errno.h>
#include <unistd.h>
static void gdk_display_x11_dispose (GObject *object);
static void gdk_display_x11_finalize (GObject *object);
static void gdk_display_broadway_dispose (GObject *object);
static void gdk_display_broadway_finalize (GObject *object);
G_DEFINE_TYPE (GdkDisplayX11, _gdk_display_x11, GDK_TYPE_DISPLAY)
G_DEFINE_TYPE (GdkDisplayBroadway, _gdk_display_broadway, GDK_TYPE_DISPLAY)
static void
_gdk_display_x11_class_init (GdkDisplayX11Class * class)
_gdk_display_broadway_class_init (GdkDisplayBroadwayClass * class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
object_class->dispose = gdk_display_x11_dispose;
object_class->finalize = gdk_display_x11_finalize;
object_class->dispose = gdk_display_broadway_dispose;
object_class->finalize = gdk_display_broadway_finalize;
}
static void
_gdk_display_x11_init (GdkDisplayX11 *display)
_gdk_display_broadway_init (GdkDisplayBroadway *display)
{
}
static void
_gdk_event_init (GdkDisplay *display)
{
GdkDisplayX11 *display_x11;
GdkDisplayBroadway *display_broadway;
display_x11 = GDK_DISPLAY_X11 (display);
display_x11->event_source = gdk_event_source_new (display);
display_broadway = GDK_DISPLAY_BROADWAY (display);
display_broadway->event_source = gdk_event_source_new (display);
}
static void
_gdk_input_init (GdkDisplay *display)
{
GdkDisplayX11 *display_x11;
GdkDisplayBroadway *display_broadway;
GdkDeviceManager *device_manager;
GdkDevice *device;
GList *list, *l;
display_x11 = GDK_DISPLAY_X11 (display);
display_broadway = GDK_DISPLAY_BROADWAY (display);
device_manager = gdk_display_get_device_manager (display);
/* For backwards compatibility, just add
@ -93,7 +93,7 @@ _gdk_input_init (GdkDisplay *display)
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
continue;
display_x11->input_devices = g_list_prepend (display_x11->input_devices,
display_broadway->input_devices = g_list_prepend (display_broadway->input_devices,
g_object_ref (l->data));
}
@ -116,7 +116,7 @@ _gdk_input_init (GdkDisplay *display)
}
/* Add the core pointer to the devices list */
display_x11->input_devices = g_list_prepend (display_x11->input_devices,
display_broadway->input_devices = g_list_prepend (display_broadway->input_devices,
g_object_ref (display->core_pointer));
g_list_free (list);
@ -126,23 +126,23 @@ GdkDisplay *
gdk_display_open (const gchar *display_name)
{
GdkDisplay *display;
GdkDisplayX11 *display_x11;
GdkDisplayBroadway *display_broadway;
const char *sm_client_id;
display = g_object_new (GDK_TYPE_DISPLAY_X11, NULL);
display_x11 = GDK_DISPLAY_X11 (display);
display = g_object_new (GDK_TYPE_DISPLAY_BROADWAY, NULL);
display_broadway = GDK_DISPLAY_BROADWAY (display);
/* initialize the display's screens */
display_x11->screens = g_new (GdkScreen *, 1);
display_x11->screens[0] = _gdk_x11_screen_new (display, 0);
display_broadway->screens = g_new (GdkScreen *, 1);
display_broadway->screens[0] = _gdk_broadway_screen_new (display, 0);
/* We need to initialize events after we have the screen
* structures in places
*/
_gdk_screen_x11_events_init (display_x11->screens[0]);
_gdk_screen_broadway_events_init (display_broadway->screens[0]);
/*set the default screen */
display_x11->default_screen = display_x11->screens[0];
display_broadway->default_screen = display_broadway->screens[0];
display->device_manager = _gdk_device_manager_new (display);
@ -155,7 +155,7 @@ gdk_display_open (const gchar *display_name)
_gdk_input_init (display);
_gdk_dnd_init (display);
_gdk_x11_screen_setup (display_x11->screens[0]);
_gdk_broadway_screen_setup (display_broadway->screens[0]);
g_signal_emit_by_name (display, "opened");
g_signal_emit_by_name (gdk_display_manager_get (), "display-opened", display);
@ -187,7 +187,7 @@ gdk_display_get_screen (GdkDisplay *display,
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (screen_num == 0, NULL);
return GDK_DISPLAY_X11 (display)->screens[screen_num];
return GDK_DISPLAY_BROADWAY (display)->screens[screen_num];
}
GdkScreen *
@ -195,7 +195,7 @@ gdk_display_get_default_screen (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return GDK_DISPLAY_X11 (display)->default_screen;
return GDK_DISPLAY_BROADWAY (display)->default_screen;
}
void
@ -233,57 +233,57 @@ gdk_display_get_default_group (GdkDisplay *display)
}
void
gdk_x11_display_grab (GdkDisplay *display)
gdk_broadway_display_grab (GdkDisplay *display)
{
}
void
gdk_x11_display_ungrab (GdkDisplay *display)
gdk_broadway_display_ungrab (GdkDisplay *display)
{
}
static void
gdk_display_x11_dispose (GObject *object)
gdk_display_broadway_dispose (GObject *object)
{
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (object);
GdkDisplayBroadway *display_broadway = GDK_DISPLAY_BROADWAY (object);
g_list_foreach (display_x11->input_devices, (GFunc) g_object_run_dispose, NULL);
g_list_foreach (display_broadway->input_devices, (GFunc) g_object_run_dispose, NULL);
_gdk_screen_close (display_x11->screens[0]);
_gdk_screen_close (display_broadway->screens[0]);
if (display_x11->event_source)
if (display_broadway->event_source)
{
g_source_destroy (display_x11->event_source);
g_source_unref (display_x11->event_source);
display_x11->event_source = NULL;
g_source_destroy (display_broadway->event_source);
g_source_unref (display_broadway->event_source);
display_broadway->event_source = NULL;
}
G_OBJECT_CLASS (_gdk_display_x11_parent_class)->dispose (object);
G_OBJECT_CLASS (_gdk_display_broadway_parent_class)->dispose (object);
}
static void
gdk_display_x11_finalize (GObject *object)
gdk_display_broadway_finalize (GObject *object)
{
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (object);
GdkDisplayBroadway *display_broadway = GDK_DISPLAY_BROADWAY (object);
/* Keymap */
if (display_x11->keymap)
g_object_unref (display_x11->keymap);
if (display_broadway->keymap)
g_object_unref (display_broadway->keymap);
_gdk_x11_cursor_display_finalize (GDK_DISPLAY_OBJECT(display_x11));
_gdk_broadway_cursor_display_finalize (GDK_DISPLAY_OBJECT(display_broadway));
/* Atom Hashtable */
g_hash_table_destroy (display_x11->atom_from_virtual);
g_hash_table_destroy (display_x11->atom_to_virtual);
g_hash_table_destroy (display_broadway->atom_from_virtual);
g_hash_table_destroy (display_broadway->atom_to_virtual);
/* input GdkDevice list */
g_list_foreach (display_x11->input_devices, (GFunc) g_object_unref, NULL);
g_list_free (display_x11->input_devices);
g_list_foreach (display_broadway->input_devices, (GFunc) g_object_unref, NULL);
g_list_free (display_broadway->input_devices);
/* Free all GdkScreens */
g_object_unref (display_x11->screens[0]);
g_free (display_x11->screens);
g_object_unref (display_broadway->screens[0]);
g_free (display_broadway->screens);
G_OBJECT_CLASS (_gdk_display_x11_parent_class)->finalize (object);
G_OBJECT_CLASS (_gdk_display_broadway_parent_class)->finalize (object);
}
void
@ -331,9 +331,9 @@ gdk_display_store_clipboard (GdkDisplay *display,
}
guint32
gdk_x11_display_get_user_time (GdkDisplay *display)
gdk_broadway_display_get_user_time (GdkDisplay *display)
{
return GDK_DISPLAY_X11 (display)->user_time;
return GDK_DISPLAY_BROADWAY (display)->user_time;
}
gboolean
@ -348,21 +348,6 @@ gdk_display_supports_input_shapes (GdkDisplay *display)
return FALSE;
}
/**
* gdk_display_supports_composite:
* @display: a #GdkDisplay
*
* Returns %TRUE if gdk_window_set_composited() can be used
* to redirect drawing on the window using compositing.
*
* Currently this only works on X11 with XComposite and
* XDamage extensions available.
*
* Returns: %TRUE if windows may be composited.
*
* Since: 2.12
*/
gboolean
gdk_display_supports_composite (GdkDisplay *display)
{
@ -374,7 +359,7 @@ gdk_display_list_devices (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return GDK_DISPLAY_X11 (display)->input_devices;
return GDK_DISPLAY_BROADWAY (display)->input_devices;
}
gboolean

View File

@ -1,5 +1,5 @@
/*
* gdkdisplay-x11.h
* gdkdisplay-broadway.h
*
* Copyright 2001 Sun Microsystems Inc.
*
@ -21,8 +21,8 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GDK_DISPLAY_X11__
#define __GDK_DISPLAY_X11__
#ifndef __GDK_DISPLAY_BROADWAY__
#define __GDK_DISPLAY_BROADWAY__
#include <gdk/gdkdisplay.h>
#include <gdk/gdkkeys.h>
@ -32,17 +32,17 @@
G_BEGIN_DECLS
typedef struct _GdkDisplayX11 GdkDisplayX11;
typedef struct _GdkDisplayX11Class GdkDisplayX11Class;
typedef struct _GdkDisplayBroadway GdkDisplayBroadway;
typedef struct _GdkDisplayBroadwayClass GdkDisplayBroadwayClass;
#define GDK_TYPE_DISPLAY_X11 (_gdk_display_x11_get_type())
#define GDK_DISPLAY_X11(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY_X11, GdkDisplayX11))
#define GDK_DISPLAY_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY_X11, GdkDisplayX11Class))
#define GDK_IS_DISPLAY_X11(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DISPLAY_X11))
#define GDK_IS_DISPLAY_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY_X11))
#define GDK_DISPLAY_X11_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY_X11, GdkDisplayX11Class))
#define GDK_TYPE_DISPLAY_BROADWAY (_gdk_display_broadway_get_type())
#define GDK_DISPLAY_BROADWAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY_BROADWAY, GdkDisplayBroadway))
#define GDK_DISPLAY_BROADWAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY_BROADWAY, GdkDisplayBroadwayClass))
#define GDK_IS_DISPLAY_BROADWAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DISPLAY_BROADWAY))
#define GDK_IS_DISPLAY_BROADWAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY_BROADWAY))
#define GDK_DISPLAY_BROADWAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY_BROADWAY, GdkDisplayBroadwayClass))
struct _GdkDisplayX11
struct _GdkDisplayBroadway
{
GdkDisplay parent_instance;
GdkScreen *default_screen;
@ -74,13 +74,13 @@ struct _GdkDisplayX11
GdkWindow *active_offscreen_window;
};
struct _GdkDisplayX11Class
struct _GdkDisplayBroadwayClass
{
GdkDisplayClass parent_class;
};
GType _gdk_display_x11_get_type (void);
GType _gdk_display_broadway_get_type (void);
G_END_DECLS
#endif /* __GDK_DISPLAY_X11__ */
#endif /* __GDK_DISPLAY_BROADWAY__ */

View File

@ -37,16 +37,16 @@
#include <string.h>
typedef struct _GdkDragContextPrivateX11 GdkDragContextPrivateX11;
typedef struct _GdkDragContextPrivateBroadway GdkDragContextPrivateBroadway;
/* Structure that holds information about a drag in progress.
* this is used on both source and destination sides.
*/
struct _GdkDragContextPrivateX11 {
struct _GdkDragContextPrivateBroadway {
GdkDragContext context;
};
#define PRIVATE_DATA(context) ((GdkDragContextPrivateX11 *) GDK_DRAG_CONTEXT (context)->windowing_data)
#define PRIVATE_DATA(context) ((GdkDragContextPrivateBroadway *) GDK_DRAG_CONTEXT (context)->windowing_data)
static void gdk_drag_context_finalize (GObject *object);
@ -57,11 +57,11 @@ G_DEFINE_TYPE (GdkDragContext, gdk_drag_context, G_TYPE_OBJECT)
static void
gdk_drag_context_init (GdkDragContext *dragcontext)
{
GdkDragContextPrivateX11 *private;
GdkDragContextPrivateBroadway *private;
private = G_TYPE_INSTANCE_GET_PRIVATE (dragcontext,
GDK_TYPE_DRAG_CONTEXT,
GdkDragContextPrivateX11);
GdkDragContextPrivateBroadway);
dragcontext->windowing_data = private;
@ -75,7 +75,7 @@ gdk_drag_context_class_init (GdkDragContextClass *klass)
object_class->finalize = gdk_drag_context_finalize;
g_type_class_add_private (object_class, sizeof (GdkDragContextPrivateX11));
g_type_class_add_private (object_class, sizeof (GdkDragContextPrivateBroadway));
}
static void
@ -119,7 +119,7 @@ gdk_drag_begin (GdkWindow *window,
GdkDragContext *new_context;
g_return_val_if_fail (window != NULL, NULL);
g_return_val_if_fail (GDK_WINDOW_IS_X11 (window), NULL);
g_return_val_if_fail (GDK_WINDOW_IS_BROADWAY (window), NULL);
new_context = gdk_drag_context_new ();
@ -157,7 +157,7 @@ gdk_drag_motion (GdkDragContext *context,
guint32 time)
{
g_return_val_if_fail (context != NULL, FALSE);
g_return_val_if_fail (dest_window == NULL || GDK_WINDOW_IS_X11 (dest_window), FALSE);
g_return_val_if_fail (dest_window == NULL || GDK_WINDOW_IS_BROADWAY (dest_window), FALSE);
return FALSE;
}

View File

@ -36,36 +36,36 @@
#include <string.h>
static cairo_surface_t *gdk_x11_ref_cairo_surface (GdkDrawable *drawable);
static cairo_surface_t *gdk_broadway_ref_cairo_surface (GdkDrawable *drawable);
static const cairo_user_data_key_t gdk_x11_cairo_key;
static const cairo_user_data_key_t gdk_broadway_cairo_key;
G_DEFINE_TYPE (GdkDrawableImplX11, _gdk_drawable_impl_x11, GDK_TYPE_DRAWABLE)
G_DEFINE_TYPE (GdkDrawableImplBroadway, _gdk_drawable_impl_broadway, GDK_TYPE_DRAWABLE)
static void
_gdk_drawable_impl_x11_class_init (GdkDrawableImplX11Class *klass)
_gdk_drawable_impl_broadway_class_init (GdkDrawableImplBroadwayClass *klass)
{
GdkDrawableClass *drawable_class = GDK_DRAWABLE_CLASS (klass);
drawable_class->ref_cairo_surface = gdk_x11_ref_cairo_surface;
drawable_class->ref_cairo_surface = gdk_broadway_ref_cairo_surface;
drawable_class->create_cairo_surface = NULL;
}
static void
_gdk_drawable_impl_x11_init (GdkDrawableImplX11 *impl)
_gdk_drawable_impl_broadway_init (GdkDrawableImplBroadway *impl)
{
}
/**
* _gdk_x11_drawable_finish:
* @drawable: a #GdkDrawableImplX11.
* _gdk_broadway_drawable_finish:
* @drawable: a #GdkDrawableImplBroadway.
*
* Performs necessary cleanup prior to destroying a window.
**/
void
_gdk_x11_drawable_finish (GdkDrawable *drawable)
_gdk_broadway_drawable_finish (GdkDrawable *drawable)
{
GdkDrawableImplX11 *impl = GDK_DRAWABLE_IMPL_X11 (drawable);
GdkDrawableImplBroadway *impl = GDK_DRAWABLE_IMPL_BROADWAY (drawable);
if (impl->surface)
{
@ -77,16 +77,16 @@ _gdk_x11_drawable_finish (GdkDrawable *drawable)
}
/**
* _gdk_x11_drawable_update_size:
* @drawable: a #GdkDrawableImplX11.
* _gdk_broadway_drawable_update_size:
* @drawable: a #GdkDrawableImplBroadway.
*
* Updates the state of the drawable (in particular the drawable's
* cairo surface) when its size has changed.
**/
void
_gdk_x11_drawable_update_size (GdkDrawable *drawable)
_gdk_broadway_drawable_update_size (GdkDrawable *drawable)
{
GdkDrawableImplX11 *impl = GDK_DRAWABLE_IMPL_X11 (drawable);
GdkDrawableImplBroadway *impl = GDK_DRAWABLE_IMPL_BROADWAY (drawable);
cairo_surface_t *old, *last_old;
if (impl->surface)
@ -109,17 +109,17 @@ _gdk_x11_drawable_update_size (GdkDrawable *drawable)
}
/*****************************************************
* X11 specific implementations of generic functions *
* Broadway specific implementations of generic functions *
*****************************************************/
static cairo_surface_t *
gdk_x11_ref_cairo_surface (GdkDrawable *drawable)
gdk_broadway_ref_cairo_surface (GdkDrawable *drawable)
{
GdkDrawableImplX11 *impl = GDK_DRAWABLE_IMPL_X11 (drawable);
GdkDrawableImplBroadway *impl = GDK_DRAWABLE_IMPL_BROADWAY (drawable);
cairo_t *cr;
int w, h;
if (GDK_IS_WINDOW_IMPL_X11 (drawable) &&
if (GDK_IS_WINDOW_IMPL_BROADWAY (drawable) &&
GDK_WINDOW_DESTROYED (impl->wrapper))
return NULL;

View File

@ -31,20 +31,20 @@
G_BEGIN_DECLS
/* Drawable implementation for X11
/* Drawable implementation for Broadway
*/
typedef struct _GdkDrawableImplX11 GdkDrawableImplX11;
typedef struct _GdkDrawableImplX11Class GdkDrawableImplX11Class;
typedef struct _GdkDrawableImplBroadway GdkDrawableImplBroadway;
typedef struct _GdkDrawableImplBroadwayClass GdkDrawableImplBroadwayClass;
#define GDK_TYPE_DRAWABLE_IMPL_X11 (_gdk_drawable_impl_x11_get_type ())
#define GDK_DRAWABLE_IMPL_X11(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DRAWABLE_IMPL_X11, GdkDrawableImplX11))
#define GDK_DRAWABLE_IMPL_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DRAWABLE_IMPL_X11, GdkDrawableImplX11Class))
#define GDK_IS_DRAWABLE_IMPL_X11(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DRAWABLE_IMPL_X11))
#define GDK_IS_DRAWABLE_IMPL_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DRAWABLE_IMPL_X11))
#define GDK_DRAWABLE_IMPL_X11_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DRAWABLE_IMPL_X11, GdkDrawableImplX11Class))
#define GDK_TYPE_DRAWABLE_IMPL_BROADWAY (_gdk_drawable_impl_broadway_get_type ())
#define GDK_DRAWABLE_IMPL_BROADWAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DRAWABLE_IMPL_BROADWAY, GdkDrawableImplBroadway))
#define GDK_DRAWABLE_IMPL_BROADWAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DRAWABLE_IMPL_BROADWAY, GdkDrawableImplBroadwayClass))
#define GDK_IS_DRAWABLE_IMPL_BROADWAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DRAWABLE_IMPL_BROADWAY))
#define GDK_IS_DRAWABLE_IMPL_BROADWAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DRAWABLE_IMPL_BROADWAY))
#define GDK_DRAWABLE_IMPL_BROADWAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DRAWABLE_IMPL_BROADWAY, GdkDrawableImplBroadwayClass))
struct _GdkDrawableImplX11
struct _GdkDrawableImplBroadway
{
GdkDrawable parent_instance;
@ -55,18 +55,18 @@ struct _GdkDrawableImplX11
cairo_surface_t *last_surface;
};
struct _GdkDrawableImplX11Class
struct _GdkDrawableImplBroadwayClass
{
GdkDrawableClass parent_class;
};
GType _gdk_drawable_impl_x11_get_type (void);
GType _gdk_drawable_impl_broadway_get_type (void);
/* Note that the following take GdkDrawableImplX11, not the wrapper drawable */
void _gdk_x11_drawable_finish (GdkDrawable *drawable);
void _gdk_x11_drawable_update_size (GdkDrawable *drawable);
GdkDrawable *gdk_x11_window_get_drawable_impl (GdkWindow *window);
/* Note that the following take GdkDrawableImplBroadway, not the wrapper drawable */
void _gdk_broadway_drawable_finish (GdkDrawable *drawable);
void _gdk_broadway_drawable_update_size (GdkDrawable *drawable);
GdkDrawable *gdk_broadway_window_get_drawable_impl (GdkWindow *window);
G_END_DECLS

View File

@ -132,7 +132,7 @@ gdk_event_source_new (GdkDisplay *display)
char *name;
source = g_source_new (&event_funcs, sizeof (GdkEventSource));
name = g_strdup_printf ("GDK X11 Event source (%s)",
name = g_strdup_printf ("GDK Broadway Event source (%s)",
gdk_display_get_name (display));
g_source_set_name (source, name);
g_free (name);

View File

@ -35,7 +35,7 @@
#include <string.h>
void
_gdk_x11_initialize_locale (void)
_gdk_broadway_initialize_locale (void)
{
}

View File

@ -38,33 +38,33 @@
#include <limits.h>
#include <errno.h>
typedef struct _GdkKeymapX11 GdkKeymapX11;
typedef struct _GdkKeymapClass GdkKeymapX11Class;
typedef struct _GdkKeymapBroadway GdkKeymapBroadway;
typedef struct _GdkKeymapClass GdkKeymapBroadwayClass;
#define GDK_TYPE_KEYMAP_X11 (gdk_keymap_x11_get_type ())
#define GDK_KEYMAP_X11(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_KEYMAP_X11, GdkKeymapX11))
#define GDK_IS_KEYMAP_X11(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_KEYMAP_X11))
#define GDK_TYPE_KEYMAP_BROADWAY (gdk_keymap_broadway_get_type ())
#define GDK_KEYMAP_BROADWAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_KEYMAP_BROADWAY, GdkKeymapBroadway))
#define GDK_IS_KEYMAP_BROADWAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_KEYMAP_BROADWAY))
typedef struct _DirectionCacheEntry DirectionCacheEntry;
struct _GdkKeymapX11
struct _GdkKeymapBroadway
{
GdkKeymap parent_instance;
};
#define KEYMAP_USE_XKB(keymap) GDK_DISPLAY_X11 ((keymap)->display)->use_xkb
#define KEYMAP_USE_XKB(keymap) GDK_DISPLAY_BROADWAY ((keymap)->display)->use_xkb
#define KEYMAP_XDISPLAY(keymap) GDK_DISPLAY_XDISPLAY ((keymap)->display)
static GType gdk_keymap_x11_get_type (void);
static void gdk_keymap_x11_class_init (GdkKeymapX11Class *klass);
static void gdk_keymap_x11_init (GdkKeymapX11 *keymap);
static void gdk_keymap_x11_finalize (GObject *object);
static GType gdk_keymap_broadway_get_type (void);
static void gdk_keymap_broadway_class_init (GdkKeymapBroadwayClass *klass);
static void gdk_keymap_broadway_init (GdkKeymapBroadway *keymap);
static void gdk_keymap_broadway_finalize (GObject *object);
static GdkKeymapClass *parent_class = NULL;
static GType
gdk_keymap_x11_get_type (void)
gdk_keymap_broadway_get_type (void)
{
static GType object_type = 0;
@ -75,16 +75,16 @@ gdk_keymap_x11_get_type (void)
sizeof (GdkKeymapClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gdk_keymap_x11_class_init,
(GClassInitFunc) gdk_keymap_broadway_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkKeymapX11),
sizeof (GdkKeymapBroadway),
0, /* n_preallocs */
(GInstanceInitFunc) gdk_keymap_x11_init,
(GInstanceInitFunc) gdk_keymap_broadway_init,
};
object_type = g_type_register_static (GDK_TYPE_KEYMAP,
g_intern_static_string ("GdkKeymapX11"),
g_intern_static_string ("GdkKeymapBroadway"),
&object_info, 0);
}
@ -92,22 +92,22 @@ gdk_keymap_x11_get_type (void)
}
static void
gdk_keymap_x11_class_init (GdkKeymapX11Class *klass)
gdk_keymap_broadway_class_init (GdkKeymapBroadwayClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gdk_keymap_x11_finalize;
object_class->finalize = gdk_keymap_broadway_finalize;
}
static void
gdk_keymap_x11_init (GdkKeymapX11 *keymap)
gdk_keymap_broadway_init (GdkKeymapBroadway *keymap)
{
}
static void
gdk_keymap_x11_finalize (GObject *object)
gdk_keymap_broadway_finalize (GObject *object)
{
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@ -115,17 +115,17 @@ gdk_keymap_x11_finalize (GObject *object)
GdkKeymap*
gdk_keymap_get_for_display (GdkDisplay *display)
{
GdkDisplayX11 *display_x11;
GdkDisplayBroadway *display_broadway;
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
display_x11 = GDK_DISPLAY_X11 (display);
display_broadway = GDK_DISPLAY_BROADWAY (display);
if (!display_x11->keymap)
display_x11->keymap = g_object_new (gdk_keymap_x11_get_type (), NULL);
if (!display_broadway->keymap)
display_broadway->keymap = g_object_new (gdk_keymap_broadway_get_type (), NULL);
display_x11->keymap->display = display;
display_broadway->keymap->display = display;
return display_x11->keymap;
return display_broadway->keymap;
}
PangoDirection

View File

@ -57,7 +57,7 @@ const GOptionEntry _gdk_windowing_args[] = {
void
_gdk_windowing_init (void)
{
_gdk_x11_initialize_locale ();
_gdk_broadway_initialize_locale ();
_gdk_selection_property = gdk_atom_intern_static_string ("GDK_SELECTION");
}

View File

@ -46,10 +46,10 @@ struct _GdkCursorPrivate
GdkDisplay *display;
};
void _gdk_x11_error_handler_push (void);
void _gdk_x11_error_handler_pop (void);
void _gdk_broadway_error_handler_push (void);
void _gdk_broadway_error_handler_pop (void);
Colormap _gdk_visual_get_x11_colormap (GdkVisual *visual);
Colormap _gdk_visual_get_broadway_colormap (GdkVisual *visual);
void _gdk_xid_table_insert (GdkDisplay *display,
XID *xid,
@ -72,9 +72,9 @@ void _gdk_window_process_expose (GdkWindow *window,
gulong serial,
GdkRectangle *area);
gboolean _gdk_x11_window_queue_antiexpose (GdkWindow *window,
gboolean _gdk_broadway_window_queue_antiexpose (GdkWindow *window,
cairo_region_t *area);
void _gdk_x11_window_translate (GdkWindow *window,
void _gdk_broadway_window_translate (GdkWindow *window,
cairo_region_t *area,
gint dx,
gint dy);
@ -99,27 +99,27 @@ gboolean _gdk_moveresize_configure_done (GdkDisplay *display,
void _gdk_keymap_state_changed (GdkDisplay *display,
XEvent *event);
void _gdk_keymap_keys_changed (GdkDisplay *display);
gint _gdk_x11_get_group_for_state (GdkDisplay *display,
gint _gdk_broadway_get_group_for_state (GdkDisplay *display,
GdkModifierType state);
void _gdk_keymap_add_virtual_modifiers_compat (GdkKeymap *keymap,
GdkModifierType *modifiers);
gboolean _gdk_keymap_key_is_modifier (GdkKeymap *keymap,
guint keycode);
void _gdk_x11_initialize_locale (void);
void _gdk_broadway_initialize_locale (void);
void _gdk_xgrab_check_unmap (GdkWindow *window,
gulong serial);
void _gdk_xgrab_check_destroy (GdkWindow *window);
gboolean _gdk_x11_display_is_root_window (GdkDisplay *display,
gboolean _gdk_broadway_display_is_root_window (GdkDisplay *display,
Window xroot_window);
void _gdk_x11_precache_atoms (GdkDisplay *display,
void _gdk_broadway_precache_atoms (GdkDisplay *display,
const gchar * const *atom_names,
gint n_atoms);
void _gdk_screen_x11_events_init (GdkScreen *screen);
void _gdk_screen_broadway_events_init (GdkScreen *screen);
void _gdk_events_init (GdkDisplay *display);
void _gdk_events_uninit (GdkDisplay *display);
@ -127,20 +127,20 @@ void _gdk_windowing_window_init (GdkScreen *screen);
void _gdk_visual_init (GdkScreen *screen);
void _gdk_dnd_init (GdkDisplay *display);
void _gdk_x11_cursor_update_theme (GdkCursor *cursor);
void _gdk_x11_cursor_display_finalize (GdkDisplay *display);
void _gdk_broadway_cursor_update_theme (GdkCursor *cursor);
void _gdk_broadway_cursor_display_finalize (GdkDisplay *display);
gboolean _gdk_x11_get_xft_setting (GdkScreen *screen,
gboolean _gdk_broadway_get_xft_setting (GdkScreen *screen,
const gchar *name,
GValue *value);
GdkGrabStatus _gdk_x11_convert_grab_status (gint status);
GdkGrabStatus _gdk_broadway_convert_grab_status (gint status);
cairo_surface_t * _gdk_x11_window_create_bitmap_surface (GdkWindow *window,
cairo_surface_t * _gdk_broadway_window_create_bitmap_surface (GdkWindow *window,
int width,
int height);
extern GdkDrawableClass _gdk_x11_drawable_class;
extern GdkDrawableClass _gdk_broadway_drawable_class;
extern gboolean _gdk_use_xshm;
extern const int _gdk_nenvent_masks;
extern const int _gdk_event_mask_table[];
@ -148,12 +148,12 @@ extern GdkAtom _gdk_selection_property;
extern gboolean _gdk_synchronize;
#define GDK_DRAWABLE_XROOTWIN(win) (GDK_WINDOW_XROOTWIN (win))
#define GDK_SCREEN_DISPLAY(screen) (GDK_SCREEN_X11 (screen)->display)
#define GDK_SCREEN_XROOTWIN(screen) (GDK_SCREEN_X11 (screen)->xroot_window)
#define GDK_WINDOW_SCREEN(win) (GDK_DRAWABLE_IMPL_X11 (((GdkWindowObject *)win)->impl)->screen)
#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_GC_DISPLAY(gc) (GDK_SCREEN_DISPLAY (GDK_GC_X11(gc)->screen))
#define GDK_WINDOW_IS_X11(win) (GDK_IS_WINDOW_IMPL_X11 (((GdkWindowObject *)win)->impl))
#define GDK_SCREEN_DISPLAY(screen) (GDK_SCREEN_BROADWAY (screen)->display)
#define GDK_SCREEN_XROOTWIN(screen) (GDK_SCREEN_BROADWAY (screen)->xroot_window)
#define GDK_WINDOW_SCREEN(win) (GDK_DRAWABLE_IMPL_BROADWAY (((GdkWindowObject *)win)->impl)->screen)
#define GDK_WINDOW_DISPLAY(win) (GDK_SCREEN_BROADWAY (GDK_WINDOW_SCREEN (win))->display)
#define GDK_WINDOW_XROOTWIN(win) (GDK_SCREEN_BROADWAY (GDK_WINDOW_SCREEN (win))->xroot_window)
#define GDK_GC_DISPLAY(gc) (GDK_SCREEN_DISPLAY (GDK_GC_BROADWAY(gc)->screen))
#define GDK_WINDOW_IS_BROADWAY(win) (GDK_IS_WINDOW_IMPL_BROADWAY (((GdkWindowObject *)win)->impl))
#endif /* __GDK_PRIVATE_BROADWAY_H__ */

View File

@ -86,12 +86,12 @@ gdk_property_change (GdkWindow *window,
const guchar *data,
gint nelements)
{
g_return_if_fail (!window || GDK_WINDOW_IS_X11 (window));
g_return_if_fail (!window || GDK_WINDOW_IS_BROADWAY (window));
}
void
gdk_property_delete (GdkWindow *window,
GdkAtom property)
{
g_return_if_fail (!window || GDK_WINDOW_IS_X11 (window));
g_return_if_fail (!window || GDK_WINDOW_IS_BROADWAY (window));
}

View File

@ -34,22 +34,22 @@
#include <stdlib.h>
#include <string.h>
static void gdk_screen_x11_dispose (GObject *object);
static void gdk_screen_x11_finalize (GObject *object);
static void gdk_screen_broadway_dispose (GObject *object);
static void gdk_screen_broadway_finalize (GObject *object);
G_DEFINE_TYPE (GdkScreenX11, _gdk_screen_x11, GDK_TYPE_SCREEN)
G_DEFINE_TYPE (GdkScreenBroadway, _gdk_screen_broadway, GDK_TYPE_SCREEN)
static void
_gdk_screen_x11_class_init (GdkScreenX11Class *klass)
_gdk_screen_broadway_class_init (GdkScreenBroadwayClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = gdk_screen_x11_dispose;
object_class->finalize = gdk_screen_x11_finalize;
object_class->dispose = gdk_screen_broadway_dispose;
object_class->finalize = gdk_screen_broadway_finalize;
}
static void
_gdk_screen_x11_init (GdkScreenX11 *screen)
_gdk_screen_broadway_init (GdkScreenBroadway *screen)
{
screen->width = 1024;
screen->height = 768;
@ -60,7 +60,7 @@ gdk_screen_get_display (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
return GDK_SCREEN_X11 (screen)->display;
return GDK_SCREEN_BROADWAY (screen)->display;
}
gint
@ -68,7 +68,7 @@ gdk_screen_get_width (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
return GDK_SCREEN_X11 (screen)->width;
return GDK_SCREEN_BROADWAY (screen)->width;
}
gint
@ -76,7 +76,7 @@ gdk_screen_get_height (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
return GDK_SCREEN_X11 (screen)->height;
return GDK_SCREEN_BROADWAY (screen)->height;
}
gint
@ -108,35 +108,35 @@ gdk_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_SCREEN_BROADWAY (screen)->root_window;
}
static void
gdk_screen_x11_dispose (GObject *object)
gdk_screen_broadway_dispose (GObject *object)
{
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (object);
GdkScreenBroadway *screen_broadway = GDK_SCREEN_BROADWAY (object);
if (screen_x11->root_window)
_gdk_window_destroy (screen_x11->root_window, TRUE);
if (screen_broadway->root_window)
_gdk_window_destroy (screen_broadway->root_window, TRUE);
G_OBJECT_CLASS (_gdk_screen_x11_parent_class)->dispose (object);
G_OBJECT_CLASS (_gdk_screen_broadway_parent_class)->dispose (object);
}
static void
gdk_screen_x11_finalize (GObject *object)
gdk_screen_broadway_finalize (GObject *object)
{
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (object);
GdkScreenBroadway *screen_broadway = GDK_SCREEN_BROADWAY (object);
gint i;
if (screen_x11->root_window)
g_object_unref (screen_x11->root_window);
if (screen_broadway->root_window)
g_object_unref (screen_broadway->root_window);
/* Visual Part */
for (i = 0; i < screen_x11->nvisuals; i++)
g_object_unref (screen_x11->visuals[i]);
g_free (screen_x11->visuals);
for (i = 0; i < screen_broadway->nvisuals; i++)
g_object_unref (screen_broadway->visuals[i]);
g_free (screen_broadway->visuals);
G_OBJECT_CLASS (_gdk_screen_x11_parent_class)->finalize (object);
G_OBJECT_CLASS (_gdk_screen_broadway_parent_class)->finalize (object);
}
gint
@ -204,7 +204,7 @@ gdk_screen_get_monitor_geometry (GdkScreen *screen,
gint monitor_num,
GdkRectangle *dest)
{
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
GdkScreenBroadway *screen_broadway = GDK_SCREEN_BROADWAY (screen);
g_return_if_fail (GDK_IS_SCREEN (screen));
g_return_if_fail (monitor_num == 0);
@ -213,34 +213,34 @@ gdk_screen_get_monitor_geometry (GdkScreen *screen,
{
dest->x = 0;
dest->y = 0;
dest->width = screen_x11->width;
dest->height = screen_x11->height;
dest->width = screen_broadway->width;
dest->height = screen_broadway->height;
}
}
GdkVisual *
gdk_screen_get_rgba_visual (GdkScreen *screen)
{
GdkScreenX11 *screen_x11;
GdkScreenBroadway *screen_broadway;
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
screen_x11 = GDK_SCREEN_X11 (screen);
screen_broadway = GDK_SCREEN_BROADWAY (screen);
return screen_x11->rgba_visual;
return screen_broadway->rgba_visual;
}
GdkScreen *
_gdk_x11_screen_new (GdkDisplay *display,
_gdk_broadway_screen_new (GdkDisplay *display,
gint screen_number)
{
GdkScreen *screen;
GdkScreenX11 *screen_x11;
GdkScreenBroadway *screen_broadway;
screen = g_object_new (GDK_TYPE_SCREEN_X11, NULL);
screen = g_object_new (GDK_TYPE_SCREEN_BROADWAY, NULL);
screen_x11 = GDK_SCREEN_X11 (screen);
screen_x11->display = display;
screen_broadway = GDK_SCREEN_BROADWAY (screen);
screen_broadway->display = display;
_gdk_visual_init (screen);
_gdk_windowing_window_init (screen);
@ -253,18 +253,18 @@ _gdk_x11_screen_new (GdkDisplay *display,
* is_composited to avoid a race condition here.
*/
void
_gdk_x11_screen_setup (GdkScreen *screen)
_gdk_broadway_screen_setup (GdkScreen *screen)
{
}
gboolean
gdk_screen_is_composited (GdkScreen *screen)
{
GdkScreenX11 *screen_x11;
GdkScreenBroadway *screen_broadway;
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
screen_x11 = GDK_SCREEN_X11 (screen);
screen_broadway = GDK_SCREEN_BROADWAY (screen);
return FALSE;
}
@ -311,7 +311,7 @@ gdk_net_wm_supports (GdkAtom property)
}
void
_gdk_screen_x11_events_init (GdkScreen *screen)
_gdk_screen_broadway_events_init (GdkScreen *screen)
{
}

View File

@ -30,19 +30,19 @@
G_BEGIN_DECLS
typedef struct _GdkScreenX11 GdkScreenX11;
typedef struct _GdkScreenX11Class GdkScreenX11Class;
typedef struct _GdkScreenBroadway GdkScreenBroadway;
typedef struct _GdkScreenBroadwayClass GdkScreenBroadwayClass;
#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_SCREEN_BROADWAY (_gdk_screen_broadway_get_type ())
#define GDK_SCREEN_BROADWAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_SCREEN_BROADWAY, GdkScreenBroadway))
#define GDK_SCREEN_BROADWAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_SCREEN_BROADWAY, GdkScreenBroadwayClass))
#define GDK_IS_SCREEN_BROADWAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_SCREEN_BROADWAY))
#define GDK_IS_SCREEN_BROADWAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_SCREEN_BROADWAY))
#define GDK_SCREEN_BROADWAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_SCREEN_BROADWAY, GdkScreenBroadwayClass))
typedef struct _GdkX11Monitor GdkX11Monitor;
typedef struct _GdkBroadwayMonitor GdkBroadwayMonitor;
struct _GdkScreenX11
struct _GdkScreenBroadway
{
GdkScreen parent_instance;
@ -63,22 +63,22 @@ struct _GdkScreenX11
gint navailable_types;
};
struct _GdkScreenX11Class
struct _GdkScreenBroadwayClass
{
GdkScreenClass parent_class;
void (* window_manager_changed) (GdkScreenX11 *screen_x11);
void (* window_manager_changed) (GdkScreenBroadway *screen_broadway);
};
GType _gdk_screen_x11_get_type (void);
GdkScreen * _gdk_x11_screen_new (GdkDisplay *display,
GType _gdk_screen_broadway_get_type (void);
GdkScreen * _gdk_broadway_screen_new (GdkDisplay *display,
gint screen_number);
void _gdk_x11_screen_setup (GdkScreen *screen);
void _gdk_x11_screen_window_manager_changed (GdkScreen *screen);
void _gdk_x11_screen_size_changed (GdkScreen *screen,
void _gdk_broadway_screen_setup (GdkScreen *screen);
void _gdk_broadway_screen_window_manager_changed (GdkScreen *screen);
void _gdk_broadway_screen_size_changed (GdkScreen *screen,
XEvent *event);
void _gdk_x11_screen_process_owner_change (GdkScreen *screen,
void _gdk_broadway_screen_process_owner_change (GdkScreen *screen,
XEvent *event);
G_END_DECLS

View File

@ -77,12 +77,12 @@ gdk_visual_init (GdkVisual *visual)
void
_gdk_visual_init (GdkScreen *screen)
{
GdkScreenX11 *screen_x11;
GdkScreenBroadway *screen_broadway;
GdkVisual **visuals;
int nvisuals;
g_return_if_fail (GDK_IS_SCREEN (screen));
screen_x11 = GDK_SCREEN_X11 (screen);
screen_broadway = GDK_SCREEN_BROADWAY (screen);
nvisuals = 1;
visuals = g_new (GdkVisual *, nvisuals);
@ -127,17 +127,17 @@ _gdk_visual_init (GdkScreen *screen)
&visuals[1]->blue_shift,
&visuals[1]->blue_prec);
screen_x11->system_visual = visuals[1];
screen_x11->rgba_visual = visuals[0];
screen_broadway->system_visual = visuals[1];
screen_broadway->rgba_visual = visuals[0];
screen_x11->navailable_depths = 2;
screen_x11->available_depths[0] = 32;
screen_x11->available_depths[1] = 24;
screen_broadway->navailable_depths = 2;
screen_broadway->available_depths[0] = 32;
screen_broadway->available_depths[1] = 24;
screen_x11->navailable_types = 1;
screen_x11->available_types[0] = GDK_VISUAL_TRUE_COLOR;
screen_broadway->navailable_types = 1;
screen_broadway->available_types[0] = GDK_VISUAL_TRUE_COLOR;
screen_x11->visuals = visuals;
screen_broadway->visuals = visuals;
}
gint
@ -145,7 +145,7 @@ gdk_visual_get_best_depth (void)
{
GdkScreen *screen = gdk_screen_get_default();
return GDK_SCREEN_X11 (screen)->available_depths[0];
return GDK_SCREEN_BROADWAY (screen)->available_depths[0];
}
GdkVisualType
@ -153,7 +153,7 @@ gdk_visual_get_best_type (void)
{
GdkScreen *screen = gdk_screen_get_default();
return GDK_SCREEN_X11 (screen)->available_types[0];
return GDK_SCREEN_BROADWAY (screen)->available_types[0];
}
GdkVisual *
@ -161,29 +161,29 @@ gdk_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_SCREEN_BROADWAY (screen)->system_visual);
}
GdkVisual*
gdk_visual_get_best (void)
{
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_screen_get_default());
GdkScreenBroadway *screen_broadway = GDK_SCREEN_BROADWAY (gdk_screen_get_default());
return (GdkVisual *)screen_x11->visuals[0];
return (GdkVisual *)screen_broadway->visuals[0];
}
GdkVisual*
gdk_visual_get_best_with_depth (gint depth)
{
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_screen_get_default ());
GdkScreenBroadway *screen_broadway = GDK_SCREEN_BROADWAY (gdk_screen_get_default ());
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 < screen_broadway->nvisuals; i++)
if (depth == screen_broadway->visuals[i]->depth)
{
return_val = (GdkVisual *) screen_x11->visuals[i];
return_val = (GdkVisual *) screen_broadway->visuals[i];
break;
}
@ -193,15 +193,15 @@ gdk_visual_get_best_with_depth (gint depth)
GdkVisual*
gdk_visual_get_best_with_type (GdkVisualType visual_type)
{
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_screen_get_default ());
GdkScreenBroadway *screen_broadway = GDK_SCREEN_BROADWAY (gdk_screen_get_default ());
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 < screen_broadway->nvisuals; i++)
if (visual_type == screen_broadway->visuals[i]->type)
{
return_val = (GdkVisual *) screen_x11->visuals[i];
return_val = (GdkVisual *) screen_broadway->visuals[i];
break;
}
@ -212,16 +212,16 @@ GdkVisual*
gdk_visual_get_best_with_both (gint depth,
GdkVisualType visual_type)
{
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_screen_get_default ());
GdkScreenBroadway *screen_broadway = GDK_SCREEN_BROADWAY (gdk_screen_get_default ());
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 < screen_broadway->nvisuals; i++)
if ((depth == screen_broadway->visuals[i]->depth) &&
(visual_type == screen_broadway->visuals[i]->type))
{
return_val = (GdkVisual *) screen_x11->visuals[i];
return_val = (GdkVisual *) screen_broadway->visuals[i];
break;
}
@ -232,36 +232,36 @@ void
gdk_query_depths (gint **depths,
gint *count)
{
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_screen_get_default ());
GdkScreenBroadway *screen_broadway = GDK_SCREEN_BROADWAY (gdk_screen_get_default ());
*count = screen_x11->navailable_depths;
*depths = screen_x11->available_depths;
*count = screen_broadway->navailable_depths;
*depths = screen_broadway->available_depths;
}
void
gdk_query_visual_types (GdkVisualType **visual_types,
gint *count)
{
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_screen_get_default ());
GdkScreenBroadway *screen_broadway = GDK_SCREEN_BROADWAY (gdk_screen_get_default ());
*count = screen_x11->navailable_types;
*visual_types = screen_x11->available_types;
*count = screen_broadway->navailable_types;
*visual_types = screen_broadway->available_types;
}
GList *
gdk_screen_list_visuals (GdkScreen *screen)
{
GList *list;
GdkScreenX11 *screen_x11;
GdkScreenBroadway *screen_broadway;
guint i;
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
screen_x11 = GDK_SCREEN_X11 (screen);
screen_broadway = GDK_SCREEN_BROADWAY (screen);
list = NULL;
for (i = 0; i < screen_x11->nvisuals; ++i)
list = g_list_append (list, screen_x11->visuals[i]);
for (i = 0; i < screen_broadway->nvisuals; ++i)
list = g_list_append (list, screen_broadway->visuals[i]);
return list;
}

View File

@ -45,10 +45,10 @@
#include <unistd.h>
/* Forward declarations */
static void gdk_window_x11_set_background (GdkWindow *window,
static void gdk_window_broadway_set_background (GdkWindow *window,
cairo_pattern_t *pattern);
static void gdk_window_impl_x11_finalize (GObject *object);
static void gdk_window_impl_broadway_finalize (GObject *object);
static void gdk_window_impl_iface_init (GdkWindowImplIface *iface);
#define WINDOW_IS_TOPLEVEL_OR_FOREIGN(window) \
@ -68,9 +68,9 @@ static void gdk_window_impl_iface_init (GdkWindowImplIface *iface);
(( time1 < time2 ) && ( time2 - time1 > ((guint32)-1)/2 )) \
)
G_DEFINE_TYPE_WITH_CODE (GdkWindowImplX11,
gdk_window_impl_x11,
GDK_TYPE_DRAWABLE_IMPL_X11,
G_DEFINE_TYPE_WITH_CODE (GdkWindowImplBroadway,
gdk_window_impl_broadway,
GDK_TYPE_DRAWABLE_IMPL_BROADWAY,
G_IMPLEMENT_INTERFACE (GDK_TYPE_WINDOW_IMPL,
gdk_window_impl_iface_init));
@ -79,11 +79,11 @@ static GList *all_windows;
GType
_gdk_window_impl_get_type (void)
{
return gdk_window_impl_x11_get_type ();
return gdk_window_impl_broadway_get_type ();
}
static void
gdk_window_impl_x11_init (GdkWindowImplX11 *impl)
gdk_window_impl_broadway_init (GdkWindowImplBroadway *impl)
{
static int current_id = 1; /* 0 is the root window */
@ -95,24 +95,24 @@ gdk_window_impl_x11_init (GdkWindowImplX11 *impl)
}
static void
gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
gdk_window_impl_broadway_class_init (GdkWindowImplBroadwayClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gdk_window_impl_x11_finalize;
object_class->finalize = gdk_window_impl_broadway_finalize;
}
static void
gdk_window_impl_x11_finalize (GObject *object)
gdk_window_impl_broadway_finalize (GObject *object)
{
GdkWindowObject *wrapper;
GdkDrawableImplX11 *draw_impl;
GdkWindowImplX11 *window_impl;
GdkDrawableImplBroadway *draw_impl;
GdkWindowImplBroadway *window_impl;
g_return_if_fail (GDK_IS_WINDOW_IMPL_X11 (object));
g_return_if_fail (GDK_IS_WINDOW_IMPL_BROADWAY (object));
draw_impl = GDK_DRAWABLE_IMPL_X11 (object);
window_impl = GDK_WINDOW_IMPL_X11 (object);
draw_impl = GDK_DRAWABLE_IMPL_BROADWAY (object);
window_impl = GDK_WINDOW_IMPL_BROADWAY (object);
wrapper = (GdkWindowObject*) draw_impl->wrapper;
@ -123,28 +123,28 @@ gdk_window_impl_x11_finalize (GObject *object)
all_windows = g_list_remove (all_windows, window_impl);
G_OBJECT_CLASS (gdk_window_impl_x11_parent_class)->finalize (object);
G_OBJECT_CLASS (gdk_window_impl_broadway_parent_class)->finalize (object);
}
void
_gdk_windowing_window_init (GdkScreen * screen)
{
GdkWindowObject *private;
GdkDrawableImplX11 *draw_impl;
GdkScreenX11 *screen_x11;
GdkDrawableImplBroadway *draw_impl;
GdkScreenBroadway *screen_broadway;
screen_x11 = GDK_SCREEN_X11 (screen);
screen_broadway = GDK_SCREEN_BROADWAY (screen);
g_assert (screen_x11->root_window == NULL);
g_assert (screen_broadway->root_window == NULL);
screen_x11->root_window = g_object_new (GDK_TYPE_WINDOW, NULL);
screen_broadway->root_window = g_object_new (GDK_TYPE_WINDOW, NULL);
private = (GdkWindowObject *) screen_x11->root_window;
private = (GdkWindowObject *) screen_broadway->root_window;
private->impl = g_object_new (_gdk_window_impl_get_type (), NULL);
private->impl_window = private;
private->visual = gdk_screen_get_system_visual (screen);
draw_impl = GDK_DRAWABLE_IMPL_X11 (private->impl);
draw_impl = GDK_DRAWABLE_IMPL_BROADWAY (private->impl);
draw_impl->screen = screen;
draw_impl->wrapper = GDK_DRAWABLE (private);
@ -160,7 +160,7 @@ _gdk_windowing_window_init (GdkScreen * screen)
private->height = gdk_screen_get_height (screen);
private->viewable = TRUE;
_gdk_window_update_size (screen_x11->root_window);
_gdk_window_update_size (screen_broadway->root_window);
}
void
@ -172,19 +172,19 @@ _gdk_window_impl_new (GdkWindow *window,
gint attributes_mask)
{
GdkWindowObject *private;
GdkWindowImplX11 *impl;
GdkDrawableImplX11 *draw_impl;
GdkScreenX11 *screen_x11;
GdkDisplayX11 *display_x11;
GdkWindowImplBroadway *impl;
GdkDrawableImplBroadway *draw_impl;
GdkScreenBroadway *screen_broadway;
GdkDisplayBroadway *display_broadway;
private = (GdkWindowObject *) window;
screen_x11 = GDK_SCREEN_X11 (screen);
display_x11 = GDK_DISPLAY_X11 (GDK_SCREEN_DISPLAY (screen));
screen_broadway = GDK_SCREEN_BROADWAY (screen);
display_broadway = GDK_DISPLAY_BROADWAY (GDK_SCREEN_DISPLAY (screen));
impl = g_object_new (_gdk_window_impl_get_type (), NULL);
private->impl = (GdkDrawable *)impl;
draw_impl = GDK_DRAWABLE_IMPL_X11 (impl);
draw_impl = GDK_DRAWABLE_IMPL_BROADWAY (impl);
draw_impl->wrapper = GDK_DRAWABLE (window);
draw_impl->screen = screen;
@ -215,7 +215,7 @@ gdk_window_lookup (GdkNativeWindow anid)
}
static void
_gdk_x11_window_destroy (GdkWindow *window,
_gdk_broadway_window_destroy (GdkWindow *window,
gboolean recursing,
gboolean foreign_destroy)
{
@ -225,11 +225,11 @@ _gdk_x11_window_destroy (GdkWindow *window,
_gdk_selection_window_destroyed (window);
_gdk_x11_drawable_finish (private->impl);
_gdk_broadway_drawable_finish (private->impl);
}
static cairo_surface_t *
gdk_window_x11_resize_cairo_surface (GdkWindow *window,
gdk_window_broadway_resize_cairo_surface (GdkWindow *window,
cairo_surface_t *surface,
gint width,
gint height)
@ -250,9 +250,9 @@ _gdk_windowing_window_destroy_foreign (GdkWindow *window)
void
gdk_window_destroy_notify (GdkWindow *window)
{
GdkWindowImplX11 *window_impl;
GdkWindowImplBroadway *window_impl;
window_impl = GDK_WINDOW_IMPL_X11 (((GdkWindowObject *)window)->impl);
window_impl = GDK_WINDOW_IMPL_BROADWAY (((GdkWindowObject *)window)->impl);
if (!GDK_WINDOW_DESTROYED (window))
{
@ -266,7 +266,7 @@ gdk_window_destroy_notify (GdkWindow *window)
}
static void
gdk_window_x11_show (GdkWindow *window, gboolean already_mapped)
gdk_window_broadway_show (GdkWindow *window, gboolean already_mapped)
{
GdkWindowObject *private;
@ -282,7 +282,7 @@ gdk_window_x11_show (GdkWindow *window, gboolean already_mapped)
}
static void
gdk_window_x11_hide (GdkWindow *window)
gdk_window_broadway_hide (GdkWindow *window)
{
GdkWindowObject *private;
@ -298,13 +298,13 @@ gdk_window_x11_hide (GdkWindow *window)
}
static void
gdk_window_x11_withdraw (GdkWindow *window)
gdk_window_broadway_withdraw (GdkWindow *window)
{
gdk_window_x11_hide (window);
gdk_window_broadway_hide (window);
}
static inline void
window_x11_move (GdkWindow *window,
window_broadway_move (GdkWindow *window,
gint x,
gint y)
{
@ -316,7 +316,7 @@ window_x11_move (GdkWindow *window,
}
static inline void
window_x11_resize (GdkWindow *window,
window_broadway_resize (GdkWindow *window,
gint width,
gint height)
{
@ -332,13 +332,13 @@ window_x11_resize (GdkWindow *window,
private->width = width;
private->height = height;
_gdk_x11_drawable_update_size (private->impl);
_gdk_broadway_drawable_update_size (private->impl);
_gdk_x11_drawable_update_size (private->impl);
_gdk_broadway_drawable_update_size (private->impl);
}
static inline void
window_x11_move_resize (GdkWindow *window,
window_broadway_move_resize (GdkWindow *window,
gint x,
gint y,
gint width,
@ -360,11 +360,11 @@ window_x11_move_resize (GdkWindow *window,
private->width = width;
private->height = height;
_gdk_x11_drawable_update_size (private->impl);
_gdk_broadway_drawable_update_size (private->impl);
}
static void
gdk_window_x11_move_resize (GdkWindow *window,
gdk_window_broadway_move_resize (GdkWindow *window,
gboolean with_move,
gint x,
gint y,
@ -372,18 +372,18 @@ gdk_window_x11_move_resize (GdkWindow *window,
gint height)
{
if (with_move && (width < 0 && height < 0))
window_x11_move (window, x, y);
window_broadway_move (window, x, y);
else
{
if (with_move)
window_x11_move_resize (window, x, y, width, height);
window_broadway_move_resize (window, x, y, width, height);
else
window_x11_resize (window, width, height);
window_broadway_resize (window, width, height);
}
}
static gboolean
gdk_window_x11_reparent (GdkWindow *window,
gdk_window_broadway_reparent (GdkWindow *window,
GdkWindow *new_parent,
gint x,
gint y)
@ -392,25 +392,25 @@ gdk_window_x11_reparent (GdkWindow *window,
}
static void
gdk_window_x11_raise (GdkWindow *window)
gdk_window_broadway_raise (GdkWindow *window)
{
}
static void
gdk_window_x11_restack_under (GdkWindow *window,
gdk_window_broadway_restack_under (GdkWindow *window,
GList *native_siblings /* in requested order, first is bottom-most */)
{
}
static void
gdk_window_x11_restack_toplevel (GdkWindow *window,
gdk_window_broadway_restack_toplevel (GdkWindow *window,
GdkWindow *sibling,
gboolean above)
{
}
static void
gdk_window_x11_lower (GdkWindow *window)
gdk_window_broadway_lower (GdkWindow *window)
{
}
@ -489,31 +489,31 @@ gdk_window_set_transient_for (GdkWindow *window,
}
static void
gdk_window_x11_set_background (GdkWindow *window,
gdk_window_broadway_set_background (GdkWindow *window,
cairo_pattern_t *pattern)
{
return;
}
static void
gdk_window_x11_set_device_cursor (GdkWindow *window,
gdk_window_broadway_set_device_cursor (GdkWindow *window,
GdkDevice *device,
GdkCursor *cursor)
{
GdkWindowObject *private;
GdkWindowImplX11 *impl;
GdkWindowImplBroadway *impl;
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (GDK_IS_DEVICE (device));
private = (GdkWindowObject *) window;
impl = GDK_WINDOW_IMPL_X11 (private->impl);
impl = GDK_WINDOW_IMPL_BROADWAY (private->impl);
if (!cursor)
g_hash_table_remove (impl->device_cursor, device);
else
{
_gdk_x11_cursor_update_theme (cursor);
_gdk_broadway_cursor_update_theme (cursor);
g_hash_table_replace (impl->device_cursor,
device, gdk_cursor_ref (cursor));
}
@ -523,21 +523,21 @@ gdk_window_x11_set_device_cursor (GdkWindow *window,
}
GdkCursor *
_gdk_x11_window_get_cursor (GdkWindow *window)
_gdk_broadway_window_get_cursor (GdkWindow *window)
{
GdkWindowObject *private;
GdkWindowImplX11 *impl;
GdkWindowImplBroadway *impl;
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
private = (GdkWindowObject *)window;
impl = GDK_WINDOW_IMPL_X11 (private->impl);
impl = GDK_WINDOW_IMPL_BROADWAY (private->impl);
return impl->cursor;
}
static void
gdk_window_x11_get_geometry (GdkWindow *window,
gdk_window_broadway_get_geometry (GdkWindow *window,
gint *x,
gint *y,
gint *width,
@ -547,7 +547,7 @@ gdk_window_x11_get_geometry (GdkWindow *window,
}
static gint
gdk_window_x11_get_root_coords (GdkWindow *window,
gdk_window_broadway_get_root_coords (GdkWindow *window,
gint x,
gint y,
gint *root_x,
@ -603,7 +603,7 @@ _gdk_windowing_get_device_state (GdkDisplay *display,
}
static gboolean
gdk_window_x11_get_device_state (GdkWindow *window,
gdk_window_broadway_get_device_state (GdkWindow *window,
GdkDevice *device,
gint *x,
gint *y,
@ -654,7 +654,7 @@ _gdk_windowing_window_at_device_position (GdkDisplay *display,
}
static GdkEventMask
gdk_window_x11_get_events (GdkWindow *window)
gdk_window_broadway_get_events (GdkWindow *window)
{
if (GDK_WINDOW_DESTROYED (window))
return 0;
@ -662,7 +662,7 @@ gdk_window_x11_get_events (GdkWindow *window)
return 0;
}
static void
gdk_window_x11_set_events (GdkWindow *window,
gdk_window_broadway_set_events (GdkWindow *window,
GdkEventMask event_mask)
{
if (!GDK_WINDOW_DESTROYED (window))
@ -671,7 +671,7 @@ gdk_window_x11_set_events (GdkWindow *window,
}
static void
gdk_window_x11_shape_combine_region (GdkWindow *window,
gdk_window_broadway_shape_combine_region (GdkWindow *window,
const cairo_region_t *shape_region,
gint offset_x,
gint offset_y)
@ -679,7 +679,7 @@ gdk_window_x11_shape_combine_region (GdkWindow *window,
}
static void
gdk_window_x11_input_shape_combine_region (GdkWindow *window,
gdk_window_broadway_input_shape_combine_region (GdkWindow *window,
const cairo_region_t *shape_region,
gint offset_x,
gint offset_y)
@ -905,7 +905,7 @@ _gdk_windowing_window_get_input_shape (GdkWindow *window)
static gboolean
gdk_window_x11_set_static_gravities (GdkWindow *window,
gdk_window_broadway_set_static_gravities (GdkWindow *window,
gboolean use_static)
{
return TRUE;
@ -943,7 +943,7 @@ gdk_window_enable_synchronized_configure (GdkWindow *window)
{
GdkWindowObject *private = (GdkWindowObject *)window;
if (!GDK_IS_WINDOW_IMPL_X11 (private->impl))
if (!GDK_IS_WINDOW_IMPL_BROADWAY (private->impl))
return;
}
@ -998,12 +998,12 @@ _gdk_windowing_window_process_updates_recurse (GdkWindow *window,
cairo_region_t *region)
{
GdkWindowObject *private;
GdkWindowImplX11 *impl;
GdkWindowImplBroadway *impl;
_gdk_window_process_updates_recurse (window, region);
private = (GdkWindowObject *)window;
impl = GDK_WINDOW_IMPL_X11 (private->impl);
impl = GDK_WINDOW_IMPL_BROADWAY (private->impl);
impl->dirty = TRUE;
}
@ -1019,7 +1019,7 @@ _gdk_windowing_after_process_all_updates (void)
for (l = all_windows; l != NULL; l = l->next)
{
GdkWindowImplX11 *impl = l->data;
GdkWindowImplBroadway *impl = l->data;
if (impl->dirty)
{
@ -1030,26 +1030,26 @@ _gdk_windowing_after_process_all_updates (void)
}
gboolean
_gdk_x11_window_queue_antiexpose (GdkWindow *window,
_gdk_broadway_window_queue_antiexpose (GdkWindow *window,
cairo_region_t *area)
{
return TRUE;
}
void
_gdk_x11_window_translate (GdkWindow *window,
_gdk_broadway_window_translate (GdkWindow *window,
cairo_region_t *area,
gint dx,
gint dy)
{
GdkWindowObject *private;
GdkWindowImplX11 *impl;
GdkWindowImplBroadway *impl;
cairo_surface_t *surface;
private = (GdkWindowObject *)window;
impl = GDK_WINDOW_IMPL_X11 (private->impl);
impl = GDK_WINDOW_IMPL_BROADWAY (private->impl);
surface = GDK_DRAWABLE_IMPL_X11 (impl)->surface;
surface = GDK_DRAWABLE_IMPL_BROADWAY (impl)->surface;
if (surface)
{
cairo_t *cr;
@ -1079,27 +1079,27 @@ _gdk_x11_window_translate (GdkWindow *window,
static void
gdk_window_impl_iface_init (GdkWindowImplIface *iface)
{
iface->show = gdk_window_x11_show;
iface->hide = gdk_window_x11_hide;
iface->withdraw = gdk_window_x11_withdraw;
iface->set_events = gdk_window_x11_set_events;
iface->get_events = gdk_window_x11_get_events;
iface->raise = gdk_window_x11_raise;
iface->lower = gdk_window_x11_lower;
iface->restack_under = gdk_window_x11_restack_under;
iface->restack_toplevel = gdk_window_x11_restack_toplevel;
iface->move_resize = gdk_window_x11_move_resize;
iface->set_background = gdk_window_x11_set_background;
iface->reparent = gdk_window_x11_reparent;
iface->set_device_cursor = gdk_window_x11_set_device_cursor;
iface->get_geometry = gdk_window_x11_get_geometry;
iface->get_root_coords = gdk_window_x11_get_root_coords;
iface->get_device_state = gdk_window_x11_get_device_state;
iface->shape_combine_region = gdk_window_x11_shape_combine_region;
iface->input_shape_combine_region = gdk_window_x11_input_shape_combine_region;
iface->set_static_gravities = gdk_window_x11_set_static_gravities;
iface->queue_antiexpose = _gdk_x11_window_queue_antiexpose;
iface->translate = _gdk_x11_window_translate;
iface->destroy = _gdk_x11_window_destroy;
iface->resize_cairo_surface = gdk_window_x11_resize_cairo_surface;
iface->show = gdk_window_broadway_show;
iface->hide = gdk_window_broadway_hide;
iface->withdraw = gdk_window_broadway_withdraw;
iface->set_events = gdk_window_broadway_set_events;
iface->get_events = gdk_window_broadway_get_events;
iface->raise = gdk_window_broadway_raise;
iface->lower = gdk_window_broadway_lower;
iface->restack_under = gdk_window_broadway_restack_under;
iface->restack_toplevel = gdk_window_broadway_restack_toplevel;
iface->move_resize = gdk_window_broadway_move_resize;
iface->set_background = gdk_window_broadway_set_background;
iface->reparent = gdk_window_broadway_reparent;
iface->set_device_cursor = gdk_window_broadway_set_device_cursor;
iface->get_geometry = gdk_window_broadway_get_geometry;
iface->get_root_coords = gdk_window_broadway_get_root_coords;
iface->get_device_state = gdk_window_broadway_get_device_state;
iface->shape_combine_region = gdk_window_broadway_shape_combine_region;
iface->input_shape_combine_region = gdk_window_broadway_input_shape_combine_region;
iface->set_static_gravities = gdk_window_broadway_set_static_gravities;
iface->queue_antiexpose = _gdk_broadway_window_queue_antiexpose;
iface->translate = _gdk_broadway_window_translate;
iface->destroy = _gdk_broadway_window_destroy;
iface->resize_cairo_surface = gdk_window_broadway_resize_cairo_surface;
}

View File

@ -31,24 +31,22 @@
G_BEGIN_DECLS
typedef struct _GdkToplevelX11 GdkToplevelX11;
typedef struct _GdkWindowImplX11 GdkWindowImplX11;
typedef struct _GdkWindowImplX11Class GdkWindowImplX11Class;
typedef struct _GdkXPositionInfo GdkXPositionInfo;
typedef struct _GdkWindowImplBroadway GdkWindowImplBroadway;
typedef struct _GdkWindowImplBroadwayClass GdkWindowImplBroadwayClass;
/* Window implementation for X11
/* Window implementation for Broadway
*/
#define GDK_TYPE_WINDOW_IMPL_X11 (gdk_window_impl_x11_get_type ())
#define GDK_WINDOW_IMPL_X11(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW_IMPL_X11, GdkWindowImplX11))
#define GDK_WINDOW_IMPL_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW_IMPL_X11, GdkWindowImplX11Class))
#define GDK_IS_WINDOW_IMPL_X11(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_IMPL_X11))
#define GDK_IS_WINDOW_IMPL_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW_IMPL_X11))
#define GDK_WINDOW_IMPL_X11_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW_IMPL_X11, GdkWindowImplX11Class))
#define GDK_TYPE_WINDOW_IMPL_BROADWAY (gdk_window_impl_broadway_get_type ())
#define GDK_WINDOW_IMPL_BROADWAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW_IMPL_BROADWAY, GdkWindowImplBroadway))
#define GDK_WINDOW_IMPL_BROADWAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW_IMPL_BROADWAY, GdkWindowImplBroadwayClass))
#define GDK_IS_WINDOW_IMPL_BROADWAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_IMPL_BROADWAY))
#define GDK_IS_WINDOW_IMPL_BROADWAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW_IMPL_BROADWAY))
#define GDK_WINDOW_IMPL_BROADWAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW_IMPL_BROADWAY, GdkWindowImplBroadwayClass))
struct _GdkWindowImplX11
struct _GdkWindowImplBroadway
{
GdkDrawableImplX11 parent_instance;
GdkDrawableImplBroadway parent_instance;
int id;
GdkCursor *cursor;
@ -59,12 +57,12 @@ struct _GdkWindowImplX11
};
struct _GdkWindowImplX11Class
struct _GdkWindowImplBroadwayClass
{
GdkDrawableImplX11Class parent_class;
GdkDrawableImplBroadwayClass parent_class;
};
GType gdk_window_impl_x11_get_type (void);
GType gdk_window_impl_broadway_get_type (void);
G_END_DECLS