diff options
author | Matthias Clasen <mclasen@redhat.com> | 2009-11-27 01:23:55 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2009-11-27 01:23:55 -0500 |
commit | 0567ea1c1834609821460abb91bd4144da565c7a (patch) | |
tree | ff1ab63137775078bd6b217c6092162930d0fb60 /gtk | |
parent | c1dfd2f2f5a958eb73f7e9f6a653963b58008d79 (diff) | |
download | gtk+-0567ea1c1834609821460abb91bd4144da565c7a.tar.gz |
Add customary args to gtk_style_paint_spinner()
...and adjust all callers.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkcellrendererspinner.c | 3 | ||||
-rw-r--r-- | gtk/gtkspinner.c | 6 | ||||
-rw-r--r-- | gtk/gtkstyle.c | 57 | ||||
-rw-r--r-- | gtk/gtkstyle.h | 22 |
4 files changed, 57 insertions, 31 deletions
diff --git a/gtk/gtkcellrendererspinner.c b/gtk/gtkcellrendererspinner.c index 70614d35f3..2524aca2d7 100644 --- a/gtk/gtkcellrendererspinner.c +++ b/gtk/gtkcellrendererspinner.c @@ -380,6 +380,9 @@ gtk_cell_renderer_spinner_render (GtkCellRenderer *cellr, gtk_paint_spinner (widget->style, window, state, + expose_area, + widget, + "cell", priv->pulse, draw_rect.x, draw_rect.y, draw_rect.width, draw_rect.height); diff --git a/gtk/gtkspinner.c b/gtk/gtkspinner.c index 0c341b86d9..59b25ea27e 100644 --- a/gtk/gtkspinner.c +++ b/gtk/gtkspinner.c @@ -215,7 +215,8 @@ gtk_spinner_init (GtkSpinner *spinner) } static gboolean -gtk_spinner_expose (GtkWidget *widget, GdkEventExpose *event) +gtk_spinner_expose (GtkWidget *widget, + GdkEventExpose *event) { GtkStateType state_type; GtkSpinnerPrivate *priv; @@ -236,6 +237,9 @@ gtk_spinner_expose (GtkWidget *widget, GdkEventExpose *event) gtk_paint_spinner (widget->style, widget->window, state_type, + &event->area, + widget, + "spinner", priv->current, event->area.x, event->area.y, event->area.width, event->area.height); diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 01f8ff02a6..20e14a6331 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -313,14 +313,17 @@ static void gtk_default_draw_resize_grip (GtkStyle *style, gint y, gint width, gint height); -static void gtk_default_draw_spinner (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - guint step, - gint x, - gint y, - gint width, - gint height); +static void gtk_default_draw_spinner (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + guint step, + gint x, + gint y, + gint width, + gint height); static void rgb_to_hls (gdouble *r, gdouble *g, @@ -5612,6 +5615,9 @@ static void gtk_default_draw_spinner (GtkStyle *style, GdkWindow *window, GtkStateType state_type, + GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, guint step, gint x, gint y, @@ -6720,30 +6726,37 @@ gtk_paint_resize_grip (GtkStyle *style, * @style: a #GtkStyle * @window: a #GdkWindow * @state_type: a state - * @widget: the widget - * @step: the nth step, a value between 0 and GtkSpinner::num-steps - * @x: the x origin of the rectangle in which to draw the resize grip - * @y: the y origin of the rectangle in which to draw the resize grip - * @width: the width of the rectangle in which to draw the resize grip - * @height: the height of the rectangle in which to draw the resize grip + * @area: clip rectangle, or %NULL if the + * output should not be clipped + * @widget: the widget (may be %NULL) + * @detail: a style detail (may be %NULL) + * @step: the nth step, a value between 0 and #GtkSpinner:num-steps + * @x: the x origin of the rectangle in which to draw the spinner + * @y: the y origin of the rectangle in which to draw the spinner + * @width: the width of the rectangle in which to draw the spinner + * @height: the height of the rectangle in which to draw the spinner * * Draws a spinner on @window using the given parameters. */ void -gtk_paint_spinner (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - guint step, - gint x, - gint y, - gint width, - gint height) +gtk_paint_spinner (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + guint step, + gint x, + gint y, + gint width, + gint height) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_spinner != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); GTK_STYLE_GET_CLASS (style)->draw_spinner (style, window, state_type, + (GdkRectangle *)area, widget, detail, step, x, y, width, height); } diff --git a/gtk/gtkstyle.h b/gtk/gtkstyle.h index 3e1401bcf4..75dc109ec9 100644 --- a/gtk/gtkstyle.h +++ b/gtk/gtkstyle.h @@ -406,6 +406,9 @@ struct _GtkStyleClass void (*draw_spinner) (GtkStyle *style, GdkWindow *window, GtkStateType state_type, + GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, guint step, gint x, gint y, @@ -863,14 +866,17 @@ void gtk_paint_resize_grip (GtkStyle *style, gint y, gint width, gint height); -void gtk_paint_spinner (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - guint step, - gint x, - gint y, - gint width, - gint height); +void gtk_paint_spinner (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + guint step, + gint x, + gint y, + gint width, + gint height); GType gtk_border_get_type (void) G_GNUC_CONST; GtkBorder *gtk_border_new (void) G_GNUC_MALLOC; |