gint *width,
gint *height);
static void gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
- GdkWindow *window,
+ cairo_t *cr,
GtkWidget *widget,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GdkRectangle *expose_area,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
guint flags);
}
static void
-gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
- GdkWindow *window,
- GtkWidget *widget,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GdkRectangle *expose_area,
- guint flags)
+gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
+ cairo_t *cr,
+ GtkWidget *widget,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
+ GtkCellRendererState flags)
{
GtkCellRendererProgress *cellprogress = GTK_CELL_RENDERER_PROGRESS (cell);
GtkCellRendererProgressPrivate *priv= cellprogress->priv;
* but some engines don't paint anything with that detail for
* non-GtkProgressBar widgets.
*/
- gtk_paint_box (style,
- window,
- GTK_STATE_NORMAL, GTK_SHADOW_IN,
- NULL, widget, NULL,
- x, y, w, h);
+ gtk_cairo_paint_box (style,
+ cr,
+ GTK_STATE_NORMAL, GTK_SHADOW_IN,
+ widget, NULL,
+ x, y, w, h);
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
clip.y = bar_position;
}
- gtk_paint_box (style,
- window,
- GTK_STATE_SELECTED, GTK_SHADOW_OUT,
- &clip, widget, "bar",
- clip.x, clip.y,
- clip.width, clip.height);
+ gtk_cairo_paint_box (style,
+ cr,
+ GTK_STATE_SELECTED, GTK_SHADOW_OUT,
+ widget, "bar",
+ clip.x, clip.y,
+ clip.width, clip.height);
if (priv->label)
{
y_pos = y + style->ythickness + priv->text_yalign *
(h - 2 * style->ythickness - logical_rect.height);
- gtk_paint_layout (style, window,
- GTK_STATE_SELECTED,
- FALSE, &clip, widget, "progressbar",
- x_pos, y_pos,
- layout);
+ cairo_save (cr);
+ gdk_cairo_rectangle (cr, &clip);
+ cairo_clip (cr);
+
+ gtk_cairo_paint_layout (style, cr,
+ GTK_STATE_SELECTED,
+ FALSE, widget, "progressbar",
+ x_pos, y_pos,
+ layout);
+
+ cairo_restore (cr);
if (bar_position > start)
{
clip.height = bar_position - y;
}
- gtk_paint_layout (style, window,
- GTK_STATE_NORMAL,
- FALSE, &clip, widget, "progressbar",
- x_pos, y_pos,
- layout);
+ cairo_save (cr);
+ gdk_cairo_rectangle (cr, &clip);
+ cairo_clip (cr);
+
+ gtk_cairo_paint_layout (style, cr,
+ GTK_STATE_NORMAL,
+ FALSE, widget, "progressbar",
+ x_pos, y_pos,
+ layout);
+
+ cairo_restore (cr);
}
if (bar_position + bar_size < start + full_size)
clip.height = y + h - (bar_position + bar_size);
}
- gtk_paint_layout (style, window,
- GTK_STATE_NORMAL,
- FALSE, &clip, widget, "progressbar",
- x_pos, y_pos,
- layout);
+ cairo_save (cr);
+ gdk_cairo_rectangle (cr, &clip);
+ cairo_clip (cr);
+
+ gtk_cairo_paint_layout (style, cr,
+ GTK_STATE_NORMAL,
+ FALSE, widget, "progressbar",
+ x_pos, y_pos,
+ layout);
+
+ cairo_restore (cr);
}
g_object_unref (layout);