diff options
author | Matthias Clasen <mclasen@redhat.com> | 2017-10-20 08:06:20 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-10-20 13:54:01 +0200 |
commit | eee89587c3afe0c8c240e2bf26cad4719c6bf39a (patch) | |
tree | c4078e79d3405d7bfbf6ffdfc28a4effef61e587 /gsk | |
parent | 0e1785ed4861164d08afa660225100474f8247c5 (diff) | |
download | gtk+-eee89587c3afe0c8c240e2bf26cad4719c6bf39a.tar.gz |
Make render node getter public
Keeping these private does not really buy us anything.
Diffstat (limited to 'gsk')
-rw-r--r-- | gsk/gskrendernode.h | 191 | ||||
-rw-r--r-- | gsk/gskrendernodeprivate.h | 87 |
2 files changed, 159 insertions, 119 deletions
diff --git a/gsk/gskrendernode.h b/gsk/gskrendernode.h index 8d3b75de4c..1b0fba6a72 100644 --- a/gsk/gskrendernode.h +++ b/gsk/gskrendernode.h @@ -67,30 +67,78 @@ GDK_AVAILABLE_IN_3_90 GskRenderNodeType gsk_render_node_get_node_type (GskRenderNode *node); GDK_AVAILABLE_IN_3_90 +void gsk_render_node_set_scaling_filters (GskRenderNode *node, + GskScalingFilter min_filter, + GskScalingFilter mag_filter); + +GDK_AVAILABLE_IN_3_90 +void gsk_render_node_set_name (GskRenderNode *node, + const char *name); +GDK_AVAILABLE_IN_3_90 +const char * gsk_render_node_get_name (GskRenderNode *node); +GDK_AVAILABLE_IN_3_90 +void gsk_render_node_get_bounds (GskRenderNode *node, + graphene_rect_t *bounds); + +GDK_AVAILABLE_IN_3_90 +void gsk_render_node_draw (GskRenderNode *node, + cairo_t *cr); + +GDK_AVAILABLE_IN_3_90 +GBytes * gsk_render_node_serialize (GskRenderNode *node); +GDK_AVAILABLE_IN_3_90 +gboolean gsk_render_node_write_to_file (GskRenderNode *node, + const char *filename, + GError **error); +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); +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); +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, @@ -99,6 +147,19 @@ GskRenderNode * gsk_inset_shadow_node_new (const GskRounde 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, @@ -106,6 +167,18 @@ GskRenderNode * gsk_outset_shadow_node_new (const GskRounde 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); @@ -115,6 +188,8 @@ GskRenderNode * gsk_cairo_node_new_for_surface (const graphene_ 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, @@ -130,88 +205,114 @@ GskRenderNode * gsk_transform_node_new (GskRenderNode 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); +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_90 -void gsk_render_node_set_scaling_filters (GskRenderNode *node, - GskScalingFilter min_filter, - GskScalingFilter mag_filter); - -GDK_AVAILABLE_IN_3_90 -void gsk_render_node_set_name (GskRenderNode *node, - const char *name); -GDK_AVAILABLE_IN_3_90 -const char * gsk_render_node_get_name (GskRenderNode *node); -GDK_AVAILABLE_IN_3_90 -void gsk_render_node_get_bounds (GskRenderNode *node, - graphene_rect_t *bounds); - -GDK_AVAILABLE_IN_3_90 -void gsk_render_node_draw (GskRenderNode *node, - cairo_t *cr); - -GDK_AVAILABLE_IN_3_90 -GBytes * gsk_render_node_serialize (GskRenderNode *node); -GDK_AVAILABLE_IN_3_90 -gboolean gsk_render_node_write_to_file (GskRenderNode *node, - const char *filename, - GError **error); -GDK_AVAILABLE_IN_3_90 -GskRenderNode * gsk_render_node_deserialize (GBytes *bytes, - GError **error); +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 diff --git a/gsk/gskrendernodeprivate.h b/gsk/gskrendernodeprivate.h index c9d7a87e9b..8fafdb37f3 100644 --- a/gsk/gskrendernodeprivate.h +++ b/gsk/gskrendernodeprivate.h @@ -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); -}; - -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); + void (* finalize) (GskRenderNode *node); + void (* draw) (GskRenderNode *node, + cairo_t *cr); + GVariant * (* serialize) (GskRenderNode *node); + GskRenderNode * (* deserialize) (GVariant *variant, + GError **error); +}; -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_render_node_new (const GskRenderNodeClass *node_class, + gsize extra_size); -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 |