[gtk+] Deprecate GDK_WINDOW_OBJECT and GdkWindowObject



commit 812b3c451d2717e54ff7eb778f8dfbd018da48a7
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Sep 4 17:53:27 2009 +0200

    Deprecate GDK_WINDOW_OBJECT and GdkWindowObject

 gdk/gdkwindow.h     |    4 ++++
 gtk/gtktestutils.c  |    2 ++
 tests/testwindows.c |    1 +
 3 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index 36a79f0..3370e0f 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -258,9 +258,12 @@ typedef struct _GdkWindowObjectClass GdkWindowObjectClass;
 #define GDK_IS_WINDOW(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW))
 #define GDK_IS_WINDOW_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW))
 #define GDK_WINDOW_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW, GdkWindowObjectClass))
+
+#ifndef GDK_DISABLE_DEPRECATED
 #define GDK_WINDOW_OBJECT(object)    ((GdkWindowObject *) GDK_WINDOW (object))
 
 #ifndef GDK_COMPILATION
+
 /* We used to export all of GdkWindowObject, but we don't want to keep doing so.
    However, there are various parts of it accessed by macros and other code,
    so we keep the old exported version public, but in reality it is larger. */
@@ -316,6 +319,7 @@ struct _GdkWindowObject
   GdkWindowRedirect *redirect;
 };
 #endif
+#endif
 
 struct _GdkWindowObjectClass
 {
diff --git a/gtk/gtktestutils.c b/gtk/gtktestutils.c
index 383af9a..64bf351 100644
--- a/gtk/gtktestutils.c
+++ b/gtk/gtktestutils.c
@@ -21,6 +21,8 @@
 /* need to get the prototypes of all get_type functions */
 #define GTK_ENABLE_BROKEN
 #undef GTK_DISABLE_DEPRECATED
+/* Need to get GDK_WINDOW_OBJECT */
+#undef GDK_DISABLE_DEPRECATED
 
 #include "config.h"
 
diff --git a/tests/testwindows.c b/tests/testwindows.c
index a6cd0a5..d2d5f0d 100644
--- a/tests/testwindows.c
+++ b/tests/testwindows.c
@@ -1,3 +1,4 @@
+#undef GDK_DISABLE_DEPRECATED
 #include <gtk/gtk.h>
 #ifdef GDK_WINDOWING_X11
 #include <X11/Xlib.h>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]