deprecation cleanup

Sat Oct  5 16:11:22 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
        gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
This commit is contained in:
Manish Singh 2002-10-05 23:15:39 +00:00 committed by Manish Singh
parent 8632229721
commit 8b6a832f26
16 changed files with 287 additions and 242 deletions

View File

@ -1,3 +1,8 @@
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
Sat Oct 5 18:30:50 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am (pixbuf_csource): Use
@ -25,9 +30,9 @@ Sat Oct 5 16:47:03 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Fri Oct 4 18:40:50 2002 Manish Singh <yosh@gimp.org>
* gtkcheckmenuitem.[ch] gtkimagemenuitem.[ch] gtkmenu.[ch]
gtkmenubar.[ch] gtkmenuitem.[ch] gtkmenushell.[ch]
gtkradiomenuitem.[ch]: Deprecation cleanup
* gtk/gtkcheckmenuitem.[ch] gtk/gtkimagemenuitem.[ch] gtk/gtkmenu.[ch]
gtk/gtkmenubar.[ch] gtk/gtkmenuitem.[ch] gtk/gtkmenushell.[ch]
gtk/gtkradiomenuitem.[ch]: Deprecation cleanup
Fri Oct 4 16:48:27 2002 Manish Singh <yosh@gimp.org>
@ -109,9 +114,9 @@ Fri Oct 4 11:43:47 2002 Owen Taylor <otaylor@redhat.com>
Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
* gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
* gtk/gtkhscrollbar.[ch] gtk/gtkhseparator.[ch] gtk/gtkrange.[ch]
gtk/gtkscrollbar.[ch] gtk/gtkseparator.[ch] gtk/gtkseparatormenuitem.h
gtk/gtkvscrollbar.[ch] gtk/gtkvseparator.[ch]: Deprecation cleanup
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
@ -235,7 +240,7 @@ Wed Oct 2 08:47:31 2002 Owen Taylor <otaylor@redhat.com>
Tue Oct 1 12:53:44 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkwindow-decorate.c gtkwindow.[ch]: Deprecation cleanup
* gtk/gtkwindow-decorate.c gtk/gtkwindow.[ch]: Deprecation cleanup
2002-10-01 jacob berkman <jacob@ximian.com>

View File

@ -1,3 +1,8 @@
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
Sat Oct 5 18:30:50 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am (pixbuf_csource): Use
@ -25,9 +30,9 @@ Sat Oct 5 16:47:03 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Fri Oct 4 18:40:50 2002 Manish Singh <yosh@gimp.org>
* gtkcheckmenuitem.[ch] gtkimagemenuitem.[ch] gtkmenu.[ch]
gtkmenubar.[ch] gtkmenuitem.[ch] gtkmenushell.[ch]
gtkradiomenuitem.[ch]: Deprecation cleanup
* gtk/gtkcheckmenuitem.[ch] gtk/gtkimagemenuitem.[ch] gtk/gtkmenu.[ch]
gtk/gtkmenubar.[ch] gtk/gtkmenuitem.[ch] gtk/gtkmenushell.[ch]
gtk/gtkradiomenuitem.[ch]: Deprecation cleanup
Fri Oct 4 16:48:27 2002 Manish Singh <yosh@gimp.org>
@ -109,9 +114,9 @@ Fri Oct 4 11:43:47 2002 Owen Taylor <otaylor@redhat.com>
Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
* gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
* gtk/gtkhscrollbar.[ch] gtk/gtkhseparator.[ch] gtk/gtkrange.[ch]
gtk/gtkscrollbar.[ch] gtk/gtkseparator.[ch] gtk/gtkseparatormenuitem.h
gtk/gtkvscrollbar.[ch] gtk/gtkvseparator.[ch]: Deprecation cleanup
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
@ -235,7 +240,7 @@ Wed Oct 2 08:47:31 2002 Owen Taylor <otaylor@redhat.com>
Tue Oct 1 12:53:44 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkwindow-decorate.c gtkwindow.[ch]: Deprecation cleanup
* gtk/gtkwindow-decorate.c gtk/gtkwindow.[ch]: Deprecation cleanup
2002-10-01 jacob berkman <jacob@ximian.com>

View File

@ -1,3 +1,8 @@
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
Sat Oct 5 18:30:50 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am (pixbuf_csource): Use
@ -25,9 +30,9 @@ Sat Oct 5 16:47:03 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Fri Oct 4 18:40:50 2002 Manish Singh <yosh@gimp.org>
* gtkcheckmenuitem.[ch] gtkimagemenuitem.[ch] gtkmenu.[ch]
gtkmenubar.[ch] gtkmenuitem.[ch] gtkmenushell.[ch]
gtkradiomenuitem.[ch]: Deprecation cleanup
* gtk/gtkcheckmenuitem.[ch] gtk/gtkimagemenuitem.[ch] gtk/gtkmenu.[ch]
gtk/gtkmenubar.[ch] gtk/gtkmenuitem.[ch] gtk/gtkmenushell.[ch]
gtk/gtkradiomenuitem.[ch]: Deprecation cleanup
Fri Oct 4 16:48:27 2002 Manish Singh <yosh@gimp.org>
@ -109,9 +114,9 @@ Fri Oct 4 11:43:47 2002 Owen Taylor <otaylor@redhat.com>
Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
* gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
* gtk/gtkhscrollbar.[ch] gtk/gtkhseparator.[ch] gtk/gtkrange.[ch]
gtk/gtkscrollbar.[ch] gtk/gtkseparator.[ch] gtk/gtkseparatormenuitem.h
gtk/gtkvscrollbar.[ch] gtk/gtkvseparator.[ch]: Deprecation cleanup
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
@ -235,7 +240,7 @@ Wed Oct 2 08:47:31 2002 Owen Taylor <otaylor@redhat.com>
Tue Oct 1 12:53:44 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkwindow-decorate.c gtkwindow.[ch]: Deprecation cleanup
* gtk/gtkwindow-decorate.c gtk/gtkwindow.[ch]: Deprecation cleanup
2002-10-01 jacob berkman <jacob@ximian.com>

