From 8b6a832f26a644999ed965ebbb23d0a8d5d8dc3f Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Sat, 5 Oct 2002 23:15:39 +0000 Subject: deprecation cleanup Sat Oct 5 16:11:22 2002 Manish Singh * gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch] gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup --- gtk/gtkdrawingarea.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'gtk/gtkdrawingarea.c') diff --git a/gtk/gtkdrawingarea.c b/gtk/gtkdrawingarea.c index 87d5b205c6..737870743a 100644 --- a/gtk/gtkdrawingarea.c +++ b/gtk/gtkdrawingarea.c @@ -35,26 +35,29 @@ static void gtk_drawing_area_size_allocate (GtkWidget *widget, static void gtk_drawing_area_send_configure (GtkDrawingArea *darea); -GtkType +GType gtk_drawing_area_get_type (void) { - static GtkType drawing_area_type = 0; + static GType drawing_area_type = 0; if (!drawing_area_type) { - static const GtkTypeInfo drawing_area_info = + static const GTypeInfo drawing_area_info = { - "GtkDrawingArea", - sizeof (GtkDrawingArea), sizeof (GtkDrawingAreaClass), - (GtkClassInitFunc) gtk_drawing_area_class_init, - (GtkObjectInitFunc) gtk_drawing_area_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_drawing_area_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkDrawingArea), + 0, /* n_preallocs */ + (GInstanceInitFunc) gtk_drawing_area_init, }; - drawing_area_type = gtk_type_unique (GTK_TYPE_WIDGET, &drawing_area_info); + drawing_area_type = + g_type_register_static (GTK_TYPE_WIDGET, "GtkDrawingArea", + &drawing_area_info, 0); } return drawing_area_type; @@ -79,7 +82,7 @@ gtk_drawing_area_init (GtkDrawingArea *darea) GtkWidget* gtk_drawing_area_new (void) { - return GTK_WIDGET (gtk_type_new (GTK_TYPE_DRAWING_AREA)); + return g_object_new (GTK_TYPE_DRAWING_AREA, NULL); } void -- cgit v1.2.1