Deprecation cleanup

Wed Oct  9 15:23:48 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkadjustment.[ch] gtk/gtkalignment.[ch] gtk/gtkentry.[ch]
        gtk/gtkhsv.[ch] gtk/gtktooltips.[ch]: Deprecation cleanup
This commit is contained in:
Manish Singh 2002-10-09 22:25:18 +00:00 committed by Manish Singh
parent fb6a7df846
commit 9565f3ffb2
16 changed files with 390 additions and 293 deletions

View File

@ -1,3 +1,14 @@
Wed Oct 9 15:23:48 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkadjustment.[ch] gtk/gtkalignment.[ch] gtk/gtkentry.[ch]
gtk/gtkhsv.[ch] gtk/gtktooltips.[ch]: Deprecation cleanup
Wed Oct 9 15:07:08 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkbindings.[ch] gtk/gtkcalendar.[ch] gtk/gtkfilesel.[ch]
gtk/gtkfontsel.[ch] gtk/gtkitem.[ch] gtk/gtkitemfactory.[ch]:
Deprecation cleanup
Wed Oct 9 17:06:21 2002 Owen Taylor <otaylor@redhat.com> Wed Oct 9 17:06:21 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkiconfactory.c (add_size_and_dir_with_fallback): * gtk/gtkiconfactory.c (add_size_and_dir_with_fallback):

View File

@ -1,3 +1,14 @@
Wed Oct 9 15:23:48 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkadjustment.[ch] gtk/gtkalignment.[ch] gtk/gtkentry.[ch]
gtk/gtkhsv.[ch] gtk/gtktooltips.[ch]: Deprecation cleanup
Wed Oct 9 15:07:08 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkbindings.[ch] gtk/gtkcalendar.[ch] gtk/gtkfilesel.[ch]
gtk/gtkfontsel.[ch] gtk/gtkitem.[ch] gtk/gtkitemfactory.[ch]:
Deprecation cleanup
Wed Oct 9 17:06:21 2002 Owen Taylor <otaylor@redhat.com> Wed Oct 9 17:06:21 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkiconfactory.c (add_size_and_dir_with_fallback): * gtk/gtkiconfactory.c (add_size_and_dir_with_fallback):

View File

@ -1,3 +1,14 @@
Wed Oct 9 15:23:48 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkadjustment.[ch] gtk/gtkalignment.[ch] gtk/gtkentry.[ch]
gtk/gtkhsv.[ch] gtk/gtktooltips.[ch]: Deprecation cleanup
Wed Oct 9 15:07:08 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkbindings.[ch] gtk/gtkcalendar.[ch] gtk/gtkfilesel.[ch]
gtk/gtkfontsel.[ch] gtk/gtkitem.[ch] gtk/gtkitemfactory.[ch]:
Deprecation cleanup
Wed Oct 9 17:06:21 2002 Owen Taylor <otaylor@redhat.com> Wed Oct 9 17:06:21 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkiconfactory.c (add_size_and_dir_with_fallback): * gtk/gtkiconfactory.c (add_size_and_dir_with_fallback):

View File

@ -1,3 +1,14 @@
Wed Oct 9 15:23:48 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkadjustment.[ch] gtk/gtkalignment.[ch] gtk/gtkentry.[ch]
gtk/gtkhsv.[ch] gtk/gtktooltips.[ch]: Deprecation cleanup
Wed Oct 9 15:07:08 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkbindings.[ch] gtk/gtkcalendar.[ch] gtk/gtkfilesel.[ch]
gtk/gtkfontsel.[ch] gtk/gtkitem.[ch] gtk/gtkitemfactory.[ch]:
Deprecation cleanup
Wed Oct 9 17:06:21 2002 Owen Taylor <otaylor@redhat.com> Wed Oct 9 17:06:21 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkiconfactory.c (add_size_and_dir_with_fallback): * gtk/gtkiconfactory.c (add_size_and_dir_with_fallback):

View File

@ -1,3 +1,14 @@
Wed Oct 9 15:23:48 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkadjustment.[ch] gtk/gtkalignment.[ch] gtk/gtkentry.[ch]
gtk/gtkhsv.[ch] gtk/gtktooltips.[ch]: Deprecation cleanup
Wed Oct 9 15:07:08 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkbindings.[ch] gtk/gtkcalendar.[ch] gtk/gtkfilesel.[ch]
gtk/gtkfontsel.[ch] gtk/gtkitem.[ch] gtk/gtkitemfactory.[ch]:
Deprecation cleanup
Wed Oct 9 17:06:21 2002 Owen Taylor <otaylor@redhat.com> Wed Oct 9 17:06:21 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkiconfactory.c (add_size_and_dir_with_fallback): * gtk/gtkiconfactory.c (add_size_and_dir_with_fallback):

View File

@ -1,3 +1,14 @@
Wed Oct 9 15:23:48 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkadjustment.[ch] gtk/gtkalignment.[ch] gtk/gtkentry.[ch]
gtk/gtkhsv.[ch] gtk/gtktooltips.[ch]: Deprecation cleanup
Wed Oct 9 15:07:08 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkbindings.[ch] gtk/gtkcalendar.[ch] gtk/gtkfilesel.[ch]
gtk/gtkfontsel.[ch] gtk/gtkitem.[ch] gtk/gtkitemfactory.[ch]:
Deprecation cleanup
Wed Oct 9 17:06:21 2002 Owen Taylor <otaylor@redhat.com> Wed Oct 9 17:06:21 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkiconfactory.c (add_size_and_dir_with_fallback): * gtk/gtkiconfactory.c (add_size_and_dir_with_fallback):

View File

