[gtk+/wip/otte/snapshot: 15/30] snapshot: Convert GtkGrid
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/snapshot: 15/30] snapshot: Convert GtkGrid
- Date: Tue, 15 Nov 2016 06:32:54 +0000 (UTC)
commit b252261c228b553aa8189ad2381ecd16437dad83
Author: Benjamin Otte <otte redhat com>
Date: Mon Nov 14 03:47:22 2016 +0100
snapshot: Convert GtkGrid
gtk/gtkgrid.c | 31 ++++++++++++++++++-------------
1 files changed, 18 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
index 8c6a258..22fbb56 100644
--- a/gtk/gtkgrid.c
+++ b/gtk/gtkgrid.c
@@ -1655,20 +1655,25 @@ gtk_grid_allocate (GtkCssGadget *gadget,
gtk_container_get_children_clip (GTK_CONTAINER (grid), out_clip);
}
-static GskRenderNode *
-gtk_grid_get_render_node (GtkWidget *widget,
- GskRenderer *renderer)
-{
- GskRenderNode *res = gtk_css_gadget_get_render_node (GTK_GRID (widget)->priv->gadget,
- renderer,
- FALSE);
-
- if (res == NULL)
- return NULL;
-
- gtk_container_propagate_render_node (GTK_CONTAINER (widget), renderer, res);
+static gboolean
+gtk_grid_render (GtkCssGadget *gadget,
+ GtkSnapshot *snapshot,
+ int x,
+ int y,
+ int width,
+ int height,
+ gpointer data)
+{
+ GTK_WIDGET_CLASS (gtk_grid_parent_class)->snapshot (gtk_css_gadget_get_owner (gadget), snapshot);
+
+ return FALSE;
+}
- return res;
+static void
+gtk_grid_snapshot (GtkWidget *widget,
+ GtkSnapshot *snapshot)
+{
+ gtk_css_gadget_snapshot (GTK_GRID (widget)->priv->gadget, snapshot);
}
static void
@@ -1684,7 +1689,7 @@ gtk_grid_class_init (GtkGridClass *class)
widget_class->size_allocate = gtk_grid_size_allocate;
widget_class->measure = gtk_grid_measure_;
- widget_class->get_render_node = gtk_grid_get_render_node;
+ widget_class->snapshot = gtk_grid_snapshot;
container_class->add = gtk_grid_add;
container_class->remove = gtk_grid_remove;
@@ -1792,7 +1797,7 @@ gtk_grid_init (GtkGrid *grid)
gtk_grid_measure,
gtk_grid_allocate,
NULL,
- NULL,
+ gtk_grid_render,
NULL,
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]