forked from AuroraMiddleware/gtk
Deprecation cleanup
Fri Oct 4 15:47:06 2002 Manish Singh <yosh@gimp.org> * gtkbbox.[ch] gtkhbbox.[ch] gtkhscale.[ch] gtkscale.[ch] gtkvscale.[ch] gtkvbbox.[ch]: Deprecation cleanup
This commit is contained in:
parent
fc7534bbcb
commit
2aa8991477
@ -1,3 +1,8 @@
|
||||
Fri Oct 4 15:47:06 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtkbbox.[ch] gtkhbbox.[ch] gtkhscale.[ch] gtkscale.[ch]
|
||||
gtkvscale.[ch] gtkvbbox.[ch]: Deprecation cleanup
|
||||
|
||||
Fri Oct 4 15:05:19 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
|
||||
|
||||
* modules/input/gtkimcontextxim.c (get_ic_real): Fix memory
|
||||
|
@ -1,3 +1,8 @@
|
||||
Fri Oct 4 15:47:06 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtkbbox.[ch] gtkhbbox.[ch] gtkhscale.[ch] gtkscale.[ch]
|
||||
gtkvscale.[ch] gtkvbbox.[ch]: Deprecation cleanup
|
||||
|
||||
Fri Oct 4 15:05:19 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
|
||||
|
||||
* modules/input/gtkimcontextxim.c (get_ic_real): Fix memory
|
||||
|
@ -1,3 +1,8 @@
|
||||
Fri Oct 4 15:47:06 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtkbbox.[ch] gtkhbbox.[ch] gtkhscale.[ch] gtkscale.[ch]
|
||||
gtkvscale.[ch] gtkvbbox.[ch]: Deprecation cleanup
|
||||
|
||||
Fri Oct 4 15:05:19 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
|
||||
|
||||
* modules/input/gtkimcontextxim.c (get_ic_real): Fix memory
|
||||
|
@ -1,3 +1,8 @@
|
||||
Fri Oct 4 15:47:06 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtkbbox.[ch] gtkhbbox.[ch] gtkhscale.[ch] gtkscale.[ch]
|
||||
gtkvscale.[ch] gtkvbbox.[ch]: Deprecation cleanup
|
||||
|
||||
Fri Oct 4 15:05:19 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
|
||||
|
||||
* modules/input/gtkimcontextxim.c (get_ic_real): Fix memory
|
||||
|
@ -1,3 +1,8 @@
|
||||
Fri Oct 4 15:47:06 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtkbbox.[ch] gtkhbbox.[ch] gtkhscale.[ch] gtkscale.[ch]
|
||||
gtkvscale.[ch] gtkvbbox.[ch]: Deprecation cleanup
|
||||
|
||||
Fri Oct 4 15:05:19 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
|
||||
|
||||
* modules/input/gtkimcontextxim.c (get_ic_real): Fix memory
|
||||
|
@ -1,3 +1,8 @@
|
||||
Fri Oct 4 15:47:06 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtkbbox.[ch] gtkhbbox.[ch] gtkhscale.[ch] gtkscale.[ch]
|
||||
gtkvscale.[ch] gtkvbbox.[ch]: Deprecation cleanup
|
||||
|
||||
Fri Oct 4 15:05:19 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
|
||||
|
||||
* modules/input/gtkimcontextxim.c (get_ic_real): Fix memory
|
||||
|
@ -64,29 +64,30 @@ static void gtk_button_box_get_child_property (GtkContainer *container,
|
||||
#define DEFAULT_CHILD_IPAD_X 4
|
||||
#define DEFAULT_CHILD_IPAD_Y 0
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_button_box_get_type (void)
|
||||
{
|
||||
static GtkType button_box_type = 0;
|
||||
static GType button_box_type = 0;
|
||||
|
||||
if (!button_box_type)
|
||||
{
|
||||
static const GTypeInfo button_box_info =
|
||||
{
|
||||
sizeof (GtkButtonBoxClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gtk_button_box_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkButtonBox),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_button_box_init,
|
||||
NULL, /* value_table */
|
||||
NULL, /* value_table */
|
||||
};
|
||||
|
||||
button_box_type = g_type_register_static (GTK_TYPE_BOX, "GtkButtonBox",
|
||||
&button_box_info, G_TYPE_FLAG_ABSTRACT);
|
||||
button_box_type =
|
||||
g_type_register_static (GTK_TYPE_BOX, "GtkButtonBox",
|
||||
&button_box_info, G_TYPE_FLAG_ABSTRACT);
|
||||
}
|
||||
|
||||
return button_box_type;
|
||||
|
@ -36,11 +36,11 @@ extern "C" {
|
||||
|
||||
|
||||
#define GTK_TYPE_BUTTON_BOX (gtk_button_box_get_type ())
|
||||
#define GTK_BUTTON_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BUTTON_BOX, GtkButtonBox))
|
||||
#define GTK_BUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON_BOX, GtkButtonBoxClass))
|
||||
#define GTK_IS_BUTTON_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BUTTON_BOX))
|
||||
#define GTK_IS_BUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON_BOX))
|
||||
#define GTK_BUTTON_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_BUTTON_BOX, GtkButtonBoxClass))
|
||||
#define GTK_BUTTON_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BUTTON_BOX, GtkButtonBox))
|
||||
#define GTK_BUTTON_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON_BOX, GtkButtonBoxClass))
|
||||
#define GTK_IS_BUTTON_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_BUTTON_BOX))
|
||||
#define GTK_IS_BUTTON_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON_BOX))
|
||||
#define GTK_BUTTON_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_BUTTON_BOX, GtkButtonBoxClass))
|
||||
|
||||
|
||||
#define GTK_BUTTONBOX_DEFAULT -1
|
||||
@ -64,7 +64,7 @@ struct _GtkButtonBoxClass
|
||||
};
|
||||
|
||||
|
||||
GtkType gtk_button_box_get_type (void) G_GNUC_CONST;
|
||||
GType gtk_button_box_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkButtonBoxStyle gtk_button_box_get_layout (GtkButtonBox *widget);
|
||||
void gtk_button_box_set_layout (GtkButtonBox *widget,
|
||||
|
@ -37,26 +37,29 @@ static void gtk_hbutton_box_size_allocate (GtkWidget *widget,
|
||||
static gint default_spacing = 30;
|
||||
static gint default_layout_style = GTK_BUTTONBOX_EDGE;
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_hbutton_box_get_type (void)
|
||||
{
|
||||
static GtkType hbutton_box_type = 0;
|
||||
static GType hbutton_box_type = 0;
|
||||
|
||||
if (!hbutton_box_type)
|
||||
{
|
||||
static const GtkTypeInfo hbutton_box_info =
|
||||
static const GTypeInfo hbutton_box_info =
|
||||
{
|
||||
"GtkHButtonBox",
|
||||
sizeof (GtkHButtonBox),
|
||||
sizeof (GtkHButtonBoxClass),
|
||||
(GtkClassInitFunc) gtk_hbutton_box_class_init,
|
||||
(GtkObjectInitFunc) gtk_hbutton_box_init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gtk_hbutton_box_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkHButtonBox),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_hbutton_box_init,
|
||||
};
|
||||
|
||||
hbutton_box_type = gtk_type_unique (GTK_TYPE_BUTTON_BOX, &hbutton_box_info);
|
||||
hbutton_box_type =
|
||||
g_type_register_static (GTK_TYPE_BUTTON_BOX, "GtkHButtonBox",
|
||||
&hbutton_box_info, 0);
|
||||
}
|
||||
|
||||
return hbutton_box_type;
|
||||
@ -84,7 +87,7 @@ gtk_hbutton_box_new (void)
|
||||
{
|
||||
GtkHButtonBox *hbutton_box;
|
||||
|
||||
hbutton_box = gtk_type_new (GTK_TYPE_HBUTTON_BOX);
|
||||
hbutton_box = g_object_new (GTK_TYPE_HBUTTON_BOX, NULL);
|
||||
|
||||
return GTK_WIDGET (hbutton_box);
|
||||
}
|
||||
|
@ -37,11 +37,11 @@ extern "C" {
|
||||
|
||||
|
||||
#define GTK_TYPE_HBUTTON_BOX (gtk_hbutton_box_get_type ())
|
||||
#define GTK_HBUTTON_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HBUTTON_BOX, GtkHButtonBox))
|
||||
#define GTK_HBUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HBUTTON_BOX, GtkHButtonBoxClass))
|
||||
#define GTK_IS_HBUTTON_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HBUTTON_BOX))
|
||||
#define GTK_IS_HBUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HBUTTON_BOX))
|
||||
#define GTK_HBUTTON_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_HBUTTON_BOX, GtkHButtonBoxClass))
|
||||
#define GTK_HBUTTON_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_HBUTTON_BOX, GtkHButtonBox))
|
||||
#define GTK_HBUTTON_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_HBUTTON_BOX, GtkHButtonBoxClass))
|
||||
#define GTK_IS_HBUTTON_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_HBUTTON_BOX))
|
||||
#define GTK_IS_HBUTTON_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HBUTTON_BOX))
|
||||
#define GTK_HBUTTON_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_HBUTTON_BOX, GtkHButtonBoxClass))
|
||||
|
||||
|
||||
typedef struct _GtkHButtonBox GtkHButtonBox;
|
||||
@ -58,7 +58,7 @@ struct _GtkHButtonBoxClass
|
||||
};
|
||||
|
||||
|
||||
GtkType gtk_hbutton_box_get_type (void) G_GNUC_CONST;
|
||||
GType gtk_hbutton_box_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* gtk_hbutton_box_new (void);
|
||||
|
||||
/* buttons can be added by gtk_container_add() */
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "gtkhscale.h"
|
||||
#include "gtksignal.h"
|
||||
#include "gtkintl.h"
|
||||
|
||||
static gpointer parent_class;
|
||||
@ -38,26 +37,28 @@ static void gtk_hscale_init (GtkHScale *hscale);
|
||||
static gboolean gtk_hscale_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_hscale_get_type (void)
|
||||
{
|
||||
static GtkType hscale_type = 0;
|
||||
static GType hscale_type = 0;
|
||||
|
||||
if (!hscale_type)
|
||||
{
|
||||
static const GtkTypeInfo hscale_info =
|
||||
static const GTypeInfo hscale_info =
|
||||
{
|
||||
"GtkHScale",
|
||||
sizeof (GtkHScale),
|
||||
sizeof (GtkHScaleClass),
|
||||
(GtkClassInitFunc) gtk_hscale_class_init,
|
||||
(GtkObjectInitFunc) gtk_hscale_init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gtk_hscale_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkHScale),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_hscale_init,
|
||||
};
|
||||
|
||||
hscale_type = gtk_type_unique (GTK_TYPE_SCALE, &hscale_info);
|
||||
hscale_type = g_type_register_static (GTK_TYPE_SCALE, "GtkHScale",
|
||||
&hscale_info, 0);
|
||||
}
|
||||
|
||||
return hscale_type;
|
||||
@ -66,11 +67,9 @@ gtk_hscale_get_type (void)
|
||||
static void
|
||||
gtk_hscale_class_init (GtkHScaleClass *class)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GtkWidgetClass *widget_class;
|
||||
GtkRangeClass *range_class;
|
||||
|
||||
gobject_class = G_OBJECT_CLASS (class);
|
||||
widget_class = GTK_WIDGET_CLASS (class);
|
||||
range_class = GTK_RANGE_CLASS (class);
|
||||
|
||||
@ -95,13 +94,7 @@ gtk_hscale_init (GtkHScale *hscale)
|
||||
GtkWidget*
|
||||
gtk_hscale_new (GtkAdjustment *adjustment)
|
||||
{
|
||||
GtkWidget *hscale;
|
||||
|
||||
hscale = gtk_widget_new (GTK_TYPE_HSCALE,
|
||||
"adjustment", adjustment,
|
||||
NULL);
|
||||
|
||||
return hscale;
|
||||
return g_object_new (GTK_TYPE_HSCALE, "adjustment", adjustment, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -235,7 +228,7 @@ gtk_hscale_expose (GtkWidget *widget,
|
||||
x, y,
|
||||
layout);
|
||||
|
||||
g_object_unref (G_OBJECT (layout));
|
||||
g_object_unref (layout);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
@ -38,11 +38,11 @@ extern "C" {
|
||||
|
||||
|
||||
#define GTK_TYPE_HSCALE (gtk_hscale_get_type ())
|
||||
#define GTK_HSCALE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HSCALE, GtkHScale))
|
||||
#define GTK_HSCALE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSCALE, GtkHScaleClass))
|
||||
#define GTK_IS_HSCALE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HSCALE))
|
||||
#define GTK_IS_HSCALE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSCALE))
|
||||
#define GTK_HSCALE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_HSCALE, GtkHScaleClass))
|
||||
#define GTK_HSCALE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_HSCALE, GtkHScale))
|
||||
#define GTK_HSCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSCALE, GtkHScaleClass))
|
||||
#define GTK_IS_HSCALE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_HSCALE))
|
||||
#define GTK_IS_HSCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSCALE))
|
||||
#define GTK_HSCALE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_HSCALE, GtkHScaleClass))
|
||||
|
||||
|
||||
typedef struct _GtkHScale GtkHScale;
|
||||
@ -59,7 +59,7 @@ struct _GtkHScaleClass
|
||||
};
|
||||
|
||||
|
||||
GtkType gtk_hscale_get_type (void) G_GNUC_CONST;
|
||||
GType gtk_hscale_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* gtk_hscale_new (GtkAdjustment *adjustment);
|
||||
GtkWidget* gtk_hscale_new_with_range (gdouble min,
|
||||
gdouble max,
|
||||
|
@ -69,25 +69,25 @@ static void gtk_scale_style_set (GtkWidget *widget,
|
||||
static void gtk_scale_get_range_border (GtkRange *range,
|
||||
GtkBorder *border);
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_scale_get_type (void)
|
||||
{
|
||||
static GtkType scale_type = 0;
|
||||
static GType scale_type = 0;
|
||||
|
||||
if (!scale_type)
|
||||
{
|
||||
static const GTypeInfo scale_info =
|
||||
{
|
||||
sizeof (GtkScaleClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gtk_scale_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkScale),
|
||||
0, /* n_preallocs */
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_scale_init,
|
||||
NULL, /* value_table */
|
||||
NULL, /* value_table */
|
||||
};
|
||||
|
||||
scale_type = g_type_register_static (GTK_TYPE_RANGE, "GtkScale",
|
||||
@ -123,17 +123,15 @@ static void
|
||||
gtk_scale_class_init (GtkScaleClass *class)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GtkObjectClass *object_class;
|
||||
GtkWidgetClass *widget_class;
|
||||
GtkRangeClass *range_class;
|
||||
GtkBindingSet *binding_set;
|
||||
GtkRangeClass *range_class;
|
||||
GtkBindingSet *binding_set;
|
||||
|
||||
gobject_class = G_OBJECT_CLASS (class);
|
||||
object_class = (GtkObjectClass*) class;
|
||||
range_class = (GtkRangeClass*) class;
|
||||
widget_class = (GtkWidgetClass*) class;
|
||||
|
||||
parent_class = gtk_type_class (GTK_TYPE_RANGE);
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
gobject_class->set_property = gtk_scale_set_property;
|
||||
gobject_class->get_property = gtk_scale_get_property;
|
||||
@ -144,7 +142,7 @@ gtk_scale_class_init (GtkScaleClass *class)
|
||||
|
||||
signals[FORMAT_VALUE] =
|
||||
g_signal_new ("format_value",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_TYPE_FROM_CLASS (gobject_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkScaleClass, format_value),
|
||||
single_string_accumulator, NULL,
|
||||
@ -561,7 +559,7 @@ _gtk_scale_get_value_size (GtkScale *scale,
|
||||
if (height)
|
||||
*height = MAX (*height, logical_rect.height);
|
||||
|
||||
g_object_unref (G_OBJECT (layout));
|
||||
g_object_unref (layout);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -608,7 +606,7 @@ _gtk_scale_format_value (GtkScale *scale,
|
||||
{
|
||||
gchar *fmt = NULL;
|
||||
|
||||
g_signal_emit (G_OBJECT (scale),
|
||||
g_signal_emit (scale,
|
||||
signals[FORMAT_VALUE],
|
||||
0,
|
||||
value,
|
||||
|
@ -38,11 +38,11 @@ extern "C" {
|
||||
|
||||
|
||||
#define GTK_TYPE_SCALE (gtk_scale_get_type ())
|
||||
#define GTK_SCALE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SCALE, GtkScale))
|
||||
#define GTK_SCALE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SCALE, GtkScaleClass))
|
||||
#define GTK_IS_SCALE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SCALE))
|
||||
#define GTK_IS_SCALE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SCALE))
|
||||
#define GTK_SCALE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_SCALE, GtkScaleClass))
|
||||
#define GTK_SCALE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SCALE, GtkScale))
|
||||
#define GTK_SCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SCALE, GtkScaleClass))
|
||||
#define GTK_IS_SCALE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SCALE))
|
||||
#define GTK_IS_SCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SCALE))
|
||||
#define GTK_SCALE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SCALE, GtkScaleClass))
|
||||
|
||||
|
||||
typedef struct _GtkScale GtkScale;
|
||||
@ -73,7 +73,7 @@ struct _GtkScaleClass
|
||||
void (*_gtk_reserved4) (void);
|
||||
};
|
||||
|
||||
GtkType gtk_scale_get_type (void) G_GNUC_CONST;
|
||||
GType gtk_scale_get_type (void) G_GNUC_CONST;
|
||||
|
||||
void gtk_scale_set_digits (GtkScale *scale,
|
||||
gint digits);
|
||||
|
@ -37,26 +37,29 @@ static void gtk_vbutton_box_size_allocate (GtkWidget *widget,
|
||||
static gint default_spacing = 10;
|
||||
static GtkButtonBoxStyle default_layout_style = GTK_BUTTONBOX_EDGE;
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_vbutton_box_get_type (void)
|
||||
{
|
||||
static GtkType vbutton_box_type = 0;
|
||||
static GType vbutton_box_type = 0;
|
||||
|
||||
if (!vbutton_box_type)
|
||||
{
|
||||
static const GtkTypeInfo vbutton_box_info =
|
||||
static const GTypeInfo vbutton_box_info =
|
||||
{
|
||||
"GtkVButtonBox",
|
||||
sizeof (GtkVButtonBox),
|
||||
sizeof (GtkVButtonBoxClass),
|
||||
(GtkClassInitFunc) gtk_vbutton_box_class_init,
|
||||
(GtkObjectInitFunc) gtk_vbutton_box_init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gtk_vbutton_box_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkVButtonBox),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_vbutton_box_init,
|
||||
};
|
||||
|
||||
vbutton_box_type = gtk_type_unique (GTK_TYPE_BUTTON_BOX, &vbutton_box_info);
|
||||
vbutton_box_type =
|
||||
g_type_register_static (GTK_TYPE_BUTTON_BOX, "GtkVButtonBox",
|
||||
&vbutton_box_info, 0);
|
||||
}
|
||||
|
||||
return vbutton_box_type;
|
||||
@ -84,7 +87,8 @@ gtk_vbutton_box_new (void)
|
||||
{
|
||||
GtkVButtonBox *vbutton_box;
|
||||
|
||||
vbutton_box = gtk_type_new (GTK_TYPE_VBUTTON_BOX);
|
||||
vbutton_box = g_object_new (GTK_TYPE_VBUTTON_BOX, NULL);
|
||||
|
||||
return GTK_WIDGET (vbutton_box);
|
||||
}
|
||||
|
||||
|
@ -37,11 +37,11 @@ extern "C" {
|
||||
|
||||
|
||||
#define GTK_TYPE_VBUTTON_BOX (gtk_vbutton_box_get_type ())
|
||||
#define GTK_VBUTTON_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VBUTTON_BOX, GtkVButtonBox))
|
||||
#define GTK_VBUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VBUTTON_BOX, GtkVButtonBoxClass))
|
||||
#define GTK_IS_VBUTTON_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VBUTTON_BOX))
|
||||
#define GTK_IS_VBUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VBUTTON_BOX))
|
||||
#define GTK_VBUTTON_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_VBUTTON_BOX, GtkVButtonBoxClass))
|
||||
#define GTK_VBUTTON_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_VBUTTON_BOX, GtkVButtonBox))
|
||||
#define GTK_VBUTTON_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_VBUTTON_BOX, GtkVButtonBoxClass))
|
||||
#define GTK_IS_VBUTTON_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_VBUTTON_BOX))
|
||||
#define GTK_IS_VBUTTON_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VBUTTON_BOX))
|
||||
#define GTK_VBUTTON_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_VBUTTON_BOX, GtkVButtonBoxClass))
|
||||
|
||||
|
||||
typedef struct _GtkVButtonBox GtkVButtonBox;
|
||||
@ -58,7 +58,7 @@ struct _GtkVButtonBoxClass
|
||||
};
|
||||
|
||||
|
||||
GtkType gtk_vbutton_box_get_type (void) G_GNUC_CONST;
|
||||
GType gtk_vbutton_box_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget *gtk_vbutton_box_new (void);
|
||||
|
||||
/* buttons can be added by gtk_container_add() */
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "gtkvscale.h"
|
||||
#include "gtksignal.h"
|
||||
#include "gtkintl.h"
|
||||
|
||||
#define VALUE_SPACING 2
|
||||
@ -40,26 +39,28 @@ static void gtk_vscale_init (GtkVScale *vscale);
|
||||
static gboolean gtk_vscale_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_vscale_get_type (void)
|
||||
{
|
||||
static GtkType vscale_type = 0;
|
||||
static GType vscale_type = 0;
|
||||
|
||||
if (!vscale_type)
|
||||
{
|
||||
static const GtkTypeInfo vscale_info =
|
||||
static const GTypeInfo vscale_info =
|
||||
{
|
||||
"GtkVScale",
|
||||
sizeof (GtkVScale),
|
||||
sizeof (GtkVScaleClass),
|
||||
(GtkClassInitFunc) gtk_vscale_class_init,
|
||||
(GtkObjectInitFunc) gtk_vscale_init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
sizeof (GtkVScaleClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gtk_vscale_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkVScale),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_vscale_init,
|
||||
};
|
||||
|
||||
vscale_type = gtk_type_unique (GTK_TYPE_SCALE, &vscale_info);
|
||||
vscale_type = g_type_register_static (GTK_TYPE_SCALE, "GtkVScale",
|
||||
&vscale_info, 0);
|
||||
}
|
||||
|
||||
return vscale_type;
|
||||
@ -68,11 +69,9 @@ gtk_vscale_get_type (void)
|
||||
static void
|
||||
gtk_vscale_class_init (GtkVScaleClass *class)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GtkWidgetClass *widget_class;
|
||||
GtkRangeClass *range_class;
|
||||
|
||||
gobject_class = G_OBJECT_CLASS (class);
|
||||
widget_class = GTK_WIDGET_CLASS (class);
|
||||
range_class = GTK_RANGE_CLASS (class);
|
||||
|
||||
@ -96,13 +95,7 @@ gtk_vscale_init (GtkVScale *vscale)
|
||||
GtkWidget*
|
||||
gtk_vscale_new (GtkAdjustment *adjustment)
|
||||
{
|
||||
GtkWidget *vscale;
|
||||
|
||||
vscale = gtk_widget_new (GTK_TYPE_VSCALE,
|
||||
"adjustment", adjustment,
|
||||
NULL);
|
||||
|
||||
return vscale;
|
||||
return g_object_new (GTK_TYPE_VSCALE, "adjustment", adjustment, NULL);
|
||||
}
|
||||
|
||||
|
||||
@ -235,7 +228,7 @@ gtk_vscale_expose (GtkWidget *widget,
|
||||
x, y,
|
||||
layout);
|
||||
|
||||
g_object_unref (G_OBJECT (layout));
|
||||
g_object_unref (layout);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
@ -38,11 +38,11 @@ extern "C" {
|
||||
|
||||
|
||||
#define GTK_TYPE_VSCALE (gtk_vscale_get_type ())
|
||||
#define GTK_VSCALE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VSCALE, GtkVScale))
|
||||
#define GTK_VSCALE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VSCALE, GtkVScaleClass))
|
||||
#define GTK_IS_VSCALE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VSCALE))
|
||||
#define GTK_IS_VSCALE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VSCALE))
|
||||
#define GTK_VSCALE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_VSCALE, GtkVScaleClass))
|
||||
#define GTK_VSCALE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_VSCALE, GtkVScale))
|
||||
#define GTK_VSCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_VSCALE, GtkVScaleClass))
|
||||
#define GTK_IS_VSCALE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_VSCALE))
|
||||
#define GTK_IS_VSCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VSCALE))
|
||||
#define GTK_VSCALE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_VSCALE, GtkVScaleClass))
|
||||
|
||||
|
||||
typedef struct _GtkVScale GtkVScale;
|
||||
@ -59,7 +59,7 @@ struct _GtkVScaleClass
|
||||
};
|
||||
|
||||
|
||||
GtkType gtk_vscale_get_type (void) G_GNUC_CONST;
|
||||
GType gtk_vscale_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* gtk_vscale_new (GtkAdjustment *adjustment);
|
||||
GtkWidget* gtk_vscale_new_with_range (gdouble min,
|
||||
gdouble max,
|
||||
|
Loading…
Reference in New Issue
Block a user