@ -26,7 +26,6 @@
#include "gtkadjustment.h" #include "gtkadjustment.h"
#include "gtkmarshalers.h" #include "gtkmarshalers.h"
#include "gtksignal.h"
enum { enum {
@ -43,26 +42,29 @@ static void gtk_adjustment_init (GtkAdjustment *adjustment);
static guint adjustment_signals[LAST_SIGNAL] = { 0 }; static guint adjustment_signals[LAST_SIGNAL] = { 0 };
GtkType GType
gtk_adjustment_get_type (void) gtk_adjustment_get_type (void)
{ {
static GtkType adjustment_type = 0; static GType adjustment_type = 0;
if (!adjustment_type) if (!adjustment_type)
{ {
static const GtkTypeInfo adjustment_info = static const GTypeInfo adjustment_info =
{ {
"GtkAdjustment",
sizeof (GtkAdjustment),
sizeof (GtkAdjustmentClass), sizeof (GtkAdjustmentClass),
(GtkClassInitFunc) gtk_adjustment_class_init, NULL, /* base_init */
(GtkObjectInitFunc) gtk_adjustment_init, NULL, /* base_finalize */
/* reserved_1 */ NULL, (GClassInitFunc) gtk_adjustment_class_init,
/* reserved_2 */ NULL, NULL, /* class_finalize */
(GtkClassInitFunc) NULL, NULL, /* class_data */
sizeof (GtkAdjustment),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_adjustment_init,
}; };
adjustment_type = gtk_type_unique (GTK_TYPE_OBJECT, &adjustment_info); adjustment_type =
g_type_register_static (GTK_TYPE_OBJECT, "GtkAdjustment",
&adjustment_info, 0);
} }
return adjustment_type; return adjustment_type;
@ -71,27 +73,25 @@ gtk_adjustment_get_type (void)
static void static void
gtk_adjustment_class_init (GtkAdjustmentClass *class) gtk_adjustment_class_init (GtkAdjustmentClass *class)
{ {
GtkObjectClass *object_class;
object_class = (GtkObjectClass*) class;
class->changed = NULL; class->changed = NULL;
class->value_changed = NULL; class->value_changed = NULL;
adjustment_signals[CHANGED] = adjustment_signals[CHANGED] =
gtk_signal_new ("changed", g_signal_new ("changed",
GTK_RUN_FIRST | GTK_RUN_NO_RECURSE, G_OBJECT_CLASS_TYPE (class),
GTK_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE,
GTK_SIGNAL_OFFSET (GtkAdjustmentClass, changed), G_STRUCT_OFFSET (GtkAdjustmentClass, changed),
_gtk_marshal_VOID__VOID, NULL, NULL,
GTK_TYPE_NONE, 0); _gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
adjustment_signals[VALUE_CHANGED] = adjustment_signals[VALUE_CHANGED] =
gtk_signal_new ("value_changed", g_signal_new ("value_changed",
GTK_RUN_FIRST | GTK_RUN_NO_RECURSE, G_OBJECT_CLASS_TYPE (class),
GTK_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE,
GTK_SIGNAL_OFFSET (GtkAdjustmentClass, value_changed), G_STRUCT_OFFSET (GtkAdjustmentClass, value_changed),
_gtk_marshal_VOID__VOID, NULL, NULL,
GTK_TYPE_NONE, 0); _gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
} }
static void static void
@ -115,7 +115,7 @@ gtk_adjustment_new (gdouble value,
{ {
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
adjustment = gtk_type_new (gtk_adjustment_get_type ()); adjustment = g_object_new (GTK_TYPE_ADJUSTMENT, NULL);
adjustment->value = value; adjustment->value = value;
adjustment->lower = lower; adjustment->lower = lower;
@ -165,7 +165,7 @@ gtk_adjustment_changed (GtkAdjustment *adjustment)
{ {
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
gtk_signal_emit (GTK_OBJECT (adjustment), adjustment_signals[CHANGED]); g_signal_emit (adjustment, adjustment_signals[CHANGED], 0);
} }
void void
@ -173,7 +173,7 @@ gtk_adjustment_value_changed (GtkAdjustment *adjustment)
{ {
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
gtk_signal_emit (GTK_OBJECT (adjustment), adjustment_signals[VALUE_CHANGED]); g_signal_emit (adjustment, adjustment_signals[VALUE_CHANGED], 0);
} }
void void

View File

@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_ADJUSTMENT (gtk_adjustment_get_type ()) #define GTK_TYPE_ADJUSTMENT (gtk_adjustment_get_type ())
#define GTK_ADJUSTMENT(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ADJUSTMENT, GtkAdjustment)) #define GTK_ADJUSTMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ADJUSTMENT, GtkAdjustment))
#define GTK_ADJUSTMENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass)) #define GTK_ADJUSTMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass))
#define GTK_IS_ADJUSTMENT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ADJUSTMENT)) #define GTK_IS_ADJUSTMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ADJUSTMENT))
#define GTK_IS_ADJUSTMENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ADJUSTMENT)) #define GTK_IS_ADJUSTMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ADJUSTMENT))
#define GTK_ADJUSTMENT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass)) #define GTK_ADJUSTMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass))
typedef struct _GtkAdjustment GtkAdjustment; typedef struct _GtkAdjustment GtkAdjustment;
@ -75,7 +75,7 @@ struct _GtkAdjustmentClass
}; };
GtkType gtk_adjustment_get_type (void) G_GNUC_CONST; GType gtk_adjustment_get_type (void) G_GNUC_CONST;
GtkObject* gtk_adjustment_new (gdouble value, GtkObject* gtk_adjustment_new (gdouble value,
gdouble lower, gdouble lower,
gdouble upper, gdouble upper,

View File

@ -54,26 +54,28 @@ static void gtk_alignment_get_property (GObject *object,
GValue *value, GValue *value,
GParamSpec *pspec); GParamSpec *pspec);
GtkType GType
gtk_alignment_get_type (void) gtk_alignment_get_type (void)
{ {
static GtkType alignment_type = 0; static GType alignment_type = 0;
if (!alignment_type) if (!alignment_type)
{ {
static const GtkTypeInfo alignment_info = static const GTypeInfo alignment_info =
{ {
"GtkAlignment",
sizeof (GtkAlignment),
sizeof (GtkAlignmentClass), sizeof (GtkAlignmentClass),
(GtkClassInitFunc) gtk_alignment_class_init, NULL, /* base_init */
(GtkObjectInitFunc) gtk_alignment_init, NULL, /* base_finalize */
/* reserved_1 */ NULL, (GClassInitFunc) gtk_alignment_class_init,
/* reserved_2 */ NULL, NULL, /* class_finalize */
(GtkClassInitFunc) NULL, NULL, /* class_data */
sizeof (GtkAlignment),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_alignment_init,
}; };
alignment_type = gtk_type_unique (GTK_TYPE_BIN, &alignment_info); alignment_type = g_type_register_static (GTK_TYPE_BIN, "GtkAlignment",
&alignment_info, 0);
} }
return alignment_type; return alignment_type;
@ -83,11 +85,9 @@ static void
gtk_alignment_class_init (GtkAlignmentClass *class) gtk_alignment_class_init (GtkAlignmentClass *class)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class; GtkWidgetClass *widget_class;
gobject_class = (GObjectClass*) class; gobject_class = (GObjectClass*) class;
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class; widget_class = (GtkWidgetClass*) class;
gobject_class->set_property = gtk_alignment_set_property; gobject_class->set_property = gtk_alignment_set_property;
@ -155,7 +155,7 @@ gtk_alignment_new (gfloat xalign,
{ {
GtkAlignment *alignment; GtkAlignment *alignment;
alignment = gtk_type_new (gtk_alignment_get_type ()); alignment = g_object_new (GTK_TYPE_ALIGNMENT, NULL);
alignment->xalign = CLAMP (xalign, 0.0, 1.0); alignment->xalign = CLAMP (xalign, 0.0, 1.0);
alignment->yalign = CLAMP (yalign, 0.0, 1.0); alignment->yalign = CLAMP (yalign, 0.0, 1.0);

View File

@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_ALIGNMENT (gtk_alignment_get_type ()) #define GTK_TYPE_ALIGNMENT (gtk_alignment_get_type ())
#define GTK_ALIGNMENT(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ALIGNMENT, GtkAlignment)) #define GTK_ALIGNMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ALIGNMENT, GtkAlignment))
#define GTK_ALIGNMENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ALIGNMENT, GtkAlignmentClass)) #define GTK_ALIGNMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ALIGNMENT, GtkAlignmentClass))
#define GTK_IS_ALIGNMENT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ALIGNMENT)) #define GTK_IS_ALIGNMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ALIGNMENT))
#define GTK_IS_ALIGNMENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ALIGNMENT)) #define GTK_IS_ALIGNMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ALIGNMENT))
#define GTK_ALIGNMENT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ALIGNMENT, GtkAlignmentClass)) #define GTK_ALIGNMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ALIGNMENT, GtkAlignmentClass))
typedef struct _GtkAlignment GtkAlignment; typedef struct _GtkAlignment GtkAlignment;
@ -64,7 +64,7 @@ struct _GtkAlignmentClass
}; };
GtkType gtk_alignment_get_type (void) G_GNUC_CONST; GType gtk_alignment_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_alignment_new (gfloat xalign, GtkWidget* gtk_alignment_new (gfloat xalign,
gfloat yalign, gfloat yalign,
gfloat xscale, gfloat xscale,

View File

@ -45,7 +45,6 @@
#include "gtkselection.h" #include "gtkselection.h"
#include "gtksettings.h" #include "gtksettings.h"
#include "gtkstock.h" #include "gtkstock.h"
#include "gtksignal.h"
#include "gtktextutil.h" #include "gtktextutil.h"
#include "gtkwindow.h" #include "gtkwindow.h"
@ -309,23 +308,24 @@ static void get_widget_window_size (GtkEntry *entry,
static GtkWidgetClass *parent_class = NULL; static GtkWidgetClass *parent_class = NULL;
GtkType GType
gtk_entry_get_type (void) gtk_entry_get_type (void)
{ {
static GtkType entry_type = 0; static GType entry_type = 0;
if (!entry_type) if (!entry_type)
{ {
static const GtkTypeInfo entry_info = static const GTypeInfo entry_info =
{ {
"GtkEntry",
sizeof (GtkEntry),
sizeof (GtkEntryClass), sizeof (GtkEntryClass),
(GtkClassInitFunc) gtk_entry_class_init, NULL, /* base_init */
(GtkObjectInitFunc) gtk_entry_init, NULL, /* base_finalize */
/* reserved_1 */ NULL, (GClassInitFunc) gtk_entry_class_init,
/* reserved_2 */ NULL, NULL, /* class_finalize */
(GtkClassInitFunc) NULL, NULL, /* class_data */
sizeof (GtkEntry),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_entry_init,
}; };
static const GInterfaceInfo editable_info = static const GInterfaceInfo editable_info =
@ -342,7 +342,9 @@ gtk_entry_get_type (void)
NULL /* interface_data */ NULL /* interface_data */
}; };
entry_type = gtk_type_unique (GTK_TYPE_WIDGET, &entry_info); entry_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkEntry",
&entry_info, 0);
g_type_add_interface_static (entry_type, g_type_add_interface_static (entry_type,
GTK_TYPE_EDITABLE, GTK_TYPE_EDITABLE,
&editable_info); &editable_info);
@ -365,29 +367,27 @@ add_move_binding (GtkBindingSet *binding_set,
gtk_binding_entry_add_signal (binding_set, keyval, modmask, gtk_binding_entry_add_signal (binding_set, keyval, modmask,
"move_cursor", 3, "move_cursor", 3,
GTK_TYPE_ENUM, step, G_TYPE_ENUM, step,
G_TYPE_INT, count, G_TYPE_INT, count,
G_TYPE_BOOLEAN, FALSE); G_TYPE_BOOLEAN, FALSE);
/* Selection-extending version */ /* Selection-extending version */
gtk_binding_entry_add_signal (binding_set, keyval, modmask | GDK_SHIFT_MASK, gtk_binding_entry_add_signal (binding_set, keyval, modmask | GDK_SHIFT_MASK,
"move_cursor", 3, "move_cursor", 3,
GTK_TYPE_ENUM, step, G_TYPE_ENUM, step,
G_TYPE_INT, count, G_TYPE_INT, count,
G_TYPE_BOOLEAN, TRUE); G_TYPE_BOOLEAN, TRUE);
} }
static void static void
gtk_entry_class_init (GtkEntryClass *class) gtk_entry_class_init (GtkEntryClass *class)
{ {
GObjectClass *gobject_class = G_OBJECT_CLASS (class); GObjectClass *gobject_class = G_OBJECT_CLASS (class);
GtkObjectClass *object_class;
GtkWidgetClass *widget_class; GtkWidgetClass *widget_class;
GtkBindingSet *binding_set; GtkBindingSet *binding_set;
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class; widget_class = (GtkWidgetClass*) class;
parent_class = gtk_type_class (GTK_TYPE_WIDGET); parent_class = g_type_class_peek_parent (class);
gobject_class->finalize = gtk_entry_finalize; gobject_class->finalize = gtk_entry_finalize;
gobject_class->set_property = gtk_entry_set_property; gobject_class->set_property = gtk_entry_set_property;
@ -526,79 +526,95 @@ gtk_entry_class_init (GtkEntryClass *class)
G_PARAM_READABLE | G_PARAM_WRITABLE)); G_PARAM_READABLE | G_PARAM_WRITABLE));
signals[POPULATE_POPUP] = signals[POPULATE_POPUP] =
gtk_signal_new ("populate_popup", g_signal_new ("populate_popup",
GTK_RUN_LAST, G_OBJECT_CLASS_TYPE (gobject_class),
GTK_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST,
GTK_SIGNAL_OFFSET (GtkEntryClass, populate_popup), G_STRUCT_OFFSET (GtkEntryClass, populate_popup),
_gtk_marshal_VOID__OBJECT, NULL, NULL,
GTK_TYPE_NONE, 1, GTK_TYPE_MENU); _gtk_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
GTK_TYPE_MENU);
/* Action signals */ /* Action signals */
signals[ACTIVATE] = signals[ACTIVATE] =
gtk_signal_new ("activate", g_signal_new ("activate",
GTK_RUN_LAST | GTK_RUN_ACTION, G_OBJECT_CLASS_TYPE (gobject_class),
GTK_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
GTK_SIGNAL_OFFSET (GtkEntryClass, activate), G_STRUCT_OFFSET (GtkEntryClass, activate),
_gtk_marshal_VOID__VOID, NULL, NULL,
GTK_TYPE_NONE, 0); _gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
widget_class->activate_signal = signals[ACTIVATE]; widget_class->activate_signal = signals[ACTIVATE];
signals[MOVE_CURSOR] = signals[MOVE_CURSOR] =
gtk_signal_new ("move_cursor", g_signal_new ("move_cursor",
GTK_RUN_LAST | GTK_RUN_ACTION, G_OBJECT_CLASS_TYPE (gobject_class),
GTK_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
GTK_SIGNAL_OFFSET (GtkEntryClass, move_cursor), G_STRUCT_OFFSET (GtkEntryClass, move_cursor),
_gtk_marshal_VOID__ENUM_INT_BOOLEAN, NULL, NULL,
GTK_TYPE_NONE, 3, GTK_TYPE_MOVEMENT_STEP, GTK_TYPE_INT, GTK_TYPE_BOOL); _gtk_marshal_VOID__ENUM_INT_BOOLEAN,
G_TYPE_NONE, 3,
GTK_TYPE_MOVEMENT_STEP,
G_TYPE_INT,
G_TYPE_BOOLEAN);
signals[INSERT_AT_CURSOR] = signals[INSERT_AT_CURSOR] =
gtk_signal_new ("insert_at_cursor", g_signal_new ("insert_at_cursor",
GTK_RUN_LAST | GTK_RUN_ACTION, G_OBJECT_CLASS_TYPE (gobject_class),
GTK_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
GTK_SIGNAL_OFFSET (GtkEntryClass, insert_at_cursor), G_STRUCT_OFFSET (GtkEntryClass, insert_at_cursor),
_gtk_marshal_VOID__STRING, NULL, NULL,
GTK_TYPE_NONE, 1, GTK_TYPE_STRING); _gtk_marshal_VOID__STRING,
G_TYPE_NONE, 1,
G_TYPE_STRING);
signals[DELETE_FROM_CURSOR] = signals[DELETE_FROM_CURSOR] =
gtk_signal_new ("delete_from_cursor", g_signal_new ("delete_from_cursor",
GTK_RUN_LAST | GTK_RUN_ACTION, G_OBJECT_CLASS_TYPE (gobject_class),
GTK_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
GTK_SIGNAL_OFFSET (GtkEntryClass, delete_from_cursor), G_STRUCT_OFFSET (GtkEntryClass, delete_from_cursor),
_gtk_marshal_VOID__ENUM_INT, NULL, NULL,
GTK_TYPE_NONE, 2, GTK_TYPE_DELETE_TYPE, GTK_TYPE_INT); _gtk_marshal_VOID__ENUM_INT,
G_TYPE_NONE, 2,
GTK_TYPE_DELETE_TYPE,
G_TYPE_INT);
signals[CUT_CLIPBOARD] = signals[CUT_CLIPBOARD] =
gtk_signal_new ("cut_clipboard", g_signal_new ("cut_clipboard",
GTK_RUN_LAST | GTK_RUN_ACTION, G_OBJECT_CLASS_TYPE (gobject_class),
GTK_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
GTK_SIGNAL_OFFSET (GtkEntryClass, cut_clipboard), G_STRUCT_OFFSET (GtkEntryClass, cut_clipboard),
_gtk_marshal_VOID__VOID, NULL, NULL,
GTK_TYPE_NONE, 0); _gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[COPY_CLIPBOARD] = signals[COPY_CLIPBOARD] =
gtk_signal_new ("copy_clipboard", g_signal_new ("copy_clipboard",
GTK_RUN_LAST | GTK_RUN_ACTION, G_OBJECT_CLASS_TYPE (gobject_class),
GTK_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
GTK_SIGNAL_OFFSET (GtkEntryClass, copy_clipboard), G_STRUCT_OFFSET (GtkEntryClass, copy_clipboard),
_gtk_marshal_VOID__VOID, NULL, NULL,
GTK_TYPE_NONE, 0); _gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[PASTE_CLIPBOARD] = signals[PASTE_CLIPBOARD] =
gtk_signal_new ("paste_clipboard", g_signal_new ("paste_clipboard",
GTK_RUN_LAST | GTK_RUN_ACTION, G_OBJECT_CLASS_TYPE (gobject_class),
GTK_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
GTK_SIGNAL_OFFSET (GtkEntryClass, paste_clipboard), G_STRUCT_OFFSET (GtkEntryClass, paste_clipboard),
_gtk_marshal_VOID__VOID, NULL, NULL,
GTK_TYPE_NONE, 0); _gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[TOGGLE_OVERWRITE] = signals[TOGGLE_OVERWRITE] =
gtk_signal_new ("toggle_overwrite", g_signal_new ("toggle_overwrite",
GTK_RUN_LAST | GTK_RUN_ACTION, G_OBJECT_CLASS_TYPE (gobject_class),
GTK_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
GTK_SIGNAL_OFFSET (GtkEntryClass, toggle_overwrite), G_STRUCT_OFFSET (GtkEntryClass, toggle_overwrite),
_gtk_marshal_VOID__VOID, NULL, NULL,
GTK_TYPE_NONE, 0); _gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
/* /*
* Key bindings * Key bindings
@ -660,13 +676,13 @@ gtk_entry_class_init (GtkEntryClass *class)
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK, gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK,
"move_cursor", 3, "move_cursor", 3,
GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS, GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
GTK_TYPE_INT, -1, G_TYPE_INT, -1,
GTK_TYPE_BOOL, FALSE); G_TYPE_BOOLEAN, FALSE);
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK, gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK,
"move_cursor", 3, "move_cursor", 3,
GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS, GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
GTK_TYPE_INT, 1, G_TYPE_INT, 1,
GTK_TYPE_BOOL, TRUE); G_TYPE_BOOLEAN, TRUE);
/* Activate /* Activate
@ -679,39 +695,39 @@ gtk_entry_class_init (GtkEntryClass *class)
/* Deleting text */ /* Deleting text */
gtk_binding_entry_add_signal (binding_set, GDK_Delete, 0, gtk_binding_entry_add_signal (binding_set, GDK_Delete, 0,
"delete_from_cursor", 2, "delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_CHARS, G_TYPE_ENUM, GTK_DELETE_CHARS,
GTK_TYPE_INT, 1); G_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Delete, 0, gtk_binding_entry_add_signal (binding_set, GDK_KP_Delete, 0,
"delete_from_cursor", 2, "delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_CHARS, G_TYPE_ENUM, GTK_DELETE_CHARS,
GTK_TYPE_INT, 1); G_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, 0, gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, 0,
"delete_from_cursor", 2, "delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_CHARS, G_TYPE_ENUM, GTK_DELETE_CHARS,
GTK_TYPE_INT, -1); G_TYPE_INT, -1);
/* Make this do the same as Backspace, to help with mis-typing */ /* Make this do the same as Backspace, to help with mis-typing */
gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, GDK_SHIFT_MASK, gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, GDK_SHIFT_MASK,
"delete_from_cursor", 2, "delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_CHARS, G_TYPE_ENUM, GTK_DELETE_CHARS,
GTK_TYPE_INT, -1); G_TYPE_INT, -1);
gtk_binding_entry_add_signal (binding_set, GDK_Delete, GDK_CONTROL_MASK, gtk_binding_entry_add_signal (binding_set, GDK_Delete, GDK_CONTROL_MASK,
"delete_from_cursor", 2, "delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_WORD_ENDS, G_TYPE_ENUM, GTK_DELETE_WORD_ENDS,
GTK_TYPE_INT, 1); G_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Delete, GDK_CONTROL_MASK, gtk_binding_entry_add_signal (binding_set, GDK_KP_Delete, GDK_CONTROL_MASK,
"delete_from_cursor", 2, "delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_WORD_ENDS, G_TYPE_ENUM, GTK_DELETE_WORD_ENDS,
GTK_TYPE_INT, 1); G_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, GDK_CONTROL_MASK, gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, GDK_CONTROL_MASK,
"delete_from_cursor", 2, "delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_WORD_ENDS, G_TYPE_ENUM, GTK_DELETE_WORD_ENDS,
GTK_TYPE_INT, -1); G_TYPE_INT, -1);
/* Cut/copy/paste */ /* Cut/copy/paste */
@ -901,13 +917,13 @@ gtk_entry_init (GtkEntry *entry)
*/ */
entry->im_context = gtk_im_multicontext_new (); entry->im_context = gtk_im_multicontext_new ();
g_signal_connect (G_OBJECT (entry->im_context), "commit", g_signal_connect (entry->im_context, "commit",
G_CALLBACK (gtk_entry_commit_cb), entry); G_CALLBACK (gtk_entry_commit_cb), entry);
g_signal_connect (G_OBJECT (entry->im_context), "preedit_changed", g_signal_connect (entry->im_context, "preedit_changed",
G_CALLBACK (gtk_entry_preedit_changed_cb), entry); G_CALLBACK (gtk_entry_preedit_changed_cb), entry);
g_signal_connect (G_OBJECT (entry->im_context), "retrieve_surrounding", g_signal_connect (entry->im_context, "retrieve_surrounding",
G_CALLBACK (gtk_entry_retrieve_surrounding_cb), entry); G_CALLBACK (gtk_entry_retrieve_surrounding_cb), entry);
g_signal_connect (G_OBJECT (entry->im_context), "delete_surrounding", g_signal_connect (entry->im_context, "delete_surrounding",
G_CALLBACK (gtk_entry_delete_surrounding_cb), entry); G_CALLBACK (gtk_entry_delete_surrounding_cb), entry);
} }
@ -917,9 +933,9 @@ gtk_entry_finalize (GObject *object)
GtkEntry *entry = GTK_ENTRY (object); GtkEntry *entry = GTK_ENTRY (object);
if (entry->cached_layout) if (entry->cached_layout)
g_object_unref (G_OBJECT (entry->cached_layout)); g_object_unref (entry->cached_layout);
g_object_unref (G_OBJECT (entry->im_context)); g_object_unref (entry->im_context);
if (entry->blink_timeout) if (entry->blink_timeout)
g_source_remove (entry->blink_timeout); g_source_remove (entry->blink_timeout);
@ -1195,7 +1211,7 @@ gtk_entry_draw_frame (GtkWidget *widget)
"focus-line-width", &focus_width, "focus-line-width", &focus_width,
NULL); NULL);
gdk_window_get_size (widget->window, &width, &height); gdk_drawable_get_size (widget->window, &width, &height);
if (GTK_WIDGET_HAS_FOCUS (widget) && !interior_focus) if (GTK_WIDGET_HAS_FOCUS (widget) && !interior_focus)
{ {
@ -1471,7 +1487,7 @@ gtk_entry_motion_notify (GtkWidget *widget,
else else
{ {
gint height; gint height;
gdk_window_get_size (entry->text_area, NULL, &height); gdk_drawable_get_size (entry->text_area, NULL, &height);
if (event->y < 0) if (event->y < 0)
tmp_pos = 0; tmp_pos = 0;
@ -1602,7 +1618,7 @@ gtk_entry_focus_out (GtkWidget *widget,
gtk_entry_check_cursor_blink (entry); gtk_entry_check_cursor_blink (entry);
g_signal_handlers_disconnect_by_func (gdk_keymap_get_for_display (gtk_widget_get_display (widget)), g_signal_handlers_disconnect_by_func (gdk_keymap_get_for_display (gtk_widget_get_display (widget)),
(gpointer) gtk_entry_keymap_direction_changed, gtk_entry_keymap_direction_changed,
entry); entry);
return FALSE; return FALSE;
@ -1654,7 +1670,7 @@ gtk_entry_state_changed (GtkWidget *widget,
gtk_editable_select_region (GTK_EDITABLE (entry), entry->current_pos, entry->current_pos); gtk_editable_select_region (GTK_EDITABLE (entry), entry->current_pos, entry->current_pos);
} }
gtk_widget_queue_clear (widget); gtk_widget_queue_draw (widget);
} }
/* GtkEditable method implementations /* GtkEditable method implementations
@ -1672,7 +1688,7 @@ gtk_entry_insert_text (GtkEditable *editable,
if (*position < 0 || *position > entry->text_length) if (*position < 0 || *position > entry->text_length)
*position = entry->text_length; *position = entry->text_length;
g_object_ref (G_OBJECT (editable)); g_object_ref (editable);
if (new_text_length <= 63) if (new_text_length <= 63)
text = buf; text = buf;
@ -1687,7 +1703,7 @@ gtk_entry_insert_text (GtkEditable *editable,
if (new_text_length > 63) if (new_text_length > 63)
g_free (text); g_free (text);
g_object_unref (G_OBJECT (editable)); g_object_unref (editable);
} }
static void static void
@ -1704,11 +1720,11 @@ gtk_entry_delete_text (GtkEditable *editable,
if (start_pos > end_pos) if (start_pos > end_pos)
start_pos = end_pos; start_pos = end_pos;
g_object_ref (G_OBJECT (editable)); g_object_ref (editable);
g_signal_emit_by_name (editable, "delete_text", start_pos, end_pos); g_signal_emit_by_name (editable, "delete_text", start_pos, end_pos);
g_object_unref (G_OBJECT (editable)); g_object_unref (editable);
} }
static gchar * static gchar *
@ -1844,9 +1860,9 @@ gtk_entry_start_editing (GtkCellEditable *cell_editable,
{ {
GTK_ENTRY (cell_editable)->is_cell_renderer = TRUE; GTK_ENTRY (cell_editable)->is_cell_renderer = TRUE;
g_signal_connect (G_OBJECT (cell_editable), "activate", g_signal_connect (cell_editable, "activate",
G_CALLBACK (gtk_cell_editable_entry_activated), NULL); G_CALLBACK (gtk_cell_editable_entry_activated), NULL);
g_signal_connect (G_OBJECT (cell_editable), "key_press_event", g_signal_connect (cell_editable, "key_press_event",
G_CALLBACK (gtk_cell_editable_key_press_event), NULL); G_CALLBACK (gtk_cell_editable_key_press_event), NULL);
} }
@ -2383,7 +2399,7 @@ gtk_entry_reset_layout (GtkEntry *entry)
{ {
if (entry->cached_layout) if (entry->cached_layout)
{ {
g_object_unref (G_OBJECT (entry->cached_layout)); g_object_unref (entry->cached_layout);
entry->cached_layout = NULL; entry->cached_layout = NULL;
} }
} }
@ -2733,7 +2749,7 @@ gtk_entry_draw_cursor (GtkEntry *entry,
gint x2 = 0; gint x2 = 0;
GdkGC *gc; GdkGC *gc;
gdk_window_get_size (entry->text_area, NULL, &text_area_height); gdk_drawable_get_size (entry->text_area, NULL, &text_area_height);
gtk_entry_get_cursor_locations (entry, type, &strong_x, &weak_x); gtk_entry_get_cursor_locations (entry, type, &strong_x, &weak_x);
@ -2880,7 +2896,7 @@ gtk_entry_adjust_scroll (GtkEntry *entry)
if (!GTK_WIDGET_REALIZED (entry)) if (!GTK_WIDGET_REALIZED (entry))
return; return;
gdk_window_get_size (entry->text_area, &text_area_width, NULL); gdk_drawable_get_size (entry->text_area, &text_area_width, NULL);
text_area_width -= 2 * INNER_BORDER; text_area_width -= 2 * INNER_BORDER;
layout = gtk_entry_ensure_layout (entry, TRUE); layout = gtk_entry_ensure_layout (entry, TRUE);
@ -3200,14 +3216,14 @@ paste_received (GtkClipboard *clipboard,
gtk_editable_set_position (editable, pos); gtk_editable_set_position (editable, pos);
} }
g_object_unref (G_OBJECT (entry)); g_object_unref (entry);
} }
static void static void
gtk_entry_paste (GtkEntry *entry, gtk_entry_paste (GtkEntry *entry,
GdkAtom selection) GdkAtom selection)
{ {
g_object_ref (G_OBJECT (entry)); g_object_ref (entry);
gtk_clipboard_request_text (gtk_widget_get_clipboard (GTK_WIDGET (entry), selection), gtk_clipboard_request_text (gtk_widget_get_clipboard (GTK_WIDGET (entry), selection),
paste_received, entry); paste_received, entry);
} }
@ -3275,7 +3291,7 @@ gtk_entry_update_primary_selection (GtkEntry *entry)
GtkWidget* GtkWidget*
gtk_entry_new (void) gtk_entry_new (void)
{ {
return GTK_WIDGET (gtk_type_new (GTK_TYPE_ENTRY)); return g_object_new (GTK_TYPE_ENTRY, NULL);
} }
/** /**
@ -3302,7 +3318,7 @@ gtk_entry_new_with_max_length (gint max)
max = CLAMP (max, 0, MAX_SIZE); max = CLAMP (max, 0, MAX_SIZE);
entry = gtk_type_new (GTK_TYPE_ENTRY); entry = g_object_new (GTK_TYPE_ENTRY, NULL);
entry->text_max_length = max; entry->text_max_length = max;
return GTK_WIDGET (entry); return GTK_WIDGET (entry);
@ -3791,8 +3807,8 @@ static void
activate_cb (GtkWidget *menuitem, activate_cb (GtkWidget *menuitem,
GtkEntry *entry) GtkEntry *entry)
{ {
const gchar *signal = gtk_object_get_data (GTK_OBJECT (menuitem), "gtk-signal"); const gchar *signal = g_object_get_data (G_OBJECT (menuitem), "gtk-signal");
gtk_signal_emit_by_name (GTK_OBJECT (entry), signal); g_signal_emit_by_name (entry, signal);
} }
@ -3813,9 +3829,9 @@ append_action_signal (GtkEntry *entry,
{ {
GtkWidget *menuitem = gtk_image_menu_item_new_from_stock (stock_id, NULL); GtkWidget *menuitem = gtk_image_menu_item_new_from_stock (stock_id, NULL);
gtk_object_set_data (GTK_OBJECT (menuitem), "gtk-signal", (char *)signal); g_object_set_data (G_OBJECT (menuitem), "gtk-signal", (char *)signal);
gtk_signal_connect (GTK_OBJECT (menuitem), "activate", g_signal_connect (menuitem, "activate",
GTK_SIGNAL_FUNC (activate_cb), entry); G_CALLBACK (activate_cb), entry);
gtk_widget_set_sensitive (menuitem, sensitive); gtk_widget_set_sensitive (menuitem, sensitive);
@ -3904,8 +3920,8 @@ popup_targets_received (GtkClipboard *clipboard,
entry->editable && clipboard_contains_text); entry->editable && clipboard_contains_text);
menuitem = gtk_menu_item_new_with_label (_("Select All")); menuitem = gtk_menu_item_new_with_label (_("Select All"));
gtk_signal_connect_object (GTK_OBJECT (menuitem), "activate", g_signal_connect_swapped (menuitem, "activate",
GTK_SIGNAL_FUNC (gtk_entry_select_all), entry); G_CALLBACK (gtk_entry_select_all), entry);
gtk_widget_show (menuitem); gtk_widget_show (menuitem);
gtk_menu_shell_append (GTK_MENU_SHELL (entry->popup_menu), menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (entry->popup_menu), menuitem);
@ -3936,9 +3952,10 @@ popup_targets_received (GtkClipboard *clipboard,
if (!entry->editable) if (!entry->editable)
gtk_widget_set_sensitive (menuitem, FALSE); gtk_widget_set_sensitive (menuitem, FALSE);
gtk_signal_emit (GTK_OBJECT (entry), g_signal_emit (entry,
signals[POPULATE_POPUP], signals[POPULATE_POPUP],
entry->popup_menu); 0,
entry->popup_menu);
if (info->button) if (info->button)

View File

@ -40,11 +40,11 @@ extern "C" {
#define GTK_TYPE_ENTRY (gtk_entry_get_type ()) #define GTK_TYPE_ENTRY (gtk_entry_get_type ())
#define GTK_ENTRY(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ENTRY, GtkEntry)) #define GTK_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ENTRY, GtkEntry))
#define GTK_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ENTRY, GtkEntryClass)) #define GTK_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ENTRY, GtkEntryClass))
#define GTK_IS_ENTRY(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ENTRY)) #define GTK_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ENTRY))
#define GTK_IS_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ENTRY)) #define GTK_IS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ENTRY))
#define GTK_ENTRY_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ENTRY, GtkEntryClass)) #define GTK_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ENTRY, GtkEntryClass))
typedef struct _GtkEntry GtkEntry; typedef struct _GtkEntry GtkEntry;
@ -145,7 +145,7 @@ struct _GtkEntryClass
void (*_gtk_reserved4) (void); void (*_gtk_reserved4) (void);
}; };
GtkType gtk_entry_get_type (void) G_GNUC_CONST; GType gtk_entry_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_entry_new (void); GtkWidget* gtk_entry_new (void);
void gtk_entry_set_visibility (GtkEntry *entry, void gtk_entry_set_visibility (GtkEntry *entry,
gboolean visible); gboolean visible);

View File

@ -24,7 +24,6 @@
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
#include "gtksignal.h"
#include "gtkhsv.h" #include "gtkhsv.h"
#include "gdk/gdkkeysyms.h" #include "gdk/gdkkeysyms.h"
#include "gtkbindings.h" #include "gtkbindings.h"
@ -125,24 +124,26 @@ static GtkWidgetClass *parent_class;
* *
* Return value: The type ID of the &GtkHSV class. * Return value: The type ID of the &GtkHSV class.
**/ **/
GtkType GType
gtk_hsv_get_type (void) gtk_hsv_get_type (void)
{ {
static GtkType hsv_type = 0; static GType hsv_type = 0;
if (!hsv_type) { if (!hsv_type) {
static const GtkTypeInfo hsv_info = { static const GTypeInfo hsv_info = {
"GtkHSV",
sizeof (GtkHSV),
sizeof (GtkHSVClass), sizeof (GtkHSVClass),
(GtkClassInitFunc) gtk_hsv_class_init, NULL, /* base_init */
(GtkObjectInitFunc) gtk_hsv_init, NULL, /* base_finalize */
NULL, /* reserved_1 */ (GClassInitFunc) gtk_hsv_class_init,
NULL, /* reserved_2 */ NULL, /* class_finalize */
(GtkClassInitFunc) NULL NULL, /* class_data */
sizeof (GtkHSV),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_hsv_init,
}; };
hsv_type = gtk_type_unique (GTK_TYPE_WIDGET, &hsv_info); hsv_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkHSV",
&hsv_info, 0);
} }
return hsv_type; return hsv_type;
@ -155,13 +156,13 @@ gtk_hsv_class_init (GtkHSVClass *class)
GtkObjectClass *object_class; GtkObjectClass *object_class;
GtkWidgetClass *widget_class; GtkWidgetClass *widget_class;
GtkHSVClass *hsv_class; GtkHSVClass *hsv_class;
GtkBindingSet *binding_set; GtkBindingSet *binding_set;
object_class = (GtkObjectClass *) class; object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class; widget_class = (GtkWidgetClass *) class;
hsv_class = GTK_HSV_CLASS (class); hsv_class = GTK_HSV_CLASS (class);
parent_class = gtk_type_class (GTK_TYPE_WIDGET); parent_class = g_type_class_peek_parent (class);
object_class->destroy = gtk_hsv_destroy; object_class->destroy = gtk_hsv_destroy;
@ -180,51 +181,54 @@ gtk_hsv_class_init (GtkHSVClass *class)
hsv_class->move = gtk_hsv_move; hsv_class->move = gtk_hsv_move;
hsv_signals[CHANGED] = hsv_signals[CHANGED] =
gtk_signal_new ("changed", g_signal_new ("changed",
GTK_RUN_FIRST, G_OBJECT_CLASS_TYPE (object_class),
GTK_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST,
GTK_SIGNAL_OFFSET (GtkHSVClass, changed), G_STRUCT_OFFSET (GtkHSVClass, changed),
_gtk_marshal_VOID__VOID, NULL, NULL,
GTK_TYPE_NONE, 0); _gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
hsv_signals[MOVE] = hsv_signals[MOVE] =
gtk_signal_new ("move", g_signal_new ("move",
GTK_RUN_LAST | GTK_RUN_ACTION, G_OBJECT_CLASS_TYPE (object_class),
GTK_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
GTK_SIGNAL_OFFSET (GtkHSVClass, move), G_STRUCT_OFFSET (GtkHSVClass, move),
_gtk_marshal_VOID__ENUM, NULL, NULL,
GTK_TYPE_NONE, 1, GTK_TYPE_DIRECTION_TYPE); _gtk_marshal_VOID__ENUM,
G_TYPE_NONE, 1,
GTK_TYPE_DIRECTION_TYPE);
binding_set = gtk_binding_set_by_class (class); binding_set = gtk_binding_set_by_class (class);
gtk_binding_entry_add_signal (binding_set, GDK_Up, 0, gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
"move", 1, "move", 1,
GTK_TYPE_ENUM, GTK_DIR_UP); G_TYPE_ENUM, GTK_DIR_UP);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Up, 0, gtk_binding_entry_add_signal (binding_set, GDK_KP_Up, 0,
"move", 1, "move", 1,
GTK_TYPE_ENUM, GTK_DIR_UP); G_TYPE_ENUM, GTK_DIR_UP);
gtk_binding_entry_add_signal (binding_set, GDK_Down, 0, gtk_binding_entry_add_signal (binding_set, GDK_Down, 0,
"move", 1, "move", 1,
GTK_TYPE_ENUM, GTK_DIR_DOWN); G_TYPE_ENUM, GTK_DIR_DOWN);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Down, 0, gtk_binding_entry_add_signal (binding_set, GDK_KP_Down, 0,
"move", 1, "move", 1,
GTK_TYPE_ENUM, GTK_DIR_DOWN); G_TYPE_ENUM, GTK_DIR_DOWN);
gtk_binding_entry_add_signal (binding_set, GDK_Right, 0, gtk_binding_entry_add_signal (binding_set, GDK_Right, 0,
"move", 1, "move", 1,
GTK_TYPE_ENUM, GTK_DIR_RIGHT); G_TYPE_ENUM, GTK_DIR_RIGHT);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Right, 0, gtk_binding_entry_add_signal (binding_set, GDK_KP_Right, 0,
"move", 1, "move", 1,
GTK_TYPE_ENUM, GTK_DIR_RIGHT); G_TYPE_ENUM, GTK_DIR_RIGHT);
gtk_binding_entry_add_signal (binding_set, GDK_Left, 0, gtk_binding_entry_add_signal (binding_set, GDK_Left, 0,
"move", 1, "move", 1,
GTK_TYPE_ENUM, GTK_DIR_LEFT); G_TYPE_ENUM, GTK_DIR_LEFT);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Left, 0, gtk_binding_entry_add_signal (binding_set, GDK_KP_Left, 0,
"move", 1, "move", 1,
GTK_TYPE_ENUM, GTK_DIR_LEFT); G_TYPE_ENUM, GTK_DIR_LEFT);
} }
/* Object initialization function for the HSV color selector */ /* Object initialization function for the HSV color selector */
@ -337,7 +341,7 @@ gtk_hsv_realize (GtkWidget *widget)
parent_window = gtk_widget_get_parent_window (widget); parent_window = gtk_widget_get_parent_window (widget);
widget->window = parent_window; widget->window = parent_window;
gdk_window_ref (widget->window); g_object_ref (widget->window);
priv->window = gdk_window_new (parent_window, &attr, attr_mask); priv->window = gdk_window_new (parent_window, &attr, attr_mask);
gdk_window_set_user_data (priv->window, hsv); gdk_window_set_user_data (priv->window, hsv);
@ -363,7 +367,7 @@ gtk_hsv_unrealize (GtkWidget *widget)
gdk_window_destroy (priv->window); gdk_window_destroy (priv->window);
priv->window = NULL; priv->window = NULL;
gdk_gc_unref (priv->gc); g_object_unref (priv->gc);
priv->gc = NULL; priv->gc = NULL;
if (GTK_WIDGET_CLASS (parent_class)->unrealize) if (GTK_WIDGET_CLASS (parent_class)->unrealize)
@ -762,7 +766,7 @@ set_cross_grab (GtkHSV *hsv,
NULL, NULL,
cursor, cursor,
time); time);
gdk_cursor_destroy (cursor); gdk_cursor_unref (cursor);
} }
/* Button_press_event handler for the HSV color selector */ /* Button_press_event handler for the HSV color selector */
@ -1004,7 +1008,7 @@ paint_ring (GtkHSV *hsv,
priv->size - 2 * priv->ring_width + 1, priv->size - 2 * priv->ring_width + 1, priv->size - 2 * priv->ring_width + 1, priv->size - 2 * priv->ring_width + 1,
0, 360 * 64); 0, 360 * 64);
gdk_gc_unref (gc); g_object_unref (gc);
gdk_gc_set_clip_mask (priv->gc, mask); gdk_gc_set_clip_mask (priv->gc, mask);
gdk_gc_set_clip_origin (priv->gc, 0, 0); gdk_gc_set_clip_origin (priv->gc, 0, 0);
@ -1035,7 +1039,7 @@ paint_ring (GtkHSV *hsv,
-y + center - sin (priv->h * 2.0 * G_PI) * center); -y + center - sin (priv->h * 2.0 * G_PI) * center);
gdk_gc_set_clip_mask (priv->gc, NULL); gdk_gc_set_clip_mask (priv->gc, NULL);
gdk_bitmap_unref (mask); g_object_unref (mask);
g_free (buf); g_free (buf);
@ -1241,7 +1245,7 @@ paint_triangle (GtkHSV *hsv,
points[2].y = y3 - y; points[2].y = y3 - y;
gdk_draw_polygon (mask, gc, TRUE, points, 3); gdk_draw_polygon (mask, gc, TRUE, points, 3);
gdk_gc_unref (gc); g_object_unref (gc);
gdk_gc_set_clip_mask (priv->gc, mask); gdk_gc_set_clip_mask (priv->gc, mask);
gdk_gc_set_clip_origin (priv->gc, 0, 0); gdk_gc_set_clip_origin (priv->gc, 0, 0);
@ -1255,7 +1259,7 @@ paint_triangle (GtkHSV *hsv,
x, y); x, y);
gdk_gc_set_clip_mask (priv->gc, NULL); gdk_gc_set_clip_mask (priv->gc, NULL);
gdk_bitmap_unref (mask); g_object_unref (mask);
g_free (buf); g_free (buf);
@ -1351,15 +1355,15 @@ gtk_hsv_expose (GtkWidget *widget,
dest.x - widget->allocation.x, dest.y - widget->allocation.y, dest.x - widget->allocation.x, dest.y - widget->allocation.y,
dest.width, dest.height); dest.width, dest.height);
gdk_draw_pixmap (widget->window, gdk_draw_drawable (widget->window,
priv->gc, priv->gc,
pixmap, pixmap,
0, 0, 0, 0,
dest.x, dest.x,
dest.y, dest.y,
event->area.width, event->area.height); event->area.width, event->area.height);
gdk_pixmap_unref (pixmap); g_object_unref (pixmap);
return FALSE; return FALSE;
} }
@ -1434,7 +1438,7 @@ gtk_hsv_focus (GtkWidget *widget,
GtkWidget* GtkWidget*
gtk_hsv_new (void) gtk_hsv_new (void)
{ {
return GTK_WIDGET (gtk_type_new (GTK_TYPE_HSV)); return g_object_new (GTK_TYPE_HSV, NULL);
} }
/** /**
@ -1467,7 +1471,7 @@ gtk_hsv_set_color (GtkHSV *hsv,
priv->s = s; priv->s = s;
priv->v = v; priv->v = v;
gtk_signal_emit (GTK_OBJECT (hsv), hsv_signals[CHANGED]); g_signal_emit (hsv, hsv_signals[CHANGED], 0);
gtk_widget_queue_draw (GTK_WIDGET (hsv)); gtk_widget_queue_draw (GTK_WIDGET (hsv));
} }

View File

@ -38,11 +38,11 @@ extern "C" {
#endif #endif
#define GTK_TYPE_HSV (gtk_hsv_get_type ()) #define GTK_TYPE_HSV (gtk_hsv_get_type ())
#define GTK_HSV(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HSV, GtkHSV)) #define GTK_HSV(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_HSV, GtkHSV))
#define GTK_HSV_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSV, GtkHSVClass)) #define GTK_HSV_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSV, GtkHSVClass))
#define GTK_IS_HSV(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HSV)) #define GTK_IS_HSV(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_HSV))
#define GTK_IS_HSV_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSV)) #define GTK_IS_HSV_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSV))
#define GTK_HSV_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_HSV, GtkHSVClass)) #define GTK_HSV_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_HSV, GtkHSVClass))
typedef struct _GtkHSV GtkHSV; typedef struct _GtkHSV GtkHSV;
@ -70,7 +70,7 @@ struct _GtkHSVClass
}; };
GtkType gtk_hsv_get_type (void) G_GNUC_CONST; GType gtk_hsv_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_hsv_new (void); GtkWidget* gtk_hsv_new (void);
void gtk_hsv_set_color (GtkHSV *hsv, void gtk_hsv_set_color (GtkHSV *hsv,
double h, double h,

View File

@ -34,7 +34,6 @@
#include "gtkprivate.h" #include "gtkprivate.h"
#include "gtkwidget.h" #include "gtkwidget.h"
#include "gtkwindow.h" #include "gtkwindow.h"
#include "gtksignal.h"
#include "gtkstyle.h" #include "gtkstyle.h"
#include "gtktooltips.h" #include "gtktooltips.h"
@ -69,26 +68,28 @@ static gboolean get_keyboard_mode (GtkWidget *widget);
static GtkObjectClass *parent_class; static GtkObjectClass *parent_class;
static const gchar *tooltips_data_key = "_GtkTooltipsData"; static const gchar *tooltips_data_key = "_GtkTooltipsData";
GtkType GType
gtk_tooltips_get_type (void) gtk_tooltips_get_type (void)
{ {
static GtkType tooltips_type = 0; static GType tooltips_type = 0;
if (!tooltips_type) if (!tooltips_type)
{ {
static const GtkTypeInfo tooltips_info = static const GTypeInfo tooltips_info =
{ {
"GtkTooltips",
sizeof (GtkTooltips),
sizeof (GtkTooltipsClass), sizeof (GtkTooltipsClass),
(GtkClassInitFunc) gtk_tooltips_class_init, NULL, /* base_init */
(GtkObjectInitFunc) gtk_tooltips_init, NULL, /* base_finalize */
/* reserved_1 */ NULL, (GClassInitFunc) gtk_tooltips_class_init,
/* reserved_2 */ NULL, NULL, /* class_finalize */
(GtkClassInitFunc) NULL, NULL, /* class_data */
sizeof (GtkTooltips),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_tooltips_init,
}; };
tooltips_type = gtk_type_unique (GTK_TYPE_OBJECT, &tooltips_info); tooltips_type = g_type_register_static (GTK_TYPE_OBJECT, "GtkTooltips",
&tooltips_info, 0);
} }
return tooltips_type; return tooltips_type;
@ -100,7 +101,8 @@ gtk_tooltips_class_init (GtkTooltipsClass *class)
GtkObjectClass *object_class; GtkObjectClass *object_class;
object_class = (GtkObjectClass*) class; object_class = (GtkObjectClass*) class;
parent_class = gtk_type_class (GTK_TYPE_OBJECT);
parent_class = g_type_class_peek_parent (class);
object_class->destroy = gtk_tooltips_destroy; object_class->destroy = gtk_tooltips_destroy;
} }
@ -123,7 +125,7 @@ gtk_tooltips_init (GtkTooltips *tooltips)
GtkTooltips * GtkTooltips *
gtk_tooltips_new (void) gtk_tooltips_new (void)
{ {
return gtk_type_new (GTK_TYPE_TOOLTIPS); return g_object_new (GTK_TYPE_TOOLTIPS, NULL);
} }
static void static void
@ -131,10 +133,19 @@ gtk_tooltips_destroy_data (GtkTooltipsData *tooltipsdata)
{ {
g_free (tooltipsdata->tip_text); g_free (tooltipsdata->tip_text);
g_free (tooltipsdata->tip_private); g_free (tooltipsdata->tip_private);
gtk_signal_disconnect_by_data (GTK_OBJECT (tooltipsdata->widget),
(gpointer) tooltipsdata); g_signal_handlers_disconnect_by_func (tooltipsdata->widget,
gtk_object_remove_data (GTK_OBJECT (tooltipsdata->widget), tooltips_data_key); gtk_tooltips_event_handler,
gtk_widget_unref (tooltipsdata->widget); tooltipsdata);
g_signal_handlers_disconnect_by_func (tooltipsdata->widget,
gtk_tooltips_widget_unmap,
tooltipsdata);
g_signal_handlers_disconnect_by_func (tooltipsdata->widget,
gtk_tooltips_widget_remove,
tooltipsdata);
g_object_set_data (G_OBJECT (tooltipsdata->widget), tooltips_data_key, NULL);
g_object_unref (tooltipsdata->widget);
g_free (tooltipsdata); g_free (tooltipsdata);
} }
@ -179,14 +190,13 @@ gtk_tooltips_force_window (GtkTooltips *tooltips)
gtk_window_set_screen (GTK_WINDOW (tooltips->tip_window), gtk_window_set_screen (GTK_WINDOW (tooltips->tip_window),
gtk_widget_get_screen (tooltips->active_tips_data->widget)); gtk_widget_get_screen (tooltips->active_tips_data->widget));
gtk_widget_set_app_paintable (tooltips->tip_window, TRUE); gtk_widget_set_app_paintable (tooltips->tip_window, TRUE);
gtk_window_set_policy (GTK_WINDOW (tooltips->tip_window), FALSE, FALSE, TRUE);
gtk_widget_set_name (tooltips->tip_window, "gtk-tooltips"); gtk_widget_set_name (tooltips->tip_window, "gtk-tooltips");
gtk_container_set_border_width (GTK_CONTAINER (tooltips->tip_window), 4); gtk_container_set_border_width (GTK_CONTAINER (tooltips->tip_window), 4);
gtk_signal_connect_object (GTK_OBJECT (tooltips->tip_window), g_signal_connect_swapped (tooltips->tip_window,
"expose_event", "expose_event",
GTK_SIGNAL_FUNC (gtk_tooltips_paint_window), G_CALLBACK (gtk_tooltips_paint_window),
GTK_OBJECT (tooltips)); tooltips);
tooltips->tip_label = gtk_label_new (NULL); tooltips->tip_label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (tooltips->tip_label), TRUE); gtk_label_set_line_wrap (GTK_LABEL (tooltips->tip_label), TRUE);
@ -195,10 +205,10 @@ gtk_tooltips_force_window (GtkTooltips *tooltips)
gtk_container_add (GTK_CONTAINER (tooltips->tip_window), tooltips->tip_label); gtk_container_add (GTK_CONTAINER (tooltips->tip_window), tooltips->tip_label);
gtk_signal_connect (GTK_OBJECT (tooltips->tip_window), g_signal_connect (tooltips->tip_window,
"destroy", "destroy",
GTK_SIGNAL_FUNC (gtk_widget_destroyed), G_CALLBACK (gtk_widget_destroyed),
&tooltips->tip_window); &tooltips->tip_window);
} }
} }
@ -234,7 +244,7 @@ gtk_tooltips_data_get (GtkWidget *widget)
{ {
g_return_val_if_fail (widget != NULL, NULL); g_return_val_if_fail (widget != NULL, NULL);
return gtk_object_get_data ((GtkObject*) widget, tooltips_data_key); return g_object_get_data (G_OBJECT (widget), tooltips_data_key);
} }
void void
@ -271,7 +281,7 @@ gtk_tooltips_set_tip (GtkTooltips *tooltips,
} }
else else
{ {
gtk_widget_ref (widget); g_object_ref (widget);
if (tooltipsdata) if (tooltipsdata)
gtk_tooltips_widget_remove (tooltipsdata->widget, tooltipsdata); gtk_tooltips_widget_remove (tooltipsdata->widget, tooltipsdata);
@ -286,24 +296,24 @@ gtk_tooltips_set_tip (GtkTooltips *tooltips,
tooltips->tips_data_list = g_list_append (tooltips->tips_data_list, tooltips->tips_data_list = g_list_append (tooltips->tips_data_list,
tooltipsdata); tooltipsdata);
gtk_signal_connect_after (GTK_OBJECT (widget), "event-after", g_signal_connect_after (widget, "event-after",
(GtkSignalFunc) gtk_tooltips_event_handler, G_CALLBACK (gtk_tooltips_event_handler),
tooltipsdata); tooltipsdata);
gtk_object_set_data (GTK_OBJECT (widget), tooltips_data_key, g_object_set_data (G_OBJECT (widget), tooltips_data_key,
tooltipsdata); tooltipsdata);
gtk_signal_connect (GTK_OBJECT (widget), "unmap", g_signal_connect (widget, "unmap",
(GtkSignalFunc) gtk_tooltips_widget_unmap, G_CALLBACK (gtk_tooltips_widget_unmap),
tooltipsdata); tooltipsdata);
gtk_signal_connect (GTK_OBJECT (widget), "unrealize", g_signal_connect (widget, "unrealize",
(GtkSignalFunc) gtk_tooltips_widget_unmap, G_CALLBACK (gtk_tooltips_widget_unmap),
tooltipsdata); tooltipsdata);
gtk_signal_connect (GTK_OBJECT (widget), "destroy", g_signal_connect (widget, "destroy",
(GtkSignalFunc) gtk_tooltips_widget_remove, G_CALLBACK (gtk_tooltips_widget_remove),
tooltipsdata); tooltipsdata);
} }
} }

