[gtk+] API: rendernode: Add gsk_render_node_get_name()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] API: rendernode: Add gsk_render_node_get_name()
- Date: Sat, 29 Oct 2016 16:11:27 +0000 (UTC)
commit def62a9ddaf3c2d5478c2aa2ae7a33f3332e3884
Author: Benjamin Otte <otte redhat com>
Date: Sat Oct 29 18:08:11 2016 +0200
API: rendernode: Add gsk_render_node_get_name()
Make the debug string available to public API.
gsk/gskrendernode.c | 20 ++++++++++++++++++++
gsk/gskrendernode.h | 2 ++
2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/gsk/gskrendernode.c b/gsk/gskrendernode.c
index 17f759a..5efc8bf 100644
--- a/gsk/gskrendernode.c
+++ b/gsk/gskrendernode.c
@@ -1330,6 +1330,26 @@ gsk_render_node_set_name (GskRenderNode *node,
}
/**
+ * gsk_render_node_get_name:
+ * @node: a #GskRenderNode
+ *
+ * Retrieves the name previously set via gsk_render_node_set_name().
+ * If no name has been set, %NULL is returned.
+ *
+ * Returns: (nullable) The name previously set via
+ * gsk_render_node_set_name() or %NULL
+ *
+ * Since: 3.90
+ **/
+const char *
+gsk_render_node_get_name (GskRenderNode *node)
+{
+ g_return_val_if_fail (GSK_IS_RENDER_NODE (node), NULL);
+
+ return node->name;
+}
+
+/**
* gsk_render_node_set_blend_mode:
* @node: a #GskRenderNode
* @blend_mode: the blend mode to be applied to the node's children
diff --git a/gsk/gskrendernode.h b/gsk/gskrendernode.h
index 4ae9040..90006f1 100644
--- a/gsk/gskrendernode.h
+++ b/gsk/gskrendernode.h
@@ -127,6 +127,8 @@ void gsk_render_node_set_scaling_filter (GskRenderNode *
GDK_AVAILABLE_IN_3_90
void gsk_render_node_set_name (GskRenderNode *node,
const char *name);
+GDK_AVAILABLE_IN_3_90
+const char * gsk_render_node_get_name (GskRenderNode *node);
#define GSK_VALUE_HOLDS_RENDER_NODE(value) (G_VALUE_HOLDS (value, GSK_TYPE_RENDER_NODE))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]