[gtk+] Make GdkRectangle arguments in GtkCellRenderer use const consistently
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Make GdkRectangle arguments in GtkCellRenderer use const consistently
- Date: Mon, 4 Oct 2010 14:38:39 +0000 (UTC)
commit 21eae6b6f385f64ebea0f4494a14bfd114050f66
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Oct 4 10:22:09 2010 -0400
Make GdkRectangle arguments in GtkCellRenderer use const consistently
https://bugzilla.gnome.org/show_bug.cgi?id=630900
gtk/gtkcellrenderer.h | 10 ++++----
gtk/gtkcellrendereraccel.c | 46 ++++++++++++++++++++--------------------
gtk/gtkcellrenderercombo.c | 24 ++++++++++----------
gtk/gtkcellrendererpixbuf.c | 16 +++++++-------
gtk/gtkcellrendererprogress.c | 16 +++++++-------
gtk/gtkcellrendererspin.c | 18 ++++++++--------
gtk/gtkcellrendererspinner.c | 26 +++++++++++-----------
gtk/gtkcellrenderertext.c | 26 +++++++++++-----------
gtk/gtkcellrenderertoggle.c | 26 +++++++++++-----------
9 files changed, 104 insertions(+), 104 deletions(-)
---
diff --git a/gtk/gtkcellrenderer.h b/gtk/gtkcellrenderer.h
index 0264703..6ad2b8c 100644
--- a/gtk/gtkcellrenderer.h
+++ b/gtk/gtkcellrenderer.h
@@ -90,7 +90,7 @@ struct _GtkCellRendererClass
gint *natural_width);
void (* get_size) (GtkCellRenderer *cell,
GtkWidget *widget,
- GdkRectangle *cell_area,
+ const GdkRectangle *cell_area,
gint *x_offset,
gint *y_offset,
gint *width,
@@ -105,15 +105,15 @@ struct _GtkCellRendererClass
GdkEvent *event,
GtkWidget *widget,
const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
GtkCellRendererState flags);
GtkCellEditable * (* start_editing) (GtkCellRenderer *cell,
GdkEvent *event,
GtkWidget *widget,
const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
GtkCellRendererState flags);
/* Signals */
diff --git a/gtk/gtkcellrendereraccel.c b/gtk/gtkcellrendereraccel.c
index 45cd0b8..f18ce56 100644
--- a/gtk/gtkcellrendereraccel.c
+++ b/gtk/gtkcellrendereraccel.c
@@ -41,21 +41,21 @@ static void gtk_cell_renderer_accel_set_property (GObject *object,
guint param_id,
const GValue *value,
GParamSpec *pspec);
-static void gtk_cell_renderer_accel_get_size (GtkCellRenderer *cell,
- GtkWidget *widget,
- GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height);
+static void gtk_cell_renderer_accel_get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ const GdkRectangle *cell_area,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height);
static GtkCellEditable *
- gtk_cell_renderer_accel_start_editing (GtkCellRenderer *cell,
- GdkEvent *event,
- GtkWidget *widget,
- const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GtkCellRendererState flags);
+ gtk_cell_renderer_accel_start_editing (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ const gchar *path,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
+ GtkCellRendererState flags);
static gchar *convert_keysym_state_to_string (GtkCellRendererAccel *accel,
guint keysym,
GdkModifierType mask,
@@ -402,13 +402,13 @@ gtk_cell_renderer_accel_set_property (GObject *object,
}
static void
-gtk_cell_renderer_accel_get_size (GtkCellRenderer *cell,
- GtkWidget *widget,
- GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height)
+gtk_cell_renderer_accel_get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ const GdkRectangle *cell_area,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height)
{
GtkCellRendererAccelPrivate *priv = GTK_CELL_RENDERER_ACCEL (cell)->priv;
@@ -579,8 +579,8 @@ gtk_cell_renderer_accel_start_editing (GtkCellRenderer *cell,
GdkEvent *event,
GtkWidget *widget,
const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
GtkCellRendererState flags)
{
GtkCellRendererAccelPrivate *priv;
diff --git a/gtk/gtkcellrenderercombo.c b/gtk/gtkcellrenderercombo.c
index effbc89..505f2bc 100644
--- a/gtk/gtkcellrenderercombo.c
+++ b/gtk/gtkcellrenderercombo.c
@@ -59,12 +59,12 @@ static void gtk_cell_renderer_combo_set_property (GObject *object,
GParamSpec *pspec);
static GtkCellEditable *gtk_cell_renderer_combo_start_editing (GtkCellRenderer *cell,
- GdkEvent *event,
- GtkWidget *widget,
- const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GtkCellRendererState flags);
+ GdkEvent *event,
+ GtkWidget *widget,
+ const gchar *path,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
+ GtkCellRendererState flags);
enum {
PROP_0,
@@ -421,12 +421,12 @@ find_text (GtkTreeModel *model,
static GtkCellEditable *
gtk_cell_renderer_combo_start_editing (GtkCellRenderer *cell,
- GdkEvent *event,
- GtkWidget *widget,
- const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GtkCellRendererState flags)
+ GdkEvent *event,
+ GtkWidget *widget,
+ const gchar *path,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
+ GtkCellRendererState flags)
{
GtkCellRendererCombo *cell_combo;
GtkCellRendererText *cell_text;
diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c
index edd469e..52b4ec9 100644
--- a/gtk/gtkcellrendererpixbuf.c
+++ b/gtk/gtkcellrendererpixbuf.c
@@ -39,7 +39,7 @@ static void gtk_cell_renderer_pixbuf_create_stock_pixbuf (GtkCellRendererPixbuf
GtkWidget *widget);
static void gtk_cell_renderer_pixbuf_get_size (GtkCellRenderer *cell,
GtkWidget *widget,
- GdkRectangle *rectangle,
+ const GdkRectangle *rectangle,
gint *x_offset,
gint *y_offset,
gint *width,
@@ -664,13 +664,13 @@ create_colorized_pixbuf (GdkPixbuf *src,
static void
-gtk_cell_renderer_pixbuf_get_size (GtkCellRenderer *cell,
- GtkWidget *widget,
- GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height)
+gtk_cell_renderer_pixbuf_get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ const GdkRectangle *cell_area,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height)
{
GtkCellRendererPixbuf *cellpixbuf = (GtkCellRendererPixbuf *) cell;
GtkCellRendererPixbufPrivate *priv = cellpixbuf->priv;
diff --git a/gtk/gtkcellrendererprogress.c b/gtk/gtkcellrendererprogress.c
index 486075d..20abba0 100644
--- a/gtk/gtkcellrendererprogress.c
+++ b/gtk/gtkcellrendererprogress.c
@@ -83,7 +83,7 @@ static void compute_dimensions (GtkCellRenderer *ce
gint *height);
static void gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell,
GtkWidget *widget,
- GdkRectangle *cell_area,
+ const GdkRectangle *cell_area,
gint *x_offset,
gint *y_offset,
gint *width,
@@ -434,13 +434,13 @@ compute_dimensions (GtkCellRenderer *cell,
}
static void
-gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell,
- GtkWidget *widget,
- GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height)
+gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ const GdkRectangle *cell_area,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height)
{
GtkCellRendererProgress *cellprogress = GTK_CELL_RENDERER_PROGRESS (cell);
GtkCellRendererProgressPrivate *priv = cellprogress->priv;
diff --git a/gtk/gtkcellrendererspin.c b/gtk/gtkcellrendererspin.c
index 7bac620..2a7fc10 100644
--- a/gtk/gtkcellrendererspin.c
+++ b/gtk/gtkcellrendererspin.c
@@ -50,8 +50,8 @@ static GtkCellEditable * gtk_cell_renderer_spin_start_editing (GtkCellRenderer
GdkEvent *event,
GtkWidget *widget,
const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
GtkCellRendererState flags);
enum {
PROP_0,
@@ -290,13 +290,13 @@ gtk_cell_renderer_spin_button_press_event (GtkWidget *widget,
}
static GtkCellEditable *
-gtk_cell_renderer_spin_start_editing (GtkCellRenderer *cell,
- GdkEvent *event,
- GtkWidget *widget,
- const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GtkCellRendererState flags)
+gtk_cell_renderer_spin_start_editing (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ const gchar *path,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
+ GtkCellRendererState flags)
{
GtkCellRendererSpinPrivate *priv;
GtkCellRendererText *cell_text;
diff --git a/gtk/gtkcellrendererspinner.c b/gtk/gtkcellrendererspinner.c
index 8cb020a..5d50f8d 100644
--- a/gtk/gtkcellrendererspinner.c
+++ b/gtk/gtkcellrendererspinner.c
@@ -80,12 +80,12 @@ static void gtk_cell_renderer_spinner_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec);
static void gtk_cell_renderer_spinner_get_size (GtkCellRenderer *cell,
- GtkWidget *widget,
- GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height);
+ GtkWidget *widget,
+ const GdkRectangle *cell_area,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height);
static void gtk_cell_renderer_spinner_render (GtkCellRenderer *cell,
cairo_t *cr,
GtkWidget *widget,
@@ -262,13 +262,13 @@ gtk_cell_renderer_spinner_set_property (GObject *object,
}
static void
-gtk_cell_renderer_spinner_get_size (GtkCellRenderer *cellr,
- GtkWidget *widget,
- GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height)
+gtk_cell_renderer_spinner_get_size (GtkCellRenderer *cellr,
+ GtkWidget *widget,
+ const GdkRectangle *cell_area,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height)
{
GtkCellRendererSpinner *cell = GTK_CELL_RENDERER_SPINNER (cellr);
GtkCellRendererSpinnerPrivate *priv = cell->priv;
diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c
index 4cf85d9..4a3110c 100644
--- a/gtk/gtkcellrenderertext.c
+++ b/gtk/gtkcellrenderertext.c
@@ -53,8 +53,8 @@ static GtkCellEditable *gtk_cell_renderer_text_start_editing (GtkCellRenderer
GdkEvent *event,
GtkWidget *widget,
const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
GtkCellRendererState flags);
static void gtk_cell_renderer_text_get_preferred_width (GtkCellRenderer *cell,
@@ -1566,14 +1566,14 @@ get_layout (GtkCellRendererText *celltext,
static void
-get_size (GtkCellRenderer *cell,
- GtkWidget *widget,
- GdkRectangle *cell_area,
- PangoLayout *layout,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height)
+get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ const GdkRectangle *cell_area,
+ PangoLayout *layout,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height)
{
GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (cell);
GtkCellRendererTextPrivate *priv = celltext->priv;
@@ -1708,7 +1708,7 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell,
gint xpad, ypad;
layout = get_layout (celltext, widget, cell_area, flags);
- get_size (cell, widget, (GdkRectangle *) cell_area, layout, &x_offset, &y_offset, NULL, NULL);
+ get_size (cell, widget, cell_area, layout, &x_offset, &y_offset, NULL, NULL);
if (!gtk_cell_renderer_get_sensitive (cell))
{
@@ -1891,8 +1891,8 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell,
GdkEvent *event,
GtkWidget *widget,
const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
GtkCellRendererState flags)
{
GtkRequisition requisition;
diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c
index d0e8f3a..e1aa78e 100644
--- a/gtk/gtkcellrenderertoggle.c
+++ b/gtk/gtkcellrenderertoggle.c
@@ -36,7 +36,7 @@ static void gtk_cell_renderer_toggle_set_property (GObject *
GParamSpec *pspec);
static void gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
GtkWidget *widget,
- GdkRectangle *cell_area,
+ const GdkRectangle *cell_area,
gint *x_offset,
gint *y_offset,
gint *width,
@@ -51,8 +51,8 @@ static gboolean gtk_cell_renderer_toggle_activate (GtkCellRenderer *
GdkEvent *event,
GtkWidget *widget,
const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
GtkCellRendererState flags);
@@ -271,13 +271,13 @@ gtk_cell_renderer_toggle_new (void)
}
static void
-gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
- GtkWidget *widget,
- GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height)
+gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ const GdkRectangle *cell_area,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height)
{
GtkCellRendererTogglePrivate *priv;
gint calc_width;
@@ -337,7 +337,7 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell,
GtkShadowType shadow;
GtkStateType state = 0;
- gtk_cell_renderer_toggle_get_size (cell, widget, (GdkRectangle *) cell_area,
+ gtk_cell_renderer_toggle_get_size (cell, widget, cell_area,
&x_offset, &y_offset,
&width, &height);
gtk_cell_renderer_get_padding (cell, &xpad, &ypad);
@@ -399,8 +399,8 @@ gtk_cell_renderer_toggle_activate (GtkCellRenderer *cell,
GdkEvent *event,
GtkWidget *widget,
const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
GtkCellRendererState flags)
{
GtkCellRendererTogglePrivate *priv;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]