View File

@ -36,11 +36,11 @@ extern "C" {
#define GTK_TYPE_TOOLTIPS (gtk_tooltips_get_type ()) #define GTK_TYPE_TOOLTIPS (gtk_tooltips_get_type ())
#define GTK_TOOLTIPS(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TOOLTIPS, GtkTooltips)) #define GTK_TOOLTIPS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TOOLTIPS, GtkTooltips))
#define GTK_TOOLTIPS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOLTIPS, GtkTooltipsClass)) #define GTK_TOOLTIPS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOLTIPS, GtkTooltipsClass))
#define GTK_IS_TOOLTIPS(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TOOLTIPS)) #define GTK_IS_TOOLTIPS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TOOLTIPS))
#define GTK_IS_TOOLTIPS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOOLTIPS)) #define GTK_IS_TOOLTIPS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOOLTIPS))
#define GTK_TOOLTIPS_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_TOOLTIPS, GtkTooltipsClass)) #define GTK_TOOLTIPS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TOOLTIPS, GtkTooltipsClass))
typedef struct _GtkTooltips GtkTooltips; typedef struct _GtkTooltips GtkTooltips;
@ -83,7 +83,7 @@ struct _GtkTooltipsClass
void (*_gtk_reserved4) (void); void (*_gtk_reserved4) (void);
}; };
GtkType gtk_tooltips_get_type (void) G_GNUC_CONST; GType gtk_tooltips_get_type (void) G_GNUC_CONST;
GtkTooltips* gtk_tooltips_new (void); GtkTooltips* gtk_tooltips_new (void);
void gtk_tooltips_enable (GtkTooltips *tooltips); void gtk_tooltips_enable (GtkTooltips *tooltips);