Commit 60e5a210 authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

removed default initialization check, people must use gtk_type_init();

Sun Nov 29 06:12:01 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtktypeutils.c (gtk_type_unique): removed default initialization
        check, people must use gtk_type_init();

        * gtk/gtkwidget.h:
        * gtk/gtkwidget.c: added gtk_widget_set_composite_name() which is meant
        for internal use by containers, that want to assign specific composite
        names to their composite children.
        added gtk_widget_get_composite_name() which will return a newly
        allocated string, containing the composite name of a widget. valid
        composite names can only be retrived from widgets that have a parent
        assigned and are flagged as GTK_COMPOSITE_CHILD.

        * gtk/gtkcontainer.h:
        * gtk/gtkcontainer.c: added a new function
        gtk_container_child_default_composite_name() which will return a
        newly allocated string, holding the composite name of a containers
        child. a default implementation is provided which will compose the
        composite name out of the widgets type and its sequential children
        id. this implementation can be overidden through a new class function
        *(composite_name)().
parent 6edbb34d
Sun Nov 29 06:12:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_unique): removed default initialization
check, people must use gtk_type_init();
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added gtk_widget_set_composite_name() which is meant
for internal use by containers, that want to assign specific composite
names to their composite children.
added gtk_widget_get_composite_name() which will return a newly
allocated string, containing the composite name of a widget. valid
composite names can only be retrived from widgets that have a parent
assigned and are flagged as GTK_COMPOSITE_CHILD.
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: added a new function
gtk_container_child_default_composite_name() which will return a
newly allocated string, holding the composite name of a containers
child. a default implementation is provided which will compose the
composite name out of the widgets type and its sequential children
id. this implementation can be overidden through a new class function
*(composite_name)().
Sat Nov 28 10:57:59 1998 Owen Taylor <otaylor@redhat.com> Sat Nov 28 10:57:59 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_expose_event): Removed bogus * gtk/gtkwindow.c (gtk_window_expose_event): Removed bogus
......
Sun Nov 29 06:12:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_unique): removed default initialization
check, people must use gtk_type_init();
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added gtk_widget_set_composite_name() which is meant
for internal use by containers, that want to assign specific composite
names to their composite children.
added gtk_widget_get_composite_name() which will return a newly
allocated string, containing the composite name of a widget. valid
composite names can only be retrived from widgets that have a parent
assigned and are flagged as GTK_COMPOSITE_CHILD.
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: added a new function
gtk_container_child_default_composite_name() which will return a
newly allocated string, holding the composite name of a containers
child. a default implementation is provided which will compose the
composite name out of the widgets type and its sequential children
id. this implementation can be overidden through a new class function
*(composite_name)().
Sat Nov 28 10:57:59 1998 Owen Taylor <otaylor@redhat.com> Sat Nov 28 10:57:59 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_expose_event): Removed bogus * gtk/gtkwindow.c (gtk_window_expose_event): Removed bogus
......
Sun Nov 29 06:12:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_unique): removed default initialization
check, people must use gtk_type_init();
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added gtk_widget_set_composite_name() which is meant
for internal use by containers, that want to assign specific composite
names to their composite children.
added gtk_widget_get_composite_name() which will return a newly
allocated string, containing the composite name of a widget. valid
composite names can only be retrived from widgets that have a parent
assigned and are flagged as GTK_COMPOSITE_CHILD.
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: added a new function
gtk_container_child_default_composite_name() which will return a
newly allocated string, holding the composite name of a containers
child. a default implementation is provided which will compose the
composite name out of the widgets type and its sequential children
id. this implementation can be overidden through a new class function
*(composite_name)().
Sat Nov 28 10:57:59 1998 Owen Taylor <otaylor@redhat.com> Sat Nov 28 10:57:59 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_expose_event): Removed bogus * gtk/gtkwindow.c (gtk_window_expose_event): Removed bogus
......
Sun Nov 29 06:12:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_unique): removed default initialization
check, people must use gtk_type_init();
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added gtk_widget_set_composite_name() which is meant
for internal use by containers, that want to assign specific composite
names to their composite children.
added gtk_widget_get_composite_name() which will return a newly
allocated string, containing the composite name of a widget. valid
composite names can only be retrived from widgets that have a parent
assigned and are flagged as GTK_COMPOSITE_CHILD.
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: added a new function
gtk_container_child_default_composite_name() which will return a
newly allocated string, holding the composite name of a containers
child. a default implementation is provided which will compose the
composite name out of the widgets type and its sequential children
id. this implementation can be overidden through a new class function
*(composite_name)().
Sat Nov 28 10:57:59 1998 Owen Taylor <otaylor@redhat.com> Sat Nov 28 10:57:59 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_expose_event): Removed bogus * gtk/gtkwindow.c (gtk_window_expose_event): Removed bogus
......
Sun Nov 29 06:12:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_unique): removed default initialization
check, people must use gtk_type_init();
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added gtk_widget_set_composite_name() which is meant
for internal use by containers, that want to assign specific composite
names to their composite children.
added gtk_widget_get_composite_name() which will return a newly
allocated string, containing the composite name of a widget. valid
composite names can only be retrived from widgets that have a parent
assigned and are flagged as GTK_COMPOSITE_CHILD.
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: added a new function
gtk_container_child_default_composite_name() which will return a
newly allocated string, holding the composite name of a containers
child. a default implementation is provided which will compose the
composite name out of the widgets type and its sequential children
id. this implementation can be overidden through a new class function
*(composite_name)().
Sat Nov 28 10:57:59 1998 Owen Taylor <otaylor@redhat.com> Sat Nov 28 10:57:59 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_expose_event): Removed bogus * gtk/gtkwindow.c (gtk_window_expose_event): Removed bogus
......
Sun Nov 29 06:12:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_unique): removed default initialization
check, people must use gtk_type_init();
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added gtk_widget_set_composite_name() which is meant
for internal use by containers, that want to assign specific composite
names to their composite children.
added gtk_widget_get_composite_name() which will return a newly
allocated string, containing the composite name of a widget. valid
composite names can only be retrived from widgets that have a parent
assigned and are flagged as GTK_COMPOSITE_CHILD.
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: added a new function
gtk_container_child_default_composite_name() which will return a
newly allocated string, holding the composite name of a containers
child. a default implementation is provided which will compose the
composite name out of the widgets type and its sequential children
id. this implementation can be overidden through a new class function
*(composite_name)().
Sat Nov 28 10:57:59 1998 Owen Taylor <otaylor@redhat.com> Sat Nov 28 10:57:59 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_expose_event): Removed bogus * gtk/gtkwindow.c (gtk_window_expose_event): Removed bogus
......
Sun Nov 29 06:12:01 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_unique): removed default initialization
check, people must use gtk_type_init();
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: added gtk_widget_set_composite_name() which is meant
for internal use by containers, that want to assign specific composite
names to their composite children.
added gtk_widget_get_composite_name() which will return a newly
allocated string, containing the composite name of a widget. valid
composite names can only be retrived from widgets that have a parent
assigned and are flagged as GTK_COMPOSITE_CHILD.
* gtk/gtkcontainer.h:
* gtk/gtkcontainer.c: added a new function
gtk_container_child_default_composite_name() which will return a
newly allocated string, holding the composite name of a containers
child. a default implementation is provided which will compose the
composite name out of the widgets type and its sequential children
id. this implementation can be overidden through a new class function
*(composite_name)().
Sat Nov 28 10:57:59 1998 Owen Taylor <otaylor@redhat.com> Sat Nov 28 10:57:59 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_expose_event): Removed bogus * gtk/gtkwindow.c (gtk_window_expose_event): Removed bogus
......
...@@ -89,6 +89,9 @@ static void gtk_container_children_callback (GtkWidget *widget, ...@@ -89,6 +89,9 @@ static void gtk_container_children_callback (GtkWidget *widget,
static void gtk_container_show_all (GtkWidget *widget); static void gtk_container_show_all (GtkWidget *widget);
static void gtk_container_hide_all (GtkWidget *widget); static void gtk_container_hide_all (GtkWidget *widget);
static gchar* gtk_container_child_default_composite_name (GtkContainer *container,
GtkWidget *child);
static guint container_signals[LAST_SIGNAL] = { 0 }; static guint container_signals[LAST_SIGNAL] = { 0 };
...@@ -212,6 +215,7 @@ gtk_container_class_init (GtkContainerClass *class) ...@@ -212,6 +215,7 @@ gtk_container_class_init (GtkContainerClass *class)
class->focus = gtk_container_real_focus; class->focus = gtk_container_real_focus;
class->set_focus_child = gtk_container_real_set_focus_child; class->set_focus_child = gtk_container_real_set_focus_child;
class->child_type = NULL; class->child_type = NULL;
class->composite_name = gtk_container_child_default_composite_name;
} }
GtkType GtkType
...@@ -1254,7 +1258,7 @@ gtk_container_unregister_toplevel (GtkContainer *container) ...@@ -1254,7 +1258,7 @@ gtk_container_unregister_toplevel (GtkContainer *container)
gtk_widget_unref (GTK_WIDGET (container)); gtk_widget_unref (GTK_WIDGET (container));
} }
GList * GList*
gtk_container_get_toplevels (void) gtk_container_get_toplevels (void)
{ {
/* XXX: fixme we should ref all these widgets and duplicate /* XXX: fixme we should ref all these widgets and duplicate
...@@ -1263,6 +1267,83 @@ gtk_container_get_toplevels (void) ...@@ -1263,6 +1267,83 @@ gtk_container_get_toplevels (void)
return toplevel_list; return toplevel_list;
} }
static void
gtk_container_child_position_callback (GtkWidget *widget,
gpointer client_data)
{
struct {
GtkWidget *child;
guint i;
guint index;
} *data = client_data;
data->i++;
if (data->child == widget)
data->index = data->i;
}
static gchar*
gtk_container_child_default_composite_name (GtkContainer *container,
GtkWidget *child)
{
struct {
GtkWidget *child;
guint i;
guint index;
} data;
gchar *name;
/* fallback implementation */
data.child = child;
data.i = 0;
data.index = 0;
gtk_container_forall (container,
gtk_container_child_position_callback,
&data);
name = g_strdup_printf ("%s-%u",
gtk_type_name (GTK_OBJECT_TYPE (child)),
data.index);
return name;
}
gchar*
gtk_container_child_composite_name (GtkContainer *container,
GtkWidget *child)
{
g_return_val_if_fail (container != NULL, NULL);
g_return_val_if_fail (GTK_IS_CONTAINER (container), NULL);
g_return_val_if_fail (child != NULL, NULL);
g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
g_return_val_if_fail (child->parent == GTK_WIDGET (container), NULL);
if (GTK_WIDGET_COMPOSITE_CHILD (child))
{
static GQuark quark_composite_name = 0;
gchar *name;
if (!quark_composite_name)
quark_composite_name = g_quark_from_static_string ("gtk-composite-name");
name = gtk_object_get_data_by_id (GTK_OBJECT (child), quark_composite_name);
if (!name)
{
GtkContainerClass *class;
class = GTK_CONTAINER_CLASS (GTK_OBJECT (container)->klass);
if (class->composite_name)
name = class->composite_name (container, child);
}
else
name = g_strdup (name);
return name;
}
return NULL;
}
void void
gtk_container_real_set_focus_child (GtkContainer *container, gtk_container_real_set_focus_child (GtkContainer *container,
GtkWidget *child) GtkWidget *child)
......
...@@ -87,6 +87,8 @@ struct _GtkContainerClass ...@@ -87,6 +87,8 @@ struct _GtkContainerClass
GtkWidget *child, GtkWidget *child,
GtkArg *arg, GtkArg *arg,
guint arg_id); guint arg_id);
gchar* (*composite_name) (GtkContainer *container,
GtkWidget *child);
}; };
/* Application-level methods */ /* Application-level methods */
...@@ -211,6 +213,8 @@ gchar* gtk_container_child_arg_get_info (GtkType object_type, ...@@ -211,6 +213,8 @@ gchar* gtk_container_child_arg_get_info (GtkType object_type,
void gtk_container_forall (GtkContainer *container, void gtk_container_forall (GtkContainer *container,
GtkCallback callback, GtkCallback callback,
gpointer callback_data); gpointer callback_data);
gchar* gtk_container_child_composite_name (GtkContainer *container,
GtkWidget *child);
/* Deprecated methods */ /* Deprecated methods */
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "gtktypeutils.h" #include "gtktypeutils.h"
#define TYPE_NODES_BLOCK_SIZE (200) #define TYPE_NODES_BLOCK_SIZE (35) /* needs to be > GTK_TYPE_FUNDAMENTAL_MAX */
typedef struct _GtkTypeNode GtkTypeNode; typedef struct _GtkTypeNode GtkTypeNode;
...@@ -39,16 +39,20 @@ struct _GtkTypeNode ...@@ -39,16 +39,20 @@ struct _GtkTypeNode
#define LOOKUP_TYPE_NODE(node_var, type) { \ #define LOOKUP_TYPE_NODE(node_var, type) { \
if (type > 0) \ GtkTypeNode *__node = NULL; \
{ \ GtkType sqn = GTK_TYPE_SEQNO (type); \
register GtkType sqn = GTK_TYPE_SEQNO (type); \ if (sqn > 0) \
if (sqn < n_type_nodes) \ { \
node_var = type_nodes + sqn; \ sqn--; \
else \ if (sqn < GTK_TYPE_FUNDAMENTAL_MAX) \
node_var = NULL; \ { \
} \ if (sqn < n_ftype_nodes) \
else \ __node = type_nodes + sqn; \
node_var = NULL; \ } \
else if (sqn < n_type_nodes) \
__node = type_nodes + sqn; \
} \
node_var = __node; \
} }
static void gtk_type_class_init (GtkType node_type); static void gtk_type_class_init (GtkType node_type);
...@@ -59,23 +63,23 @@ static void gtk_type_init_builtin_types (void); ...@@ -59,23 +63,23 @@ static void gtk_type_init_builtin_types (void);
static GtkTypeNode *type_nodes = NULL; static GtkTypeNode *type_nodes = NULL;
static guint n_type_nodes = 0; static guint n_type_nodes = 0;
static guint n_ftype_nodes = 0;
static GHashTable *type_name_2_type_ht = NULL; static GHashTable *type_name_2_type_ht = NULL;
static GtkTypeNode* static GtkTypeNode*
gtk_type_node_next_and_invalidate (void) gtk_type_node_next_and_invalidate (GtkType parent_type)
{ {
static guint n_free_type_nodes = 0; static guint n_free_type_nodes = 0;
register GtkTypeNode *node; GtkTypeNode *node;
register GtkType new_type;
/* don't keep *any* GtkTypeNode pointers across invokation of this function!!! /* don't keep *any* GtkTypeNode pointers across invokation of this function!!!
*/ */
if (n_free_type_nodes == 0) if (n_free_type_nodes == 0)
{ {
register guint i; guint i;
register guint size; guint size;
/* nearest pow /* nearest pow
*/ */
...@@ -91,22 +95,28 @@ gtk_type_node_next_and_invalidate (void) ...@@ -91,22 +95,28 @@ gtk_type_node_next_and_invalidate (void)
n_free_type_nodes = size / sizeof (GtkTypeNode) - n_type_nodes; n_free_type_nodes = size / sizeof (GtkTypeNode) - n_type_nodes;
memset (type_nodes + n_type_nodes, 0, n_free_type_nodes * sizeof (GtkTypeNode)); memset (type_nodes + n_type_nodes, 0, n_free_type_nodes * sizeof (GtkTypeNode));
if (!n_type_nodes)
{
n_type_nodes = GTK_TYPE_FUNDAMENTAL_MAX;
n_free_type_nodes -= GTK_TYPE_FUNDAMENTAL_MAX;
}
} }
new_type = n_type_nodes++;
n_free_type_nodes--;
/* This can't be used here - new_type can be over 256!
* LOOKUP_TYPE_NODE (node, new_type);
* Code copied from above (we may assume we are all right here):
*/
if(new_type == 0) if (!parent_type)
return NULL; {
node = type_nodes + new_type; g_assert (n_ftype_nodes < GTK_TYPE_FUNDAMENTAL_MAX); /* paranoid */
if (node) node = type_nodes + n_ftype_nodes;
node->type = new_type; n_ftype_nodes++;
node->type = n_ftype_nodes;
}
else
{
node = type_nodes + n_type_nodes;
n_type_nodes++;
n_free_type_nodes--;
node->type = GTK_TYPE_MAKE (parent_type, n_type_nodes);
}
return node; return node;
} }
...@@ -116,12 +126,8 @@ gtk_type_init (void) ...@@ -116,12 +126,8 @@ gtk_type_init (void)
{ {
if (n_type_nodes == 0) if (n_type_nodes == 0)
{ {
GtkTypeNode *zero;
g_assert (sizeof (GtkType) >= 4); g_assert (sizeof (GtkType) >= 4);
g_assert (TYPE_NODES_BLOCK_SIZE > GTK_TYPE_FUNDAMENTAL_MAX);
zero = gtk_type_node_next_and_invalidate ();
g_assert (zero == NULL);
type_name_2_type_ht = g_hash_table_new ((GHashFunc) gtk_type_name_hash, type_name_2_type_ht = g_hash_table_new ((GHashFunc) gtk_type_name_hash,
(GCompareFunc) gtk_type_name_compare); (GCompareFunc) gtk_type_name_compare);
...@@ -182,16 +188,16 @@ gtk_type_create (GtkType parent_type, ...@@ -182,16 +188,16 @@ gtk_type_create (GtkType parent_type,
/* relookup pointers afterwards. /* relookup pointers afterwards.
*/ */
new_node = gtk_type_node_next_and_invalidate (); new_node = gtk_type_node_next_and_invalidate (parent_type);
if (parent_type) if (parent_type)
{ {
new_node->type = GTK_TYPE_MAKE (parent_type, new_node->type); g_assert (GTK_TYPE_SEQNO (new_node->type) > GTK_TYPE_FUNDAMENTAL_MAX);
LOOKUP_TYPE_NODE (parent, parent_type); LOOKUP_TYPE_NODE (parent, parent_type);
} }
else else
{ {
g_assert (new_node->type <= 0xff); g_assert (new_node->type <= GTK_TYPE_FUNDAMENTAL_MAX);
parent = NULL; parent = NULL;
} }
...@@ -232,9 +238,13 @@ gtk_type_unique (GtkType parent_type, ...@@ -232,9 +238,13 @@ gtk_type_unique (GtkType parent_type,
g_return_val_if_fail (type_info != NULL, 0); g_return_val_if_fail (type_info != NULL, 0);
g_return_val_if_fail (type_info->type_name != NULL, 0); g_return_val_if_fail (type_info->type_name != NULL, 0);
if (n_type_nodes == 0) if (!parent_type && n_ftype_nodes >= GTK_TYPE_FUNDAMENTAL_MAX)
gtk_type_init (); {
g_warning ("gtk_type_unique(): maximum amount of fundamental types reached, "
"try increasing GTK_TYPE_FUNDAMENTAL_MAX");
return 0;
}
type_name = g_strdup (type_info->type_name); type_name = g_strdup (type_info->type_name);
/* relookup pointers afterwards. /* relookup pointers afterwards.
...@@ -491,12 +501,12 @@ gtk_type_is_a (GtkType type, ...@@ -491,12 +501,12 @@ gtk_type_is_a (GtkType type,
return TRUE; return TRUE;
else else
{ {
register GtkTypeNode *node; GtkTypeNode *node;
LOOKUP_TYPE_NODE (node, type); LOOKUP_TYPE_NODE (node, type);
if (node) if (node)
{ {
register GtkTypeNode *a_node; GtkTypeNode *a_node;
LOOKUP_TYPE_NODE (a_node, is_a_type); LOOKUP_TYPE_NODE (a_node, is_a_type);
if (a_node) if (a_node)
...@@ -572,7 +582,7 @@ gtk_type_class_init (GtkType type) ...@@ -572,7 +582,7 @@ gtk_type_class_init (GtkType type)
for (walk = slist; walk; walk = walk->next) for (walk = slist; walk; walk = walk->next)
{ {
register GtkClassInitFunc base_class_init; GtkClassInitFunc base_class_init;
base_class_init = walk->data; base_class_init = walk->data;
base_class_init (node->klass); base_class_init (node->klass);
...@@ -948,7 +958,7 @@ gtk_type_init_builtin_types (void) ...@@ -948,7 +958,7 @@ gtk_type_init_builtin_types (void)
/* relookup pointers afterwards. /* relookup pointers afterwards.
*/ */
type_id = gtk_type_register_intern (fundamental_info[i].name, GTK_TYPE_INVALID, NULL); type_id = gtk_type_register_intern (fundamental_info[i].name, 0, NULL);
g_assert (type_id == fundamental_info[i].type_id); g_assert (type_id == fundamental_info[i].type_id);
} }
...@@ -967,7 +977,7 @@ gtk_type_init_builtin_types (void) ...@@ -967,7 +977,7 @@ gtk_type_init_builtin_types (void)
builtin_info[i].parent, builtin_info[i].parent,
builtin_info[i].values); builtin_info[i].values);
g_assert (type_id != GTK_TYPE_INVALID); g_assert (GTK_TYPE_SEQNO (type_id) > GTK_TYPE_FUNDAMENTAL_MAX);
(*builtin_info[i].type_id) = type_id; (*builtin_info[i].type_id) = type_id;
} }
......
...@@ -1642,7 +1642,7 @@ struct _GtkDrawData { ...@@ -1642,7 +1642,7 @@ struct _GtkDrawData {
static GMemChunk *draw_data_mem_chunk = NULL; static GMemChunk *draw_data_mem_chunk = NULL;
static GSList *draw_data_free_list = NULL; static GSList *draw_data_free_list = NULL;
static const gchar *draw_data_key = "gtk-draw-data"; static const gchar *draw_data_key = "gtk-draw-data";
static guint draw_data_key_id = 0; static GQuark draw_data_key_id = 0;
static gint gtk_widget_idle_draw (gpointer data); static gint gtk_widget_idle_draw (gpointer data);
...@@ -3812,6 +3812,52 @@ gtk_widget_is_ancestor (GtkWidget *widget, ...@@ -3812,6 +3812,52 @@ gtk_widget_is_ancestor (GtkWidget *widget,
return FALSE; return FALSE;
} }
static GQuark quark_composite_name = 0;
void
gtk_widget_set_composite_name (GtkWidget *widget,
gchar *name)
{
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (GTK_WIDGET_COMPOSITE_CHILD (widget));
g_return_if_fail (name != NULL);
if (!quark_composite_name)