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-03-17 13:48:19 +00:00
|
|
|
/* Bit fields; leave at the end */
|
2016-06-22 16:30:36 +00:00
|
|
|
gboolean is_mutable : 1;
|
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-11 10:53:17 +00:00
|
|
|
void (* make_immutable) (GskRenderNode *node);
|
2016-12-13 02:05:15 +00:00
|
|
|
void (* draw) (GskRenderNode *node,
|
|
|
|
cairo_t *cr);
|
2016-12-12 05:29:04 +00:00
|
|
|
void (* get_bounds) (GskRenderNode *node,
|
|
|
|
graphene_rect_t *bounds);
|
2016-12-11 02:57:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
GskRenderNode *gsk_render_node_new (const GskRenderNodeClass *node_class);
|
2016-07-27 15:23:44 +00:00
|
|
|
|
2016-06-22 16:30:36 +00:00
|
|
|
void gsk_render_node_make_immutable (GskRenderNode *node);
|
|
|
|
|
2016-03-17 13:48:19 +00:00
|
|
|
void gsk_render_node_get_bounds (GskRenderNode *node,
|
|
|
|
graphene_rect_t *frame);
|
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-18 17:14:53 +00:00
|
|
|
const GskRoundedRect * gsk_border_node_peek_outline (GskRenderNode *node);
|
|
|
|
float gsk_border_node_get_width (GskRenderNode *node, guint i);
|
|
|
|
const GdkRGBA * gsk_border_node_peek_color (GskRenderNode *node, guint i);
|
|
|
|
|
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-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__ */
|