Commit f18d5d35 authored by Manish Singh's avatar Manish Singh Committed by Manish Singh

Deprecation cleanup

Fri Oct 11 15:56:20 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkaccellabel.[ch] gtk/gtkaccessible.[ch] gtk/gtkbutton.[ch]
        gtk/gtkcheckbutton.[ch] gtk/gtkcolorseldialog.[ch] gtk/gtkdialog.[ch]
        gtk/gtkhandlebox.[ch] gtk/gtkinputdialog.[ch] gtk/gtkmessagedialog.[ch]
        gtk/gtktearoffmenuitem.[ch] gtk/gtktogglebutton.[ch]: Deprecation
        cleanup
parent a9b71314
Fri Oct 11 15:56:20 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkaccellabel.[ch] gtk/gtkaccessible.[ch] gtk/gtkbutton.[ch]
gtk/gtkcheckbutton.[ch] gtk/gtkcolorseldialog.[ch] gtk/gtkdialog.[ch]
gtk/gtkhandlebox.[ch] gtk/gtkinputdialog.[ch] gtk/gtkmessagedialog.[ch]
gtk/gtktearoffmenuitem.[ch] gtk/gtktogglebutton.[ch]: Deprecation
cleanup
2002-10-11 Matthias Clasen <maclas@gmx.de>
* examples/gtkdial/gtkdial.c (gtk_dial_destroy):
......
Fri Oct 11 15:56:20 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkaccellabel.[ch] gtk/gtkaccessible.[ch] gtk/gtkbutton.[ch]
gtk/gtkcheckbutton.[ch] gtk/gtkcolorseldialog.[ch] gtk/gtkdialog.[ch]
gtk/gtkhandlebox.[ch] gtk/gtkinputdialog.[ch] gtk/gtkmessagedialog.[ch]
gtk/gtktearoffmenuitem.[ch] gtk/gtktogglebutton.[ch]: Deprecation
cleanup
2002-10-11 Matthias Clasen <maclas@gmx.de>
* examples/gtkdial/gtkdial.c (gtk_dial_destroy):
......
Fri Oct 11 15:56:20 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkaccellabel.[ch] gtk/gtkaccessible.[ch] gtk/gtkbutton.[ch]
gtk/gtkcheckbutton.[ch] gtk/gtkcolorseldialog.[ch] gtk/gtkdialog.[ch]
gtk/gtkhandlebox.[ch] gtk/gtkinputdialog.[ch] gtk/gtkmessagedialog.[ch]
gtk/gtktearoffmenuitem.[ch] gtk/gtktogglebutton.[ch]: Deprecation
cleanup
2002-10-11 Matthias Clasen <maclas@gmx.de>
* examples/gtkdial/gtkdial.c (gtk_dial_destroy):
......
Fri Oct 11 15:56:20 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkaccellabel.[ch] gtk/gtkaccessible.[ch] gtk/gtkbutton.[ch]
gtk/gtkcheckbutton.[ch] gtk/gtkcolorseldialog.[ch] gtk/gtkdialog.[ch]
gtk/gtkhandlebox.[ch] gtk/gtkinputdialog.[ch] gtk/gtkmessagedialog.[ch]
gtk/gtktearoffmenuitem.[ch] gtk/gtktogglebutton.[ch]: Deprecation
cleanup
2002-10-11 Matthias Clasen <maclas@gmx.de>
* examples/gtkdial/gtkdial.c (gtk_dial_destroy):
......
Fri Oct 11 15:56:20 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkaccellabel.[ch] gtk/gtkaccessible.[ch] gtk/gtkbutton.[ch]
gtk/gtkcheckbutton.[ch] gtk/gtkcolorseldialog.[ch] gtk/gtkdialog.[ch]
gtk/gtkhandlebox.[ch] gtk/gtkinputdialog.[ch] gtk/gtkmessagedialog.[ch]
gtk/gtktearoffmenuitem.[ch] gtk/gtktogglebutton.[ch]: Deprecation
cleanup
2002-10-11 Matthias Clasen <maclas@gmx.de>
* examples/gtkdial/gtkdial.c (gtk_dial_destroy):
......
Fri Oct 11 15:56:20 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkaccellabel.[ch] gtk/gtkaccessible.[ch] gtk/gtkbutton.[ch]
gtk/gtkcheckbutton.[ch] gtk/gtkcolorseldialog.[ch] gtk/gtkdialog.[ch]
gtk/gtkhandlebox.[ch] gtk/gtkinputdialog.[ch] gtk/gtkmessagedialog.[ch]
gtk/gtktearoffmenuitem.[ch] gtk/gtktogglebutton.[ch]: Deprecation
cleanup
2002-10-11 Matthias Clasen <maclas@gmx.de>
* examples/gtkdial/gtkdial.c (gtk_dial_destroy):
......
......@@ -26,14 +26,14 @@
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include <string.h>
#include "gtkaccellabel.h"
#include "gtkaccelmap.h"
#include "gtkmain.h"
#include "gtksignal.h"
#include "gtkintl.h"
#include <string.h>
enum {
PROP_0,
PROP_ACCEL_CLOSURE,
......@@ -58,30 +58,32 @@ static gboolean gtk_accel_label_expose_event (GtkWidget *widget,
GdkEventExpose *event);
static gboolean gtk_accel_label_refetch_idle (GtkAccelLabel *accel_label);
static GtkAccelLabelClass *accel_label_class = NULL;
static GtkLabelClass *parent_class = NULL;
GtkType
GType
gtk_accel_label_get_type (void)
{
static GtkType accel_label_type = 0;
static GType accel_label_type = 0;
if (!accel_label_type)
{
static const GtkTypeInfo accel_label_info =
static const GTypeInfo accel_label_info =
{
"GtkAccelLabel",
sizeof (GtkAccelLabel),
sizeof (GtkAccelLabelClass),
(GtkClassInitFunc) gtk_accel_label_class_init,
(GtkObjectInitFunc) gtk_accel_label_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gtk_accel_label_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtkAccelLabel),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_accel_label_init,
};
accel_label_type = gtk_type_unique (GTK_TYPE_LABEL, &accel_label_info);
accel_label_type =
g_type_register_static (GTK_TYPE_LABEL, "GtkAccelLabel",
&accel_label_info, 0);
}
return accel_label_type;
......@@ -94,7 +96,6 @@ gtk_accel_label_class_init (GtkAccelLabelClass *class)
GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
accel_label_class = class;
parent_class = g_type_class_peek_parent (class);
gobject_class->finalize = gtk_accel_label_finalize;
......@@ -130,14 +131,14 @@ gtk_accel_label_class_init (GtkAccelLabelClass *class)
class->accel_seperator = g_strdup (" / ");
class->latin1_to_char = TRUE;
g_object_class_install_property (G_OBJECT_CLASS (object_class),
g_object_class_install_property (gobject_class,
PROP_ACCEL_CLOSURE,
g_param_spec_boxed ("accel_closure",
_("Accelerator Closure"),
_("The closure to be monitored for accelerator changes"),
G_TYPE_CLOSURE,
G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (object_class),
g_object_class_install_property (gobject_class,
PROP_ACCEL_WIDGET,
g_param_spec_object ("accel_widget",
_("Accelerator Widget"),
......@@ -214,7 +215,7 @@ gtk_accel_label_new (const gchar *string)
g_return_val_if_fail (string != NULL, NULL);
accel_label = gtk_type_new (GTK_TYPE_ACCEL_LABEL);
accel_label = g_object_new (GTK_TYPE_ACCEL_LABEL, NULL);
gtk_label_set_text (GTK_LABEL (accel_label), string);
......@@ -289,7 +290,7 @@ gtk_accel_label_size_request (GtkWidget *widget,
pango_layout_get_pixel_size (layout, &width, NULL);
accel_label->accel_string_width = width;
g_object_unref (G_OBJECT (layout));
g_object_unref (layout);
}
static gboolean
......@@ -335,7 +336,7 @@ gtk_accel_label_expose_event (GtkWidget *widget,
x, y,
layout);
g_object_unref (G_OBJECT (layout));
g_object_unref (layout);
}
else
{
......@@ -388,7 +389,7 @@ gtk_accel_label_set_accel_widget (GtkAccelLabel *accel_label,
{
gtk_accel_label_set_accel_closure (accel_label, NULL);
g_signal_handlers_disconnect_by_func (accel_label->accel_widget,
(gpointer) refetch_widget_accel_closure,
refetch_widget_accel_closure,
accel_label);
g_object_unref (accel_label->accel_widget);
}
......@@ -448,7 +449,7 @@ gtk_accel_label_set_accel_closure (GtkAccelLabel *accel_label,
if (accel_label->accel_closure)
{
g_signal_handlers_disconnect_by_func (accel_label->accel_group,
(gpointer) check_accel_changed,
check_accel_changed,
accel_label);
accel_label->accel_group = NULL;
g_closure_unref (accel_label->accel_closure);
......
......@@ -40,11 +40,11 @@ extern "C" {
#define GTK_TYPE_ACCEL_LABEL (gtk_accel_label_get_type ())
#define GTK_ACCEL_LABEL(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ACCEL_LABEL, GtkAccelLabel))
#define GTK_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ACCEL_LABEL, GtkAccelLabelClass))
#define GTK_IS_ACCEL_LABEL(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ACCEL_LABEL))
#define GTK_IS_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ACCEL_LABEL))
#define GTK_ACCEL_LABEL_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ACCEL_LABEL, GtkAccelLabelClass))
#define GTK_ACCEL_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ACCEL_LABEL, GtkAccelLabel))
#define GTK_ACCEL_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ACCEL_LABEL, GtkAccelLabelClass))
#define GTK_IS_ACCEL_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ACCEL_LABEL))
#define GTK_IS_ACCEL_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ACCEL_LABEL))
#define GTK_ACCEL_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ACCEL_LABEL, GtkAccelLabelClass))
typedef struct _GtkAccelLabel GtkAccelLabel;
......@@ -87,7 +87,7 @@ struct _GtkAccelLabelClass
#define gtk_accel_label_accelerator_width gtk_accel_label_get_accel_width
#endif /* GTK_DISABLE_DEPRECATED */
GtkType gtk_accel_label_get_type (void) G_GNUC_CONST;
GType gtk_accel_label_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_accel_label_new (const gchar *string);
GtkWidget* gtk_accel_label_get_accel_widget (GtkAccelLabel *accel_label);
guint gtk_accel_label_get_accel_width (GtkAccelLabel *accel_label);
......
......@@ -18,18 +18,18 @@
*/
#include <string.h>
#include <gtk/gtkwidget.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkaccessible.h>
#include "gtkwidget.h"
#include "gtkaccessible.h"
static void gtk_accessible_class_init (GtkAccessibleClass *klass);
static void gtk_accessible_real_connect_widget_destroyed (GtkAccessible *accessible);
GtkType
GType
gtk_accessible_get_type (void)
{
static GtkType accessible_type = 0;
static GType accessible_type = 0;
if (!accessible_type)
{
......@@ -46,7 +46,9 @@ gtk_accessible_get_type (void)
(GInstanceInitFunc) NULL,
};
accessible_type = g_type_register_static (ATK_TYPE_OBJECT, "GtkAccessible", &accessible_info, 0);
accessible_type =
g_type_register_static (ATK_TYPE_OBJECT, "GtkAccessible",
&accessible_info, 0);
}
return accessible_type;
......@@ -56,7 +58,6 @@ static void
gtk_accessible_class_init (GtkAccessibleClass *klass)
{
klass->connect_widget_destroyed = gtk_accessible_real_connect_widget_destroyed;
}
/**
......@@ -84,9 +85,9 @@ gtk_accessible_real_connect_widget_destroyed (GtkAccessible *accessible)
{
if (accessible->widget)
{
gtk_signal_connect (GTK_OBJECT (accessible->widget),
"destroy",
GTK_SIGNAL_FUNC (gtk_widget_destroyed),
&accessible->widget);
g_signal_connect (accessible->widget,
"destroy",
G_CALLBACK (gtk_widget_destroyed),
&accessible->widget);
}
}
......@@ -28,11 +28,11 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_ACCESSIBLE (gtk_accessible_get_type ())
#define GTK_ACCESSIBLE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ACCESSIBLE, GtkAccessible))
#define GTK_ACCESSIBLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ACCESSIBLE, GtkAccessibleClass))
#define GTK_IS_ACCESSIBLE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ACCESSIBLE))
#define GTK_IS_ACCESSIBLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ACCESSIBLE))
#define GTK_ACCESSIBLE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ACCESSIBLE, GtkAccessibleClass))
#define GTK_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ACCESSIBLE, GtkAccessible))
#define GTK_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ACCESSIBLE, GtkAccessibleClass))
#define GTK_IS_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ACCESSIBLE))
#define GTK_IS_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ACCESSIBLE))
#define GTK_ACCESSIBLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ACCESSIBLE, GtkAccessibleClass))
typedef struct _GtkAccessible GtkAccessible;
typedef struct _GtkAccessibleClass GtkAccessibleClass;
......@@ -50,11 +50,8 @@ struct _GtkAccessible
* accessible instance.
*/
GtkWidget *widget;
};
GtkType gtk_accessible_get_type (void);
struct _GtkAccessibleClass
{
AtkObjectClass parent_class;
......@@ -68,7 +65,10 @@ struct _GtkAccessibleClass
void (*_gtk_reserved4) (void);
};
GType gtk_accessible_get_type (void);
void gtk_accessible_connect_widget_destroyed (GtkAccessible *accessible);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
......@@ -30,7 +30,6 @@
#include "gtklabel.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtksignal.h"
#include "gtkimage.h"
#include "gtkhbox.h"
#include "gtkstock.h"
......@@ -98,9 +97,9 @@ static gint gtk_button_leave_notify (GtkWidget *widget,
GdkEventCrossing *event);
static void gtk_real_button_pressed (GtkButton *button);
static void gtk_real_button_released (GtkButton *button);
static void gtk_real_button_activate (GtkButton *button);
static void gtk_real_button_activate (GtkButton *button);
static void gtk_button_update_state (GtkButton *button);
static GtkType gtk_button_child_type (GtkContainer *container);
static GType gtk_button_child_type (GtkContainer *container);
static void gtk_button_finish_activate (GtkButton *button,
gboolean do_it);
......@@ -114,10 +113,10 @@ static GtkBinClass *parent_class = NULL;
static guint button_signals[LAST_SIGNAL] = { 0 };
GtkType
GType
gtk_button_get_type (void)
{
static GtkType button_type = 0;
static GType button_type = 0;
if (!button_type)
{
......@@ -134,7 +133,8 @@ gtk_button_get_type (void)
(GInstanceInitFunc) gtk_button_init,
};
button_type = g_type_register_static (GTK_TYPE_BIN, "GtkButton", &button_info, 0);
button_type = g_type_register_static (GTK_TYPE_BIN, "GtkButton",
&button_info, 0);
}
return button_type;
......@@ -143,21 +143,21 @@ gtk_button_get_type (void)
static void
gtk_button_class_init (GtkButtonClass *klass)
{
GObjectClass *g_object_class;
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
g_object_class = G_OBJECT_CLASS (klass);
gobject_class = G_OBJECT_CLASS (klass);
object_class = (GtkObjectClass*) klass;
widget_class = (GtkWidgetClass*) klass;
container_class = (GtkContainerClass*) klass;
parent_class = g_type_class_peek_parent (klass);
g_object_class->constructor = gtk_button_constructor;
g_object_class->set_property = gtk_button_set_property;
g_object_class->get_property = gtk_button_get_property;
gobject_class->constructor = gtk_button_constructor;
gobject_class->set_property = gtk_button_set_property;
gobject_class->get_property = gtk_button_get_property;
object_class->destroy = gtk_button_destroy;
......@@ -183,7 +183,7 @@ gtk_button_class_init (GtkButtonClass *klass)
klass->leave = gtk_button_update_state;
klass->activate = gtk_real_button_activate;
g_object_class_install_property (G_OBJECT_CLASS(object_class),
g_object_class_install_property (gobject_class,
PROP_LABEL,
g_param_spec_string ("label",
_("Label"),
......@@ -191,7 +191,7 @@ gtk_button_class_init (GtkButtonClass *klass)
NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (G_OBJECT_CLASS(object_class),
g_object_class_install_property (gobject_class,
PROP_USE_UNDERLINE,
g_param_spec_boolean ("use_underline",
_("Use underline"),
......@@ -199,7 +199,7 @@ gtk_button_class_init (GtkButtonClass *klass)
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (G_OBJECT_CLASS(object_class),
g_object_class_install_property (gobject_class,
PROP_USE_STOCK,
g_param_spec_boolean ("use_stock",
_("Use stock"),
......@@ -207,7 +207,7 @@ gtk_button_class_init (GtkButtonClass *klass)
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (G_OBJECT_CLASS(object_class),
g_object_class_install_property (gobject_class,
PROP_RELIEF,
g_param_spec_enum ("relief",
_("Border relief"),
......@@ -217,47 +217,53 @@ gtk_button_class_init (GtkButtonClass *klass)
G_PARAM_READABLE | G_PARAM_WRITABLE));
button_signals[PRESSED] =
gtk_signal_new ("pressed",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkButtonClass, pressed),
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
g_signal_new ("pressed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkButtonClass, pressed),
NULL, NULL,
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
button_signals[RELEASED] =
gtk_signal_new ("released",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkButtonClass, released),
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
g_signal_new ("released",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkButtonClass, released),
NULL, NULL,
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
button_signals[CLICKED] =
gtk_signal_new ("clicked",
GTK_RUN_FIRST | GTK_RUN_ACTION,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkButtonClass, clicked),
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
g_signal_new ("clicked",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkButtonClass, clicked),
NULL, NULL,
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
button_signals[ENTER] =
gtk_signal_new ("enter",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkButtonClass, enter),
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
g_signal_new ("enter",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkButtonClass, enter),
NULL, NULL,
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
button_signals[LEAVE] =
gtk_signal_new ("leave",
GTK_RUN_FIRST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkButtonClass, leave),
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
g_signal_new ("leave",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkButtonClass, leave),
NULL, NULL,
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
button_signals[ACTIVATE] =
gtk_signal_new ("activate",
GTK_RUN_FIRST | GTK_RUN_ACTION,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkButtonClass, activate),
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
g_signal_new ("activate",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkButtonClass, activate),
NULL, NULL,
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
widget_class->activate_signal = button_signals[ACTIVATE];
gtk_widget_class_install_style_property (widget_class,
......@@ -345,13 +351,13 @@ gtk_button_constructor (GType type,
}
static GtkType
static GType
gtk_button_child_type (GtkContainer *container)
{
if (!GTK_BIN (container)->child)
return GTK_TYPE_WIDGET;
else
return GTK_TYPE_NONE;
return G_TYPE_NONE;
}
static void
......@@ -417,7 +423,7 @@ gtk_button_get_property (GObject *object,
GtkWidget*
gtk_button_new (void)
{
return GTK_WIDGET (gtk_type_new (gtk_button_get_type ()));
return g_object_new (GTK_TYPE_BUTTON, NULL);
}
static void
......@@ -530,7 +536,7 @@ gtk_button_pressed (GtkButton *button)
{
g_return_if_fail (GTK_IS_BUTTON (button));
gtk_signal_emit (GTK_OBJECT (button), button_signals[PRESSED]);
g_signal_emit (button, button_signals[PRESSED], 0);
}
void
......@@ -538,7 +544,7 @@ gtk_button_released (GtkButton *button)
{
g_return_if_fail (GTK_IS_BUTTON (button));
gtk_signal_emit (GTK_OBJECT (button), button_signals[RELEASED]);
g_signal_emit (button, button_signals[RELEASED], 0);
}
void
......@@ -546,7 +552,7 @@ gtk_button_clicked (GtkButton *button)
{
g_return_if_fail (GTK_IS_BUTTON (button));
gtk_signal_emit (GTK_OBJECT (button), button_signals[CLICKED]);
g_signal_emit (button, button_signals[CLICKED], 0);
}
void
......@@ -554,7 +560,7 @@ gtk_button_enter (GtkButton *button)
{
g_return_if_fail (GTK_IS_BUTTON (button));
gtk_signal_emit (GTK_OBJECT (button), button_signals[ENTER]);
g_signal_emit (button, button_signals[ENTER], 0);
}
void
......@@ -562,7 +568,7 @@ gtk_button_leave (GtkButton *button)
{
g_return_if_fail (GTK_IS_BUTTON (button));
gtk_signal_emit (GTK_OBJECT (button), button_signals[LEAVE]);
g_signal_emit (button, button_signals[LEAVE], 0);
}
void
......@@ -617,7 +623,7 @@ gtk_button_realize (GtkWidget *widget)
attributes_mask = GDK_WA_X | GDK_WA_Y;
widget->window = gtk_widget_get_parent_window (widget);
gdk_window_ref (widget->window);
g_object_ref (widget->window);
button->event_window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
......
......@@ -38,11 +38,11 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_BUTTON (gtk_button_get_type ())
#define GTK_BUTTON(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BUTTON, GtkButton))
#define GTK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON, GtkButtonClass))
#define GTK_IS_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BUTTON))
#define GTK_IS_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON))
#define GTK_BUTTON_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_BUTTON, GtkButtonClass))
#define GTK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BUTTON, GtkButton))
#define GTK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON, GtkButtonClass))
#define GTK_IS_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_BUTTON))
#define GTK_IS_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON))
#define GTK_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_BUTTON, GtkButtonClass))
typedef struct _GtkButton GtkButton;
......@@ -87,7 +87,7 @@ struct _GtkButtonClass
};
GtkType gtk_button_get_type (void) G_GNUC_CONST;
GType gtk_button_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_button_new (void);
GtkWidget* gtk_button_new_with_label (const gchar *label);
GtkWidget* gtk_button_new_from_stock (const gchar *stock_id);
......
......@@ -51,26 +51,29 @@ static void gtk_real_check_button_draw_indicator (GtkCheckButton *check_but
static GtkToggleButtonClass *parent_class = NULL;
GtkType
GType
gtk_check_button_get_type (void)
{
static GtkType check_button_type = 0;
static GType check_button_type = 0;
if (!check_button_type)
{
static const GtkTypeInfo check_button_info =
static const GTypeInfo check_button_info =
{
"GtkCheckButton",
sizeof (GtkCheckButton),
sizeof (GtkCheckButtonClass),
(GtkClassInitFunc) gtk_check_button_class_init,
(GtkObjectInitFunc) gtk_check_button_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gtk_check_button_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtkCheckButton),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_check_button_init,
};
check_button_type = gtk_type_unique (GTK_TYPE_TOGGLE_BUTTON, &check_button_info);
check_button_type =
g_type_register_static (GTK_TYPE_TOGGLE_BUTTON, "GtkCheckButton",
&check_button_info, 0);
}
return check_button_type;
......@@ -82,7 +85,7 @@ gtk_check_button_class_init (GtkCheckButtonClass *class)
GtkWidgetClass *widget_class;
widget_class = (GtkWidgetClass*) class;
parent_class = gtk_type_class (gtk_toggle_button_get_type ());
parent_class = g_type_class_peek_parent (class);
widget_class->size_request = gtk_check_button_size_request;
widget_class->size_allocate = gtk_check_button_size_allocate;
......@@ -120,7 +123,7 @@ gtk_check_button_init (GtkCheckButton *check_button)
GtkWidget*
gtk_check_button_new (void)
{
return gtk_widget_new (GTK_TYPE_CHECK_BUTTON, NULL);
return g_object_new (GTK_TYPE_CHECK_BUTTON, NULL);
}
......
......@@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_CHECK_BUTTON (gtk_check_button_get_type ())
#define GTK_CHECK_BUTTON(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CHECK_BUTTON, GtkCheckButton))
#define GTK_CHECK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CHECK_BUTTON, GtkCheckButtonClass))
#define GTK_IS_CHECK_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CHECK_BUTTON))
#define GTK_IS_CHECK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CHECK_BUTTON))
#define GTK_CHECK_BUTTON_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CHECK_BUTTON, GtkCheckButtonClass))
#define GTK_CHECK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CHECK_BUTTON, GtkCheckButton))
#define GTK_CHECK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CHECK_BUTTON, GtkCheckButtonClass))
#define GTK_IS_CHECK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CHECK_BUTTON))
#define GTK_IS_CHECK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CHECK_BUTTON))
#define GTK_CHECK_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CHECK_BUTTON, GtkCheckButtonClass))
typedef struct _GtkCheckButton GtkCheckButton;
......@@ -68,7 +68,7 @@ struct _GtkCheckButtonClass
};
GtkType gtk_check_button_get_type (void) G_GNUC_CONST;
GType gtk_check_button_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_check_button_new (void);
GtkWidget* gtk_check_button_new_with_label (const gchar *label);
GtkWidget* gtk_check_button_new_with_mnemonic (const gchar *label);
......
......@@ -42,26 +42,29 @@ static GtkWindowClass *color_selection_dialog_parent_class = NULL;
/* GtkColorSelectionDialog */
/***************************/
GtkType
GType
gtk_color_selection_dialog_get_type (void)
{
static GtkType color_selection_dialog_type = 0;
static GType color_selection_dialog_type = 0;
if (!color_selection_dialog_type)
{
GtkTypeInfo colorsel_diag_info =
static const GTypeInfo colorsel_diag_info =
{
"GtkColorSelectionDialog",
sizeof (GtkColorSelectionDialog),
sizeof (GtkColorSelectionDialogClass),
(GtkClassInitFunc) gtk_color_selection_dialog_class_init,
(GtkObjectInitFunc) gtk_color_selection_dialog_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gtk_color_selection_dialog_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtkColorSelectionDialog),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_color_selection_dialog_init,
};
color_selection_dialog_type = gtk_type_unique (GTK_TYPE_DIALOG, &colorsel_diag_info);
color_selection_dialog_type =
g_type_register_static (GTK_TYPE_DIALOG, "GtkColorSelectionDialog",
&colorsel_diag_info, 0);
}
return color_selection_dialog_type;
......@@ -70,11 +73,7 @@ gtk_color_selection_dialog_get_type (void)
static void
gtk_color_selection_dialog_class_init (GtkColorSelectionDialogClass *klass)
{
GtkObjectClass *object_class;
object_class = (GtkObjectClass*) klass;
color_selection_dialog_parent_class = gtk_type_class (GTK_TYPE_DIALOG);
color_selection_dialog_parent_class = g_type_class_peek_parent (klass);
}