[gtk+] snapshot: Port GtkActionBar
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] snapshot: Port GtkActionBar
- Date: Tue, 15 Nov 2016 16:56:46 +0000 (UTC)
commit 4c9033b62de3c14680eb119e390678c132714768
Author: Benjamin Otte <otte redhat com>
Date: Mon Nov 14 21:43:24 2016 +0100
snapshot: Port GtkActionBar
gtk/gtkactionbar.c | 30 +++++++++++++++++++-----------
1 files changed, 19 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkactionbar.c b/gtk/gtkactionbar.c
index 3bf456a..4e739aa 100644
--- a/gtk/gtkactionbar.c
+++ b/gtk/gtkactionbar.c
@@ -199,19 +199,27 @@ gtk_action_bar_set_child_property (GtkContainer *container,
value);
}
-static GskRenderNode *
-gtk_action_bar_get_render_node (GtkWidget *widget,
- GskRenderer *renderer)
+static gboolean
+gtk_action_bar_render (GtkCssGadget *gadget,
+ GtkSnapshot *snapshot,
+ int x,
+ int y,
+ int width,
+ int height,
+ gpointer data)
{
- GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (GTK_ACTION_BAR (widget));
- GskRenderNode *node = gtk_css_gadget_get_render_node (priv->gadget, renderer, FALSE);
+ GTK_WIDGET_CLASS (gtk_action_bar_parent_class)->snapshot (gtk_css_gadget_get_owner (gadget), snapshot);
- if (node == NULL)
- return NULL;
+ return FALSE;
+}
- gtk_container_propagate_render_node (GTK_CONTAINER (widget), renderer, node);
+static void
+gtk_action_bar_snapshot (GtkWidget *widget,
+ GtkSnapshot *snapshot)
+{
+ GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (GTK_ACTION_BAR (widget));
- return node;
+ gtk_css_gadget_snapshot (priv->gadget, snapshot);
}
static void
@@ -297,7 +305,7 @@ gtk_action_bar_class_init (GtkActionBarClass *klass)
widget_class->show = gtk_action_bar_show;
widget_class->hide = gtk_action_bar_hide;
widget_class->destroy = gtk_action_bar_destroy;
- widget_class->get_render_node = gtk_action_bar_get_render_node;
+ widget_class->snapshot = gtk_action_bar_snapshot;
widget_class->size_allocate = gtk_action_bar_size_allocate;
widget_class->measure = gtk_action_bar_measure_;
@@ -350,7 +358,7 @@ gtk_action_bar_init (GtkActionBar *action_bar)
gtk_action_bar_measure,
gtk_action_bar_allocate,
NULL,
- NULL,
+ gtk_action_bar_render,
NULL,
NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]