[gtk+/gtk-2-22] Deprecate GTK_OBJECT_FLAGS() and GtkObjectFlags enum



commit 606180b746fc647c0269262614d5cd4117de985b
Author: Javier Jardón <jjardon gnome org>
Date:   Wed Jun 16 20:50:29 2010 +0200

    Deprecate GTK_OBJECT_FLAGS() and GtkObjectFlags enum
    
    This macro will be moved to a private header in GTK+3.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=615666

 docs/reference/gtk/tmpl/gtkobject.sgml |    6 ++++++
 gtk/gtkobject.h                        |    4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/docs/reference/gtk/tmpl/gtkobject.sgml b/docs/reference/gtk/tmpl/gtkobject.sgml
index eb0405c..ad2b898 100644
--- a/docs/reference/gtk/tmpl/gtkobject.sgml
+++ b/docs/reference/gtk/tmpl/gtkobject.sgml
@@ -139,6 +139,9 @@ Tells about the state of the object.
 @GTK_RESERVED_1: 
 @GTK_RESERVED_2: reserved for future use
 
+ Deprecated: 2.22: Do not re-use #GtkObject flags but use your own variable to
+  store flags.
+
 <!-- ##### MACRO GTK_OBJECT_FLAGS ##### -->
 <para>
 Gets the #GtkObjectFlags for an object without directly
@@ -147,6 +150,9 @@ accessing its members.
 
 @obj: the object whose flags are returned.
 
+ Deprecated: 2.22: Do not re-use #GtkObject flags but use your own variable to
+  store flags.
+
 
 <!-- ##### MACRO GTK_OBJECT_FLOATING ##### -->
 <para>
diff --git a/gtk/gtkobject.h b/gtk/gtkobject.h
index a32ecd0..bc55820 100644
--- a/gtk/gtkobject.h
+++ b/gtk/gtkobject.h
@@ -74,6 +74,7 @@ G_BEGIN_DECLS
 #define GTK_OBJECT_TYPE_NAME              G_OBJECT_TYPE_NAME
 #endif
 
+#if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
 /* GtkObject only uses the first 4 bits of the flags field.
  * Derived objects may use the remaining bits. Though this
  * is a kinda nasty break up, it does make the size of
@@ -82,9 +83,7 @@ G_BEGIN_DECLS
 typedef enum
 {
   GTK_IN_DESTRUCTION	= 1 << 0, /* Used internally during dispose */
-#if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
   GTK_FLOATING		= 1 << 1,
-#endif
   GTK_RESERVED_1	= 1 << 2,
   GTK_RESERVED_2	= 1 << 3
 } GtkObjectFlags;
@@ -100,6 +99,7 @@ typedef enum
  */
 #define GTK_OBJECT_SET_FLAGS(obj,flag)	  G_STMT_START{ (GTK_OBJECT_FLAGS (obj) |= (flag)); }G_STMT_END
 #define GTK_OBJECT_UNSET_FLAGS(obj,flag)  G_STMT_START{ (GTK_OBJECT_FLAGS (obj) &= ~(flag)); }G_STMT_END
+#endif
 
 typedef struct _GtkObjectClass	GtkObjectClass;
 



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