]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkobject.h
new functions gtk_selection_data_copy and gtk_selection_data_free.
[~andy/gtk] / gtk / gtkobject.h
index 96aa84439381dc571e1b5e56a1829bd634d0efa4..271876b759568eae40c1e4ba35575e7eaf2509b7 100644 (file)
@@ -98,14 +98,14 @@ extern "C" {
  * is a kinda nasty break up, it does make the size of
  * derived objects smaller.
  */
-enum
+typedef enum
 {
-  GTK_DESTROYED                = 1 << 0,
-  GTK_FLOATING         = 1 << 1,
-  GTK_CONNECTED                = 1 << 2,
-  GTK_RESERVED_2       = 1 << 3,
-  GTK_OBJECT_FLAG_LAST = GTK_RESERVED_2
-};
+  G_NV (GTK_DESTROYED,         destroyed,              1 << 0),
+  G_NV (GTK_FLOATING,          floating,               1 << 1),
+  G_NV (GTK_CONNECTED,         connected,              1 << 2),
+  GTK_RESERVED_2,
+  G_NV (GTK_OBJECT_FLAG_LAST,  object-flag-last,       GTK_RESERVED_2)
+} G_FLAGS (GtkObjectFlags);
 
 /* Macros for extracting the object_flags from GtkObject.
  */
@@ -121,15 +121,16 @@ enum
 
 /* GtkArg flag bits for gtk_object_add_arg_type
  */
-enum
+typedef enum
 {
-  GTK_ARG_READABLE     = 1 << 0,
-  GTK_ARG_WRITABLE     = 1 << 1,
-  GTK_ARG_CONSTRUCT    = 1 << 2,
+  G_NV (GTK_ARG_READABLE,      readable,       1 << 0),
+  G_NV (GTK_ARG_WRITABLE,      writable,       1 << 1),
+  G_NV (GTK_ARG_CONSTRUCT,     construct,      1 << 2),
+  G_NV (GTK_ARG_MASK,          mask,           0x03),
   /* aliases
    */
-  GTK_ARG_READWRITE    = GTK_ARG_READABLE | GTK_ARG_WRITABLE
-};
+  G_NV (GTK_ARG_READWRITE,     readwrite,      GTK_ARG_READABLE | GTK_ARG_WRITABLE)
+} G_FLAGS (GtkArgFlags);
 
 
 typedef struct _GtkObjectClass GtkObjectClass;
@@ -227,11 +228,26 @@ void      gtk_object_class_add_signals    (GtkObjectClass *klass,
 
 /* Append a user defined signal without default handler to a class.
  */
-guint  gtk_object_class_add_user_signal (GtkObjectClass     *klass,
-                                         const gchar        *name,
-                                         GtkSignalMarshaller marshaller,
-                                         GtkType             return_val,
-                                         guint               nparams,
+guint  gtk_object_class_user_signal_new  (GtkObjectClass     *klass,
+                                          const gchar        *name,
+                                          GtkSignalRunType    signal_flags,
+                                          GtkSignalMarshaller marshaller,
+                                          GtkType             return_val,
+                                          guint               nparams,
+                                          ...);
+guint  gtk_object_class_user_signal_newv (GtkObjectClass     *klass,
+                                          const gchar        *name,
+                                          GtkSignalRunType    signal_flags,
+                                          GtkSignalMarshaller marshaller,
+                                          GtkType             return_val,
+                                          guint               nparams,
+                                          GtkType            *params);
+/* Outdated */
+guint  gtk_object_class_add_user_signal (GtkObjectClass        *klass,
+                                         const gchar           *name,
+                                         GtkSignalMarshaller    marshaller,
+                                         GtkType                return_val,
+                                         guint                  nparams,
                                          ...);
 
 GtkObject*     gtk_object_new          (GtkType        type,
@@ -358,15 +374,15 @@ GtkObject* gtk_object_check_cast (GtkObject *obj,
 GtkObjectClass* gtk_object_check_class_cast (GtkObjectClass *klass,
                                             GtkType         cast_type);
 
-void   gtk_trace_referencing   (gpointer    *object,
+void   gtk_trace_referencing   (GtkObject   *object,
                                 const gchar *func,
-                                guint        local_frame,
+                                guint        dummy,
                                 guint        line,
                                 gboolean     do_ref);
 
-#if G_ENABLE_DEBUG && defined (__GNUC__)
-#  define gtk_object_ref(o)   G_STMT_START{static guint f=0;gtk_trace_referencing((gpointer)o,__PRETTY_FUNCTION__,++f,__LINE__, 1);f--;}G_STMT_END
-#  define gtk_object_unref(o) G_STMT_START{static guint f=0;gtk_trace_referencing((gpointer)o,__PRETTY_FUNCTION__,++f,__LINE__, 0);f--;}G_STMT_END
+#if G_ENABLE_DEBUG
+#  define gtk_object_ref(o)   G_STMT_START{gtk_trace_referencing((o),G_GNUC_PRETTY_FUNCTION,0,__LINE__,1);}G_STMT_END
+#  define gtk_object_unref(o) G_STMT_START{gtk_trace_referencing((o),G_GNUC_PRETTY_FUNCTION,0,__LINE__,0);}G_STMT_END
 #endif /* G_ENABLE_DEBUG && __GNUC__ */