View File

@ -1,3 +1,8 @@
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
Sat Oct 5 18:30:50 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am (pixbuf_csource): Use
@ -25,9 +30,9 @@ Sat Oct 5 16:47:03 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Fri Oct 4 18:40:50 2002 Manish Singh <yosh@gimp.org>
* gtkcheckmenuitem.[ch] gtkimagemenuitem.[ch] gtkmenu.[ch]
gtkmenubar.[ch] gtkmenuitem.[ch] gtkmenushell.[ch]
gtkradiomenuitem.[ch]: Deprecation cleanup
* gtk/gtkcheckmenuitem.[ch] gtk/gtkimagemenuitem.[ch] gtk/gtkmenu.[ch]
gtk/gtkmenubar.[ch] gtk/gtkmenuitem.[ch] gtk/gtkmenushell.[ch]
gtk/gtkradiomenuitem.[ch]: Deprecation cleanup
Fri Oct 4 16:48:27 2002 Manish Singh <yosh@gimp.org>
@ -109,9 +114,9 @@ Fri Oct 4 11:43:47 2002 Owen Taylor <otaylor@redhat.com>
Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
* gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
* gtk/gtkhscrollbar.[ch] gtk/gtkhseparator.[ch] gtk/gtkrange.[ch]
gtk/gtkscrollbar.[ch] gtk/gtkseparator.[ch] gtk/gtkseparatormenuitem.h
gtk/gtkvscrollbar.[ch] gtk/gtkvseparator.[ch]: Deprecation cleanup
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
@ -235,7 +240,7 @@ Wed Oct 2 08:47:31 2002 Owen Taylor <otaylor@redhat.com>
Tue Oct 1 12:53:44 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkwindow-decorate.c gtkwindow.[ch]: Deprecation cleanup
* gtk/gtkwindow-decorate.c gtk/gtkwindow.[ch]: Deprecation cleanup
2002-10-01 jacob berkman <jacob@ximian.com>

View File

@ -1,3 +1,8 @@
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
Sat Oct 5 18:30:50 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am (pixbuf_csource): Use
@ -25,9 +30,9 @@ Sat Oct 5 16:47:03 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Fri Oct 4 18:40:50 2002 Manish Singh <yosh@gimp.org>
* gtkcheckmenuitem.[ch] gtkimagemenuitem.[ch] gtkmenu.[ch]
gtkmenubar.[ch] gtkmenuitem.[ch] gtkmenushell.[ch]
gtkradiomenuitem.[ch]: Deprecation cleanup
* gtk/gtkcheckmenuitem.[ch] gtk/gtkimagemenuitem.[ch] gtk/gtkmenu.[ch]
gtk/gtkmenubar.[ch] gtk/gtkmenuitem.[ch] gtk/gtkmenushell.[ch]
gtk/gtkradiomenuitem.[ch]: Deprecation cleanup
Fri Oct 4 16:48:27 2002 Manish Singh <yosh@gimp.org>
@ -109,9 +114,9 @@ Fri Oct 4 11:43:47 2002 Owen Taylor <otaylor@redhat.com>
Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
* gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
* gtk/gtkhscrollbar.[ch] gtk/gtkhseparator.[ch] gtk/gtkrange.[ch]
gtk/gtkscrollbar.[ch] gtk/gtkseparator.[ch] gtk/gtkseparatormenuitem.h
gtk/gtkvscrollbar.[ch] gtk/gtkvseparator.[ch]: Deprecation cleanup
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
@ -235,7 +240,7 @@ Wed Oct 2 08:47:31 2002 Owen Taylor <otaylor@redhat.com>
Tue Oct 1 12:53:44 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkwindow-decorate.c gtkwindow.[ch]: Deprecation cleanup
* gtk/gtkwindow-decorate.c gtk/gtkwindow.[ch]: Deprecation cleanup
2002-10-01 jacob berkman <jacob@ximian.com>

View File

@ -1,3 +1,8 @@
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
Sat Oct 5 18:30:50 2002 Owen Taylor <otaylor@redhat.com>
* gtk/stock-icons/Makefile.am (pixbuf_csource): Use
@ -25,9 +30,9 @@ Sat Oct 5 16:47:03 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Fri Oct 4 18:40:50 2002 Manish Singh <yosh@gimp.org>
* gtkcheckmenuitem.[ch] gtkimagemenuitem.[ch] gtkmenu.[ch]
gtkmenubar.[ch] gtkmenuitem.[ch] gtkmenushell.[ch]
gtkradiomenuitem.[ch]: Deprecation cleanup
* gtk/gtkcheckmenuitem.[ch] gtk/gtkimagemenuitem.[ch] gtk/gtkmenu.[ch]
gtk/gtkmenubar.[ch] gtk/gtkmenuitem.[ch] gtk/gtkmenushell.[ch]
gtk/gtkradiomenuitem.[ch]: Deprecation cleanup
Fri Oct 4 16:48:27 2002 Manish Singh <yosh@gimp.org>
@ -109,9 +114,9 @@ Fri Oct 4 11:43:47 2002 Owen Taylor <otaylor@redhat.com>
Fri Oct 4 00:57:53 2002 Manish Singh <yosh@gimp.org>
* gtkhscrollbar.[ch] gtkhseparator.[ch] gtkrange.[ch]
gtkscrollbar.[ch] gtkseparator.[ch] gtkseparatormenuitem.h
gtkvscrollbar.[ch] gtkvseparator.[ch]: Deprecation cleanup
* gtk/gtkhscrollbar.[ch] gtk/gtkhseparator.[ch] gtk/gtkrange.[ch]
gtk/gtkscrollbar.[ch] gtk/gtkseparator.[ch] gtk/gtkseparatormenuitem.h
gtk/gtkvscrollbar.[ch] gtk/gtkvseparator.[ch]: Deprecation cleanup
Thu Oct 3 22:38:12 2002 Manish Singh <yosh@gimp.org>
@ -235,7 +240,7 @@ Wed Oct 2 08:47:31 2002 Owen Taylor <otaylor@redhat.com>
Tue Oct 1 12:53:44 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkwindow-decorate.c gtkwindow.[ch]: Deprecation cleanup
* gtk/gtkwindow-decorate.c gtk/gtkwindow.[ch]: Deprecation cleanup
2002-10-01 jacob berkman <jacob@ximian.com>

