diff --git a/ChangeLog b/ChangeLog index fa9cabbac..c4072f300 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-06-25 Michael Natterer + + * gtk/gtktypeutils.h: there is no reason to include + in the middle of the file, move it to top, + replacing the include. Also move the remaining few + non-deprecated things to the top and move some deprecated things + around to clean up the mess with too many deprecated sections even + more. + 2008-06-24 Michael Natterer * gtk/gtktypeutils.h: deprecate gtk_type_init() unconditionally diff --git a/gtk/gtktypeutils.h b/gtk/gtktypeutils.h index c3d9cf55d..48b664c2a 100644 --- a/gtk/gtktypeutils.h +++ b/gtk/gtktypeutils.h @@ -31,12 +31,38 @@ #ifndef __GTK_TYPE_UTILS_H__ #define __GTK_TYPE_UTILS_H__ - -#include - +/* enum types generated by glib-mkenums + */ +#include G_BEGIN_DECLS +/* urg */ +#define GTK_TYPE_IDENTIFIER (gtk_identifier_get_type ()) +GType gtk_identifier_get_type (void) G_GNUC_CONST; + +/* --- typedefs --- */ +/* here we come with some necessary forward declarations for structures and + * provide some fundamental function signatures + */ +typedef struct _GtkArg GtkArg; +typedef struct _GtkObject GtkObject; /* object forward declaration */ +typedef gboolean (*GtkFunction) (gpointer data); +typedef void (*GtkCallbackMarshal) (GtkObject *object, + gpointer data, + guint n_args, + GtkArg *args); + +/* This used to be defined in gtkitemfactory.h, but moved over here after + * the complete deprecation of that header + */ +typedef gchar * (*GtkTranslateFunc) (const gchar *path, + gpointer func_data); + + +/* Everything below is deprecated and superseded by GType API + */ + #ifndef GTK_DISABLE_DEPRECATED /* Fundamental Types @@ -93,49 +119,13 @@ typedef GTypeInstance GtkTypeObject; typedef GTypeClass GtkTypeClass; typedef GBaseInitFunc GtkClassInitFunc; typedef GInstanceInitFunc GtkObjectInitFunc; +typedef GSignalCMarshaller GtkSignalMarshaller; -#endif /* GTK_DISABLE_DEPRECATED */ - -G_END_DECLS - -/* Builtin Types - */ -#include - -G_BEGIN_DECLS - -/* urg */ -#define GTK_TYPE_IDENTIFIER (gtk_identifier_get_type ()) -GType gtk_identifier_get_type (void) G_GNUC_CONST; - -/* --- typedefs --- */ -/* here we come with some necessary forward declarations for structures and - * provide some fundamental function signatures - */ -typedef struct _GtkArg GtkArg; -typedef struct _GtkObject GtkObject; /* object forward declaration */ -typedef gboolean (*GtkFunction) (gpointer data); -typedef void (*GtkCallbackMarshal) (GtkObject *object, - gpointer data, - guint n_args, - GtkArg *args); - -/* This used to be defined in gtkitemfactory.h, but moved over here after - * the complete deprecation of that header - */ -typedef gchar * (*GtkTranslateFunc) (const gchar *path, - gpointer func_data); - -#ifndef GTK_DISABLE_DEPRECATED - -typedef void (*GtkDestroyNotify) (gpointer data); +typedef void (*GtkDestroyNotify) (gpointer data); typedef void (*GtkSignalFunc) (void); #define GTK_SIGNAL_FUNC(f) G_CALLBACK(f) -typedef struct _GtkTypeInfo GtkTypeInfo; -typedef GSignalCMarshaller GtkSignalMarshaller; - #endif /* GTK_DISABLE_DEPRECATED */ #if !defined (GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION) @@ -197,9 +187,11 @@ struct _GtkArg #define GTK_VALUE_OBJECT(a) ((a).d.object_data) #define GTK_VALUE_POINTER(a) ((a).d.pointer_data) #define GTK_VALUE_SIGNAL(a) ((a).d.signal_data) + #endif /* !GTK_DISABLE_DEPRECATED || GTK_COMPILATION */ #ifndef GTK_DISABLE_DEPRECATED + /* return location macros, these all narrow down to * pointer types, because return values need to be * passed by reference @@ -225,6 +217,8 @@ struct _GtkArg * g_type_register_static() or * g_type_register_dynamic() instead */ +typedef struct _GtkTypeInfo GtkTypeInfo; + struct _GtkTypeInfo { gchar *type_name;