Commit 1a69c439 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Update to use the new g_boxed_type_register_static API.

2001-09-10  Alex Larsson  <alexl@redhat.com>

	* demos/gtk-demo/stock_browser.c:
	* gdk/gdkcolor.c:
	* gdk/gdkcursor.c:
	* gdk/gdkevents.c:
	* gdk/gdkrectangle.c:
	* gtk/gtktypeutils.c:
	Update to use the new g_boxed_type_register_static API.
parent 63a95021
2001-09-10 Alex Larsson <alexl@redhat.com>
* demos/gtk-demo/stock_browser.c:
* gdk/gdkcolor.c:
* gdk/gdkcursor.c:
* gdk/gdkevents.c:
* gdk/gdkrectangle.c:
* gtk/gtktypeutils.c:
Update to use the new g_boxed_type_register_static API.
2001-09-10 Padraig O'Briain <padraig.obriain@sun.com> 2001-09-10 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtktreestore.c: * gtk/gtktreestore.c:
......
2001-09-10 Alex Larsson <alexl@redhat.com>
* demos/gtk-demo/stock_browser.c:
* gdk/gdkcolor.c:
* gdk/gdkcursor.c:
* gdk/gdkevents.c:
* gdk/gdkrectangle.c:
* gtk/gtktypeutils.c:
Update to use the new g_boxed_type_register_static API.
2001-09-10 Padraig O'Briain <padraig.obriain@sun.com> 2001-09-10 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtktreestore.c: * gtk/gtktreestore.c:
......
2001-09-10 Alex Larsson <alexl@redhat.com>
* demos/gtk-demo/stock_browser.c:
* gdk/gdkcolor.c:
* gdk/gdkcursor.c:
* gdk/gdkevents.c:
* gdk/gdkrectangle.c:
* gtk/gtktypeutils.c:
Update to use the new g_boxed_type_register_static API.
2001-09-10 Padraig O'Briain <padraig.obriain@sun.com> 2001-09-10 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtktreestore.c: * gtk/gtktreestore.c:
......
2001-09-10 Alex Larsson <alexl@redhat.com>
* demos/gtk-demo/stock_browser.c:
* gdk/gdkcolor.c:
* gdk/gdkcursor.c:
* gdk/gdkevents.c:
* gdk/gdkrectangle.c:
* gtk/gtktypeutils.c:
Update to use the new g_boxed_type_register_static API.
2001-09-10 Padraig O'Briain <padraig.obriain@sun.com> 2001-09-10 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtktreestore.c: * gtk/gtktreestore.c:
......
2001-09-10 Alex Larsson <alexl@redhat.com>
* demos/gtk-demo/stock_browser.c:
* gdk/gdkcolor.c:
* gdk/gdkcursor.c:
* gdk/gdkevents.c:
* gdk/gdkrectangle.c:
* gtk/gtktypeutils.c:
Update to use the new g_boxed_type_register_static API.
2001-09-10 Padraig O'Briain <padraig.obriain@sun.com> 2001-09-10 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtktreestore.c: * gtk/gtktreestore.c:
......
2001-09-10 Alex Larsson <alexl@redhat.com>
* demos/gtk-demo/stock_browser.c:
* gdk/gdkcolor.c:
* gdk/gdkcursor.c:
* gdk/gdkevents.c:
* gdk/gdkrectangle.c:
* gtk/gtktypeutils.c:
Update to use the new g_boxed_type_register_static API.
2001-09-10 Padraig O'Briain <padraig.obriain@sun.com> 2001-09-10 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtktreestore.c: * gtk/gtktreestore.c:
......
2001-09-10 Alex Larsson <alexl@redhat.com>
* demos/gtk-demo/stock_browser.c:
* gdk/gdkcolor.c:
* gdk/gdkcursor.c:
* gdk/gdkevents.c:
* gdk/gdkrectangle.c:
* gtk/gtktypeutils.c:
Update to use the new g_boxed_type_register_static API.
2001-09-10 Padraig O'Briain <padraig.obriain@sun.com> 2001-09-10 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtktreestore.c: * gtk/gtktreestore.c:
......
...@@ -65,10 +65,8 @@ stock_item_info_get_type (void) ...@@ -65,10 +65,8 @@ stock_item_info_get_type (void)
if (our_type == 0) if (our_type == 0)
our_type = g_boxed_type_register_static ("StockItemInfo", our_type = g_boxed_type_register_static ("StockItemInfo",
NULL,
(GBoxedCopyFunc) stock_item_info_copy, (GBoxedCopyFunc) stock_item_info_copy,
(GBoxedFreeFunc) stock_item_info_free, (GBoxedFreeFunc) stock_item_info_free);
FALSE);
return our_type; return our_type;
} }
......
...@@ -224,9 +224,7 @@ gdk_color_get_type (void) ...@@ -224,9 +224,7 @@ gdk_color_get_type (void)
if (our_type == 0) if (our_type == 0)
our_type = g_boxed_type_register_static ("GdkColor", our_type = g_boxed_type_register_static ("GdkColor",
NULL,
(GBoxedCopyFunc)gdk_color_copy, (GBoxedCopyFunc)gdk_color_copy,
(GBoxedFreeFunc)gdk_color_free, (GBoxedFreeFunc)gdk_color_free);
FALSE);
return our_type; return our_type;
} }
...@@ -34,10 +34,8 @@ gdk_cursor_get_type (void) ...@@ -34,10 +34,8 @@ gdk_cursor_get_type (void)
if (our_type == 0) if (our_type == 0)
our_type = g_boxed_type_register_static ("GdkCursor", our_type = g_boxed_type_register_static ("GdkCursor",
NULL,
(GBoxedCopyFunc)gdk_cursor_ref, (GBoxedCopyFunc)gdk_cursor_ref,
(GBoxedFreeFunc)gdk_cursor_unref, (GBoxedFreeFunc)gdk_cursor_unref);
TRUE);
return our_type; return our_type;
} }
......
...@@ -1000,10 +1000,8 @@ gdk_event_get_type (void) ...@@ -1000,10 +1000,8 @@ gdk_event_get_type (void)
if (our_type == 0) if (our_type == 0)
our_type = g_boxed_type_register_static ("GdkEvent", our_type = g_boxed_type_register_static ("GdkEvent",
NULL,
(GBoxedCopyFunc)gdk_event_copy, (GBoxedCopyFunc)gdk_event_copy,
(GBoxedFreeFunc)gdk_event_free, (GBoxedFreeFunc)gdk_event_free);
FALSE);
return our_type; return our_type;
} }
......
...@@ -98,10 +98,8 @@ gdk_rectangle_get_type (void) ...@@ -98,10 +98,8 @@ gdk_rectangle_get_type (void)
if (our_type == 0) if (our_type == 0)
our_type = g_boxed_type_register_static ("GdkRectangle", our_type = g_boxed_type_register_static ("GdkRectangle",
NULL,
(GBoxedCopyFunc)gdk_rectangle_copy, (GBoxedCopyFunc)gdk_rectangle_copy,
(GBoxedFreeFunc)g_free, (GBoxedFreeFunc)g_free);
FALSE);
return our_type; return our_type;
} }
...@@ -169,25 +169,10 @@ gtk_type_init (GTypeDebugFlags debug_flags) ...@@ -169,25 +169,10 @@ gtk_type_init (GTypeDebugFlags debug_flags)
type_id = g_flags_register_static (builtin_info[i].type_name, builtin_info[i].pointer1); type_id = g_flags_register_static (builtin_info[i].type_name, builtin_info[i].pointer1);
else if (builtin_info[i].parent == GTK_TYPE_BOXED) else if (builtin_info[i].parent == GTK_TYPE_BOXED)
{ {
static const gchar *copy_types[] = {
"GtkSelectionData", "GtkBorder", "GtkTextIter", "PangoTabArray",
"PangoFontDescription", "GtkTreeIter", "GtkTreePath", "GtkRequisition"
};
gboolean ref_counted = TRUE;
guint j;
for (j = 0; j < sizeof (copy_types) / sizeof (copy_types[0]); j++)
if (strcmp (copy_types[j], builtin_info[i].type_name) == 0)
{
ref_counted = FALSE;
break;
}
if (builtin_info[i].pointer1 && builtin_info[i].pointer2) if (builtin_info[i].pointer1 && builtin_info[i].pointer2)
type_id = g_boxed_type_register_static (builtin_info[i].type_name, type_id = g_boxed_type_register_static (builtin_info[i].type_name,
NULL,
builtin_info[i].pointer1, builtin_info[i].pointer1,
builtin_info[i].pointer2, builtin_info[i].pointer2);
ref_counted);
else else
type_id = g_type_register_static (GTK_TYPE_BOXED, builtin_info[i].type_name, &tinfo, 0); type_id = g_type_register_static (GTK_TYPE_BOXED, builtin_info[i].type_name, &tinfo, 0);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment