[gtk+] rendernode: Add getters for box-shadow nodes



commit 84c1204853b532494c4568d81d10b45142472565
Author: Benjamin Otte <otte redhat com>
Date:   Wed Jan 18 00:05:25 2017 +0100

    rendernode: Add getters for box-shadow nodes

 gsk/gskrendernodeimpl.c    |  120 ++++++++++++++++++++++++++++++++++++++++++++
 gsk/gskrendernodeprivate.h |   14 +++++
 2 files changed, 134 insertions(+), 0 deletions(-)
---
diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c
index aaa6a92..7827ece 100644
--- a/gsk/gskrendernodeimpl.c
+++ b/gsk/gskrendernodeimpl.c
@@ -1303,6 +1303,66 @@ gsk_inset_shadow_node_new (const GskRoundedRect *outline,
   return &self->render_node;
 }
 
+const GskRoundedRect *
+gsk_inset_shadow_node_peek_outline (GskRenderNode *node)
+{
+  GskInsetShadowNode *self = (GskInsetShadowNode *) node;
+
+  g_return_val_if_fail (GSK_IS_RENDER_NODE_TYPE (node, GSK_INSET_SHADOW_NODE), NULL);
+
+  return &self->outline;
+}
+
+const GdkRGBA *
+gsk_inset_shadow_node_peek_color (GskRenderNode *node)
+{
+  GskInsetShadowNode *self = (GskInsetShadowNode *) node;
+
+  g_return_val_if_fail (GSK_IS_RENDER_NODE_TYPE (node, GSK_INSET_SHADOW_NODE), NULL);
+
+  return &self->color;
+}
+
+float
+gsk_inset_shadow_node_get_dx (GskRenderNode *node)
+{
+  GskInsetShadowNode *self = (GskInsetShadowNode *) node;
+
+  g_return_val_if_fail (GSK_IS_RENDER_NODE_TYPE (node, GSK_INSET_SHADOW_NODE), 0.0f);
+
+  return self->dx;
+}
+
+float
+gsk_inset_shadow_node_get_dy (GskRenderNode *node)
+{
+  GskInsetShadowNode *self = (GskInsetShadowNode *) node;
+
+  g_return_val_if_fail (GSK_IS_RENDER_NODE_TYPE (node, GSK_INSET_SHADOW_NODE), 0.0f);
+
+  return self->dy;
+}
+
+float
+gsk_inset_shadow_node_get_spread (GskRenderNode *node)
+{
+  GskInsetShadowNode *self = (GskInsetShadowNode *) node;
+
+  g_return_val_if_fail (GSK_IS_RENDER_NODE_TYPE (node, GSK_INSET_SHADOW_NODE), 0.0f);
+
+  return self->spread;
+}
+
+float
+gsk_inset_shadow_node_get_blur_radius (GskRenderNode *node)
+{
+  GskInsetShadowNode *self = (GskInsetShadowNode *) node;
+
+  g_return_val_if_fail (GSK_IS_RENDER_NODE_TYPE (node, GSK_INSET_SHADOW_NODE), 0.0f);
+
+  return self->blur_radius;
+}
+
 /*** GSK_OUTSET_SHADOW_NODE ***/
 
 typedef struct _GskOutsetShadowNode GskOutsetShadowNode;
@@ -1554,6 +1614,66 @@ gsk_outset_shadow_node_new (const GskRoundedRect *outline,
   return &self->render_node;
 }
 
+const GskRoundedRect *
+gsk_outset_shadow_node_peek_outline (GskRenderNode *node)
+{
+  GskOutsetShadowNode *self = (GskOutsetShadowNode *) node;
+
+  g_return_val_if_fail (GSK_IS_RENDER_NODE_TYPE (node, GSK_OUTSET_SHADOW_NODE), NULL);
+
+  return &self->outline;
+}
+
+const GdkRGBA *
+gsk_outset_shadow_node_peek_color (GskRenderNode *node)
+{
+  GskOutsetShadowNode *self = (GskOutsetShadowNode *) node;
+
+  g_return_val_if_fail (GSK_IS_RENDER_NODE_TYPE (node, GSK_OUTSET_SHADOW_NODE), NULL);
+
+  return &self->color;
+}
+
+float
+gsk_outset_shadow_node_get_dx (GskRenderNode *node)
+{
+  GskOutsetShadowNode *self = (GskOutsetShadowNode *) node;
+
+  g_return_val_if_fail (GSK_IS_RENDER_NODE_TYPE (node, GSK_OUTSET_SHADOW_NODE), 0.0f);
+
+  return self->dx;
+}
+
+float
+gsk_outset_shadow_node_get_dy (GskRenderNode *node)
+{
+  GskOutsetShadowNode *self = (GskOutsetShadowNode *) node;
+
+  g_return_val_if_fail (GSK_IS_RENDER_NODE_TYPE (node, GSK_OUTSET_SHADOW_NODE), 0.0f);
+
+  return self->dy;
+}
+
+float
+gsk_outset_shadow_node_get_spread (GskRenderNode *node)
+{
+  GskOutsetShadowNode *self = (GskOutsetShadowNode *) node;
+
+  g_return_val_if_fail (GSK_IS_RENDER_NODE_TYPE (node, GSK_OUTSET_SHADOW_NODE), 0.0f);
+
+  return self->spread;
+}
+
+float
+gsk_outset_shadow_node_get_blur_radius (GskRenderNode *node)
+{
+  GskOutsetShadowNode *self = (GskOutsetShadowNode *) node;
+
+  g_return_val_if_fail (GSK_IS_RENDER_NODE_TYPE (node, GSK_OUTSET_SHADOW_NODE), 0.0f);
+
+  return self->blur_radius;
+}
+
 /*** GSK_CAIRO_NODE ***/
 
 typedef struct _GskCairoNode GskCairoNode;
diff --git a/gsk/gskrendernodeprivate.h b/gsk/gskrendernodeprivate.h
index 52f7bc8..1a19b5d 100644
--- a/gsk/gskrendernodeprivate.h
+++ b/gsk/gskrendernodeprivate.h
@@ -62,6 +62,20 @@ const GskRoundedRect * gsk_border_node_peek_outline (GskRenderNode *node);
 const float * gsk_border_node_peek_widths (GskRenderNode *node);
 const GdkRGBA * gsk_border_node_peek_colors (GskRenderNode *node);
 
+const GskRoundedRect * gsk_inset_shadow_node_peek_outline (GskRenderNode *node);
+const GdkRGBA * gsk_inset_shadow_node_peek_color (GskRenderNode *node);
+float gsk_inset_shadow_node_get_dx (GskRenderNode *node);
+float gsk_inset_shadow_node_get_dy (GskRenderNode *node);
+float gsk_inset_shadow_node_get_spread (GskRenderNode *node);
+float gsk_inset_shadow_node_get_blur_radius (GskRenderNode *node);
+
+const GskRoundedRect * gsk_outset_shadow_node_peek_outline (GskRenderNode *node);
+const GdkRGBA * gsk_outset_shadow_node_peek_color (GskRenderNode *node);
+float gsk_outset_shadow_node_get_dx (GskRenderNode *node);
+float gsk_outset_shadow_node_get_dy (GskRenderNode *node);
+float gsk_outset_shadow_node_get_spread (GskRenderNode *node);
+float gsk_outset_shadow_node_get_blur_radius (GskRenderNode *node);
+
 GskRenderNode *gsk_cairo_node_new_for_surface (const graphene_rect_t *bounds, cairo_surface_t *surface);
 cairo_surface_t *gsk_cairo_node_get_surface (GskRenderNode *node);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]