2016-03-17 13:48:19 +00:00
|
|
|
#ifndef __GSK_RENDER_NODE_PRIVATE_H__
|
|
|
|
#define __GSK_RENDER_NODE_PRIVATE_H__
|
|
|
|
|
|
|
|
#include "gskrendernode.h"
|
|
|
|
#include <cairo.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2016-12-11 02:57:42 +00:00
|
|
|
typedef struct _GskRenderNodeClass GskRenderNodeClass;
|
|
|
|
|
|
|
|
#define GSK_IS_RENDER_NODE_TYPE(node,type) (GSK_IS_RENDER_NODE (node) && (node)->node_class->node_type == (type))
|
|
|
|
|
2016-03-17 13:48:19 +00:00
|
|
|
struct _GskRenderNode
|
|
|
|
{
|
2016-12-11 02:57:42 +00:00
|
|
|
const GskRenderNodeClass *node_class;
|
2016-12-10 20:42:01 +00:00
|
|
|
|
2016-06-29 18:05:33 +00:00
|
|
|
volatile int ref_count;
|
2016-03-17 13:48:19 +00:00
|
|
|
|
|
|
|
/* Use for debugging */
|
|
|
|
char *name;
|
|
|
|
|
2016-08-13 07:34:22 +00:00
|
|
|
/* Scaling filters */
|
|
|
|
GskScalingFilter min_filter;
|
|
|
|
GskScalingFilter mag_filter;
|
2016-12-21 10:21:38 +00:00
|
|
|
|
|
|
|
graphene_rect_t bounds;
|
2016-03-17 13:48:19 +00:00
|
|
|
};
|
|
|
|
|
2016-12-11 02:57:42 +00:00
|
|
|
struct _GskRenderNodeClass
|
|
|
|
{
|
|
|
|
GskRenderNodeType node_type;
|
2016-12-11 03:28:21 +00:00
|
|
|
gsize struct_size;
|
2016-12-11 02:57:42 +00:00
|
|
|
const char *type_name;
|
2016-12-11 03:18:25 +00:00
|
|
|
void (* finalize) (GskRenderNode *node);
|
2016-12-13 02:05:15 +00:00
|
|
|
void (* draw) (GskRenderNode *node,
|
|
|
|
cairo_t *cr);
|
2016-12-21 04:43:14 +00:00
|
|
|
GVariant * (* serialize) (GskRenderNode *node);
|
2016-12-23 07:03:36 +00:00
|
|
|
GskRenderNode * (* deserialize) (GVariant *variant,
|
|
|
|
GError **error);
|
2016-12-11 02:57:42 +00:00
|
|
|
};
|
|
|
|
|
2016-12-21 11:20:56 +00:00
|
|
|
GskRenderNode *gsk_render_node_new (const GskRenderNodeClass *node_class, gsize extra_size);
|
2016-07-27 15:23:44 +00:00
|
|
|
|
2016-12-21 04:43:14 +00:00
|
|
|
GVariant * gsk_render_node_serialize_node (GskRenderNode *node);
|
2016-12-23 07:03:36 +00:00
|
|
|
GskRenderNode * gsk_render_node_deserialize_node (GskRenderNodeType type, GVariant *variant, GError **error);
|
2016-12-21 04:43:14 +00:00
|
|
|
|
2016-12-13 04:49:57 +00:00
|
|
|
double gsk_opacity_node_get_opacity (GskRenderNode *node);
|
2016-03-17 13:48:19 +00:00
|
|
|
|
2016-12-31 00:13:19 +00:00
|
|
|
GskRenderNode * gsk_color_matrix_node_get_child (GskRenderNode *node);
|
|
|
|
const graphene_matrix_t * gsk_color_matrix_node_peek_color_matrix (GskRenderNode *node);
|
|
|
|
const graphene_vec4_t * gsk_color_matrix_node_peek_color_offset (GskRenderNode *node);
|
|
|
|
|
2017-01-01 18:52:18 +00:00
|
|
|
GskRenderNode * gsk_repeat_node_get_child (GskRenderNode *node);
|
|
|
|
const graphene_rect_t * gsk_repeat_node_peek_child_bounds (GskRenderNode *node);
|
|
|
|
|
2016-12-26 16:11:13 +00:00
|
|
|
const graphene_point_t * gsk_linear_gradient_node_peek_start (GskRenderNode *node);
|
|
|
|
const graphene_point_t * gsk_linear_gradient_node_peek_end (GskRenderNode *node);
|
|
|
|
const gsize gsk_linear_gradient_node_get_n_color_stops (GskRenderNode *node);
|
|
|
|
const GskColorStop * gsk_linear_gradient_node_peek_color_stops (GskRenderNode *node);
|
|
|
|
|
2016-12-18 17:14:53 +00:00
|
|
|
const GskRoundedRect * gsk_border_node_peek_outline (GskRenderNode *node);
|
2017-01-10 13:59:20 +00:00
|
|
|
const float * gsk_border_node_peek_widths (GskRenderNode *node);
|
|
|
|
const GdkRGBA * gsk_border_node_peek_colors (GskRenderNode *node);
|
2016-12-18 17:14:53 +00:00
|
|
|
|
2017-01-17 23:05:25 +00:00
|
|
|
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);
|
|
|
|
|
2016-12-21 04:43:14 +00:00
|
|
|
GskRenderNode *gsk_cairo_node_new_for_surface (const graphene_rect_t *bounds, cairo_surface_t *surface);
|
2016-12-11 00:23:02 +00:00
|
|
|
cairo_surface_t *gsk_cairo_node_get_surface (GskRenderNode *node);
|
2016-03-17 13:48:19 +00:00
|
|
|
|
2016-12-10 21:52:22 +00:00
|
|
|
GskTexture *gsk_texture_node_get_texture (GskRenderNode *node);
|
2016-08-12 15:44:29 +00:00
|
|
|
|
2016-12-13 02:35:56 +00:00
|
|
|
const GdkRGBA *gsk_color_node_peek_color (GskRenderNode *node);
|
|
|
|
|
2016-12-13 08:37:51 +00:00
|
|
|
const graphene_rect_t * gsk_clip_node_peek_clip (GskRenderNode *node);
|
|
|
|
|
2016-12-13 20:59:28 +00:00
|
|
|
const GskRoundedRect * gsk_rounded_clip_node_peek_clip (GskRenderNode *node);
|
|
|
|
|
2016-12-18 23:45:35 +00:00
|
|
|
GskRenderNode * gsk_shadow_node_get_child (GskRenderNode *node);
|
|
|
|
const GskShadow * gsk_shadow_node_peek_shadow (GskRenderNode *node, gsize i);
|
|
|
|
gsize gsk_shadow_node_get_n_shadows (GskRenderNode *node);
|
|
|
|
|
2016-12-12 23:11:06 +00:00
|
|
|
void gsk_transform_node_get_transform (GskRenderNode *node, graphene_matrix_t *transform);
|
|
|
|
|
2016-12-15 03:24:37 +00:00
|
|
|
GskRenderNode * gsk_blend_node_get_bottom_child (GskRenderNode *node);
|
|
|
|
GskRenderNode * gsk_blend_node_get_top_child (GskRenderNode *node);
|
|
|
|
GskBlendMode gsk_blend_node_get_blend_node (GskRenderNode *node);
|
2016-08-24 13:07:26 +00:00
|
|
|
|
2016-12-17 06:44:10 +00:00
|
|
|
GskRenderNode * gsk_cross_fade_node_get_start_child (GskRenderNode *node);
|
|
|
|
GskRenderNode * gsk_cross_fade_node_get_end_child (GskRenderNode *node);
|
|
|
|
double gsk_cross_fade_node_get_progress (GskRenderNode *node);
|
|
|
|
|
2016-03-17 13:48:19 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GSK_RENDER_NODE_PRIVATE_H__ */
|