]> Pileus Git - ~andy/gtk/commitdiff
Deprecate GTK_OBJECT_FLAGS() and GtkObjectFlags enum
authorJavier Jardón <jjardon@gnome.org>
Thu, 13 May 2010 18:07:17 +0000 (20:07 +0200)
committerJavier Jardón <jjardon@gnome.org>
Wed, 16 Jun 2010 18:36:30 +0000 (20:36 +0200)
This macro will be moved to a private header in GTK+3.

https://bugzilla.gnome.org/show_bug.cgi?id=615666

gtk/gtkobject.h

index 34f34ed7abc12eb6184ebe4f0ddc48fbf249f106..d8339a0b6142f2a1e520ffad68d9319ba90bd771 100644 (file)
@@ -51,6 +51,7 @@ G_BEGIN_DECLS
 #define GTK_IS_OBJECT_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_OBJECT))
 #define GTK_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GTK_TYPE_OBJECT, GtkObjectClass))
 
+#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
@@ -64,6 +65,9 @@ G_BEGIN_DECLS
  * @GTK_RESERVED_2: reserved for future use
  *
  * Tells about the state of the object.
+ *
+ * Deprecated: 2.22: Do not re-use #GtkObject flags but use your own variable to
+ *   store flags.
  */
 typedef enum
 {
@@ -78,6 +82,9 @@ typedef enum
  *
  * Gets the #GtkObjectFlags for an object without directly
  * accessing its members.
+ *
+ * Deprecated: 2.22: Do not re-use #GtkObject flags but use your own variable to
+ *   store flags.
  */
 #define GTK_OBJECT_FLAGS(obj)            (GTK_OBJECT (obj)->flags)
 
@@ -85,6 +92,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;