[libgd/wip/ernestask/gtk4: 2/4] styled-text-renderer: use snapshot API for rendering
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgd/wip/ernestask/gtk4: 2/4] styled-text-renderer: use snapshot API for rendering
- Date: Sun, 4 Mar 2018 18:54:26 +0000 (UTC)
commit ba5c19d9ae849a2749cbba4ce931d976c48bf01a
Author: Ernestas Kulik <ernestask gnome org>
Date: Sun Mar 4 17:16:36 2018 +0200
styled-text-renderer: use snapshot API for rendering
libgd/gd-styled-text-renderer.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/libgd/gd-styled-text-renderer.c b/libgd/gd-styled-text-renderer.c
index 50a315e..c6ba6cc 100644
--- a/libgd/gd-styled-text-renderer.c
+++ b/libgd/gd-styled-text-renderer.c
@@ -28,12 +28,12 @@ struct _GdStyledTextRendererPrivate {
};
static void
-gd_styled_text_renderer_render (GtkCellRenderer *cell,
- cairo_t *cr,
- GtkWidget *widget,
- const GdkRectangle *background_area,
- const GdkRectangle *cell_area,
- GtkCellRendererState flags)
+gd_styled_text_renderer_snapshot (GtkCellRenderer *cell,
+ GtkSnapshot *snapshot,
+ GtkWidget *widget,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
+ GtkCellRendererState flags)
{
GdStyledTextRenderer *self = GD_STYLED_TEXT_RENDERER (cell);
GtkStyleContext *context;
@@ -49,8 +49,8 @@ gd_styled_text_renderer_render (GtkCellRenderer *cell,
gtk_style_context_add_class (context, style_class);
}
- GTK_CELL_RENDERER_CLASS (gd_styled_text_renderer_parent_class)->render
- (cell, cr, widget,
+ GTK_CELL_RENDERER_CLASS (gd_styled_text_renderer_parent_class)->snapshot
+ (cell, snapshot, widget,
background_area, cell_area, flags);
gtk_style_context_restore (context);
@@ -77,7 +77,7 @@ gd_styled_text_renderer_class_init (GdStyledTextRendererClass *klass)
GObjectClass *oclass = G_OBJECT_CLASS (klass);
oclass->finalize = gd_styled_text_renderer_finalize;
- crclass->render = gd_styled_text_renderer_render;
+ crclass->snapshot = gd_styled_text_renderer_snapshot;
g_type_class_add_private (klass, sizeof (GdStyledTextRendererPrivate));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]