summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManish Singh <yosh@gimp.org>2002-10-04 08:02:14 +0000
committerManish Singh <yosh@src.gnome.org>2002-10-04 08:02:14 +0000
commit85d726f9aa22ff9f6b9487b4f3e380a40f731f4b (patch)
tree4ad154a10bc1c543aacc7a3734e203b9ee73ae59
parent424f913d43262a6a9eeeccddf6a795e38e7ac29a (diff)
downloadgtk+-85d726f9aa22ff9f6b9487b4f3e380a40f731f4b.tar.gz
Deprecation cleanup
Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org> * gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch] gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--ChangeLog.pre-2-26
-rw-r--r--ChangeLog.pre-2-46
-rw-r--r--ChangeLog.pre-2-66
-rw-r--r--ChangeLog.pre-2-86
-rw-r--r--gtk/gtkhscrollbar.c32
-rw-r--r--gtk/gtkhscrollbar.h12
-rw-r--r--gtk/gtkhseparator.c27
-rw-r--r--gtk/gtkhseparator.h12
-rw-r--r--gtk/gtkrange.c68
-rw-r--r--gtk/gtkrange.h12
-rw-r--r--gtk/gtkscrollbar.c21
-rw-r--r--gtk/gtkscrollbar.h12
-rw-r--r--gtk/gtkseparator.c21
-rw-r--r--gtk/gtkseparator.h12
-rw-r--r--gtk/gtkseparatormenuitem.h10
-rw-r--r--gtk/gtkvscrollbar.c32
-rw-r--r--gtk/gtkvscrollbar.h12
-rw-r--r--gtk/gtkvseparator.c27
-rw-r--r--gtk/gtkvseparator.h12
21 files changed, 204 insertions, 154 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a41516e34..d8d63ead1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
+
+ * gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
+ gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
+ gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
+
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
* gdk-pixbuf/queryloaders.c: make it legal C
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 5a41516e34..d8d63ead1b 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,9 @@
+Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
+
+ * gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
+ gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
+ gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
+
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
* gdk-pixbuf/queryloaders.c: make it legal C
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 5a41516e34..d8d63ead1b 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,9 @@
+Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
+
+ * gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
+ gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
+ gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
+
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
* gdk-pixbuf/queryloaders.c: make it legal C
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 5a41516e34..d8d63ead1b 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,9 @@
+Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
+
+ * gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
+ gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
+ gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
+
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
* gdk-pixbuf/queryloaders.c: make it legal C
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 5a41516e34..d8d63ead1b 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,9 @@
+Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
+
+ * gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
+ gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
+ gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
+
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
* gdk-pixbuf/queryloaders.c: make it legal C
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 5a41516e34..d8d63ead1b 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,9 @@
+Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
+
+ * gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
+ gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
+ gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
+
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
* gdk-pixbuf/queryloaders.c: make it legal C
diff --git a/gtk/gtkhscrollbar.c b/gtk/gtkhscrollbar.c
index 0894187dec..3b3c2af449 100644
--- a/gtk/gtkhscrollbar.c
+++ b/gtk/gtkhscrollbar.c
@@ -26,33 +26,35 @@
*/
#include "gtkhscrollbar.h"
-#include "gtksignal.h"
#include "gdk/gdkkeysyms.h"
#include "gtkintl.h"
static void gtk_hscrollbar_class_init (GtkHScrollbarClass *klass);
static void gtk_hscrollbar_init (GtkHScrollbar *hscrollbar);
-GtkType
+GType
gtk_hscrollbar_get_type (void)
{
- static GtkType hscrollbar_type = 0;
+ static GType hscrollbar_type = 0;
if (!hscrollbar_type)
{
- static const GtkTypeInfo hscrollbar_info =
+ static const GTypeInfo hscrollbar_info =
{
- "GtkHScrollbar",
- sizeof (GtkHScrollbar),
sizeof (GtkHScrollbarClass),
- (GtkClassInitFunc) gtk_hscrollbar_class_init,
- (GtkObjectInitFunc) gtk_hscrollbar_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) gtk_hscrollbar_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (GtkHScrollbar),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) gtk_hscrollbar_init,
};
- hscrollbar_type = gtk_type_unique (GTK_TYPE_SCROLLBAR, &hscrollbar_info);
+ hscrollbar_type =
+ g_type_register_static (GTK_TYPE_SCROLLBAR, "GtkHScrollbar",
+ &hscrollbar_info, 0);
}
return hscrollbar_type;
@@ -79,9 +81,9 @@ gtk_hscrollbar_new (GtkAdjustment *adjustment)
{
GtkWidget *hscrollbar;
- hscrollbar = gtk_widget_new (GTK_TYPE_HSCROLLBAR,
- "adjustment", adjustment,
- NULL);
+ hscrollbar = g_object_new (GTK_TYPE_HSCROLLBAR,
+ "adjustment", adjustment,
+ NULL);
return hscrollbar;
}
diff --git a/gtk/gtkhscrollbar.h b/gtk/gtkhscrollbar.h
index 8917a55e5b..eecca102cc 100644
--- a/gtk/gtkhscrollbar.h
+++ b/gtk/gtkhscrollbar.h
@@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_HSCROLLBAR (gtk_hscrollbar_get_type ())
-#define GTK_HSCROLLBAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HSCROLLBAR, GtkHScrollbar))
-#define GTK_HSCROLLBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSCROLLBAR, GtkHScrollbarClass))
-#define GTK_IS_HSCROLLBAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HSCROLLBAR))
-#define GTK_IS_HSCROLLBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSCROLLBAR))
-#define GTK_HSCROLLBAR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_HSCROLLBAR, GtkHScrollbarClass))
+#define GTK_HSCROLLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_HSCROLLBAR, GtkHScrollbar))
+#define GTK_HSCROLLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSCROLLBAR, GtkHScrollbarClass))
+#define GTK_IS_HSCROLLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_HSCROLLBAR))
+#define GTK_IS_HSCROLLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSCROLLBAR))
+#define GTK_HSCROLLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_HSCROLLBAR, GtkHScrollbarClass))
typedef struct _GtkHScrollbar GtkHScrollbar;
@@ -59,7 +59,7 @@ struct _GtkHScrollbarClass
};
-GtkType gtk_hscrollbar_get_type (void) G_GNUC_CONST;
+GType gtk_hscrollbar_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_hscrollbar_new (GtkAdjustment *adjustment);
diff --git a/gtk/gtkhseparator.c b/gtk/gtkhseparator.c
index 7da54bf5a2..66b5aad453 100644
--- a/gtk/gtkhseparator.c
+++ b/gtk/gtkhseparator.c
@@ -33,26 +33,29 @@ static gint gtk_hseparator_expose (GtkWidget *widget,
GdkEventExpose *event);
-GtkType
+GType
gtk_hseparator_get_type (void)
{
- static GtkType hseparator_type = 0;
+ static GType hseparator_type = 0;
if (!hseparator_type)
{
- static const GtkTypeInfo hseparator_info =
+ static const GTypeInfo hseparator_info =
{
- "GtkHSeparator",
- sizeof (GtkHSeparator),
sizeof (GtkHSeparatorClass),
- (GtkClassInitFunc) gtk_hseparator_class_init,
- (GtkObjectInitFunc) gtk_hseparator_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) gtk_hseparator_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_init */
+ sizeof (GtkHSeparator),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) gtk_hseparator_init,
};
- hseparator_type = gtk_type_unique (GTK_TYPE_SEPARATOR, &hseparator_info);
+ hseparator_type =
+ g_type_register_static (GTK_TYPE_SEPARATOR, "GtkHSeparator",
+ &hseparator_info, 0);
}
return hseparator_type;
@@ -78,7 +81,7 @@ gtk_hseparator_init (GtkHSeparator *hseparator)
GtkWidget*
gtk_hseparator_new (void)
{
- return GTK_WIDGET (gtk_type_new (GTK_TYPE_HSEPARATOR));
+ return g_object_new (GTK_TYPE_HSEPARATOR, NULL);
}
diff --git a/gtk/gtkhseparator.h b/gtk/gtkhseparator.h
index b98abd2b19..8028302018 100644
--- a/gtk/gtkhseparator.h
+++ b/gtk/gtkhseparator.h
@@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_HSEPARATOR (gtk_hseparator_get_type ())
-#define GTK_HSEPARATOR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HSEPARATOR, GtkHSeparator))
-#define GTK_HSEPARATOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSEPARATOR, GtkHSeparatorClass))
-#define GTK_IS_HSEPARATOR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HSEPARATOR))
-#define GTK_IS_HSEPARATOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSEPARATOR))
-#define GTK_HSEPARATOR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_HSEPARATOR, GtkHSeparatorClass))
+#define GTK_HSEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_HSEPARATOR, GtkHSeparator))
+#define GTK_HSEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSEPARATOR, GtkHSeparatorClass))
+#define GTK_IS_HSEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_HSEPARATOR))
+#define GTK_IS_HSEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSEPARATOR))
+#define GTK_HSEPARATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_HSEPARATOR, GtkHSeparatorClass))
typedef struct _GtkHSeparator GtkHSeparator;
@@ -59,7 +59,7 @@ struct _GtkHSeparatorClass
};
-GtkType gtk_hseparator_get_type (void) G_GNUC_CONST;
+GType gtk_hseparator_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_hseparator_new (void);
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index e5b36f65d8..a6105c77c3 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -30,7 +30,6 @@
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkrange.h"
-#include "gtksignal.h"
#include "gtkintl.h"
#define SCROLL_INITIAL_DELAY 250 /* must hold button this long before ... */
@@ -175,25 +174,25 @@ static GtkWidgetClass *parent_class = NULL;
static guint signals[LAST_SIGNAL];
-GtkType
+GType
gtk_range_get_type (void)
{
- static GtkType range_type = 0;
+ static GType range_type = 0;
if (!range_type)
{
static const GTypeInfo range_info =
{
sizeof (GtkRangeClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
+ NULL, /* base_init */
+ NULL, /* base_finalize */
(GClassInitFunc) gtk_range_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ NULL, /* class_finalize */
+ NULL, /* class_data */
sizeof (GtkRange),
- 0, /* n_preallocs */
+ 0, /* n_preallocs */
(GInstanceInitFunc) gtk_range_init,
- NULL, /* value_table */
+ NULL, /* value_table */
};
range_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkRange",
@@ -243,7 +242,7 @@ gtk_range_class_init (GtkRangeClass *class)
signals[VALUE_CHANGED] =
g_signal_new ("value_changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkRangeClass, value_changed),
NULL, NULL,
@@ -252,7 +251,7 @@ gtk_range_class_init (GtkRangeClass *class)
signals[ADJUST_BOUNDS] =
g_signal_new ("adjust_bounds",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkRangeClass, adjust_bounds),
NULL, NULL,
@@ -262,7 +261,7 @@ gtk_range_class_init (GtkRangeClass *class)
signals[MOVE_SLIDER] =
g_signal_new ("move_slider",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkRangeClass, move_slider),
NULL, NULL,
@@ -519,25 +518,25 @@ gtk_range_set_adjustment (GtkRange *range,
{
if (range->adjustment)
{
- gtk_signal_disconnect_by_func (GTK_OBJECT (range->adjustment),
- G_CALLBACK (gtk_range_adjustment_changed),
- range);
- gtk_signal_disconnect_by_func (GTK_OBJECT (range->adjustment),
- G_CALLBACK (gtk_range_adjustment_value_changed),
- range);
- gtk_object_unref (GTK_OBJECT (range->adjustment));
+ g_signal_handlers_disconnect_by_func (range->adjustment,
+ gtk_range_adjustment_changed,
+ range);
+ g_signal_handlers_disconnect_by_func (range->adjustment,
+ gtk_range_adjustment_value_changed,
+ range);
+ g_object_unref (range->adjustment);
}
range->adjustment = adjustment;
- gtk_object_ref (GTK_OBJECT (adjustment));
+ g_object_ref (adjustment);
gtk_object_sink (GTK_OBJECT (adjustment));
- gtk_signal_connect (GTK_OBJECT (adjustment), "changed",
- (GtkSignalFunc) gtk_range_adjustment_changed,
- range);
- gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
- (GtkSignalFunc) gtk_range_adjustment_value_changed,
- range);
+ g_signal_connect (adjustment, "changed",
+ G_CALLBACK (gtk_range_adjustment_changed),
+ range);
+ g_signal_connect (adjustment, "value_changed",
+ G_CALLBACK (gtk_range_adjustment_value_changed),
+ range);
gtk_range_adjustment_changed (adjustment, range);
g_object_notify (G_OBJECT (range), "adjustment");
@@ -714,10 +713,13 @@ gtk_range_destroy (GtkObject *object)
if (range->adjustment)
{
- if (range->adjustment)
- gtk_signal_disconnect_by_data (GTK_OBJECT (range->adjustment),
- (gpointer) range);
- gtk_object_unref (GTK_OBJECT (range->adjustment));
+ g_signal_handlers_disconnect_by_func (range->adjustment,
+ gtk_range_adjustment_changed,
+ range);
+ g_signal_handlers_disconnect_by_func (range->adjustment,
+ gtk_range_adjustment_value_changed,
+ range);
+ g_object_unref (range->adjustment);
range->adjustment = NULL;
}
@@ -782,7 +784,7 @@ gtk_range_realize (GtkWidget *widget)
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
widget->window = gtk_widget_get_parent_window (widget);
- gdk_window_ref (widget->window);
+ g_object_ref (widget->window);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
@@ -1477,7 +1479,7 @@ gtk_range_adjustment_value_changed (GtkAdjustment *adjustment,
* will enforce on the adjustment.
*/
- g_signal_emit (G_OBJECT (range), signals[VALUE_CHANGED], 0);
+ g_signal_emit (range, signals[VALUE_CHANGED], 0);
}
static void
@@ -2258,7 +2260,7 @@ gtk_range_internal_set_value (GtkRange *range,
gdouble value)
{
/* potentially adjust the bounds _before we clamp */
- g_signal_emit (G_OBJECT (range), signals[ADJUST_BOUNDS], 0, value);
+ g_signal_emit (range, signals[ADJUST_BOUNDS], 0, value);
value = CLAMP (value, range->adjustment->lower,
(range->adjustment->upper - range->adjustment->page_size));
diff --git a/gtk/gtkrange.h b/gtk/gtkrange.h
index 4bfcafbf7f..e62d4d2b18 100644
--- a/gtk/gtkrange.h
+++ b/gtk/gtkrange.h
@@ -39,11 +39,11 @@ extern "C" {
#define GTK_TYPE_RANGE (gtk_range_get_type ())
-#define GTK_RANGE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_RANGE, GtkRange))
-#define GTK_RANGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_RANGE, GtkRangeClass))
-#define GTK_IS_RANGE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_RANGE))
-#define GTK_IS_RANGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_RANGE))
-#define GTK_RANGE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_RANGE, GtkRangeClass))
+#define GTK_RANGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_RANGE, GtkRange))
+#define GTK_RANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_RANGE, GtkRangeClass))
+#define GTK_IS_RANGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_RANGE))
+#define GTK_IS_RANGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_RANGE))
+#define GTK_RANGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_RANGE, GtkRangeClass))
/* These two are private/opaque types, ignore */
typedef struct _GtkRangeLayout GtkRangeLayout;
@@ -128,7 +128,7 @@ struct _GtkRangeClass
};
-GtkType gtk_range_get_type (void) G_GNUC_CONST;
+GType gtk_range_get_type (void) G_GNUC_CONST;
void gtk_range_set_update_policy (GtkRange *range,
GtkUpdateType policy);
diff --git a/gtk/gtkscrollbar.c b/gtk/gtkscrollbar.c
index df6da60674..499cfd6a53 100644
--- a/gtk/gtkscrollbar.c
+++ b/gtk/gtkscrollbar.c
@@ -35,29 +35,30 @@ static void gtk_scrollbar_style_set (GtkWidget *widget,
static gpointer parent_class;
-GtkType
+GType
gtk_scrollbar_get_type (void)
{
- static GtkType scrollbar_type = 0;
+ static GType scrollbar_type = 0;
if (!scrollbar_type)
{
static const GTypeInfo scrollbar_info =
{
sizeof (GtkScrollbarClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
+ NULL, /* base_init */
+ NULL, /* base_finalize */
(GClassInitFunc) gtk_scrollbar_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ NULL, /* class_finalize */
+ NULL, /* class_data */
sizeof (GtkScrollbar),
- 0, /* n_preallocs */
+ 0, /* n_preallocs */
(GInstanceInitFunc) gtk_scrollbar_init,
- NULL, /* value_table */
+ NULL, /* value_table */
};
- scrollbar_type = g_type_register_static (GTK_TYPE_RANGE, "GtkScrollbar",
- &scrollbar_info, G_TYPE_FLAG_ABSTRACT);
+ scrollbar_type =
+ g_type_register_static (GTK_TYPE_RANGE, "GtkScrollbar",
+ &scrollbar_info, G_TYPE_FLAG_ABSTRACT);
}
return scrollbar_type;
diff --git a/gtk/gtkscrollbar.h b/gtk/gtkscrollbar.h
index 7d4bf231e0..14a7cea142 100644
--- a/gtk/gtkscrollbar.h
+++ b/gtk/gtkscrollbar.h
@@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_SCROLLBAR (gtk_scrollbar_get_type ())
-#define GTK_SCROLLBAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SCROLLBAR, GtkScrollbar))
-#define GTK_SCROLLBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SCROLLBAR, GtkScrollbarClass))
-#define GTK_IS_SCROLLBAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SCROLLBAR))
-#define GTK_IS_SCROLLBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SCROLLBAR))
-#define GTK_SCROLLBAR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_SCROLLBAR, GtkScrollbarClass))
+#define GTK_SCROLLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SCROLLBAR, GtkScrollbar))
+#define GTK_SCROLLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SCROLLBAR, GtkScrollbarClass))
+#define GTK_IS_SCROLLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SCROLLBAR))
+#define GTK_IS_SCROLLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SCROLLBAR))
+#define GTK_SCROLLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SCROLLBAR, GtkScrollbarClass))
typedef struct _GtkScrollbar GtkScrollbar;
@@ -65,7 +65,7 @@ struct _GtkScrollbarClass
};
-GtkType gtk_scrollbar_get_type (void) G_GNUC_CONST;
+GType gtk_scrollbar_get_type (void) G_GNUC_CONST;
#ifdef __cplusplus
diff --git a/gtk/gtkseparator.c b/gtk/gtkseparator.c
index 336f5ded07..83fdb2d1c8 100644
--- a/gtk/gtkseparator.c
+++ b/gtk/gtkseparator.c
@@ -31,29 +31,30 @@ static void gtk_separator_class_init (GtkSeparatorClass *klass);
static void gtk_separator_init (GtkSeparator *separator);
-GtkType
+GType
gtk_separator_get_type (void)
{
- static GtkType separator_type = 0;
+ static GType separator_type = 0;
if (!separator_type)
{
static const GTypeInfo separator_info =
{
sizeof (GtkSeparatorClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
+ NULL, /* base_init */
+ NULL, /* base_finalize */
(GClassInitFunc) gtk_separator_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ NULL, /* class_finalize */
+ NULL, /* class_data */
sizeof (GtkSeparator),
- 0, /* n_preallocs */
+ 0, /* n_preallocs */
(GInstanceInitFunc) gtk_separator_init,
- NULL, /* value_table */
+ NULL, /* value_table */
};
- separator_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkSeparator",
- &separator_info, G_TYPE_FLAG_ABSTRACT);
+ separator_type =
+ g_type_register_static (GTK_TYPE_WIDGET, "GtkSeparator",
+ &separator_info, G_TYPE_FLAG_ABSTRACT);
}
return separator_type;
diff --git a/gtk/gtkseparator.h b/gtk/gtkseparator.h
index 602874d12f..c0894fc49b 100644
--- a/gtk/gtkseparator.h
+++ b/gtk/gtkseparator.h
@@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_SEPARATOR (gtk_separator_get_type ())
-#define GTK_SEPARATOR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SEPARATOR, GtkSeparator))
-#define GTK_SEPARATOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SEPARATOR, GtkSeparatorClass))
-#define GTK_IS_SEPARATOR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SEPARATOR))
-#define GTK_IS_SEPARATOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SEPARATOR))
-#define GTK_SEPARATOR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_SEPARATOR, GtkSeparatorClass))
+#define GTK_SEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SEPARATOR, GtkSeparator))
+#define GTK_SEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SEPARATOR, GtkSeparatorClass))
+#define GTK_IS_SEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SEPARATOR))
+#define GTK_IS_SEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SEPARATOR))
+#define GTK_SEPARATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SEPARATOR, GtkSeparatorClass))
@@ -60,7 +60,7 @@ struct _GtkSeparatorClass
};
-GtkType gtk_separator_get_type (void) G_GNUC_CONST;
+GType gtk_separator_get_type (void) G_GNUC_CONST;
#ifdef __cplusplus
diff --git a/gtk/gtkseparatormenuitem.h b/gtk/gtkseparatormenuitem.h
index b34eccbcff..1d3a0014a0 100644
--- a/gtk/gtkseparatormenuitem.h
+++ b/gtk/gtkseparatormenuitem.h
@@ -37,11 +37,11 @@ extern "C" {
#define GTK_TYPE_SEPARATOR_MENU_ITEM (gtk_separator_menu_item_get_type ())
-#define GTK_SEPARATOR_MENU_ITEM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SEPARATOR_MENU_ITEM, GtkSeparatorMenuItem))
-#define GTK_SEPARATOR_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SEPARATOR_MENU_ITEM, GtkSeparatorMenuItemClass))
-#define GTK_IS_SEPARATOR_MENU_ITEM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SEPARATOR_MENU_ITEM))
-#define GTK_IS_SEPARATOR_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SEPARATOR_MENU_ITEM))
-#define GTK_SEPARATOR_MENU_ITEM_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_SEPARATOR_MENU_ITEM, GtkSeparatorMenuItemClass))
+#define GTK_SEPARATOR_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SEPARATOR_MENU_ITEM, GtkSeparatorMenuItem))
+#define GTK_SEPARATOR_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SEPARATOR_MENU_ITEM, GtkSeparatorMenuItemClass))
+#define GTK_IS_SEPARATOR_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SEPARATOR_MENU_ITEM))
+#define GTK_IS_SEPARATOR_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SEPARATOR_MENU_ITEM))
+#define GTK_SEPARATOR_MENU_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SEPARATOR_MENU_ITEM, GtkSeparatorMenuItemClass))
typedef struct _GtkSeparatorMenuItem GtkSeparatorMenuItem;
diff --git a/gtk/gtkvscrollbar.c b/gtk/gtkvscrollbar.c
index 795255b5eb..e10636e9d5 100644
--- a/gtk/gtkvscrollbar.c
+++ b/gtk/gtkvscrollbar.c
@@ -26,33 +26,35 @@
*/
#include "gtkvscrollbar.h"
-#include "gtksignal.h"
#include "gdk/gdkkeysyms.h"
#include "gtkintl.h"
static void gtk_vscrollbar_class_init (GtkVScrollbarClass *klass);
static void gtk_vscrollbar_init (GtkVScrollbar *vscrollbar);
-GtkType
+GType
gtk_vscrollbar_get_type (void)
{
- static GtkType vscrollbar_type = 0;
+ static GType vscrollbar_type = 0;
if (!vscrollbar_type)
{
- static const GtkTypeInfo vscrollbar_info =
+ static const GTypeInfo vscrollbar_info =
{
- "GtkVScrollbar",
- sizeof (GtkVScrollbar),
sizeof (GtkVScrollbarClass),
- (GtkClassInitFunc) gtk_vscrollbar_class_init,
- (GtkObjectInitFunc) gtk_vscrollbar_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) gtk_vscrollbar_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (GtkVScrollbar),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) gtk_vscrollbar_init,
};
- vscrollbar_type = gtk_type_unique (GTK_TYPE_SCROLLBAR, &vscrollbar_info);
+ vscrollbar_type =
+ g_type_register_static (GTK_TYPE_SCROLLBAR, "GtkVScrollbar",
+ &vscrollbar_info, 0);
}
return vscrollbar_type;
@@ -79,9 +81,9 @@ gtk_vscrollbar_new (GtkAdjustment *adjustment)
{
GtkWidget *vscrollbar;
- vscrollbar = gtk_widget_new (GTK_TYPE_VSCROLLBAR,
- "adjustment", adjustment,
- NULL);
+ vscrollbar = g_object_new (GTK_TYPE_VSCROLLBAR,
+ "adjustment", adjustment,
+ NULL);
return vscrollbar;
}
diff --git a/gtk/gtkvscrollbar.h b/gtk/gtkvscrollbar.h
index 4ae8f8fc54..c4983bbbeb 100644
--- a/gtk/gtkvscrollbar.h
+++ b/gtk/gtkvscrollbar.h
@@ -33,11 +33,11 @@
#define GTK_TYPE_VSCROLLBAR (gtk_vscrollbar_get_type ())
-#define GTK_VSCROLLBAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VSCROLLBAR, GtkVScrollbar))
-#define GTK_VSCROLLBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VSCROLLBAR, GtkVScrollbarClass))
-#define GTK_IS_VSCROLLBAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VSCROLLBAR))
-#define GTK_IS_VSCROLLBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VSCROLLBAR))
-#define GTK_VSCROLLBAR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_VSCROLLBAR, GtkVScrollbarClass))
+#define GTK_VSCROLLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_VSCROLLBAR, GtkVScrollbar))
+#define GTK_VSCROLLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_VSCROLLBAR, GtkVScrollbarClass))
+#define GTK_IS_VSCROLLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_VSCROLLBAR))
+#define GTK_IS_VSCROLLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VSCROLLBAR))
+#define GTK_VSCROLLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_VSCROLLBAR, GtkVScrollbarClass))
typedef struct _GtkVScrollbar GtkVScrollbar;
@@ -59,7 +59,7 @@ extern "C" {
#endif /* __cplusplus */
-GtkType gtk_vscrollbar_get_type (void) G_GNUC_CONST;
+GType gtk_vscrollbar_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_vscrollbar_new (GtkAdjustment *adjustment);
diff --git a/gtk/gtkvseparator.c b/gtk/gtkvseparator.c
index 48c3962f6b..f546e0db85 100644
--- a/gtk/gtkvseparator.c
+++ b/gtk/gtkvseparator.c
@@ -33,26 +33,29 @@ static gint gtk_vseparator_expose (GtkWidget *widget,
GdkEventExpose *event);
-GtkType
+GType
gtk_vseparator_get_type (void)
{
- static GtkType vseparator_type = 0;
+ static GType vseparator_type = 0;
if (!vseparator_type)
{
- static const GtkTypeInfo vseparator_info =
+ static const GTypeInfo vseparator_info =
{
- "GtkVSeparator",
- sizeof (GtkVSeparator),
sizeof (GtkVSeparatorClass),
- (GtkClassInitFunc) gtk_vseparator_class_init,
- (GtkObjectInitFunc) gtk_vseparator_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) gtk_vseparator_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_init */
+ sizeof (GtkVSeparator),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) gtk_vseparator_init,
};
- vseparator_type = gtk_type_unique (GTK_TYPE_SEPARATOR, &vseparator_info);
+ vseparator_type =
+ g_type_register_static (GTK_TYPE_SEPARATOR, "GtkVSeparator",
+ &vseparator_info, 0);
}
return vseparator_type;
@@ -78,7 +81,7 @@ gtk_vseparator_init (GtkVSeparator *vseparator)
GtkWidget*
gtk_vseparator_new (void)
{
- return GTK_WIDGET (gtk_type_new (GTK_TYPE_VSEPARATOR));
+ return g_object_new (GTK_TYPE_VSEPARATOR, NULL);
}
diff --git a/gtk/gtkvseparator.h b/gtk/gtkvseparator.h
index 69c3ac8756..b55f2d9029 100644
--- a/gtk/gtkvseparator.h
+++ b/gtk/gtkvseparator.h
@@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_VSEPARATOR (gtk_vseparator_get_type ())
-#define GTK_VSEPARATOR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VSEPARATOR, GtkVSeparator))
-#define GTK_VSEPARATOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VSEPARATOR, GtkVSeparatorClass))
-#define GTK_IS_VSEPARATOR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VSEPARATOR))
-#define GTK_IS_VSEPARATOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VSEPARATOR))
-#define GTK_VSEPARATOR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_VSEPARATOR, GtkVSeparatorClass))
+#define GTK_VSEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_VSEPARATOR, GtkVSeparator))
+#define GTK_VSEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_VSEPARATOR, GtkVSeparatorClass))
+#define GTK_IS_VSEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_VSEPARATOR))
+#define GTK_IS_VSEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VSEPARATOR))
+#define GTK_VSEPARATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_VSEPARATOR, GtkVSeparatorClass))
typedef struct _GtkVSeparator GtkVSeparator;
@@ -59,7 +59,7 @@ struct _GtkVSeparatorClass
};
-GtkType gtk_vseparator_get_type (void) G_GNUC_CONST;
+GType gtk_vseparator_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_vseparator_new (void);