mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 12:41:16 +00:00
deprecation cleanup
Sun Oct 6 18:32:11 2002 Manish Singh <yosh@gimp.org> * gtk/gtkcelleditable.c gtk/gtkcellrenderer.[ch] gtk/gtkcellrendererpixbuf.[ch] gtk/gtkcellrenderertext.[ch] gtk/gtkcellrenderertoggle.[ch]: deprecation cleanup
This commit is contained in:
parent
8b6a832f26
commit
28def5e4ad
@ -1,3 +1,9 @@
|
||||
Sun Oct 6 18:32:11 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkcelleditable.c gtk/gtkcellrenderer.[ch]
|
||||
gtk/gtkcellrendererpixbuf.[ch] gtk/gtkcellrenderertext.[ch]
|
||||
gtk/gtkcellrenderertoggle.[ch]: deprecation cleanup
|
||||
|
||||
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Oct 6 18:32:11 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkcelleditable.c gtk/gtkcellrenderer.[ch]
|
||||
gtk/gtkcellrendererpixbuf.[ch] gtk/gtkcellrenderertext.[ch]
|
||||
gtk/gtkcellrenderertoggle.[ch]: deprecation cleanup
|
||||
|
||||
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Oct 6 18:32:11 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkcelleditable.c gtk/gtkcellrenderer.[ch]
|
||||
gtk/gtkcellrendererpixbuf.[ch] gtk/gtkcellrenderertext.[ch]
|
||||
gtk/gtkcellrenderertoggle.[ch]: deprecation cleanup
|
||||
|
||||
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Oct 6 18:32:11 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkcelleditable.c gtk/gtkcellrenderer.[ch]
|
||||
gtk/gtkcellrendererpixbuf.[ch] gtk/gtkcellrenderertext.[ch]
|
||||
gtk/gtkcellrenderertoggle.[ch]: deprecation cleanup
|
||||
|
||||
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Oct 6 18:32:11 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkcelleditable.c gtk/gtkcellrenderer.[ch]
|
||||
gtk/gtkcellrendererpixbuf.[ch] gtk/gtkcellrenderertext.[ch]
|
||||
gtk/gtkcellrenderertoggle.[ch]: deprecation cleanup
|
||||
|
||||
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
|
||||
|
@ -1,3 +1,9 @@
|
||||
Sun Oct 6 18:32:11 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkcelleditable.c gtk/gtkcellrenderer.[ch]
|
||||
gtk/gtkcellrendererpixbuf.[ch] gtk/gtkcellrenderertext.[ch]
|
||||
gtk/gtkcellrenderertoggle.[ch]: deprecation cleanup
|
||||
|
||||
Sat Oct 5 16:11:22 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
|
||||
|
@ -20,14 +20,13 @@
|
||||
|
||||
#include "gtkcelleditable.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtksignal.h"
|
||||
|
||||
static void gtk_cell_editable_base_init (gpointer g_class);
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_cell_editable_get_type (void)
|
||||
{
|
||||
static GtkType cell_editable_type = 0;
|
||||
static GType cell_editable_type = 0;
|
||||
|
||||
if (! cell_editable_type)
|
||||
{
|
||||
@ -43,7 +42,11 @@ gtk_cell_editable_get_type (void)
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
cell_editable_type = g_type_register_static (G_TYPE_INTERFACE, "GtkCellEditable", &cell_editable_info, 0);
|
||||
|
||||
cell_editable_type =
|
||||
g_type_register_static (G_TYPE_INTERFACE, "GtkCellEditable",
|
||||
&cell_editable_info, 0);
|
||||
|
||||
g_type_interface_add_prerequisite (cell_editable_type, GTK_TYPE_WIDGET);
|
||||
}
|
||||
|
||||
|
@ -59,10 +59,10 @@ struct _GtkCellRendererInfo
|
||||
GdkColor cell_background;
|
||||
};
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_cell_renderer_get_type (void)
|
||||
{
|
||||
static GtkType cell_type = 0;
|
||||
static GType cell_type = 0;
|
||||
|
||||
if (!cell_type)
|
||||
{
|
||||
@ -75,9 +75,9 @@ gtk_cell_renderer_get_type (void)
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkCellRenderer),
|
||||
0, /* n_preallocs */
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_cell_renderer_init,
|
||||
NULL, /* value_table */
|
||||
NULL, /* value_table */
|
||||
};
|
||||
|
||||
cell_type = g_type_register_static (GTK_TYPE_OBJECT, "GtkCellRenderer",
|
||||
@ -444,7 +444,13 @@ gtk_cell_renderer_get_size (GtkCellRenderer *cell,
|
||||
*height = cell->height;
|
||||
}
|
||||
|
||||
GTK_CELL_RENDERER_GET_CLASS (cell)->get_size (cell, widget, cell_area, x_offset, y_offset, real_width, real_height);
|
||||
GTK_CELL_RENDERER_GET_CLASS (cell)->get_size (cell,
|
||||
widget,
|
||||
cell_area,
|
||||
x_offset,
|
||||
y_offset,
|
||||
real_width,
|
||||
real_height);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -497,7 +503,7 @@ gtk_cell_renderer_render (GtkCellRenderer *cell,
|
||||
gdk_draw_rectangle (window, gc, TRUE,
|
||||
background_area->x, background_area->y,
|
||||
background_area->width, background_area->height);
|
||||
g_object_unref (G_OBJECT (gc));
|
||||
g_object_unref (gc);
|
||||
}
|
||||
|
||||
GTK_CELL_RENDERER_GET_CLASS (cell)->render (cell,
|
||||
|
@ -43,11 +43,11 @@ typedef enum
|
||||
} GtkCellRendererMode;
|
||||
|
||||
#define GTK_TYPE_CELL_RENDERER (gtk_cell_renderer_get_type ())
|
||||
#define GTK_CELL_RENDERER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CELL_RENDERER, GtkCellRenderer))
|
||||
#define GTK_CELL_RENDERER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER, GtkCellRendererClass))
|
||||
#define GTK_IS_CELL_RENDERER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CELL_RENDERER))
|
||||
#define GTK_IS_CELL_RENDERER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER))
|
||||
#define GTK_CELL_RENDERER_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER, GtkCellRendererClass))
|
||||
#define GTK_CELL_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_RENDERER, GtkCellRenderer))
|
||||
#define GTK_CELL_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER, GtkCellRendererClass))
|
||||
#define GTK_IS_CELL_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_RENDERER))
|
||||
#define GTK_IS_CELL_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER))
|
||||
#define GTK_CELL_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER, GtkCellRendererClass))
|
||||
|
||||
typedef struct _GtkCellRenderer GtkCellRenderer;
|
||||
typedef struct _GtkCellRendererClass GtkCellRendererClass;
|
||||
|
@ -72,110 +72,111 @@ struct _GtkCellRendererPixbufInfo
|
||||
gchar *stock_detail;
|
||||
};
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_cell_renderer_pixbuf_get_type (void)
|
||||
{
|
||||
static GtkType cell_pixbuf_type = 0;
|
||||
static GType cell_pixbuf_type = 0;
|
||||
|
||||
if (!cell_pixbuf_type)
|
||||
{
|
||||
static const GTypeInfo cell_pixbuf_info =
|
||||
{
|
||||
sizeof (GtkCellRendererPixbufClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gtk_cell_renderer_pixbuf_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkCellRendererPixbuf),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_cell_renderer_pixbuf_init,
|
||||
};
|
||||
if (!cell_pixbuf_type)
|
||||
{
|
||||
static const GTypeInfo cell_pixbuf_info =
|
||||
{
|
||||
sizeof (GtkCellRendererPixbufClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gtk_cell_renderer_pixbuf_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkCellRendererPixbuf),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_cell_renderer_pixbuf_init,
|
||||
};
|
||||
|
||||
cell_pixbuf_type = g_type_register_static (GTK_TYPE_CELL_RENDERER, "GtkCellRendererPixbuf", &cell_pixbuf_info, 0);
|
||||
}
|
||||
cell_pixbuf_type =
|
||||
g_type_register_static (GTK_TYPE_CELL_RENDERER, "GtkCellRendererPixbuf",
|
||||
&cell_pixbuf_info, 0);
|
||||
}
|
||||
|
||||
return cell_pixbuf_type;
|
||||
return cell_pixbuf_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_cell_renderer_pixbuf_init (GtkCellRendererPixbuf *cellpixbuf)
|
||||
{
|
||||
GtkCellRendererPixbufInfo *cellinfo;
|
||||
GtkCellRendererPixbufInfo *cellinfo;
|
||||
|
||||
cellinfo = g_new0 (GtkCellRendererPixbufInfo, 1);
|
||||
cellinfo->stock_size = GTK_ICON_SIZE_MENU;
|
||||
g_object_set_data (G_OBJECT (cellpixbuf), CELLINFO_KEY, cellinfo);
|
||||
cellinfo = g_new0 (GtkCellRendererPixbufInfo, 1);
|
||||
cellinfo->stock_size = GTK_ICON_SIZE_MENU;
|
||||
g_object_set_data (G_OBJECT (cellpixbuf), CELLINFO_KEY, cellinfo);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_cell_renderer_pixbuf_class_init (GtkCellRendererPixbufClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (class);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (class);
|
||||
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
object_class->finalize = gtk_cell_renderer_pixbuf_finalize;
|
||||
object_class->finalize = gtk_cell_renderer_pixbuf_finalize;
|
||||
|
||||
object_class->get_property = gtk_cell_renderer_pixbuf_get_property;
|
||||
object_class->set_property = gtk_cell_renderer_pixbuf_set_property;
|
||||
object_class->get_property = gtk_cell_renderer_pixbuf_get_property;
|
||||
object_class->set_property = gtk_cell_renderer_pixbuf_set_property;
|
||||
|
||||
cell_class->get_size = gtk_cell_renderer_pixbuf_get_size;
|
||||
cell_class->render = gtk_cell_renderer_pixbuf_render;
|
||||
cell_class->get_size = gtk_cell_renderer_pixbuf_get_size;
|
||||
cell_class->render = gtk_cell_renderer_pixbuf_render;
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PIXBUF,
|
||||
g_param_spec_object ("pixbuf",
|
||||
_("Pixbuf Object"),
|
||||
_("The pixbuf to render"),
|
||||
GDK_TYPE_PIXBUF,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_WRITABLE));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PIXBUF,
|
||||
g_param_spec_object ("pixbuf",
|
||||
_("Pixbuf Object"),
|
||||
_("The pixbuf to render"),
|
||||
GDK_TYPE_PIXBUF,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_WRITABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PIXBUF_EXPANDER_OPEN,
|
||||
g_param_spec_object ("pixbuf_expander_open",
|
||||
_("Pixbuf Expander Open"),
|
||||
_("Pixbuf for open expander"),
|
||||
GDK_TYPE_PIXBUF,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_WRITABLE));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PIXBUF_EXPANDER_OPEN,
|
||||
g_param_spec_object ("pixbuf_expander_open",
|
||||
_("Pixbuf Expander Open"),
|
||||
_("Pixbuf for open expander"),
|
||||
GDK_TYPE_PIXBUF,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_WRITABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PIXBUF_EXPANDER_CLOSED,
|
||||
g_param_spec_object ("pixbuf_expander_closed",
|
||||
_("Pixbuf Expander Closed"),
|
||||
_("Pixbuf for closed expander"),
|
||||
GDK_TYPE_PIXBUF,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_WRITABLE));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PIXBUF_EXPANDER_CLOSED,
|
||||
g_param_spec_object ("pixbuf_expander_closed",
|
||||
_("Pixbuf Expander Closed"),
|
||||
_("Pixbuf for closed expander"),
|
||||
GDK_TYPE_PIXBUF,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_WRITABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_STOCK_ID,
|
||||
g_param_spec_string ("stock_id",
|
||||
_("Stock ID"),
|
||||
_("The stock ID of the stock icon to render"),
|
||||
NULL,
|
||||
G_PARAM_READWRITE));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_STOCK_ID,
|
||||
g_param_spec_string ("stock_id",
|
||||
_("Stock ID"),
|
||||
_("The stock ID of the stock icon to render"),
|
||||
NULL,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_STOCK_SIZE,
|
||||
g_param_spec_enum ("stock_size",
|
||||
_("Size"),
|
||||
_("The size of the rendered icon"),
|
||||
GTK_TYPE_ICON_SIZE,
|
||||
GTK_ICON_SIZE_MENU,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_STOCK_DETAIL,
|
||||
g_param_spec_string ("stock_detail",
|
||||
_("Detail"),
|
||||
_("Render detail to pass to the theme engine"),
|
||||
NULL,
|
||||
G_PARAM_READWRITE));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_STOCK_SIZE,
|
||||
g_param_spec_enum ("stock_size",
|
||||
_("Size"),
|
||||
_("The size of the rendered icon"),
|
||||
GTK_TYPE_ICON_SIZE,
|
||||
GTK_ICON_SIZE_MENU,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_STOCK_DETAIL,
|
||||
g_param_spec_string ("stock_detail",
|
||||
_("Detail"),
|
||||
_("Render detail to pass to the theme engine"),
|
||||
NULL,
|
||||
G_PARAM_READWRITE));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -253,25 +254,25 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
|
||||
case PROP_PIXBUF:
|
||||
pixbuf = (GdkPixbuf*) g_value_get_object (value);
|
||||
if (pixbuf)
|
||||
g_object_ref (G_OBJECT (pixbuf));
|
||||
g_object_ref (pixbuf);
|
||||
if (cellpixbuf->pixbuf)
|
||||
g_object_unref (G_OBJECT (cellpixbuf->pixbuf));
|
||||
g_object_unref (cellpixbuf->pixbuf);
|
||||
cellpixbuf->pixbuf = pixbuf;
|
||||
break;
|
||||
case PROP_PIXBUF_EXPANDER_OPEN:
|
||||
pixbuf = (GdkPixbuf*) g_value_get_object (value);
|
||||
if (pixbuf)
|
||||
g_object_ref (G_OBJECT (pixbuf));
|
||||
g_object_ref (pixbuf);
|
||||
if (cellpixbuf->pixbuf_expander_open)
|
||||
g_object_unref (G_OBJECT (cellpixbuf->pixbuf_expander_open));
|
||||
g_object_unref (cellpixbuf->pixbuf_expander_open);
|
||||
cellpixbuf->pixbuf_expander_open = pixbuf;
|
||||
break;
|
||||
case PROP_PIXBUF_EXPANDER_CLOSED:
|
||||
pixbuf = (GdkPixbuf*) g_value_get_object (value);
|
||||
if (pixbuf)
|
||||
g_object_ref (G_OBJECT (pixbuf));
|
||||
g_object_ref (pixbuf);
|
||||
if (cellpixbuf->pixbuf_expander_closed)
|
||||
g_object_unref (G_OBJECT (cellpixbuf->pixbuf_expander_closed));
|
||||
g_object_unref (cellpixbuf->pixbuf_expander_closed);
|
||||
cellpixbuf->pixbuf_expander_closed = pixbuf;
|
||||
break;
|
||||
case PROP_STOCK_ID:
|
||||
@ -318,7 +319,7 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
|
||||
GtkCellRenderer *
|
||||
gtk_cell_renderer_pixbuf_new (void)
|
||||
{
|
||||
return GTK_CELL_RENDERER (gtk_type_new (gtk_cell_renderer_pixbuf_get_type ()));
|
||||
return g_object_new (GTK_TYPE_CELL_RENDERER_PIXBUF, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -328,7 +329,7 @@ gtk_cell_renderer_pixbuf_create_stock_pixbuf (GtkCellRendererPixbuf *cellpixbuf,
|
||||
GtkCellRendererPixbufInfo *cellinfo = g_object_get_data (G_OBJECT (cellpixbuf), CELLINFO_KEY);
|
||||
|
||||
if (cellpixbuf->pixbuf)
|
||||
g_object_unref (G_OBJECT (cellpixbuf->pixbuf));
|
||||
g_object_unref (cellpixbuf->pixbuf);
|
||||
|
||||
cellpixbuf->pixbuf = gtk_widget_render_icon (widget,
|
||||
cellinfo->stock_id,
|
||||
|
@ -28,11 +28,11 @@ extern "C" {
|
||||
|
||||
|
||||
#define GTK_TYPE_CELL_RENDERER_PIXBUF (gtk_cell_renderer_pixbuf_get_type ())
|
||||
#define GTK_CELL_RENDERER_PIXBUF(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CELL_RENDERER_PIXBUF, GtkCellRendererPixbuf))
|
||||
#define GTK_CELL_RENDERER_PIXBUF_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_PIXBUF, GtkCellRendererPixbufClass))
|
||||
#define GTK_IS_CELL_RENDERER_PIXBUF(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CELL_RENDERER_PIXBUF))
|
||||
#define GTK_IS_CELL_RENDERER_PIXBUF_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER_PIXBUF))
|
||||
#define GTK_CELL_RENDERER_PIXBUF_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_PIXBUF, GtkCellRendererPixbufClass))
|
||||
#define GTK_CELL_RENDERER_PIXBUF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_RENDERER_PIXBUF, GtkCellRendererPixbuf))
|
||||
#define GTK_CELL_RENDERER_PIXBUF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_PIXBUF, GtkCellRendererPixbufClass))
|
||||
#define GTK_IS_CELL_RENDERER_PIXBUF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_RENDERER_PIXBUF))
|
||||
#define GTK_IS_CELL_RENDERER_PIXBUF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER_PIXBUF))
|
||||
#define GTK_CELL_RENDERER_PIXBUF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_PIXBUF, GtkCellRendererPixbufClass))
|
||||
|
||||
typedef struct _GtkCellRendererPixbuf GtkCellRendererPixbuf;
|
||||
typedef struct _GtkCellRendererPixbufClass GtkCellRendererPixbufClass;
|
||||
@ -58,7 +58,7 @@ struct _GtkCellRendererPixbufClass
|
||||
void (*_gtk_reserved4) (void);
|
||||
};
|
||||
|
||||
GtkType gtk_cell_renderer_pixbuf_get_type (void);
|
||||
GType gtk_cell_renderer_pixbuf_get_type (void);
|
||||
GtkCellRenderer *gtk_cell_renderer_pixbuf_new (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include "gtkeditable.h"
|
||||
#include "gtkentry.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtksignal.h"
|
||||
#include "gtkintl.h"
|
||||
|
||||
static void gtk_cell_renderer_text_init (GtkCellRendererText *celltext);
|
||||
@ -113,10 +112,10 @@ static guint text_cell_renderer_signals [LAST_SIGNAL];
|
||||
|
||||
#define GTK_CELL_RENDERER_TEXT_PATH "gtk-cell-renderer-text-path"
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_cell_renderer_text_get_type (void)
|
||||
{
|
||||
static GtkType cell_text_type = 0;
|
||||
static GType cell_text_type = 0;
|
||||
|
||||
if (!cell_text_type)
|
||||
{
|
||||
@ -133,7 +132,9 @@ gtk_cell_renderer_text_get_type (void)
|
||||
(GInstanceInitFunc) gtk_cell_renderer_text_init,
|
||||
};
|
||||
|
||||
cell_text_type = g_type_register_static (GTK_TYPE_CELL_RENDERER, "GtkCellRendererText", &cell_text_info, 0);
|
||||
cell_text_type =
|
||||
g_type_register_static (GTK_TYPE_CELL_RENDERER, "GtkCellRendererText",
|
||||
&cell_text_info, 0);
|
||||
}
|
||||
|
||||
return cell_text_type;
|
||||
@ -409,14 +410,15 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
_("Whether this tag affects underlining"));
|
||||
|
||||
text_cell_renderer_signals [EDITED] =
|
||||
gtk_signal_new ("edited",
|
||||
GTK_RUN_LAST,
|
||||
GTK_CLASS_TYPE (object_class),
|
||||
GTK_SIGNAL_OFFSET (GtkCellRendererTextClass, edited),
|
||||
_gtk_marshal_VOID__STRING_STRING,
|
||||
GTK_TYPE_NONE, 2,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_STRING);
|
||||
g_signal_new ("edited",
|
||||
G_OBJECT_CLASS_TYPE (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkCellRendererTextClass, edited),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__STRING_STRING,
|
||||
G_TYPE_NONE, 2,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_STRING);
|
||||
|
||||
}
|
||||
|
||||
@ -1077,7 +1079,7 @@ gtk_cell_renderer_text_set_property (GObject *object,
|
||||
GtkCellRenderer *
|
||||
gtk_cell_renderer_text_new (void)
|
||||
{
|
||||
return GTK_CELL_RENDERER (g_object_new (gtk_cell_renderer_text_get_type (), NULL));
|
||||
return g_object_new (GTK_TYPE_CELL_RENDERER_TEXT, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1244,7 +1246,7 @@ gtk_cell_renderer_text_get_size (GtkCellRenderer *cell,
|
||||
}
|
||||
}
|
||||
|
||||
g_object_unref (G_OBJECT (layout));
|
||||
g_object_unref (layout);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1303,7 +1305,7 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell,
|
||||
background_area->width,
|
||||
background_area->height);
|
||||
|
||||
g_object_unref (G_OBJECT (gc));
|
||||
g_object_unref (gc);
|
||||
}
|
||||
|
||||
gtk_paint_layout (widget->style,
|
||||
@ -1317,7 +1319,7 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell,
|
||||
cell_area->y + y_offset + cell->ypad,
|
||||
layout);
|
||||
|
||||
g_object_unref (G_OBJECT (layout));
|
||||
g_object_unref (layout);
|
||||
}
|
||||
static void
|
||||
gtk_cell_renderer_text_editing_done (GtkCellEditable *entry,
|
||||
@ -1332,7 +1334,7 @@ gtk_cell_renderer_text_editing_done (GtkCellEditable *entry,
|
||||
path = g_object_get_data (G_OBJECT (entry), GTK_CELL_RENDERER_TEXT_PATH);
|
||||
new_text = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||
|
||||
gtk_signal_emit (GTK_OBJECT (data), text_cell_renderer_signals[EDITED], path, new_text);
|
||||
g_signal_emit (data, text_cell_renderer_signals[EDITED], 0, path, new_text);
|
||||
}
|
||||
|
||||
static GtkCellEditable *
|
||||
@ -1363,10 +1365,10 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell,
|
||||
gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
|
||||
|
||||
gtk_widget_show (entry);
|
||||
gtk_signal_connect (GTK_OBJECT (entry),
|
||||
"editing_done",
|
||||
G_CALLBACK (gtk_cell_renderer_text_editing_done),
|
||||
celltext);
|
||||
g_signal_connect (entry,
|
||||
"editing_done",
|
||||
G_CALLBACK (gtk_cell_renderer_text_editing_done),
|
||||
celltext);
|
||||
return GTK_CELL_EDITABLE (entry);
|
||||
|
||||
}
|
||||
|
@ -29,11 +29,11 @@ extern "C" {
|
||||
|
||||
|
||||
#define GTK_TYPE_CELL_RENDERER_TEXT (gtk_cell_renderer_text_get_type ())
|
||||
#define GTK_CELL_RENDERER_TEXT(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CELL_RENDERER_TEXT, GtkCellRendererText))
|
||||
#define GTK_CELL_RENDERER_TEXT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_TEXT, GtkCellRendererTextClass))
|
||||
#define GTK_IS_CELL_RENDERER_TEXT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CELL_RENDERER_TEXT))
|
||||
#define GTK_IS_CELL_RENDERER_TEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER_TEXT))
|
||||
#define GTK_CELL_RENDERER_TEXT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_TEXT, GtkCellRendererTextClass))
|
||||
#define GTK_CELL_RENDERER_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_RENDERER_TEXT, GtkCellRendererText))
|
||||
#define GTK_CELL_RENDERER_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_TEXT, GtkCellRendererTextClass))
|
||||
#define GTK_IS_CELL_RENDERER_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_RENDERER_TEXT))
|
||||
#define GTK_IS_CELL_RENDERER_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER_TEXT))
|
||||
#define GTK_CELL_RENDERER_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_TEXT, GtkCellRendererTextClass))
|
||||
|
||||
typedef struct _GtkCellRendererText GtkCellRendererText;
|
||||
typedef struct _GtkCellRendererTextClass GtkCellRendererTextClass;
|
||||
@ -90,7 +90,7 @@ struct _GtkCellRendererTextClass
|
||||
void (*_gtk_reserved4) (void);
|
||||
};
|
||||
|
||||
GtkType gtk_cell_renderer_text_get_type (void);
|
||||
GType gtk_cell_renderer_text_get_type (void);
|
||||
GtkCellRenderer *gtk_cell_renderer_text_new (void);
|
||||
|
||||
void gtk_cell_renderer_text_set_fixed_height_from_font (GtkCellRendererText *renderer,
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <gtk/gtkcellrenderertoggle.h>
|
||||
#include <gtk/gtksignal.h>
|
||||
#include "gtkintl.h"
|
||||
#include "gtkmarshalers.h"
|
||||
|
||||
@ -74,10 +73,10 @@ enum {
|
||||
static guint toggle_cell_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_cell_renderer_toggle_get_type (void)
|
||||
{
|
||||
static GtkType cell_toggle_type = 0;
|
||||
static GType cell_toggle_type = 0;
|
||||
|
||||
if (!cell_toggle_type)
|
||||
{
|
||||
@ -94,7 +93,9 @@ gtk_cell_renderer_toggle_get_type (void)
|
||||
(GInstanceInitFunc) gtk_cell_renderer_toggle_init,
|
||||
};
|
||||
|
||||
cell_toggle_type = g_type_register_static (GTK_TYPE_CELL_RENDERER, "GtkCellRendererToggle", &cell_toggle_info, 0);
|
||||
cell_toggle_type =
|
||||
g_type_register_static (GTK_TYPE_CELL_RENDERER, "GtkCellRendererToggle",
|
||||
&cell_toggle_info, 0);
|
||||
}
|
||||
|
||||
return cell_toggle_type;
|
||||
@ -153,13 +154,14 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class)
|
||||
|
||||
|
||||
toggle_cell_signals[TOGGLED] =
|
||||
gtk_signal_new ("toggled",
|
||||
GTK_RUN_LAST,
|
||||
GTK_CLASS_TYPE (object_class),
|
||||
GTK_SIGNAL_OFFSET (GtkCellRendererToggleClass, toggled),
|
||||
_gtk_marshal_VOID__STRING,
|
||||
GTK_TYPE_NONE, 1,
|
||||
GTK_TYPE_STRING);
|
||||
g_signal_new ("toggled",
|
||||
G_OBJECT_CLASS_TYPE (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkCellRendererToggleClass, toggled),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__STRING,
|
||||
G_TYPE_NONE, 1,
|
||||
G_TYPE_STRING);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -232,7 +234,7 @@ gtk_cell_renderer_toggle_set_property (GObject *object,
|
||||
GtkCellRenderer *
|
||||
gtk_cell_renderer_toggle_new (void)
|
||||
{
|
||||
return GTK_CELL_RENDERER (gtk_type_new (gtk_cell_renderer_toggle_get_type ()));
|
||||
return g_object_new (GTK_TYPE_CELL_RENDERER_TOGGLE, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -348,7 +350,7 @@ gtk_cell_renderer_toggle_activate (GtkCellRenderer *cell,
|
||||
celltoggle = GTK_CELL_RENDERER_TOGGLE (cell);
|
||||
if (celltoggle->activatable)
|
||||
{
|
||||
gtk_signal_emit (GTK_OBJECT (cell), toggle_cell_signals[TOGGLED], path);
|
||||
g_signal_emit (cell, toggle_cell_signals[TOGGLED], 0, path);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -28,11 +28,11 @@ extern "C" {
|
||||
|
||||
|
||||
#define GTK_TYPE_CELL_RENDERER_TOGGLE (gtk_cell_renderer_toggle_get_type ())
|
||||
#define GTK_CELL_RENDERER_TOGGLE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CELL_RENDERER_TOGGLE, GtkCellRendererToggle))
|
||||
#define GTK_CELL_RENDERER_TOGGLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_TOGGLE, GtkCellRendererToggleClass))
|
||||
#define GTK_IS_CELL_RENDERER_TOGGLE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CELL_RENDERER_TOGGLE))
|
||||
#define GTK_IS_CELL_RENDERER_TOGGLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER_TOGGLE))
|
||||
#define GTK_CELL_RENDERER_TOGGLE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_TOGGLE, GtkCellRendererToggleClass))
|
||||
#define GTK_CELL_RENDERER_TOGGLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_RENDERER_TOGGLE, GtkCellRendererToggle))
|
||||
#define GTK_CELL_RENDERER_TOGGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER_TOGGLE, GtkCellRendererToggleClass))
|
||||
#define GTK_IS_CELL_RENDERER_TOGGLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_RENDERER_TOGGLE))
|
||||
#define GTK_IS_CELL_RENDERER_TOGGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER_TOGGLE))
|
||||
#define GTK_CELL_RENDERER_TOGGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER_TOGGLE, GtkCellRendererToggleClass))
|
||||
|
||||
typedef struct _GtkCellRendererToggle GtkCellRendererToggle;
|
||||
typedef struct _GtkCellRendererToggleClass GtkCellRendererToggleClass;
|
||||
@ -61,7 +61,7 @@ struct _GtkCellRendererToggleClass
|
||||
void (*_gtk_reserved4) (void);
|
||||
};
|
||||
|
||||
GtkType gtk_cell_renderer_toggle_get_type (void);
|
||||
GType gtk_cell_renderer_toggle_get_type (void);
|
||||
GtkCellRenderer *gtk_cell_renderer_toggle_new (void);
|
||||
|
||||
gboolean gtk_cell_renderer_toggle_get_radio (GtkCellRendererToggle *toggle);
|
||||
|
Loading…
Reference in New Issue
Block a user