gsk: Remove custom GValue API for GskRenderNode

This commit is contained in:
Benjamin Otte 2016-12-10 15:21:28 +01:00
parent ff884385c0
commit 9bff1c12d4
3 changed files with 0 additions and 123 deletions

View File

@ -53,10 +53,6 @@ gsk_render_node_set_blend_mode
GskScalingFilter
gsk_render_node_set_scaling_filters
gsk_render_node_set_name
gsk_value_set_render_node
gsk_value_take_render_node
gsk_value_get_render_node
gsk_value_dup_render_node
<SUBSECTION Standard>
GSK_IS_RENDER_NODE
GSK_RENDER_NODE

View File

@ -1472,109 +1472,3 @@ gsk_render_node_get_size (GskRenderNode *root)
return res;
}
/**
* gsk_value_set_render_node:
* @value: a #GValue
* @node: (nullable): a #GskRenderNode
*
* Sets the @node into the @value.
*
* This function acquires a reference on @node.
*
* Since: 3.90
*/
void
gsk_value_set_render_node (GValue *value,
GskRenderNode *node)
{
GskRenderNode *old_node;
g_return_if_fail (GSK_VALUE_HOLDS_RENDER_NODE (value));
old_node = value->data[0].v_pointer;
if (node != NULL)
{
g_return_if_fail (GSK_IS_RENDER_NODE (node));
value->data[0].v_pointer = gsk_render_node_ref (node);
}
else
value->data[0].v_pointer = NULL;
if (old_node != NULL)
gsk_render_node_unref (old_node);
}
/**
* gsk_value_take_render_node:
* @value: a #GValue
* @node: (transfer full) (nullable): a #GskRenderNode
*
* Sets the @node into the @value, without taking a reference to it.
*
* Since: 3.90
*/
void
gsk_value_take_render_node (GValue *value,
GskRenderNode *node)
{
GskRenderNode *old_node;
g_return_if_fail (GSK_VALUE_HOLDS_RENDER_NODE (value));
old_node = value->data[0].v_pointer;
if (node != NULL)
{
g_return_if_fail (GSK_IS_RENDER_NODE (node));
/* take over ownership */
value->data[0].v_pointer = node;
}
else
value->data[0].v_pointer = NULL;
if (old_node != NULL)
gsk_render_node_unref (old_node);
}
/**
* gsk_value_get_render_node:
* @value: a #GValue
*
* Retrieves the #GskRenderNode stored inside the @value.
*
* Returns: (transfer none) (nullable): a #GskRenderNode
*
* Since: 3.90
*/
GskRenderNode *
gsk_value_get_render_node (const GValue *value)
{
g_return_val_if_fail (GSK_VALUE_HOLDS_RENDER_NODE (value), NULL);
return value->data[0].v_pointer;
}
/**
* gsk_value_dup_render_node:
* @value: a #GValue
*
* Retrieves the #GskRenderNode stored inside the @value, and
* acquires a reference to it.
*
* Returns: (transfer none) (nullable): a #GskRenderNode
*
* Since: 3.90
*/
GskRenderNode *
gsk_value_dup_render_node (const GValue *value)
{
g_return_val_if_fail (GSK_VALUE_HOLDS_RENDER_NODE (value), NULL);
if (value->data[0].v_pointer != NULL)
return gsk_render_node_ref (value->data[0].v_pointer);
return NULL;
}

View File

@ -123,19 +123,6 @@ void gsk_render_node_set_name (GskRenderNode *
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))
GDK_AVAILABLE_IN_3_90
void gsk_value_set_render_node (GValue *value,
GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
void gsk_value_take_render_node (GValue *value,
GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_value_get_render_node (const GValue *value);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_value_dup_render_node (const GValue *value);
G_END_DECLS
#endif /* __GSK_RENDER_NODE_H__ */