summaryrefslogtreecommitdiff
path: root/gtk/gtkruler.c
diff options
context:
space:
mode:
authorManish Singh <yosh@gimp.org>2002-10-04 23:50:27 +0000
committerManish Singh <yosh@src.gnome.org>2002-10-04 23:50:27 +0000
commit2ffa58f11d0fdfdee4859f37dd69bcec21b34e41 (patch)
tree48127a3db81fb37f274d8ca497e68f9e6d0fe64f /gtk/gtkruler.c
parent2aa899147773436da85d0b43711c526c3ee8cf99 (diff)
downloadgdk-pixbuf-2ffa58f11d0fdfdee4859f37dd69bcec21b34e41.tar.gz
Deprecation cleanup
Fri Oct 4 16:48:27 2002 Manish Singh <yosh@gimp.org> * gtkaspectframe.[ch] gtkbin.[ch] gtkframe.[ch] gtkhruler.[ch] gtkruler.[ch] gtkvruler.[ch]: Deprecation cleanup
Diffstat (limited to 'gtk/gtkruler.c')
-rw-r--r--gtk/gtkruler.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/gtk/gtkruler.c b/gtk/gtkruler.c
index 7553fec1c..67f126f27 100644
--- a/gtk/gtkruler.c
+++ b/gtk/gtkruler.c
@@ -63,26 +63,28 @@ static const GtkRulerMetric ruler_metrics[] =
};
-GtkType
+GType
gtk_ruler_get_type (void)
{
- static GtkType ruler_type = 0;
+ static GType ruler_type = 0;
if (!ruler_type)
{
- static const GtkTypeInfo ruler_info =
+ static const GTypeInfo ruler_info =
{
- "GtkRuler",
- sizeof (GtkRuler),
sizeof (GtkRulerClass),
- (GtkClassInitFunc) gtk_ruler_class_init,
- (GtkObjectInitFunc) gtk_ruler_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) gtk_ruler_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (GtkRuler),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) gtk_ruler_init,
};
- ruler_type = gtk_type_unique (GTK_TYPE_WIDGET, &ruler_info);
+ ruler_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkRuler",
+ &ruler_info, 0);
}
return ruler_type;
@@ -92,14 +94,12 @@ static void
gtk_ruler_class_init (GtkRulerClass *class)
{
GObjectClass *gobject_class;
- GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
gobject_class = G_OBJECT_CLASS (class);
- object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
- parent_class = gtk_type_class (GTK_TYPE_WIDGET);
+ parent_class = g_type_class_peek_parent (class);
gobject_class->set_property = gtk_ruler_set_property;
gobject_class->get_property = gtk_ruler_get_property;
@@ -388,9 +388,9 @@ gtk_ruler_unrealize (GtkWidget *widget)
GtkRuler *ruler = GTK_RULER (widget);
if (ruler->backing_store)
- gdk_pixmap_unref (ruler->backing_store);
+ g_object_unref (ruler->backing_store);
if (ruler->non_gr_exp_gc)
- gdk_gc_destroy (ruler->non_gr_exp_gc);
+ g_object_unref (ruler->non_gr_exp_gc);
ruler->backing_store = NULL;
ruler->non_gr_exp_gc = NULL;
@@ -429,12 +429,12 @@ gtk_ruler_expose (GtkWidget *widget,
gtk_ruler_draw_ticks (ruler);
- gdk_draw_pixmap (widget->window,
- ruler->non_gr_exp_gc,
- ruler->backing_store,
- 0, 0, 0, 0,
- widget->allocation.width,
- widget->allocation.height);
+ gdk_draw_drawable (widget->window,
+ ruler->non_gr_exp_gc,
+ ruler->backing_store,
+ 0, 0, 0, 0,
+ widget->allocation.width,
+ widget->allocation.height);
gtk_ruler_draw_pos (ruler);
}
@@ -453,12 +453,12 @@ gtk_ruler_make_pixmap (GtkRuler *ruler)
if (ruler->backing_store)
{
- gdk_window_get_size (ruler->backing_store, &width, &height);
+ gdk_drawable_get_size (ruler->backing_store, &width, &height);
if ((width == widget->allocation.width) &&
(height == widget->allocation.height))
return;
- gdk_pixmap_unref (ruler->backing_store);
+ g_object_unref (ruler->backing_store);
}
ruler->backing_store = gdk_pixmap_new (widget->window,