summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-12-18 18:17:17 +0100
committerBenjamin Otte <otte@redhat.com>2016-12-20 18:01:11 +0100
commit6e31fc43002a7865664ff3682b9401614865dd46 (patch)
tree09d970284867a7f29352e3867912032dd9f06580 /gtk
parent75b76af2214277856efe9629939859deebcf914d (diff)
downloadgtk+-6e31fc43002a7865664ff3682b9401614865dd46.tar.gz
inspector: Print node type in node properties
Diffstat (limited to 'gtk')
-rw-r--r--gtk/inspector/recorder.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
index 839e828991..b87e043b3b 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,