Make render node getter public

Keeping these private does not really buy us anything.
This commit is contained in:
Matthias Clasen 2017-10-20 08:06:20 +02:00
parent 0e1785ed48
commit eee89587c3
2 changed files with 233 additions and 193 deletions

View File

@ -66,125 +66,6 @@ void gsk_render_node_unref (GskRenderNode *
GDK_AVAILABLE_IN_3_90
GskRenderNodeType gsk_render_node_get_node_type (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_color_node_new (const GdkRGBA *rgba,
const graphene_rect_t *bounds);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_texture_node_new (GskTexture *texture,
const graphene_rect_t *bounds);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_linear_gradient_node_new (const graphene_rect_t *bounds,
const graphene_point_t *start,
const graphene_point_t *end,
const GskColorStop *color_stops,
gsize n_color_stops);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_repeating_linear_gradient_node_new (const graphene_rect_t *bounds,
const graphene_point_t *start,
const graphene_point_t *end,
const GskColorStop *color_stops,
gsize n_color_stops);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_border_node_new (const GskRoundedRect *outline,
const float border_width[4],
const GdkRGBA border_color[4]);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_inset_shadow_node_new (const GskRoundedRect *outline,
const GdkRGBA *color,
float dx,
float dy,
float spread,
float blur_radius);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_outset_shadow_node_new (const GskRoundedRect *outline,
const GdkRGBA *color,
float dx,
float dy,
float spread,
float blur_radius);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_cairo_node_new (const graphene_rect_t *bounds);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_cairo_node_new_for_surface (const graphene_rect_t *bounds,
cairo_surface_t *surface);
GDK_AVAILABLE_IN_3_90
cairo_t * gsk_cairo_node_get_draw_context (GskRenderNode *node,
GskRenderer *renderer);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_container_node_new (GskRenderNode **children,
guint n_children);
GDK_AVAILABLE_IN_3_90
guint gsk_container_node_get_n_children (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_container_node_get_child (GskRenderNode *node,
guint idx);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_transform_node_new (GskRenderNode *child,
const graphene_matrix_t *transform);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_transform_node_get_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_opacity_node_new (GskRenderNode *child,
double opacity);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_opacity_node_get_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_color_matrix_node_new (GskRenderNode *child,
const graphene_matrix_t *color_matrix,
const graphene_vec4_t *color_offset);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_repeat_node_new (const graphene_rect_t *bounds,
GskRenderNode *child,
const graphene_rect_t *child_bounds);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_clip_node_new (GskRenderNode *child,
const graphene_rect_t *clip);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_clip_node_get_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_rounded_clip_node_new (GskRenderNode *child,
const GskRoundedRect *clip);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_rounded_clip_node_get_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_shadow_node_new (GskRenderNode *child,
const GskShadow *shadows,
gsize n_shadows);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_blend_node_new (GskRenderNode *bottom,
GskRenderNode *top,
GskBlendMode blend_mode);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_cross_fade_node_new (GskRenderNode *start,
GskRenderNode *end,
double progress);
GDK_AVAILABLE_IN_3_92
GskRenderNode * gsk_text_node_new (PangoFont *font,
PangoGlyphString *glyphs,
const GdkRGBA *color,
double x,
double y);
GDK_AVAILABLE_IN_3_92
GskRenderNode * gsk_blur_node_new (GskRenderNode *child,
double radius);
GDK_AVAILABLE_IN_3_90
void gsk_render_node_set_scaling_filters (GskRenderNode *node,
GskScalingFilter min_filter,
@ -213,6 +94,226 @@ GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_render_node_deserialize (GBytes *bytes,
GError **error);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_color_node_new (const GdkRGBA *rgba,
const graphene_rect_t *bounds);
GDK_AVAILABLE_IN_3_94
const GdkRGBA * gsk_color_node_peek_color (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_texture_node_new (GskTexture *texture,
const graphene_rect_t *bounds);
GDK_AVAILABLE_IN_3_94
GskTexture * gsk_texture_node_get_texture (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_linear_gradient_node_new (const graphene_rect_t *bounds,
const graphene_point_t *start,
const graphene_point_t *end,
const GskColorStop *color_stops,
gsize n_color_stops);
GDK_AVAILABLE_IN_3_94
const graphene_point_t * gsk_linear_gradient_node_peek_start (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
const graphene_point_t * gsk_linear_gradient_node_peek_end (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
const gsize gsk_linear_gradient_node_get_n_color_stops (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
const GskColorStop * gsk_linear_gradient_node_peek_color_stops (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_repeating_linear_gradient_node_new (const graphene_rect_t *bounds,
const graphene_point_t *start,
const graphene_point_t *end,
const GskColorStop *color_stops,
gsize n_color_stops);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_border_node_new (const GskRoundedRect *outline,
const float border_width[4],
const GdkRGBA border_color[4]);
GDK_AVAILABLE_IN_3_94
const GskRoundedRect * gsk_border_node_peek_outline (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
const float * gsk_border_node_peek_widths (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
const GdkRGBA * gsk_border_node_peek_colors (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_inset_shadow_node_new (const GskRoundedRect *outline,
const GdkRGBA *color,
float dx,
float dy,
float spread,
float blur_radius);
GDK_AVAILABLE_IN_3_94
const GskRoundedRect * gsk_inset_shadow_node_peek_outline (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
const GdkRGBA * gsk_inset_shadow_node_peek_color (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
float gsk_inset_shadow_node_get_dx (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
float gsk_inset_shadow_node_get_dy (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
float gsk_inset_shadow_node_get_spread (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
float gsk_inset_shadow_node_get_blur_radius (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_outset_shadow_node_new (const GskRoundedRect *outline,
const GdkRGBA *color,
float dx,
float dy,
float spread,
float blur_radius);
GDK_AVAILABLE_IN_3_94
const GskRoundedRect * gsk_outset_shadow_node_peek_outline (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
const GdkRGBA * gsk_outset_shadow_node_peek_color (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
float gsk_outset_shadow_node_get_dx (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
float gsk_outset_shadow_node_get_dy (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
float gsk_outset_shadow_node_get_spread (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
float gsk_outset_shadow_node_get_blur_radius (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_cairo_node_new (const graphene_rect_t *bounds);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_cairo_node_new_for_surface (const graphene_rect_t *bounds,
cairo_surface_t *surface);
GDK_AVAILABLE_IN_3_90
cairo_t * gsk_cairo_node_get_draw_context (GskRenderNode *node,
GskRenderer *renderer);
GDK_AVAILABLE_IN_3_94
cairo_surface_t * gsk_cairo_node_get_surface (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_container_node_new (GskRenderNode **children,
guint n_children);
GDK_AVAILABLE_IN_3_90
guint gsk_container_node_get_n_children (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_container_node_get_child (GskRenderNode *node,
guint idx);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_transform_node_new (GskRenderNode *child,
const graphene_matrix_t *transform);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_transform_node_get_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
void gsk_transform_node_get_transform (GskRenderNode *node,
graphene_matrix_t *transform);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_opacity_node_new (GskRenderNode *child,
double opacity);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_opacity_node_get_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
double gsk_opacity_node_get_opacity (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_color_matrix_node_new (GskRenderNode *child,
const graphene_matrix_t *color_matrix,
const graphene_vec4_t *color_offset);
GDK_AVAILABLE_IN_3_94
GskRenderNode * gsk_color_matrix_node_get_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
const graphene_matrix_t *
gsk_color_matrix_node_peek_color_matrix (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
const graphene_vec4_t * gsk_color_matrix_node_peek_color_offset (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_repeat_node_new (const graphene_rect_t *bounds,
GskRenderNode *child,
const graphene_rect_t *child_bounds);
GDK_AVAILABLE_IN_3_94
GskRenderNode * gsk_repeat_node_get_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
const graphene_rect_t * gsk_repeat_node_peek_child_bounds (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_clip_node_new (GskRenderNode *child,
const graphene_rect_t *clip);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_clip_node_get_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
const graphene_rect_t * gsk_clip_node_peek_clip (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_rounded_clip_node_new (GskRenderNode *child,
const GskRoundedRect *clip);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_rounded_clip_node_get_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
const GskRoundedRect * gsk_rounded_clip_node_peek_clip (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_shadow_node_new (GskRenderNode *child,
const GskShadow *shadows,
gsize n_shadows);
GDK_AVAILABLE_IN_3_94
GskRenderNode * gsk_shadow_node_get_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
const GskShadow * gsk_shadow_node_peek_shadow (GskRenderNode *node,
gsize i);
GDK_AVAILABLE_IN_3_94
gsize gsk_shadow_node_get_n_shadows (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_blend_node_new (GskRenderNode *bottom,
GskRenderNode *top,
GskBlendMode blend_mode);
GDK_AVAILABLE_IN_3_94
GskRenderNode * gsk_blend_node_get_bottom_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
GskRenderNode * gsk_blend_node_get_top_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
GskBlendMode gsk_blend_node_get_blend_mode (GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
GskRenderNode * gsk_cross_fade_node_new (GskRenderNode *start,
GskRenderNode *end,
double progress);
GDK_AVAILABLE_IN_3_94
GskRenderNode * gsk_cross_fade_node_get_start_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
GskRenderNode * gsk_cross_fade_node_get_end_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
double gsk_cross_fade_node_get_progress (GskRenderNode *node);
GDK_AVAILABLE_IN_3_92
GskRenderNode * gsk_text_node_new (PangoFont *font,
PangoGlyphString *glyphs,
const GdkRGBA *color,
double x,
double y);
GDK_AVAILABLE_IN_3_94
PangoFont * gsk_text_node_get_font (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
PangoGlyphString * gsk_text_node_get_glyphs (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
const GdkRGBA * gsk_text_node_get_color (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
float gsk_text_node_get_x (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
float gsk_text_node_get_y (GskRenderNode *node);
GDK_AVAILABLE_IN_3_92
GskRenderNode * gsk_blur_node_new (GskRenderNode *child,
double radius);
GDK_AVAILABLE_IN_3_94
GskRenderNode * gsk_blur_node_get_child (GskRenderNode *node);
GDK_AVAILABLE_IN_3_94
double gsk_blur_node_get_radius (GskRenderNode *node);
G_END_DECLS
#endif /* __GSK_RENDER_NODE_H__ */

View File

@ -31,83 +31,22 @@ struct _GskRenderNodeClass
GskRenderNodeType node_type;
gsize struct_size;
const char *type_name;
void (* finalize) (GskRenderNode *node);
void (* draw) (GskRenderNode *node,
cairo_t *cr);
GVariant * (* serialize) (GskRenderNode *node);
GskRenderNode * (* deserialize) (GVariant *variant,
GError **error);
void (* finalize) (GskRenderNode *node);
void (* draw) (GskRenderNode *node,
cairo_t *cr);
GVariant * (* serialize) (GskRenderNode *node);
GskRenderNode * (* deserialize) (GVariant *variant,
GError **error);
};
GskRenderNode *gsk_render_node_new (const GskRenderNodeClass *node_class, gsize extra_size);
GskRenderNode * gsk_render_node_new (const GskRenderNodeClass *node_class,
gsize extra_size);
GVariant * gsk_render_node_serialize_node (GskRenderNode *node);
GskRenderNode * gsk_render_node_deserialize_node (GskRenderNodeType type, GVariant *variant, GError **error);
double gsk_opacity_node_get_opacity (GskRenderNode *node);
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);
GskRenderNode * gsk_repeat_node_get_child (GskRenderNode *node);
const graphene_rect_t * gsk_repeat_node_peek_child_bounds (GskRenderNode *node);
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);
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);
cairo_surface_t *gsk_cairo_node_get_surface (GskRenderNode *node);
GskTexture *gsk_texture_node_get_texture (GskRenderNode *node);
PangoFont *gsk_text_node_get_font (GskRenderNode *node);
PangoGlyphString *gsk_text_node_get_glyphs (GskRenderNode *node);
const GdkRGBA *gsk_text_node_get_color (GskRenderNode *node);
float gsk_text_node_get_x (GskRenderNode *node);
float gsk_text_node_get_y (GskRenderNode *node);
const GdkRGBA *gsk_color_node_peek_color (GskRenderNode *node);
const graphene_rect_t * gsk_clip_node_peek_clip (GskRenderNode *node);
const GskRoundedRect * gsk_rounded_clip_node_peek_clip (GskRenderNode *node);
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);
void gsk_transform_node_get_transform (GskRenderNode *node, graphene_matrix_t *transform);
GskRenderNode * gsk_blend_node_get_bottom_child (GskRenderNode *node);
GskRenderNode * gsk_blend_node_get_top_child (GskRenderNode *node);
GskBlendMode gsk_blend_node_get_blend_mode (GskRenderNode *node);
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);
GskRenderNode * gsk_blur_node_get_child (GskRenderNode *node);
double gsk_blur_node_get_radius (GskRenderNode *node);
GVariant * gsk_render_node_serialize_node (GskRenderNode *node);
GskRenderNode * gsk_render_node_deserialize_node (GskRenderNodeType type,
GVariant *variant,
GError **error);
G_END_DECLS