relookup nodes after external functions have been called. also relookup

Tue Aug 11 20:52:58 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
        external functions have been called. also relookup nodes after
        this function has been invoked.
This commit is contained in:
Tim Janik 1998-08-11 19:29:36 +00:00 committed by Tim Janik
parent ca7082a04a
commit 5d270c2f45
10 changed files with 90 additions and 6 deletions

View File

@ -1,3 +1,9 @@
Tue Aug 11 20:52:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
external functions have been called. also relookup nodes after
this function has been invoked.
Tue Aug 11 15:04:52 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.[ch]: Removed has_cursor, set the cursor

View File

@ -1,3 +1,9 @@
Tue Aug 11 20:52:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
external functions have been called. also relookup nodes after
this function has been invoked.
Tue Aug 11 15:04:52 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.[ch]: Removed has_cursor, set the cursor

View File

@ -1,3 +1,9 @@
Tue Aug 11 20:52:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
external functions have been called. also relookup nodes after
this function has been invoked.
Tue Aug 11 15:04:52 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.[ch]: Removed has_cursor, set the cursor

View File

@ -1,3 +1,9 @@
Tue Aug 11 20:52:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
external functions have been called. also relookup nodes after
this function has been invoked.
Tue Aug 11 15:04:52 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.[ch]: Removed has_cursor, set the cursor

View File

@ -1,3 +1,9 @@
Tue Aug 11 20:52:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
external functions have been called. also relookup nodes after
this function has been invoked.
Tue Aug 11 15:04:52 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.[ch]: Removed has_cursor, set the cursor

View File

@ -1,3 +1,9 @@
Tue Aug 11 20:52:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
external functions have been called. also relookup nodes after
this function has been invoked.
Tue Aug 11 15:04:52 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.[ch]: Removed has_cursor, set the cursor

View File

@ -1,3 +1,9 @@
Tue Aug 11 20:52:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
external functions have been called. also relookup nodes after
this function has been invoked.
Tue Aug 11 15:04:52 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.[ch]: Removed has_cursor, set the cursor

View File

@ -474,7 +474,19 @@
(define-enum GdkFunction
(copy GDK_COPY)
(invert GDK_INVERT)
(xor GDK_XOR))
(xor GDK_XOR)
(clear GDK_CLEAR)
(and GDK_AND)
(and-reverse GDK_AND_REVERSE)
(and-invert GDK_AND_INVERT)
(noop GDK_NOOP)
(or GDK_OR)
(equiv GDK_EQUIV)
(or-reverse GDK_OR_REVERSE)
(copy-invert GDK_COPY_INVERT)
(or-invert GDK_OR_INVERT)
(nand GDK_NAND)
(set GDK_SET))
(define-enum GdkFill
(solid GDK_SOLID)

View File

@ -501,6 +501,18 @@ static GtkEnumValue _gdk_function_values[] = {
{ GDK_COPY, "GDK_COPY", "copy" },
{ GDK_INVERT, "GDK_INVERT", "invert" },
{ GDK_XOR, "GDK_XOR", "xor" },
{ GDK_CLEAR, "GDK_CLEAR", "clear" },
{ GDK_AND, "GDK_AND", "and" },
{ GDK_AND_REVERSE, "GDK_AND_REVERSE", "and-reverse" },
{ GDK_AND_INVERT, "GDK_AND_INVERT", "and-invert" },
{ GDK_NOOP, "GDK_NOOP", "noop" },
{ GDK_OR, "GDK_OR", "or" },
{ GDK_EQUIV, "GDK_EQUIV", "equiv" },
{ GDK_OR_REVERSE, "GDK_OR_REVERSE", "or-reverse" },
{ GDK_COPY_INVERT, "GDK_COPY_INVERT", "copy-invert" },
{ GDK_OR_INVERT, "GDK_OR_INVERT", "or-invert" },
{ GDK_NAND, "GDK_NAND", "nand" },
{ GDK_SET, "GDK_SET", "set" },
{ 0, NULL, NULL }
};
static GtkEnumValue _gdk_fill_values[] = {

View File

@ -53,7 +53,7 @@ struct _GtkTypeNode
node_var = NULL; \
}
static void gtk_type_class_init (GtkTypeNode *node);
static void gtk_type_class_init (GtkType node_type);
static guint gtk_type_name_hash (const char *key);
static gint gtk_type_name_compare (const char *a,
const char *b);
@ -296,7 +296,11 @@ gtk_type_parent_class (GtkType type)
if (node)
{
if (!node->klass)
gtk_type_class_init (node);
{
type = node->type;
gtk_type_class_init (type);
LOOKUP_TYPE_NODE (node, type);
}
return node->klass;
}
@ -314,7 +318,11 @@ gtk_type_class (GtkType type)
g_return_val_if_fail (node != NULL, NULL);
if (!node->klass)
gtk_type_class_init (node);
{
type = node->type;
gtk_type_class_init (type);
LOOKUP_TYPE_NODE (node, type);
}
return node->klass;
}
@ -483,8 +491,13 @@ gtk_type_is_a (GtkType type,
}
static void
gtk_type_class_init (GtkTypeNode *node)
gtk_type_class_init (GtkType type)
{
GtkTypeNode *node;
/* we need to relookup nodes everytime we called an external function */
LOOKUP_TYPE_NODE (node, type);
if (!node->klass && node->type_info.class_size)
{
GtkObjectClass *object_class;
@ -501,7 +514,11 @@ gtk_type_class_init (GtkTypeNode *node)
LOOKUP_TYPE_NODE (parent, node->parent_type);
if (!parent->klass)
gtk_type_class_init (parent);
{
gtk_type_class_init (parent->type);
LOOKUP_TYPE_NODE (node, type);
LOOKUP_TYPE_NODE (parent, node->parent_type);
}
if (parent->klass)
memcpy (node->klass, parent->klass, parent->type_info.class_size);
@ -531,6 +548,7 @@ gtk_type_class_init (GtkTypeNode *node)
base_class_init = walk->data;
base_class_init (node->klass);
LOOKUP_TYPE_NODE (node, type);
}
g_slist_free (slist);
}