View File

@ -35,26 +35,29 @@ static void gtk_drawing_area_size_allocate (GtkWidget *widget,
static void gtk_drawing_area_send_configure (GtkDrawingArea *darea);
GtkType
GType
gtk_drawing_area_get_type (void)
{
static GtkType drawing_area_type = 0;
static GType drawing_area_type = 0;
if (!drawing_area_type)
{
static const GtkTypeInfo drawing_area_info =
static const GTypeInfo drawing_area_info =
{
"GtkDrawingArea",
sizeof (GtkDrawingArea),
sizeof (GtkDrawingAreaClass),
(GtkClassInitFunc) gtk_drawing_area_class_init,
(GtkObjectInitFunc) gtk_drawing_area_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gtk_drawing_area_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtkDrawingArea),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_drawing_area_init,
};
drawing_area_type = gtk_type_unique (GTK_TYPE_WIDGET, &drawing_area_info);
drawing_area_type =
g_type_register_static (GTK_TYPE_WIDGET, "GtkDrawingArea",
&drawing_area_info, 0);
}
return drawing_area_type;
@ -79,7 +82,7 @@ gtk_drawing_area_init (GtkDrawingArea *darea)
GtkWidget*
gtk_drawing_area_new (void)
{
return GTK_WIDGET (gtk_type_new (GTK_TYPE_DRAWING_AREA));
return g_object_new (GTK_TYPE_DRAWING_AREA, NULL);
}
void

View File

@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_DRAWING_AREA (gtk_drawing_area_get_type ())
#define GTK_DRAWING_AREA(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_DRAWING_AREA, GtkDrawingArea))
#define GTK_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
#define GTK_IS_DRAWING_AREA(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DRAWING_AREA))
#define GTK_IS_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DRAWING_AREA))
#define GTK_DRAWING_AREA_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
#define GTK_DRAWING_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_DRAWING_AREA, GtkDrawingArea))
#define GTK_DRAWING_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
#define GTK_IS_DRAWING_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DRAWING_AREA))
#define GTK_IS_DRAWING_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DRAWING_AREA))
#define GTK_DRAWING_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
typedef struct _GtkDrawingArea GtkDrawingArea;
@ -67,7 +67,7 @@ struct _GtkDrawingAreaClass
};
GtkType gtk_drawing_area_get_type (void) G_GNUC_CONST;
GType gtk_drawing_area_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_drawing_area_new (void);
#ifndef GTK_DISABLE_DEPRECATED

View File

