From 004f0982e165a319fdab4a6573b1a291d14d7192 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Thu, 14 May 1998 21:13:18 +0000 Subject: [PATCH] typedef gint gboolean; this is needed to provide portability with Thu May 14 04:14:12 1998 Tim Janik * glib.h: typedef gint gboolean; this is needed to provide portability with big-endian platforms (e.g. try sizeof(bool) for c++ on big-endians - it's 4). this is also needed to maintain some_union.d_gint==some_union.d_gboolean. plus, gint to gboolean casts and vice versa need to be possible without loss. Thu May 14 03:04:43 1998 Tim Janik * gtk/gtktypeutils.c (gtk_type_free): new function to take care about freeing types. (gtk_type_set_chunk_alloc): new function to allow allocation of new types from a mem_chunk of certain size (n_chunks==0 indicates allocation thorugh g_malloc). * gtk/gtkobject.c (gtk_object_finalize): free an object through gtk_type_free(). * gtk/gtkbutton.c (gtk_button_get_type): set chunk preallocation for GtkButtons to 16. * gtk/gtkmenuitem.c (gtk_menu_item_get_type): likewise (16). * gtk/gtklabel.c (gtk_label_get_type): likewise (32). --- ChangeLog | 16 ++++++++++ ChangeLog.pre-2-0 | 16 ++++++++++ ChangeLog.pre-2-10 | 16 ++++++++++ ChangeLog.pre-2-2 | 16 ++++++++++ ChangeLog.pre-2-4 | 16 ++++++++++ ChangeLog.pre-2-6 | 16 ++++++++++ ChangeLog.pre-2-8 | 16 ++++++++++ glib/ChangeLog | 9 ++++++ glib/glib.h | 2 +- gtk/gtk.defs | 11 +++++++ gtk/gtkbutton.c | 1 + gtk/gtklabel.c | 1 + gtk/gtkmenuitem.c | 1 + gtk/gtkobject.c | 2 +- gtk/gtktypebuiltins.c | 2 ++ gtk/gtktypebuiltins.h | 68 ++++++++++++++++++++++--------------------- gtk/gtktypeutils.c | 56 +++++++++++++++++++++++++++++++++-- gtk/gtktypeutils.h | 4 +++ 18 files changed, 231 insertions(+), 38 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5069fdf062..692c1aca6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +Thu May 14 03:04:43 1998 Tim Janik + + * gtk/gtktypeutils.c (gtk_type_free): new function to take care about + freeing types. + (gtk_type_set_chunk_alloc): new function to allow allocation of new + types from a mem_chunk of certain size (n_chunks==0 indicates allocation + thorugh g_malloc). + + * gtk/gtkobject.c (gtk_object_finalize): free an object through + gtk_type_free(). + + * gtk/gtkbutton.c (gtk_button_get_type): set chunk preallocation for + GtkButtons to 16. + * gtk/gtkmenuitem.c (gtk_menu_item_get_type): likewise (16). + * gtk/gtklabel.c (gtk_label_get_type): likewise (32). + Wed May 13 00:53:52 1998 Owen Taylor * gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 5069fdf062..692c1aca6e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,19 @@ +Thu May 14 03:04:43 1998 Tim Janik + + * gtk/gtktypeutils.c (gtk_type_free): new function to take care about + freeing types. + (gtk_type_set_chunk_alloc): new function to allow allocation of new + types from a mem_chunk of certain size (n_chunks==0 indicates allocation + thorugh g_malloc). + + * gtk/gtkobject.c (gtk_object_finalize): free an object through + gtk_type_free(). + + * gtk/gtkbutton.c (gtk_button_get_type): set chunk preallocation for + GtkButtons to 16. + * gtk/gtkmenuitem.c (gtk_menu_item_get_type): likewise (16). + * gtk/gtklabel.c (gtk_label_get_type): likewise (32). + Wed May 13 00:53:52 1998 Owen Taylor * gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5069fdf062..692c1aca6e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,19 @@ +Thu May 14 03:04:43 1998 Tim Janik + + * gtk/gtktypeutils.c (gtk_type_free): new function to take care about + freeing types. + (gtk_type_set_chunk_alloc): new function to allow allocation of new + types from a mem_chunk of certain size (n_chunks==0 indicates allocation + thorugh g_malloc). + + * gtk/gtkobject.c (gtk_object_finalize): free an object through + gtk_type_free(). + + * gtk/gtkbutton.c (gtk_button_get_type): set chunk preallocation for + GtkButtons to 16. + * gtk/gtkmenuitem.c (gtk_menu_item_get_type): likewise (16). + * gtk/gtklabel.c (gtk_label_get_type): likewise (32). + Wed May 13 00:53:52 1998 Owen Taylor * gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 5069fdf062..692c1aca6e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,19 @@ +Thu May 14 03:04:43 1998 Tim Janik + + * gtk/gtktypeutils.c (gtk_type_free): new function to take care about + freeing types. + (gtk_type_set_chunk_alloc): new function to allow allocation of new + types from a mem_chunk of certain size (n_chunks==0 indicates allocation + thorugh g_malloc). + + * gtk/gtkobject.c (gtk_object_finalize): free an object through + gtk_type_free(). + + * gtk/gtkbutton.c (gtk_button_get_type): set chunk preallocation for + GtkButtons to 16. + * gtk/gtkmenuitem.c (gtk_menu_item_get_type): likewise (16). + * gtk/gtklabel.c (gtk_label_get_type): likewise (32). + Wed May 13 00:53:52 1998 Owen Taylor * gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 5069fdf062..692c1aca6e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,19 @@ +Thu May 14 03:04:43 1998 Tim Janik + + * gtk/gtktypeutils.c (gtk_type_free): new function to take care about + freeing types. + (gtk_type_set_chunk_alloc): new function to allow allocation of new + types from a mem_chunk of certain size (n_chunks==0 indicates allocation + thorugh g_malloc). + + * gtk/gtkobject.c (gtk_object_finalize): free an object through + gtk_type_free(). + + * gtk/gtkbutton.c (gtk_button_get_type): set chunk preallocation for + GtkButtons to 16. + * gtk/gtkmenuitem.c (gtk_menu_item_get_type): likewise (16). + * gtk/gtklabel.c (gtk_label_get_type): likewise (32). + Wed May 13 00:53:52 1998 Owen Taylor * gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 5069fdf062..692c1aca6e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,19 @@ +Thu May 14 03:04:43 1998 Tim Janik + + * gtk/gtktypeutils.c (gtk_type_free): new function to take care about + freeing types. + (gtk_type_set_chunk_alloc): new function to allow allocation of new + types from a mem_chunk of certain size (n_chunks==0 indicates allocation + thorugh g_malloc). + + * gtk/gtkobject.c (gtk_object_finalize): free an object through + gtk_type_free(). + + * gtk/gtkbutton.c (gtk_button_get_type): set chunk preallocation for + GtkButtons to 16. + * gtk/gtkmenuitem.c (gtk_menu_item_get_type): likewise (16). + * gtk/gtklabel.c (gtk_label_get_type): likewise (32). + Wed May 13 00:53:52 1998 Owen Taylor * gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 5069fdf062..692c1aca6e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,19 @@ +Thu May 14 03:04:43 1998 Tim Janik + + * gtk/gtktypeutils.c (gtk_type_free): new function to take care about + freeing types. + (gtk_type_set_chunk_alloc): new function to allow allocation of new + types from a mem_chunk of certain size (n_chunks==0 indicates allocation + thorugh g_malloc). + + * gtk/gtkobject.c (gtk_object_finalize): free an object through + gtk_type_free(). + + * gtk/gtkbutton.c (gtk_button_get_type): set chunk preallocation for + GtkButtons to 16. + * gtk/gtkmenuitem.c (gtk_menu_item_get_type): likewise (16). + * gtk/gtklabel.c (gtk_label_get_type): likewise (32). + Wed May 13 00:53:52 1998 Owen Taylor * gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more diff --git a/glib/ChangeLog b/glib/ChangeLog index 95efae97ca..8f0252d490 100644 --- a/glib/ChangeLog +++ b/glib/ChangeLog @@ -1,3 +1,12 @@ +Thu May 14 04:14:12 1998 Tim Janik + + * glib.h: typedef gint gboolean; + this is needed to provide portability with big-endian platforms (e.g. + try sizeof(bool) for c++ on big-endians - it's 4). + this is also needed to maintain some_union.d_gint==some_union.d_gboolean. + plus, gint to gboolean casts and vice versa need to be possible without + loss. + Tue May 12 19:22:58 1998 Owen Taylor * glib/glib.h: Added macros G[U]INT_TO_POINTER() and diff --git a/glib/glib.h b/glib/glib.h index b8e25f79a3..5bf282f5d7 100644 --- a/glib/glib.h +++ b/glib/glib.h @@ -318,7 +318,7 @@ typedef char gchar; typedef short gshort; typedef long glong; typedef int gint; -typedef char gboolean; +typedef gint gboolean; typedef unsigned char guchar; typedef unsigned short gushort; diff --git a/gtk/gtk.defs b/gtk/gtk.defs index 6fce4ba851..cf6d7e3d04 100644 --- a/gtk/gtk.defs +++ b/gtk/gtk.defs @@ -161,6 +161,17 @@ (center GTK_JUSTIFY_CENTER) (fill GTK_JUSTIFY_FILL)) +(define-enum GtkButtonBoxStyle + (default GTK_BUTTONBOX_DEFAULT_STYLE) + (spread GTK_BUTTONBOX_SPREAD) + (edge GTK_BUTTONBOX_EDGE) + (start GTK_BUTTONBOX_START) + (end GTK_BUTTONBOX_END)) + +(define-enum GtkOrientation + (horizontal GTK_ORIENTATION_HORIZONTAL) + (vertical GTK_ORIENTATION_VERTICAL)) + ;;; Gdk enums (define-enum GdkWindowType diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index d54c98b645..9c4afe0b30 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -112,6 +112,7 @@ gtk_button_get_type (void) }; button_type = gtk_type_unique (gtk_container_get_type (), &button_info); + gtk_type_set_chunk_alloc (button_type, 16); } return button_type; diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 7436394481..dd31a71d34 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -68,6 +68,7 @@ gtk_label_get_type (void) }; label_type = gtk_type_unique (gtk_misc_get_type (), &label_info); + gtk_type_set_chunk_alloc (label_type, 32); } return label_type; diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c index 98e046d49e..291d8fe031 100644 --- a/gtk/gtkmenuitem.c +++ b/gtk/gtkmenuitem.c @@ -88,6 +88,7 @@ gtk_menu_item_get_type (void) }; menu_item_type = gtk_type_unique (gtk_item_get_type (), &menu_item_info); + gtk_type_set_chunk_alloc (menu_item_type, 16); } return menu_item_type; diff --git a/gtk/gtkobject.c b/gtk/gtkobject.c index b5525c5c4f..de013a2475 100644 --- a/gtk/gtkobject.c +++ b/gtk/gtkobject.c @@ -272,7 +272,7 @@ gtk_object_finalize (GtkObject *object) GTK_OBJECT_DATA_DESTROY (odata); } - g_free (object); + gtk_type_free (GTK_OBJECT_TYPE (object), object); } /***************************************** diff --git a/gtk/gtktypebuiltins.c b/gtk/gtktypebuiltins.c index 683a73083c..868f40fe48 100644 --- a/gtk/gtktypebuiltins.c +++ b/gtk/gtktypebuiltins.c @@ -24,6 +24,8 @@ { "GtkCurveType", GTK_TYPE_ENUM }, { "GtkFundamentalType", GTK_TYPE_ENUM }, { "GtkJustification", GTK_TYPE_ENUM }, + { "GtkButtonBoxStyle", GTK_TYPE_ENUM }, + { "GtkOrientation", GTK_TYPE_ENUM }, { "GdkWindowType", GTK_TYPE_ENUM }, { "GdkWindowClass", GTK_TYPE_ENUM }, { "GdkImageType", GTK_TYPE_ENUM }, diff --git a/gtk/gtktypebuiltins.h b/gtk/gtktypebuiltins.h index ac7827864a..73a1d10135 100644 --- a/gtk/gtktypebuiltins.h +++ b/gtk/gtktypebuiltins.h @@ -24,36 +24,38 @@ #define GTK_TYPE_CURVE_TYPE (gtk_type_builtins[21]) #define GTK_TYPE_FUNDAMENTAL_TYPE (gtk_type_builtins[22]) #define GTK_TYPE_JUSTIFICATION (gtk_type_builtins[23]) -#define GTK_TYPE_GDK_WINDOW_TYPE (gtk_type_builtins[24]) -#define GTK_TYPE_GDK_WINDOW_CLASS (gtk_type_builtins[25]) -#define GTK_TYPE_GDK_IMAGE_TYPE (gtk_type_builtins[26]) -#define GTK_TYPE_GDK_VISUAL_TYPE (gtk_type_builtins[27]) -#define GTK_TYPE_GDK_WINDOW_ATTRIBUTES_TYPE (gtk_type_builtins[28]) -#define GTK_TYPE_GDK_WINDOW_HINTS (gtk_type_builtins[29]) -#define GTK_TYPE_GDK_FUNCTION (gtk_type_builtins[30]) -#define GTK_TYPE_GDK_FILL (gtk_type_builtins[31]) -#define GTK_TYPE_GDK_LINE_STYLE (gtk_type_builtins[32]) -#define GTK_TYPE_GDK_CAP_STYLE (gtk_type_builtins[33]) -#define GTK_TYPE_GDK_JOIN_STYLE (gtk_type_builtins[34]) -#define GTK_TYPE_GDK_CURSOR_TYPE (gtk_type_builtins[35]) -#define GTK_TYPE_GDK_EVENT_TYPE (gtk_type_builtins[36]) -#define GTK_TYPE_GDK_EVENT_MASK (gtk_type_builtins[37]) -#define GTK_TYPE_GDK_NOTIFY_TYPE (gtk_type_builtins[38]) -#define GTK_TYPE_GDK_MODIFIER_TYPE (gtk_type_builtins[39]) -#define GTK_TYPE_GDK_SUBWINDOW_MODE (gtk_type_builtins[40]) -#define GTK_TYPE_GDK_INPUT_CONDITION (gtk_type_builtins[41]) -#define GTK_TYPE_GDK_STATUS (gtk_type_builtins[42]) -#define GTK_TYPE_GDK_BYTE_ORDER (gtk_type_builtins[43]) -#define GTK_TYPE_GDK_GCVALUES_MASK (gtk_type_builtins[44]) -#define GTK_TYPE_GDK_SELECTION (gtk_type_builtins[45]) -#define GTK_TYPE_GDK_PROPERTY_STATE (gtk_type_builtins[46]) -#define GTK_TYPE_GDK_PROP_MODE (gtk_type_builtins[47]) -#define GTK_TYPE_ACCELERATOR_TABLE (gtk_type_builtins[48]) -#define GTK_TYPE_STYLE (gtk_type_builtins[49]) -#define GTK_TYPE_GDK_COLORMAP (gtk_type_builtins[50]) -#define GTK_TYPE_GDK_VISUAL (gtk_type_builtins[51]) -#define GTK_TYPE_GDK_FONT (gtk_type_builtins[52]) -#define GTK_TYPE_GDK_WINDOW (gtk_type_builtins[53]) -#define GTK_TYPE_GDK_EVENT (gtk_type_builtins[54]) -#define GTK_TYPE_GDK_COLOR (gtk_type_builtins[55]) -#define GTK_TYPE_NUM_BUILTINS 56 +#define GTK_TYPE_BUTTON_BOX_STYLE (gtk_type_builtins[24]) +#define GTK_TYPE_ORIENTATION (gtk_type_builtins[25]) +#define GTK_TYPE_GDK_WINDOW_TYPE (gtk_type_builtins[26]) +#define GTK_TYPE_GDK_WINDOW_CLASS (gtk_type_builtins[27]) +#define GTK_TYPE_GDK_IMAGE_TYPE (gtk_type_builtins[28]) +#define GTK_TYPE_GDK_VISUAL_TYPE (gtk_type_builtins[29]) +#define GTK_TYPE_GDK_WINDOW_ATTRIBUTES_TYPE (gtk_type_builtins[30]) +#define GTK_TYPE_GDK_WINDOW_HINTS (gtk_type_builtins[31]) +#define GTK_TYPE_GDK_FUNCTION (gtk_type_builtins[32]) +#define GTK_TYPE_GDK_FILL (gtk_type_builtins[33]) +#define GTK_TYPE_GDK_LINE_STYLE (gtk_type_builtins[34]) +#define GTK_TYPE_GDK_CAP_STYLE (gtk_type_builtins[35]) +#define GTK_TYPE_GDK_JOIN_STYLE (gtk_type_builtins[36]) +#define GTK_TYPE_GDK_CURSOR_TYPE (gtk_type_builtins[37]) +#define GTK_TYPE_GDK_EVENT_TYPE (gtk_type_builtins[38]) +#define GTK_TYPE_GDK_EVENT_MASK (gtk_type_builtins[39]) +#define GTK_TYPE_GDK_NOTIFY_TYPE (gtk_type_builtins[40]) +#define GTK_TYPE_GDK_MODIFIER_TYPE (gtk_type_builtins[41]) +#define GTK_TYPE_GDK_SUBWINDOW_MODE (gtk_type_builtins[42]) +#define GTK_TYPE_GDK_INPUT_CONDITION (gtk_type_builtins[43]) +#define GTK_TYPE_GDK_STATUS (gtk_type_builtins[44]) +#define GTK_TYPE_GDK_BYTE_ORDER (gtk_type_builtins[45]) +#define GTK_TYPE_GDK_GCVALUES_MASK (gtk_type_builtins[46]) +#define GTK_TYPE_GDK_SELECTION (gtk_type_builtins[47]) +#define GTK_TYPE_GDK_PROPERTY_STATE (gtk_type_builtins[48]) +#define GTK_TYPE_GDK_PROP_MODE (gtk_type_builtins[49]) +#define GTK_TYPE_ACCELERATOR_TABLE (gtk_type_builtins[50]) +#define GTK_TYPE_STYLE (gtk_type_builtins[51]) +#define GTK_TYPE_GDK_COLORMAP (gtk_type_builtins[52]) +#define GTK_TYPE_GDK_VISUAL (gtk_type_builtins[53]) +#define GTK_TYPE_GDK_FONT (gtk_type_builtins[54]) +#define GTK_TYPE_GDK_WINDOW (gtk_type_builtins[55]) +#define GTK_TYPE_GDK_EVENT (gtk_type_builtins[56]) +#define GTK_TYPE_GDK_COLOR (gtk_type_builtins[57]) +#define GTK_TYPE_NUM_BUILTINS 58 diff --git a/gtk/gtktypeutils.c b/gtk/gtktypeutils.c index 155f1f8a33..41d3d13077 100644 --- a/gtk/gtktypeutils.c +++ b/gtk/gtktypeutils.c @@ -29,11 +29,13 @@ struct _GtkTypeNode { GtkType type; GtkTypeInfo type_info; - guint n_supers; + guint n_supers : 24; + guint chunk_alloc_locked : 1; GtkType *supers; GtkType parent_type; gpointer klass; GList *children_types; + GMemChunk *mem_chunk; }; @@ -121,6 +123,29 @@ gtk_type_init (void) } } +void +gtk_type_set_chunk_alloc (GtkType type, + guint n_chunks) +{ + GtkTypeNode *node; + + LOOKUP_TYPE_NODE (node, type); + g_return_if_fail (node != NULL); + g_return_if_fail (node->chunk_alloc_locked == FALSE); + + if (node->mem_chunk) + { + g_mem_chunk_destroy (node->mem_chunk); + node->mem_chunk = NULL; + } + + if (n_chunks) + node->mem_chunk = g_mem_chunk_new (node->type_info.type_name, + node->type_info.object_size, + node->type_info.object_size * n_chunks, + G_ALLOC_AND_FREE); +} + GtkType gtk_type_unique (GtkType parent_type, GtkTypeInfo *type_info) @@ -169,10 +194,12 @@ gtk_type_unique (GtkType parent_type, new_node->type_info = *type_info; new_node->type_info.type_name = g_strdup (type_info->type_name); new_node->n_supers = parent ? parent->n_supers + 1 : 0; + new_node->chunk_alloc_locked = FALSE; new_node->supers = g_new0 (GtkType, new_node->n_supers + 1); new_node->parent_type = parent_type; new_node->klass = NULL; new_node->children_types = NULL; + new_node->mem_chunk = NULL; if (parent) parent->children_types = g_list_append (parent->children_types, GUINT_TO_POINTER (new_node->type)); @@ -279,7 +306,14 @@ gtk_type_new (GtkType type) g_return_val_if_fail (node != NULL, NULL); klass = gtk_type_class (type); - object = g_malloc0 (node->type_info.object_size); + node->chunk_alloc_locked = TRUE; + if (node->mem_chunk) + { + object = g_mem_chunk_alloc (node->mem_chunk); + memset (object, 0, node->type_info.object_size); + } + else + object = g_malloc0 (node->type_info.object_size); object->klass = klass; for (i = node->n_supers; i > 0; i--) @@ -296,6 +330,22 @@ gtk_type_new (GtkType type) return object; } +void +gtk_type_free (GtkType type, + gpointer mem) +{ + GtkTypeNode *node; + + g_return_if_fail (mem != NULL); + LOOKUP_TYPE_NODE (node, type); + g_return_if_fail (node != NULL); + + if (node->mem_chunk) + g_mem_chunk_free (node->mem_chunk, mem); + else + g_free (mem); +} + void gtk_type_describe_heritage (GtkType type) { @@ -449,7 +499,7 @@ gtk_type_class_init (GtkTypeNode *node) { if (!node->klass && node->type_info.class_size) { - node->klass = g_new0 (guchar, node->type_info.class_size); + node->klass = g_malloc0 (node->type_info.class_size); if (node->parent_type) { diff --git a/gtk/gtktypeutils.h b/gtk/gtktypeutils.h index 3ab1e0f122..2f85f2588a 100644 --- a/gtk/gtktypeutils.h +++ b/gtk/gtktypeutils.h @@ -181,12 +181,16 @@ struct _GtkTypeInfo void gtk_type_init (void); GtkType gtk_type_unique (guint parent_type, GtkTypeInfo *type_info); +void gtk_type_set_chunk_alloc (GtkType type, + guint n_chunks); gchar* gtk_type_name (guint type); GtkType gtk_type_from_name (const gchar *name); GtkType gtk_type_parent (GtkType type); gpointer gtk_type_class (GtkType type); gpointer gtk_type_parent_class (GtkType type); gpointer gtk_type_new (GtkType type); +void gtk_type_free (GtkType type, + gpointer mem); void gtk_type_describe_heritage (GtkType type); void gtk_type_describe_tree (GtkType type, gint show_size);