From 85bd61778f58c50da312cb93a9ead3e98d461072 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 20 Dec 2010 17:11:00 +0100 Subject: [PATCH] API: gdk: GDK_DISPLAY_OBJECT() => GDK_DISPLAY() GDK_DISPLAY_OBJECT is now deprecated. No need to keep failures from gtk1 around. --- docs/reference/gdk/gdk3-sections.txt | 1 + gdk/gdkdisplay.c | 6 +++--- gdk/gdkdisplay.h | 5 ++++- gdk/x11/gdkdisplay-x11.c | 6 +++--- gdk/x11/gdkmain-x11.c | 2 +- gtk/gtktooltip.c | 2 +- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt index 5f2c0d8cc9..2e1a58e69a 100644 --- a/docs/reference/gdk/gdk3-sections.txt +++ b/docs/reference/gdk/gdk3-sections.txt @@ -148,6 +148,7 @@ gdk_display_supports_shapes gdk_display_supports_input_shapes gdk_display_supports_composite +GDK_DISPLAY GDK_DISPLAY_OBJECT GDK_IS_DISPLAY GDK_TYPE_DISPLAY diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c index 3374ff405e..1c69f8b2e4 100644 --- a/gdk/gdkdisplay.c +++ b/gdk/gdkdisplay.c @@ -300,10 +300,10 @@ gdk_display_init (GdkDisplay *display) static void gdk_display_dispose (GObject *object) { - GdkDisplay *display = GDK_DISPLAY_OBJECT (object); + GdkDisplay *display = GDK_DISPLAY (object); GdkDeviceManager *device_manager; - device_manager = gdk_display_get_device_manager (GDK_DISPLAY_OBJECT (object)); + device_manager = gdk_display_get_device_manager (GDK_DISPLAY (object)); g_list_foreach (display->queued_events, (GFunc)gdk_event_free, NULL); g_list_free (display->queued_events); @@ -325,7 +325,7 @@ gdk_display_dispose (GObject *object) static void gdk_display_finalize (GObject *object) { - GdkDisplay *display = GDK_DISPLAY_OBJECT (object); + GdkDisplay *display = GDK_DISPLAY (object); g_hash_table_foreach_remove (display->device_grabs, free_device_grabs_foreach, diff --git a/gdk/gdkdisplay.h b/gdk/gdkdisplay.h index 8a4b3e55d1..1445d37a53 100644 --- a/gdk/gdkdisplay.h +++ b/gdk/gdkdisplay.h @@ -35,7 +35,10 @@ G_BEGIN_DECLS #define GDK_TYPE_DISPLAY (gdk_display_get_type ()) -#define GDK_DISPLAY_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY, GdkDisplay)) +#define GDK_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY, GdkDisplay)) +#ifndef GDK_DISABLE_DEPRECATED +#define GDK_DISPLAY_OBJECT(object) GDK_DISPLAY(object) +#endif #define GDK_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY, GdkDisplayClass)) #define GDK_IS_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DISPLAY)) #define GDK_IS_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY)) diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index 60265adff5..550dab6472 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -169,7 +169,7 @@ static void _gdk_display_x11_init (GdkDisplayX11 *display) { _gdk_x11_display_manager_add_display (gdk_display_manager_get (), - GDK_DISPLAY_OBJECT (display)); + GDK_DISPLAY (display)); } static void @@ -1719,7 +1719,7 @@ gdk_x11_display_ungrab (GdkDisplay *display) static void gdk_display_x11_dispose (GObject *object) { - GdkDisplay *display = GDK_DISPLAY_OBJECT (object); + GdkDisplay *display = GDK_DISPLAY (object); GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (object); gint i; @@ -1758,7 +1758,7 @@ gdk_display_x11_finalize (GObject *object) g_free (display_x11->motif_target_lists); } - _gdk_x11_cursor_display_finalize (GDK_DISPLAY_OBJECT(display_x11)); + _gdk_x11_cursor_display_finalize (GDK_DISPLAY (display_x11)); /* Atom Hashtable */ g_hash_table_destroy (display_x11->atom_from_virtual); diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index 13434db792..9dfe67a118 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -250,7 +250,7 @@ gdk_x_error (Display *xdisplay, if (xdisplay == gdk_display->xdisplay) { - error_display = GDK_DISPLAY_OBJECT (gdk_display); + error_display = GDK_DISPLAY (gdk_display); g_slist_free (displays); displays = NULL; } diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index 16018b609d..552a63bc48 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -1284,7 +1284,7 @@ tooltip_popup_timeout (gpointer data) GdkDisplay *display; GtkTooltip *tooltip; - display = GDK_DISPLAY_OBJECT (data); + display = GDK_DISPLAY (data); tooltip = g_object_get_data (G_OBJECT (display), "gdk-display-current-tooltip");