[gtk+/wip/otte/rendernode: 16/30] inspector: Print node type in node properties
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/rendernode: 16/30] inspector: Print node type in node properties
- Date: Mon, 19 Dec 2016 18:48:44 +0000 (UTC)
commit 937df1ee700867526f9795de2307f2a5d7e5b8a0
Author: Benjamin Otte <otte redhat com>
Date: Sun Dec 18 18:17:17 2016 +0100
inspector: Print node type in node properties
gtk/inspector/recorder.c | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
---
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
index 839e828..b87e043 100644
--- a/gtk/inspector/recorder.c
+++ b/gtk/inspector/recorder.c
@@ -128,6 +128,44 @@ render_node_list_get_value (GtkTreeModelRenderNode *model,
}
}
+static const char *
+node_type_name (GskRenderNodeType type)
+{
+ switch (type)
+ {
+ case GSK_NOT_A_RENDER_NODE:
+ default:
+ g_assert_not_reached ();
+ return "Unknown";
+ case GSK_CONTAINER_NODE:
+ return "Container";
+ case GSK_CAIRO_NODE:
+ return "Cairo";
+ case GSK_COLOR_NODE:
+ return "Color";
+ case GSK_LINEAR_GRADIENT_NODE:
+ return "Linear Gradient";
+ case GSK_REPEATING_LINEAR_GRADIENT_NODE:
+ return "Repeating Linear Gradient";
+ case GSK_BORDER_NODE:
+ return "Border";
+ case GSK_TEXTURE_NODE:
+ return "Texture";
+ case GSK_TRANSFORM_NODE:
+ return "Transform";
+ case GSK_OPACITY_NODE:
+ return "Opacity";
+ case GSK_CLIP_NODE:
+ return "Clip";
+ case GSK_ROUNDED_CLIP_NODE:
+ return "Rounded Clip";
+ case GSK_BLEND_NODE:
+ return "Blend";
+ case GSK_CROSS_FADE_NODE:
+ return "CrossFade";
+ }
+}
+
static void
populate_render_node_properties (GtkListStore *store,
GskRenderNode *node)
@@ -139,6 +177,11 @@ populate_render_node_properties (GtkListStore *store,
gsk_render_node_get_bounds (node, &bounds);
+ gtk_list_store_insert_with_values (store, NULL, -1,
+ 0, "Type",
+ 1, node_type_name (gsk_render_node_get_node_type (node)),
+ -1);
+
tmp = g_strdup_printf ("%.6f x %.6f + %.6f + %.6f",
bounds.size.width,
bounds.size.height,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]