@ -75,26 +75,28 @@ enum
PROP_STORAGE_TYPE
};
GtkType
GType
gtk_image_get_type (void)
{
static GtkType image_type = 0;
static GType image_type = 0;
if (!image_type)
{
static const GtkTypeInfo image_info =
static const GTypeInfo image_info =
{
"GtkImage",
sizeof (GtkImage),
sizeof (GtkImageClass),
(GtkClassInitFunc) gtk_image_class_init,
(GtkObjectInitFunc) gtk_image_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gtk_image_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtkImage),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_image_init,
};
image_type = gtk_type_unique (GTK_TYPE_MISC, &image_info);
image_type = g_type_register_static (GTK_TYPE_MISC, "GtkImage",
&image_info, 0);
}
return image_type;
@ -271,7 +273,7 @@ gtk_image_set_property (GObject *object,
mask = g_value_get_object (value);
if (mask)
g_object_ref (G_OBJECT (mask));
g_object_ref (mask);
gtk_image_reset (image);
@ -410,7 +412,7 @@ gtk_image_new_from_pixmap (GdkPixmap *pixmap,
{
GtkImage *image;
image = gtk_type_new (GTK_TYPE_IMAGE);
image = g_object_new (GTK_TYPE_IMAGE, NULL);
gtk_image_set_from_pixmap (image, pixmap, mask);
@ -437,7 +439,7 @@ gtk_image_new_from_image (GdkImage *gdk_image,
{
GtkImage *image;
image = gtk_type_new (GTK_TYPE_IMAGE);
image = g_object_new (GTK_TYPE_IMAGE, NULL);
gtk_image_set_from_image (image, gdk_image, mask);
@ -472,7 +474,7 @@ gtk_image_new_from_file (const gchar *filename)
{
GtkImage *image;
image = gtk_type_new (GTK_TYPE_IMAGE);
image = g_object_new (GTK_TYPE_IMAGE, NULL);
gtk_image_set_from_file (image, filename);
@ -499,7 +501,7 @@ gtk_image_new_from_pixbuf (GdkPixbuf *pixbuf)
{
GtkImage *image;
image = gtk_type_new (GTK_TYPE_IMAGE);
image = g_object_new (GTK_TYPE_IMAGE, NULL);
gtk_image_set_from_pixbuf (image, pixbuf);
@ -526,7 +528,7 @@ gtk_image_new_from_stock (const gchar *stock_id,
{
GtkImage *image;
image = gtk_type_new (GTK_TYPE_IMAGE);
image = g_object_new (GTK_TYPE_IMAGE, NULL);
gtk_image_set_from_stock (image, stock_id, size);
@ -559,7 +561,7 @@ gtk_image_new_from_icon_set (GtkIconSet *icon_set,
{
GtkImage *image;
image = gtk_type_new (GTK_TYPE_IMAGE);
image = g_object_new (GTK_TYPE_IMAGE, NULL);
gtk_image_set_from_icon_set (image, icon_set, size);
@ -584,7 +586,7 @@ gtk_image_new_from_animation (GdkPixbufAnimation *animation)
g_return_val_if_fail (GDK_IS_PIXBUF_ANIMATION (animation), NULL);
image = gtk_type_new (GTK_TYPE_IMAGE);
image = g_object_new (GTK_TYPE_IMAGE, NULL);
gtk_image_set_from_animation (image, animation);
@ -614,10 +616,10 @@ gtk_image_set_from_pixmap (GtkImage *image,
g_object_freeze_notify (G_OBJECT (image));
if (pixmap)
g_object_ref (G_OBJECT (pixmap));
g_object_ref (pixmap);
if (mask)
g_object_ref (G_OBJECT (mask));
g_object_ref (mask);
gtk_image_reset (image);
@ -666,10 +668,10 @@ gtk_image_set_from_image (GtkImage *image,
g_object_freeze_notify (G_OBJECT (image));
if (gdk_image)
g_object_ref (G_OBJECT (gdk_image));
g_object_ref (gdk_image);
if (mask)
g_object_ref (G_OBJECT (mask));
g_object_ref (mask);
gtk_image_reset (image);
@ -686,7 +688,7 @@ gtk_image_set_from_image (GtkImage *image,
{
/* Clean up the mask if gdk_image was NULL */
if (mask)
g_object_unref (G_OBJECT (mask));
g_object_unref (mask);
}
g_object_notify (G_OBJECT (image), "image");
@ -747,7 +749,7 @@ gtk_image_set_from_file (GtkImage *image,
gtk_image_set_from_animation (image, anim);
}
g_object_unref (G_OBJECT (anim));
g_object_unref (anim);
g_object_thaw_notify (G_OBJECT (image));
}
@ -771,7 +773,7 @@ gtk_image_set_from_pixbuf (GtkImage *image,
g_object_freeze_notify (G_OBJECT (image));
if (pixbuf)
g_object_ref (G_OBJECT (pixbuf));
g_object_ref (pixbuf);
gtk_image_reset (image);
@ -895,7 +897,7 @@ gtk_image_set_from_animation (GtkImage *image,
g_object_freeze_notify (G_OBJECT (image));
if (animation)
g_object_ref (G_OBJECT (animation));
g_object_ref (animation);
gtk_image_reset (image);
@ -1152,7 +1154,7 @@ gtk_image_reset_anim_iter (GtkImage *image)
if (image->data.anim.iter)
{
g_object_unref (G_OBJECT (image->data.anim.iter));
g_object_unref (image->data.anim.iter);
image->data.anim.iter = NULL;
}
}
@ -1313,7 +1315,7 @@ gtk_image_expose (GtkWidget *widget,
else
{
pixbuf = image->data.pixbuf.pixbuf;
g_object_ref (G_OBJECT (pixbuf));
g_object_ref (pixbuf);
}
break;
@ -1373,7 +1375,7 @@ gtk_image_expose (GtkWidget *widget,
*/
pixbuf = gdk_pixbuf_animation_iter_get_pixbuf (image->data.anim.iter);
g_object_ref (G_OBJECT (pixbuf));
g_object_ref (pixbuf);
}
break;
@ -1418,7 +1420,7 @@ gtk_image_expose (GtkWidget *widget,
gtk_icon_source_free (source);
g_object_unref (G_OBJECT (pixbuf));
g_object_unref (pixbuf);
pixbuf = rendered;
}
@ -1436,7 +1438,7 @@ gtk_image_expose (GtkWidget *widget,
GDK_RGB_DITHER_NORMAL,
0, 0);
g_object_unref (G_OBJECT (pixbuf));
g_object_unref (pixbuf);
pixbuf = NULL;
}
}
@ -1494,7 +1496,7 @@ gtk_image_clear (GtkImage *image)
if (image->mask)
{
g_object_unref (G_OBJECT (image->mask));
g_object_unref (image->mask);
image->mask = NULL;
g_object_notify (G_OBJECT (image), "mask");
}
@ -1510,7 +1512,7 @@ gtk_image_clear (GtkImage *image)
case GTK_IMAGE_PIXMAP:
if (image->data.pixmap.pixmap)
g_object_unref (G_OBJECT (image->data.pixmap.pixmap));
g_object_unref (image->data.pixmap.pixmap);
image->data.pixmap.pixmap = NULL;
g_object_notify (G_OBJECT (image), "pixmap");
@ -1520,7 +1522,7 @@ gtk_image_clear (GtkImage *image)
case GTK_IMAGE_IMAGE:
if (image->data.image.image)
g_object_unref (G_OBJECT (image->data.image.image));
g_object_unref (image->data.image.image);
image->data.image.image = NULL;
g_object_notify (G_OBJECT (image), "image");
@ -1530,7 +1532,7 @@ gtk_image_clear (GtkImage *image)
case GTK_IMAGE_PIXBUF:
if (image->data.pixbuf.pixbuf)
g_object_unref (G_OBJECT (image->data.pixbuf.pixbuf));
g_object_unref (image->data.pixbuf.pixbuf);
g_object_notify (G_OBJECT (image), "pixbuf");
@ -1558,7 +1560,7 @@ gtk_image_clear (GtkImage *image)
g_source_remove (image->data.anim.frame_timeout);
if (image->data.anim.anim)
g_object_unref (G_OBJECT (image->data.anim.anim));
g_object_unref (image->data.anim.anim);
image->data.anim.frame_timeout = 0;
image->data.anim.anim = NULL;
@ -1631,7 +1633,7 @@ gtk_image_size_request (GtkWidget *widget,
GTK_WIDGET (image)->requisition.width = gdk_pixbuf_get_width (pixbuf) + GTK_MISC (image)->xpad * 2;
GTK_WIDGET (image)->requisition.height = gdk_pixbuf_get_height (pixbuf) + GTK_MISC (image)->ypad * 2;
g_object_unref (G_OBJECT (pixbuf));
g_object_unref (pixbuf);
}
/* Chain up to default that simply reads current requisition */

View File

@ -37,11 +37,11 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_IMAGE (gtk_image_get_type ())
#define GTK_IMAGE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_IMAGE, GtkImage))
#define GTK_IMAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMAGE, GtkImageClass))
#define GTK_IS_IMAGE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_IMAGE))
#define GTK_IS_IMAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMAGE))
#define GTK_IMAGE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_IMAGE, GtkImageClass))
#define GTK_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_IMAGE, GtkImage))
#define GTK_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMAGE, GtkImageClass))
#define GTK_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_IMAGE))
#define GTK_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMAGE))
#define GTK_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_IMAGE, GtkImageClass))
typedef struct _GtkImage GtkImage;
@ -131,7 +131,7 @@ struct _GtkImageClass
void (*_gtk_reserved4) (void);
};
GtkType gtk_image_get_type (void) G_GNUC_CONST;
GType gtk_image_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_image_new (void);
GtkWidget* gtk_image_new_from_pixmap (GdkPixmap *pixmap,

View File

@ -28,7 +28,6 @@
#include "gtklabel.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtksignal.h"
#include "gtkwindow.h"
#include "gdk/gdkkeysyms.h"
#include "gtkclipboard.h"
@ -165,10 +164,10 @@ static gint gtk_label_move_backward_word (GtkLabel *label,
static GtkMiscClass *parent_class = NULL;
GtkType
GType
gtk_label_get_type (void)
{
static GtkType label_type = 0;
static GType label_type = 0;
if (!label_type)
{
@ -185,7 +184,8 @@ gtk_label_get_type (void)
(GInstanceInitFunc) gtk_label_init,
};
label_type = g_type_register_static (GTK_TYPE_MISC, "GtkLabel", &label_info, 0);
label_type = g_type_register_static (GTK_TYPE_MISC, "GtkLabel",
&label_info, 0);
}
return label_type;
@ -202,16 +202,16 @@ add_move_binding (GtkBindingSet *binding_set,
gtk_binding_entry_add_signal (binding_set, keyval, modmask,
"move_cursor", 3,
GTK_TYPE_ENUM, step,
G_TYPE_ENUM, step,
G_TYPE_INT, count,
G_TYPE_BOOLEAN, FALSE);
G_TYPE_BOOLEAN, FALSE);
/* Selection-extending version */
gtk_binding_entry_add_signal (binding_set, keyval, modmask | GDK_SHIFT_MASK,
"move_cursor", 3,
GTK_TYPE_ENUM, step,
G_TYPE_ENUM, step,
G_TYPE_INT, count,
G_TYPE_BOOLEAN, TRUE);
G_TYPE_BOOLEAN, TRUE);
}
static void
@ -222,7 +222,7 @@ gtk_label_class_init (GtkLabelClass *class)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
GtkBindingSet *binding_set;
parent_class = gtk_type_class (GTK_TYPE_MISC);
parent_class = g_type_class_peek_parent (class);
gobject_class->set_property = gtk_label_set_property;
gobject_class->get_property = gtk_label_get_property;
@ -251,30 +251,37 @@ gtk_label_class_init (GtkLabelClass *class)
class->copy_clipboard = gtk_label_copy_clipboard;
signals[MOVE_CURSOR] =
gtk_signal_new ("move_cursor",
GTK_RUN_LAST | GTK_RUN_ACTION,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkLabelClass, move_cursor),
_gtk_marshal_VOID__ENUM_INT_BOOLEAN,
GTK_TYPE_NONE, 3, GTK_TYPE_MOVEMENT_STEP, GTK_TYPE_INT, GTK_TYPE_BOOL);
g_signal_new ("move_cursor",
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkLabelClass, move_cursor),
NULL, NULL,
_gtk_marshal_VOID__ENUM_INT_BOOLEAN,
G_TYPE_NONE, 3,
GTK_TYPE_MOVEMENT_STEP,
G_TYPE_INT,
G_TYPE_BOOLEAN);
signals[COPY_CLIPBOARD] =
gtk_signal_new ("copy_clipboard",
GTK_RUN_LAST | GTK_RUN_ACTION,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkLabelClass, copy_clipboard),
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
g_signal_new ("copy_clipboard",
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkLabelClass, copy_clipboard),
NULL, NULL,
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[POPULATE_POPUP] =
gtk_signal_new ("populate_popup",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkLabelClass, populate_popup),
_gtk_marshal_VOID__OBJECT,
GTK_TYPE_NONE, 1, GTK_TYPE_MENU);
g_signal_new ("populate_popup",
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkLabelClass, populate_popup),
NULL, NULL,
_gtk_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
GTK_TYPE_MENU);
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"),
@ -601,7 +608,7 @@ gtk_label_new (const gchar *str)
{
GtkLabel *label;
label = gtk_type_new (GTK_TYPE_LABEL);
label = g_object_new (GTK_TYPE_LABEL, NULL);
if (str && *str)
gtk_label_set_text (label, str);
@ -637,7 +644,7 @@ gtk_label_new_with_mnemonic (const gchar *str)
{
GtkLabel *label;
label = gtk_type_new (GTK_TYPE_LABEL);
label = g_object_new (GTK_TYPE_LABEL, NULL);
if (str && *str)
gtk_label_set_text_with_mnemonic (label, str);
@ -1321,7 +1328,7 @@ gtk_label_finalize (GObject *object)
g_free (label->text);
if (label->layout)
g_object_unref (G_OBJECT (label->layout));
g_object_unref (label->layout);
if (label->attrs)
pango_attr_list_unref (label->attrs);
@ -1339,7 +1346,7 @@ gtk_label_clear_layout (GtkLabel *label)
{
if (label->layout)
{
g_object_unref (G_OBJECT (label->layout));
g_object_unref (label->layout);
label->layout = NULL;
}
}
@ -3110,8 +3117,8 @@ static void
activate_cb (GtkWidget *menuitem,
GtkLabel *label)
{
const gchar *signal = gtk_object_get_data (GTK_OBJECT (menuitem), "gtk-signal");
gtk_signal_emit_by_name (GTK_OBJECT (label), signal);
const gchar *signal = g_object_get_data (G_OBJECT (menuitem), "gtk-signal");
g_signal_emit_by_name (label, signal);
}
static void
@ -3123,9 +3130,9 @@ append_action_signal (GtkLabel *label,
{
GtkWidget *menuitem = gtk_image_menu_item_new_from_stock (stock_id, NULL);
gtk_object_set_data (GTK_OBJECT (menuitem), "gtk-signal", (char *)signal);
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
GTK_SIGNAL_FUNC (activate_cb), label);
g_object_set_data (G_OBJECT (menuitem), "gtk-signal", (char *)signal);
g_signal_connect (menuitem, "activate",
G_CALLBACK (activate_cb), label);
gtk_widget_set_sensitive (menuitem, sensitive);
@ -3208,8 +3215,8 @@ gtk_label_do_popup (GtkLabel *label,
FALSE);
menuitem = gtk_menu_item_new_with_label (_("Select All"));
gtk_signal_connect_object (GTK_OBJECT (menuitem), "activate",
GTK_SIGNAL_FUNC (gtk_label_select_all), label);
g_signal_connect_swapped (menuitem, "activate",
G_CALLBACK (gtk_label_select_all), label);
gtk_widget_show (menuitem);
gtk_menu_shell_append (GTK_MENU_SHELL (label->select_info->popup_menu), menuitem);
@ -3223,9 +3230,10 @@ gtk_label_do_popup (GtkLabel *label,
gtk_widget_set_sensitive (menuitem, FALSE);
gtk_menu_shell_append (GTK_MENU_SHELL (label->select_info->popup_menu), menuitem);
gtk_signal_emit (GTK_OBJECT (label),
signals[POPULATE_POPUP],
label->select_info->popup_menu);
g_signal_emit (label,
signals[POPULATE_POPUP],
0,
label->select_info->popup_menu);
if (event)
gtk_menu_popup (GTK_MENU (label->select_info->popup_menu), NULL, NULL,

View File

@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_LABEL (gtk_label_get_type ())
#define GTK_LABEL(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_LABEL, GtkLabel))
#define GTK_LABEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_LABEL, GtkLabelClass))
#define GTK_IS_LABEL(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_LABEL))
#define GTK_IS_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LABEL))
#define GTK_LABEL_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_LABEL, GtkLabelClass))
#define GTK_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_LABEL, GtkLabel))
#define GTK_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_LABEL, GtkLabelClass))
#define GTK_IS_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_LABEL))
#define GTK_IS_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LABEL))
#define GTK_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_LABEL, GtkLabelClass))
typedef struct _GtkLabel GtkLabel;
@ -96,7 +96,7 @@ struct _GtkLabelClass
void (*_gtk_reserved4) (void);
};
GtkType gtk_label_get_type (void) G_GNUC_CONST;
GType gtk_label_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_label_new (const char *str);
GtkWidget* gtk_label_new_with_mnemonic (const char *str);
void gtk_label_set_text (GtkLabel *label,

View File

@ -37,38 +37,38 @@ enum {
PROP_YPAD
};
static void gtk_misc_class_init (GtkMiscClass *klass);
static void gtk_misc_init (GtkMisc *misc);
static void gtk_misc_realize (GtkWidget *widget);
static void gtk_misc_set_property(GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_misc_get_property(GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static void gtk_misc_class_init (GtkMiscClass *klass);
static void gtk_misc_init (GtkMisc *misc);
static void gtk_misc_realize (GtkWidget *widget);
static void gtk_misc_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_misc_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
GtkType
GType
gtk_misc_get_type (void)
{
static GtkType misc_type = 0;
static GType misc_type = 0;
if (!misc_type)
{
static const GTypeInfo misc_info =
{
sizeof (GtkMiscClass),
NULL, /* base_init */
NULL, /* base_finalize */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gtk_misc_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtkMisc),
0, /* n_preallocs */
0, /* n_preallocs */
(GInstanceInitFunc) gtk_misc_init,
NULL, /* value_table */
NULL, /* value_table */
};
misc_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkMisc",
@ -82,11 +82,9 @@ static void
gtk_misc_class_init (GtkMiscClass *class)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
gobject_class = G_OBJECT_CLASS (class);
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
gobject_class->set_property = gtk_misc_set_property;
@ -233,7 +231,7 @@ gtk_misc_set_alignment (GtkMisc *misc,
GtkWidget *widget;
widget = GTK_WIDGET (misc);
gtk_widget_queue_clear (widget);
gtk_widget_queue_draw (widget);
}
g_object_freeze_notify (G_OBJECT (misc));
@ -343,7 +341,7 @@ gtk_misc_realize (GtkWidget *widget)
if (GTK_WIDGET_NO_WINDOW (widget))
{
widget->window = gtk_widget_get_parent_window (widget);
gdk_window_ref (widget->window);
g_object_ref (widget->window);
widget->style = gtk_style_attach (widget->style, widget->window);
}
else

View File

@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_MISC (gtk_misc_get_type ())
#define GTK_MISC(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_MISC, GtkMisc))
#define GTK_MISC_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_MISC, GtkMiscClass))
#define GTK_IS_MISC(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_MISC))
#define GTK_IS_MISC_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MISC))
#define GTK_MISC_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_MISC, GtkMiscClass))
#define GTK_MISC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MISC, GtkMisc))
#define GTK_MISC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_MISC, GtkMiscClass))
#define GTK_IS_MISC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MISC))
#define GTK_IS_MISC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MISC))
#define GTK_MISC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MISC, GtkMiscClass))
typedef struct _GtkMisc GtkMisc;
@ -65,7 +65,7 @@ struct _GtkMiscClass
};
GtkType gtk_misc_get_type (void) G_GNUC_CONST;
GType gtk_misc_get_type (void) G_GNUC_CONST;
void gtk_misc_set_alignment (GtkMisc *misc,
gfloat xalign,
gfloat yalign);

View File

@ -25,7 +25,6 @@
*/
#include "gtknotebook.h"
#include "gtksignal.h"
#include "gtkmain.h"
#include "gtkmenu.h"
#include "gtkmenuitem.h"
@ -180,7 +179,7 @@ static void gtk_notebook_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_notebook_set_focus_child (GtkContainer *container,
GtkWidget *child);
static GtkType gtk_notebook_child_type (GtkContainer *container);
static GType gtk_notebook_child_type (GtkContainer *container);
static void gtk_notebook_forall (GtkContainer *container,
gboolean include_internals,
GtkCallback callback,
@ -258,26 +257,28 @@ static gboolean focus_child_in (GtkNotebook *notebook,
static GtkContainerClass *parent_class = NULL;
static guint notebook_signals[LAST_SIGNAL] = { 0 };
GtkType
GType
gtk_notebook_get_type (void)
{
static GtkType notebook_type = 0;
static GType notebook_type = 0;
if (!notebook_type)
{
static const GtkTypeInfo notebook_info =
static const GTypeInfo notebook_info =
{
"GtkNotebook",
sizeof (GtkNotebook),
sizeof (GtkNotebookClass),
(GtkClassInitFunc) gtk_notebook_class_init,
(GtkObjectInitFunc) gtk_notebook_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gtk_notebook_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtkNotebook),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_notebook_init,
};
notebook_type = gtk_type_unique (gtk_container_get_type (), &notebook_info);
notebook_type = g_type_register_static (GTK_TYPE_CONTAINER, "GtkNotebook",
&notebook_info, 0);
}
return notebook_type;
@ -480,17 +481,18 @@ gtk_notebook_class_init (GtkNotebookClass *class)
G_PARAM_READWRITE));
notebook_signals[SWITCH_PAGE] =
gtk_signal_new ("switch_page",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkNotebookClass, switch_page),
_gtk_marshal_VOID__POINTER_UINT,
GTK_TYPE_NONE, 2,
GTK_TYPE_POINTER,
GTK_TYPE_UINT);
g_signal_new ("switch_page",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkNotebookClass, switch_page),
NULL, NULL,
_gtk_marshal_VOID__POINTER_UINT,
G_TYPE_NONE, 2,
G_TYPE_POINTER,
G_TYPE_UINT);
notebook_signals[FOCUS_TAB] =
g_signal_new ("focus_tab",
G_TYPE_FROM_CLASS (object_class),
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkNotebookClass, focus_tab),
NULL, NULL,
@ -499,7 +501,7 @@ gtk_notebook_class_init (GtkNotebookClass *class)
GTK_TYPE_NOTEBOOK_TAB);
notebook_signals[SELECT_PAGE] =
g_signal_new ("select_page",
G_TYPE_FROM_CLASS (object_class),
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkNotebookClass, select_page),
NULL, NULL,
@ -508,7 +510,7 @@ gtk_notebook_class_init (GtkNotebookClass *class)
G_TYPE_BOOLEAN);
notebook_signals[CHANGE_CURRENT_PAGE] =
g_signal_new ("change_current_page",
G_TYPE_FROM_CLASS (object_class),
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkNotebookClass, change_current_page),
NULL, NULL,
@ -517,7 +519,7 @@ gtk_notebook_class_init (GtkNotebookClass *class)
G_TYPE_INT);
notebook_signals[MOVE_FOCUS_OUT] =
g_signal_new ("move_focus_out",
G_TYPE_FROM_CLASS (object_class),
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkNotebookClass, move_focus_out),
NULL, NULL,
@ -526,7 +528,7 @@ gtk_notebook_class_init (GtkNotebookClass *class)
GTK_TYPE_DIRECTION_TYPE);
binding_set = gtk_binding_set_by_class (object_class);
binding_set = gtk_binding_set_by_class (class);
gtk_binding_entry_add_signal (binding_set,
GDK_space, 0,
"select_page", 1,
@ -708,7 +710,7 @@ gtk_notebook_move_focus_out (GtkNotebook *notebook,
g_object_ref (notebook);
notebook->focus_out = TRUE;
g_signal_emit_by_name (G_OBJECT (toplevel), "move_focus", direction_type);
g_signal_emit_by_name (toplevel, "move_focus", direction_type);
notebook->focus_out = FALSE;
g_object_unref (notebook);
@ -725,7 +727,7 @@ gtk_notebook_move_focus_out (GtkNotebook *notebook,
GtkWidget*
gtk_notebook_new (void)
{
return GTK_WIDGET (gtk_type_new (gtk_notebook_get_type ()));
return g_object_new (GTK_TYPE_NOTEBOOK, NULL);
}
/* Private GtkObject Methods :
@ -985,7 +987,7 @@ gtk_notebook_realize (GtkWidget *widget)
gtk_notebook_get_event_window_position (notebook, &event_window_pos);
widget->window = gtk_widget_get_parent_window (widget);
gdk_window_ref (widget->window);
g_object_ref (widget->window);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = event_window_pos.x;
@ -2193,7 +2195,7 @@ gtk_notebook_forall (GtkContainer *container,
}
}
static GtkType
static GType
gtk_notebook_child_type (GtkContainer *container)
{
return GTK_TYPE_WIDGET;
@ -2376,8 +2378,8 @@ gtk_notebook_remove_tab_label (GtkNotebook *notebook,
if (page->tab_label)
{
if (page->mnemonic_activate_signal)
gtk_signal_disconnect (page->tab_label,
page->mnemonic_activate_signal);
g_signal_handler_disconnect (page->tab_label,
page->mnemonic_activate_signal);
page->mnemonic_activate_signal = 0;
gtk_widget_unparent (page->tab_label);
@ -2424,7 +2426,7 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
gtk_widget_queue_resize (notebook->menu);
}
if (!page->default_menu)
gtk_widget_unref (page->menu_label);
g_object_unref (page->menu_label);
notebook->children = g_list_remove_link (notebook->children, list);
g_list_free (list);
@ -3363,7 +3365,7 @@ gtk_notebook_page_allocate (GtkNotebook *notebook,
break;
}
gtk_widget_queue_clear_area (widget, x, y, width, height);
gtk_widget_queue_draw_area (widget, x, y, width, height);
}
page->allocation = *allocation;
@ -3600,10 +3602,11 @@ gtk_notebook_switch_page (GtkNotebook *notebook,
if (page_num < 0)
page_num = g_list_index (notebook->children, page);
gtk_signal_emit (GTK_OBJECT (notebook),
notebook_signals[SWITCH_PAGE],
page,
page_num);
g_signal_emit (notebook,
notebook_signals[SWITCH_PAGE],
0,
page,
page_num);
}
static gint
@ -3702,10 +3705,11 @@ gtk_notebook_menu_switch_page (GtkWidget *widget,
page_num++;
}
gtk_signal_emit (GTK_OBJECT (notebook),
notebook_signals[SWITCH_PAGE],
page,
page_num);
g_signal_emit (notebook,
notebook_signals[SWITCH_PAGE],
0,
page,
page_num);
}
/* Private GtkNotebook Menu Functions:
@ -3736,8 +3740,8 @@ gtk_notebook_menu_item_create (GtkNotebook *notebook,
gtk_container_add (GTK_CONTAINER (menu_item), page->menu_label);
gtk_menu_shell_insert (GTK_MENU_SHELL (notebook->menu), menu_item,
gtk_notebook_real_page_position (notebook, list));
gtk_signal_connect (GTK_OBJECT (menu_item), "activate",
GTK_SIGNAL_FUNC (gtk_notebook_menu_switch_page), page);
g_signal_connect (menu_item, "activate",
G_CALLBACK (gtk_notebook_menu_switch_page), page);
if (GTK_WIDGET_VISIBLE (page->child))
gtk_widget_show (menu_item);
}
@ -4000,7 +4004,7 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
page->default_menu = TRUE;
else
{
gtk_widget_ref (page->menu_label);
g_object_ref (page->menu_label);
gtk_object_sink (GTK_OBJECT (page->menu_label));
}
@ -4038,10 +4042,10 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
if (tab_label)
page->mnemonic_activate_signal =
gtk_signal_connect (GTK_OBJECT (tab_label),
"mnemonic_activate",
(GtkSignalFunc) gtk_notebook_mnemonic_activate_switch_page,
notebook);
g_signal_connect (tab_label,
"mnemonic_activate",
G_CALLBACK (gtk_notebook_mnemonic_activate_switch_page),
notebook);
if (notebook->show_tabs && GTK_WIDGET_MAPPED (notebook))
gdk_window_show_unraised (notebook->event_window);
@ -4747,10 +4751,10 @@ gtk_notebook_set_tab_label (GtkNotebook *notebook,
if (page->tab_label)
page->mnemonic_activate_signal =
gtk_signal_connect (GTK_OBJECT (page->tab_label),
"mnemonic_activate",
(GtkSignalFunc) gtk_notebook_mnemonic_activate_switch_page,
notebook);
g_signal_connect (page->tab_label,
"mnemonic_activate",
G_CALLBACK (gtk_notebook_mnemonic_activate_switch_page),
notebook);
if (notebook->show_tabs && GTK_WIDGET_VISIBLE (child))
{
@ -4875,13 +4879,13 @@ gtk_notebook_set_menu_label (GtkNotebook *notebook,
page->menu_label->parent);
if (!page->default_menu)
gtk_widget_unref (page->menu_label);
g_object_unref (page->menu_label);
}
if (menu_label)
{
page->menu_label = menu_label;
gtk_widget_ref (page->menu_label);
g_object_ref (page->menu_label);
gtk_object_sink (GTK_OBJECT(page->menu_label));
page->default_menu = FALSE;
}

View File

@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_NOTEBOOK (gtk_notebook_get_type ())
#define GTK_NOTEBOOK(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_NOTEBOOK, GtkNotebook))
#define GTK_NOTEBOOK_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_NOTEBOOK, GtkNotebookClass))
#define GTK_IS_NOTEBOOK(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_NOTEBOOK))
#define GTK_IS_NOTEBOOK_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_NOTEBOOK))
#define GTK_NOTEBOOK_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_NOTEBOOK, GtkNotebookClass))
#define GTK_NOTEBOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_NOTEBOOK, GtkNotebook))
#define GTK_NOTEBOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_NOTEBOOK, GtkNotebookClass))
#define GTK_IS_NOTEBOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_NOTEBOOK))
#define GTK_IS_NOTEBOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_NOTEBOOK))
#define GTK_NOTEBOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_NOTEBOOK, GtkNotebookClass))
typedef enum
@ -115,7 +115,7 @@ struct _GtkNotebookClass
* Creation, insertion, deletion *
***********************************************************/
GtkType gtk_notebook_get_type (void) G_GNUC_CONST;
GType gtk_notebook_get_type (void) G_GNUC_CONST;
GtkWidget * gtk_notebook_new (void);
void gtk_notebook_append_page (GtkNotebook *notebook,
GtkWidget *child,