diff options
author | Benjamin Otte <otte.benjamin@googlemail.com> | 2020-11-17 19:08:01 +0000 |
---|---|---|
committer | Benjamin Otte <otte.benjamin@googlemail.com> | 2020-11-17 19:08:01 +0000 |
commit | 1c7daece7ac987213c75bf320deaf0e884a39490 (patch) | |
tree | 4d75fc85f02a55d5e0d52bd12af57ffcd7c4a2fd | |
parent | 5cc5022a8fd4188fc88df376a315f5ddb8eca899 (diff) | |
parent | 163c04c1014d90cdbcc8a4e8f1cbe082831521c5 (diff) | |
download | gtk+-1c7daece7ac987213c75bf320deaf0e884a39490.tar.gz |
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
See merge request GNOME/gtk!2855
-rw-r--r-- | docs/reference/gsk/gsk4-sections.txt | 46 | ||||
-rw-r--r-- | gsk/broadway/gskbroadwayrenderer.c | 34 | ||||
-rw-r--r-- | gsk/gl/gskglrenderer.c | 58 | ||||
-rw-r--r-- | gsk/gskrendernode.h | 46 | ||||
-rw-r--r-- | gsk/gskrendernodeimpl.c | 100 | ||||
-rw-r--r-- | gsk/gskrendernodeparser.c | 50 | ||||
-rw-r--r-- | gsk/vulkan/gskvulkanrenderpass.c | 48 | ||||
-rw-r--r-- | gtk/gtkshortcut.c | 2 | ||||
-rw-r--r-- | gtk/gtksnapshot.c | 118 | ||||
-rw-r--r-- | gtk/gtktestutils.c | 10 | ||||
-rw-r--r-- | gtk/gtktextbuffer.c | 28 | ||||
-rw-r--r-- | gtk/inspector/recorder.c | 42 | ||||
-rw-r--r-- | gtk/meson.build | 1 | ||||
-rw-r--r-- | tests/testcolumnview.c | 2 | ||||
-rw-r--r-- | testsuite/gtk/defaultvalue.c | 126 | ||||
-rw-r--r-- | testsuite/gtk/notify.c | 6 | ||||
-rw-r--r-- | testsuite/gtk/objects-finalize.c | 6 |
17 files changed, 398 insertions, 325 deletions
diff --git a/docs/reference/gsk/gsk4-sections.txt b/docs/reference/gsk/gsk4-sections.txt index b0bf7b506b..f671732880 100644 --- a/docs/reference/gsk/gsk4-sections.txt +++ b/docs/reference/gsk/gsk4-sections.txt @@ -64,46 +64,46 @@ gsk_render_node_get_bounds <SUBSECTION Nodes> gsk_color_node_new -gsk_color_node_peek_color +gsk_color_node_get_color gsk_texture_node_new gsk_texture_node_get_texture GskColorStop gsk_linear_gradient_node_new -gsk_linear_gradient_node_peek_start -gsk_linear_gradient_node_peek_end +gsk_linear_gradient_node_get_start +gsk_linear_gradient_node_get_end gsk_linear_gradient_node_get_n_color_stops -gsk_linear_gradient_node_peek_color_stops +gsk_linear_gradient_node_get_color_stops gsk_repeating_linear_gradient_node_new gsk_radial_gradient_node_new gsk_radial_gradient_node_get_n_color_stops -gsk_radial_gradient_node_peek_color_stops +gsk_radial_gradient_node_get_color_stops gsk_radial_gradient_node_get_start gsk_radial_gradient_node_get_end gsk_radial_gradient_node_get_hradius gsk_radial_gradient_node_get_vradius -gsk_radial_gradient_node_peek_center +gsk_radial_gradient_node_get_center gsk_repeating_radial_gradient_node_new gsk_border_node_new -gsk_border_node_peek_outline -gsk_border_node_peek_widths -gsk_border_node_peek_colors +gsk_border_node_get_outline +gsk_border_node_get_widths +gsk_border_node_get_colors gsk_inset_shadow_node_new -gsk_inset_shadow_node_peek_outline -gsk_inset_shadow_node_peek_color +gsk_inset_shadow_node_get_outline +gsk_inset_shadow_node_get_color gsk_inset_shadow_node_get_dx gsk_inset_shadow_node_get_dy gsk_inset_shadow_node_get_spread gsk_inset_shadow_node_get_blur_radius gsk_outset_shadow_node_new -gsk_outset_shadow_node_peek_outline -gsk_outset_shadow_node_peek_color +gsk_outset_shadow_node_get_outline +gsk_outset_shadow_node_get_color gsk_outset_shadow_node_get_dx gsk_outset_shadow_node_get_dy gsk_outset_shadow_node_get_spread gsk_outset_shadow_node_get_blur_radius gsk_cairo_node_new gsk_cairo_node_get_draw_context -gsk_cairo_node_peek_surface +gsk_cairo_node_get_surface gsk_container_node_new gsk_container_node_get_n_children gsk_container_node_get_child @@ -115,20 +115,20 @@ gsk_opacity_node_get_child gsk_opacity_node_get_opacity gsk_color_matrix_node_new gsk_color_matrix_node_get_child -gsk_color_matrix_node_peek_color_matrix -gsk_color_matrix_node_peek_color_offset +gsk_color_matrix_node_get_color_matrix +gsk_color_matrix_node_get_color_offset gsk_repeat_node_new gsk_repeat_node_get_child -gsk_repeat_node_peek_child_bounds +gsk_repeat_node_get_child_bounds gsk_clip_node_new gsk_clip_node_get_child -gsk_clip_node_peek_clip +gsk_clip_node_get_clip gsk_rounded_clip_node_new gsk_rounded_clip_node_get_child -gsk_rounded_clip_node_peek_clip +gsk_rounded_clip_node_get_clip GskShadow gsk_shadow_node_new -gsk_shadow_node_peek_shadow +gsk_shadow_node_get_shadow gsk_shadow_node_get_n_shadows gsk_shadow_node_get_child GskBlendMode @@ -141,9 +141,9 @@ gsk_cross_fade_node_get_start_child gsk_cross_fade_node_get_end_child gsk_cross_fade_node_get_progress gsk_text_node_new -gsk_text_node_peek_font -gsk_text_node_peek_glyphs -gsk_text_node_peek_color +gsk_text_node_get_font +gsk_text_node_get_glyphs +gsk_text_node_get_color gsk_text_node_has_color_glyphs gsk_text_node_get_num_glyphs gsk_text_node_get_offset diff --git a/gsk/broadway/gskbroadwayrenderer.c b/gsk/broadway/gskbroadwayrenderer.c index e2b43146fe..80a3f84968 100644 --- a/gsk/broadway/gskbroadwayrenderer.c +++ b/gsk/broadway/gskbroadwayrenderer.c @@ -583,7 +583,7 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer, case GSK_CAIRO_NODE: if (add_new_node (renderer, node, BROADWAY_NODE_TEXTURE, clip_bounds)) { - cairo_surface_t *surface = gsk_cairo_node_peek_surface (node); + cairo_surface_t *surface = gsk_cairo_node_get_surface (node); cairo_surface_t *image_surface = NULL; GdkTexture *texture; guint32 texture_id; @@ -620,7 +620,7 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer, if (add_new_node (renderer, node, BROADWAY_NODE_COLOR, clip_bounds)) { add_rect (nodes, &node->bounds, offset_x, offset_y); - add_rgba (nodes, gsk_color_node_peek_color (node)); + add_rgba (nodes, gsk_color_node_get_color (node)); } return; @@ -628,19 +628,19 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer, if (add_new_node (renderer, node, BROADWAY_NODE_BORDER, clip_bounds)) { int i; - add_rounded_rect (nodes, gsk_border_node_peek_outline (node), offset_x, offset_y); + add_rounded_rect (nodes, gsk_border_node_get_outline (node), offset_x, offset_y); for (i = 0; i < 4; i++) - add_float (nodes, gsk_border_node_peek_widths (node)[i]); + add_float (nodes, gsk_border_node_get_widths (node)[i]); for (i = 0; i < 4; i++) - add_rgba (nodes, &gsk_border_node_peek_colors (node)[i]); + add_rgba (nodes, &gsk_border_node_get_colors (node)[i]); } return; case GSK_OUTSET_SHADOW_NODE: if (add_new_node (renderer, node, BROADWAY_NODE_OUTSET_SHADOW, clip_bounds)) { - add_rounded_rect (nodes, gsk_outset_shadow_node_peek_outline (node), offset_x, offset_y); - add_rgba (nodes, gsk_outset_shadow_node_peek_color (node)); + add_rounded_rect (nodes, gsk_outset_shadow_node_get_outline (node), offset_x, offset_y); + add_rgba (nodes, gsk_outset_shadow_node_get_color (node)); add_float (nodes, gsk_outset_shadow_node_get_dx (node)); add_float (nodes, gsk_outset_shadow_node_get_dy (node)); add_float (nodes, gsk_outset_shadow_node_get_spread (node)); @@ -651,8 +651,8 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer, case GSK_INSET_SHADOW_NODE: if (add_new_node (renderer, node, BROADWAY_NODE_INSET_SHADOW, clip_bounds)) { - add_rounded_rect (nodes, gsk_inset_shadow_node_peek_outline (node), offset_x, offset_y); - add_rgba (nodes, gsk_inset_shadow_node_peek_color (node)); + add_rounded_rect (nodes, gsk_inset_shadow_node_get_outline (node), offset_x, offset_y); + add_rgba (nodes, gsk_inset_shadow_node_get_color (node)); add_float (nodes, gsk_inset_shadow_node_get_dx (node)); add_float (nodes, gsk_inset_shadow_node_get_dy (node)); add_float (nodes, gsk_inset_shadow_node_get_spread (node)); @@ -666,12 +666,12 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer, guint i, n; add_rect (nodes, &node->bounds, offset_x, offset_y); - add_point (nodes, gsk_linear_gradient_node_peek_start (node), offset_x, offset_y); - add_point (nodes, gsk_linear_gradient_node_peek_end (node), offset_x, offset_y); + add_point (nodes, gsk_linear_gradient_node_get_start (node), offset_x, offset_y); + add_point (nodes, gsk_linear_gradient_node_get_end (node), offset_x, offset_y); n = gsk_linear_gradient_node_get_n_color_stops (node); add_uint32 (nodes, n); for (i = 0; i < n; i++) - add_color_stop (nodes, &gsk_linear_gradient_node_peek_color_stops (node, NULL)[i]); + add_color_stop (nodes, &gsk_linear_gradient_node_get_color_stops (node, NULL)[i]); } return; @@ -685,7 +685,7 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer, add_uint32 (nodes, n_shadows); for (i = 0; i < n_shadows; i++) { - const GskShadow *shadow = gsk_shadow_node_peek_shadow (node, i); + const GskShadow *shadow = gsk_shadow_node_get_shadow (node, i); add_rgba (nodes, &shadow->color); add_float (nodes, shadow->dx); add_float (nodes, shadow->dy); @@ -710,7 +710,7 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer, case GSK_ROUNDED_CLIP_NODE: if (add_new_node (renderer, node, BROADWAY_NODE_ROUNDED_CLIP, clip_bounds)) { - const GskRoundedRect *rclip = gsk_rounded_clip_node_peek_clip (node); + const GskRoundedRect *rclip = gsk_rounded_clip_node_get_clip (node); graphene_rect_t child_bounds = rclip->bounds; if (clip_bounds) @@ -728,7 +728,7 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer, case GSK_CLIP_NODE: if (add_new_node (renderer, node, BROADWAY_NODE_CLIP, clip_bounds)) { - const graphene_rect_t *clip = gsk_clip_node_peek_clip (node); + const graphene_rect_t *clip = gsk_clip_node_get_clip (node); graphene_rect_t child_bounds = *clip; if (clip_bounds) @@ -828,8 +828,8 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer, GskRenderNode *child = gsk_color_matrix_node_get_child (node); if (gsk_render_node_get_node_type (child) == GSK_TEXTURE_NODE) { - const graphene_matrix_t *color_matrix = gsk_color_matrix_node_peek_color_matrix (node); - const graphene_vec4_t *color_offset = gsk_color_matrix_node_peek_color_offset (node); + const graphene_matrix_t *color_matrix = gsk_color_matrix_node_get_color_matrix (node); + const graphene_vec4_t *color_offset = gsk_color_matrix_node_get_color_offset (node); GdkTexture *texture = gsk_texture_node_get_texture (child); GdkTexture *colorized_texture = get_colorized_texture (texture, color_matrix, color_offset); if (add_new_node (renderer, node, BROADWAY_NODE_TEXTURE, clip_bounds)) diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c index 15bad5feaa..46fb18e57c 100644 --- a/gsk/gl/gskglrenderer.c +++ b/gsk/gl/gskglrenderer.c @@ -128,7 +128,7 @@ print_render_node_tree (GskRenderNode *root, int level) break; case GSK_COLOR_NODE: - g_print ("%*s Color %s\n", level * INDENT, " ", gdk_rgba_to_string (gsk_color_node_peek_color (root))); + g_print ("%*s Color %s\n", level * INDENT, " ", gdk_rgba_to_string (gsk_color_node_get_color (root))); break; case GSK_SHADOW_NODE: @@ -291,8 +291,8 @@ init_projection_matrix (graphene_matrix_t *out_proj, static inline gboolean G_GNUC_PURE color_matrix_modifies_alpha (GskRenderNode *node) { - const graphene_matrix_t *matrix = gsk_color_matrix_node_peek_color_matrix (node); - const graphene_vec4_t *offset = gsk_color_matrix_node_peek_color_offset (node); + const graphene_matrix_t *matrix = gsk_color_matrix_node_get_color_matrix (node); + const graphene_vec4_t *offset = gsk_color_matrix_node_get_color_offset (node); graphene_vec4_t row3; if (graphene_vec4_get_w (offset) != 0.0f) @@ -750,8 +750,8 @@ render_text_node (GskGLRenderer *self, const GdkRGBA *color, gboolean force_color) { - const PangoFont *font = gsk_text_node_peek_font (node); - const PangoGlyphInfo *glyphs = gsk_text_node_peek_glyphs (node, NULL); + const PangoFont *font = gsk_text_node_get_font (node); + const PangoGlyphInfo *glyphs = gsk_text_node_get_glyphs (node, NULL); const float text_scale = ops_get_scale (builder); const graphene_point_t *offset = gsk_text_node_get_offset (node); const guint num_glyphs = gsk_text_node_get_num_glyphs (node); @@ -834,9 +834,9 @@ render_border_node (GskGLRenderer *self, GskRenderNode *node, RenderOpBuilder *builder) { - const GdkRGBA *colors = gsk_border_node_peek_colors (node); - const GskRoundedRect *rounded_outline = gsk_border_node_peek_outline (node); - const float *widths = gsk_border_node_peek_widths (node); + const GdkRGBA *colors = gsk_border_node_get_colors (node); + const GskRoundedRect *rounded_outline = gsk_border_node_get_outline (node); + const float *widths = gsk_border_node_get_widths (node); int i; struct { float w; @@ -975,7 +975,7 @@ render_color_node (GskGLRenderer *self, RenderOpBuilder *builder) { ops_set_program (builder, &self->programs->color_program); - ops_set_color (builder, gsk_color_node_peek_color (node)); + ops_set_color (builder, gsk_color_node_get_color (node)); load_vertex_data (ops_draw (builder, NULL), &node->bounds, builder); } @@ -1426,9 +1426,9 @@ render_linear_gradient_node (GskGLRenderer *self, if (n_color_stops < GL_MAX_GRADIENT_STOPS) { - const GskColorStop *stops = gsk_linear_gradient_node_peek_color_stops (node, NULL); - const graphene_point_t *start = gsk_linear_gradient_node_peek_start (node); - const graphene_point_t *end = gsk_linear_gradient_node_peek_end (node); + const GskColorStop *stops = gsk_linear_gradient_node_get_color_stops (node, NULL); + const graphene_point_t *start = gsk_linear_gradient_node_get_start (node); + const graphene_point_t *end = gsk_linear_gradient_node_get_end (node); ops_set_program (builder, &self->programs->linear_gradient_program); ops_set_linear_gradient (builder, @@ -1456,8 +1456,8 @@ render_radial_gradient_node (GskGLRenderer *self, if (n_color_stops < GL_MAX_GRADIENT_STOPS) { - const GskColorStop *stops = gsk_radial_gradient_node_peek_color_stops (node, NULL); - const graphene_point_t *center = gsk_radial_gradient_node_peek_center (node); + const GskColorStop *stops = gsk_radial_gradient_node_get_color_stops (node, NULL); + const graphene_point_t *center = gsk_radial_gradient_node_get_center (node); const float start = gsk_radial_gradient_node_get_start (node); const float end = gsk_radial_gradient_node_get_end (node); const float hradius = gsk_radial_gradient_node_get_hradius (node); @@ -1628,7 +1628,7 @@ render_clip_node (GskGLRenderer *self, GskRenderNode *node, RenderOpBuilder *builder) { - const graphene_rect_t *clip = gsk_clip_node_peek_clip (node); + const graphene_rect_t *clip = gsk_clip_node_get_clip (node); GskRenderNode *child = gsk_clip_node_get_child (node); render_clipped_child (self, builder, clip, child); @@ -1641,7 +1641,7 @@ render_rounded_clip_node (GskGLRenderer *self, { const float scale_x = builder->scale_x; const float scale_y = builder->scale_y; - const GskRoundedRect *clip = gsk_rounded_clip_node_peek_clip (node); + const GskRoundedRect *clip = gsk_rounded_clip_node_get_clip (node); GskRenderNode *child = gsk_rounded_clip_node_get_child (node); GskRoundedRect transformed_clip; gboolean need_offscreen; @@ -1761,8 +1761,8 @@ render_color_matrix_node (GskGLRenderer *self, ops_set_program (builder, &self->programs->color_matrix_program); ops_set_color_matrix (builder, - gsk_color_matrix_node_peek_color_matrix (node), - gsk_color_matrix_node_peek_color_offset (node)); + gsk_color_matrix_node_get_color_matrix (node), + gsk_color_matrix_node_get_color_offset (node)); ops_set_texture (builder, region.texture_id); @@ -1978,9 +1978,9 @@ render_unblurred_inset_shadow_node (GskGLRenderer *self, g_assert (blur_radius == 0); ops_set_program (builder, &self->programs->inset_shadow_program); - ops_set_inset_shadow (builder, transform_rect (self, builder, gsk_inset_shadow_node_peek_outline (node)), + ops_set_inset_shadow (builder, transform_rect (self, builder, gsk_inset_shadow_node_get_outline (node)), spread, - gsk_inset_shadow_node_peek_color (node), + gsk_inset_shadow_node_get_color (node), dx, dy); load_vertex_data (ops_draw (builder, NULL), &node->bounds, builder); @@ -1997,7 +1997,7 @@ render_inset_shadow_node (GskGLRenderer *self, const float blur_extra = blur_radius * 2.0; /* 2.0 = shader radius_multiplier */ const float dx = gsk_inset_shadow_node_get_dx (node); const float dy = gsk_inset_shadow_node_get_dy (node); - const GskRoundedRect *node_outline = gsk_inset_shadow_node_peek_outline (node); + const GskRoundedRect *node_outline = gsk_inset_shadow_node_get_outline (node); float texture_width; float texture_height; int blurred_texture_id; @@ -2069,7 +2069,7 @@ render_inset_shadow_node (GskGLRenderer *self, ops_set_program (builder, &self->programs->inset_shadow_program); ops_set_inset_shadow (builder, transform_rect (self, builder, &outline_to_blur), spread * MAX (scale_x, scale_y), - gsk_inset_shadow_node_peek_color (node), + gsk_inset_shadow_node_get_color (node), dx * scale_x, dy * scale_y); load_float_vertex_data (ops_draw (builder, NULL), builder, @@ -2130,7 +2130,7 @@ render_unblurred_outset_shadow_node (GskGLRenderer *self, GskRenderNode *node, RenderOpBuilder *builder) { - const GskRoundedRect *outline = gsk_outset_shadow_node_peek_outline (node); + const GskRoundedRect *outline = gsk_outset_shadow_node_get_outline (node); const float x = node->bounds.origin.x; const float y = node->bounds.origin.y; const float w = node->bounds.size.width; @@ -2151,7 +2151,7 @@ render_unblurred_outset_shadow_node (GskGLRenderer *self, ops_set_program (builder, &self->programs->unblurred_outset_shadow_program); ops_set_unblurred_outset_shadow (builder, transform_rect (self, builder, outline), spread, - gsk_outset_shadow_node_peek_color (node), + gsk_outset_shadow_node_get_color (node), dx, dy); /* Corners... */ @@ -2200,8 +2200,8 @@ render_outset_shadow_node (GskGLRenderer *self, const float scale = ops_get_scale (builder); const float scale_x = builder->scale_x; const float scale_y = builder->scale_y; - const GskRoundedRect *outline = gsk_outset_shadow_node_peek_outline (node); - const GdkRGBA *color = gsk_outset_shadow_node_peek_color (node); + const GskRoundedRect *outline = gsk_outset_shadow_node_get_outline (node); + const GdkRGBA *color = gsk_outset_shadow_node_get_color (node); const float blur_radius = gsk_outset_shadow_node_get_blur_radius (node); const float blur_extra = blur_radius * 2.0f; /* 2.0 = shader radius_multiplier */ const int extra_blur_pixels = (int) ceilf(blur_extra / 2.0 * scale); @@ -2529,7 +2529,7 @@ render_shadow_node (GskGLRenderer *self, for (i = 0; i < n_shadows; i ++) { - const GskShadow *shadow = gsk_shadow_node_peek_shadow (node, i); + const GskShadow *shadow = gsk_shadow_node_get_shadow (node, i); const float dx = shadow->dx; const float dy = shadow->dy; TextureRegion region; @@ -2713,7 +2713,7 @@ render_repeat_node (GskGLRenderer *self, RenderOpBuilder *builder) { GskRenderNode *child = gsk_repeat_node_get_child (node); - const graphene_rect_t *child_bounds = gsk_repeat_node_peek_child_bounds (node); + const graphene_rect_t *child_bounds = gsk_repeat_node_get_child_bounds (node); TextureRegion region; gboolean is_offscreen; OpRepeat *op; @@ -3663,7 +3663,7 @@ gsk_gl_renderer_add_render_ops (GskGLRenderer *self, case GSK_TEXT_NODE: render_text_node (self, node, builder, - gsk_text_node_peek_color (node), FALSE); + gsk_text_node_get_color (node), FALSE); break; case GSK_COLOR_MATRIX_NODE: diff --git a/gsk/gskrendernode.h b/gsk/gskrendernode.h index 683bf5d9ff..dba436afda 100644 --- a/gsk/gskrendernode.h +++ b/gsk/gskrendernode.h @@ -179,7 +179,7 @@ GDK_AVAILABLE_IN_ALL GskRenderNode * gsk_color_node_new (const GdkRGBA *rgba, const graphene_rect_t *bounds); GDK_AVAILABLE_IN_ALL -const GdkRGBA * gsk_color_node_peek_color (GskRenderNode *node); +const GdkRGBA * gsk_color_node_get_color (GskRenderNode *node); GDK_AVAILABLE_IN_ALL GType gsk_texture_node_get_type (void) G_GNUC_CONST; @@ -198,13 +198,13 @@ GskRenderNode * gsk_linear_gradient_node_new (const graph const GskColorStop *color_stops, gsize n_color_stops); GDK_AVAILABLE_IN_ALL -const graphene_point_t * gsk_linear_gradient_node_peek_start (GskRenderNode *node); +const graphene_point_t * gsk_linear_gradient_node_get_start (GskRenderNode *node); GDK_AVAILABLE_IN_ALL -const graphene_point_t * gsk_linear_gradient_node_peek_end (GskRenderNode *node); +const graphene_point_t * gsk_linear_gradient_node_get_end (GskRenderNode *node); GDK_AVAILABLE_IN_ALL gsize gsk_linear_gradient_node_get_n_color_stops (GskRenderNode *node); GDK_AVAILABLE_IN_ALL -const GskColorStop * gsk_linear_gradient_node_peek_color_stops (GskRenderNode *node, +const GskColorStop * gsk_linear_gradient_node_get_color_stops (GskRenderNode *node, gsize *n_stops); GDK_AVAILABLE_IN_ALL @@ -230,10 +230,10 @@ GskRenderNode * gsk_radial_gradient_node_new (const graphene_rect_t GDK_AVAILABLE_IN_ALL gsize gsk_radial_gradient_node_get_n_color_stops (GskRenderNode *node); GDK_AVAILABLE_IN_ALL -const GskColorStop * gsk_radial_gradient_node_peek_color_stops (GskRenderNode *node, +const GskColorStop * gsk_radial_gradient_node_get_color_stops (GskRenderNode *node, gsize *n_stops); GDK_AVAILABLE_IN_ALL -const graphene_point_t *gsk_radial_gradient_node_peek_center (GskRenderNode *node); +const graphene_point_t *gsk_radial_gradient_node_get_center (GskRenderNode *node); GDK_AVAILABLE_IN_ALL float gsk_radial_gradient_node_get_hradius (GskRenderNode *node); GDK_AVAILABLE_IN_ALL @@ -262,11 +262,11 @@ GskRenderNode * gsk_border_node_new (const GskRounde const float border_width[4], const GdkRGBA border_color[4]); GDK_AVAILABLE_IN_ALL -const GskRoundedRect * gsk_border_node_peek_outline (GskRenderNode *node); +const GskRoundedRect * gsk_border_node_get_outline (GskRenderNode *node); GDK_AVAILABLE_IN_ALL -const float * gsk_border_node_peek_widths (GskRenderNode *node); +const float * gsk_border_node_get_widths (GskRenderNode *node); GDK_AVAILABLE_IN_ALL -const GdkRGBA * gsk_border_node_peek_colors (GskRenderNode *node); +const GdkRGBA * gsk_border_node_get_colors (GskRenderNode *node); GDK_AVAILABLE_IN_ALL GType gsk_inset_shadow_node_get_type (void) G_GNUC_CONST; @@ -278,9 +278,9 @@ GskRenderNode * gsk_inset_shadow_node_new (const GskRounde float spread, float blur_radius); GDK_AVAILABLE_IN_ALL -const GskRoundedRect * gsk_inset_shadow_node_peek_outline (GskRenderNode *node); +const GskRoundedRect * gsk_inset_shadow_node_get_outline (GskRenderNode *node); GDK_AVAILABLE_IN_ALL -const GdkRGBA * gsk_inset_shadow_node_peek_color (GskRenderNode *node); +const GdkRGBA * gsk_inset_shadow_node_get_color (GskRenderNode *node); GDK_AVAILABLE_IN_ALL float gsk_inset_shadow_node_get_dx (GskRenderNode *node); GDK_AVAILABLE_IN_ALL @@ -300,9 +300,9 @@ GskRenderNode * gsk_outset_shadow_node_new (const GskRounde float spread, float blur_radius); GDK_AVAILABLE_IN_ALL -const GskRoundedRect * gsk_outset_shadow_node_peek_outline (GskRenderNode *node); +const GskRoundedRect * gsk_outset_shadow_node_get_outline (GskRenderNode *node); GDK_AVAILABLE_IN_ALL -const GdkRGBA * gsk_outset_shadow_node_peek_color (GskRenderNode *node); +const GdkRGBA * gsk_outset_shadow_node_get_color (GskRenderNode *node); GDK_AVAILABLE_IN_ALL float gsk_outset_shadow_node_get_dx (GskRenderNode *node); GDK_AVAILABLE_IN_ALL @@ -319,7 +319,7 @@ GskRenderNode * gsk_cairo_node_new (const graphene_ GDK_AVAILABLE_IN_ALL cairo_t * gsk_cairo_node_get_draw_context (GskRenderNode *node); GDK_AVAILABLE_IN_ALL -cairo_surface_t * gsk_cairo_node_peek_surface (GskRenderNode *node); +cairo_surface_t * gsk_cairo_node_get_surface (GskRenderNode *node); GDK_AVAILABLE_IN_ALL GType gsk_container_node_get_type (void) G_GNUC_CONST; @@ -362,9 +362,9 @@ GDK_AVAILABLE_IN_ALL GskRenderNode * gsk_color_matrix_node_get_child (GskRenderNode *node); GDK_AVAILABLE_IN_ALL const graphene_matrix_t * - gsk_color_matrix_node_peek_color_matrix (GskRenderNode *node); + gsk_color_matrix_node_get_color_matrix (GskRenderNode *node); GDK_AVAILABLE_IN_ALL -const graphene_vec4_t * gsk_color_matrix_node_peek_color_offset (GskRenderNode *node); +const graphene_vec4_t * gsk_color_matrix_node_get_color_offset (GskRenderNode *node); GDK_AVAILABLE_IN_ALL GType gsk_repeat_node_get_type (void) G_GNUC_CONST; @@ -375,7 +375,7 @@ GskRenderNode * gsk_repeat_node_new (const graphene_ GDK_AVAILABLE_IN_ALL GskRenderNode * gsk_repeat_node_get_child (GskRenderNode *node); GDK_AVAILABLE_IN_ALL -const graphene_rect_t * gsk_repeat_node_peek_child_bounds (GskRenderNode *node); +const graphene_rect_t * gsk_repeat_node_get_child_bounds (GskRenderNode *node); GDK_AVAILABLE_IN_ALL GType gsk_clip_node_get_type (void) G_GNUC_CONST; @@ -385,7 +385,7 @@ GskRenderNode * gsk_clip_node_new (GskRenderNode GDK_AVAILABLE_IN_ALL GskRenderNode * gsk_clip_node_get_child (GskRenderNode *node); GDK_AVAILABLE_IN_ALL -const graphene_rect_t * gsk_clip_node_peek_clip (GskRenderNode *node); +const graphene_rect_t * gsk_clip_node_get_clip (GskRenderNode *node); GDK_AVAILABLE_IN_ALL GType gsk_rounded_clip_node_get_type (void) G_GNUC_CONST; @@ -395,7 +395,7 @@ GskRenderNode * gsk_rounded_clip_node_new (GskRenderNode GDK_AVAILABLE_IN_ALL GskRenderNode * gsk_rounded_clip_node_get_child (GskRenderNode *node); GDK_AVAILABLE_IN_ALL -const GskRoundedRect * gsk_rounded_clip_node_peek_clip (GskRenderNode *node); +const GskRoundedRect * gsk_rounded_clip_node_get_clip (GskRenderNode *node); GDK_AVAILABLE_IN_ALL GType gsk_shadow_node_get_type (void) G_GNUC_CONST; @@ -406,7 +406,7 @@ GskRenderNode * gsk_shadow_node_new (GskRenderNode GDK_AVAILABLE_IN_ALL GskRenderNode * gsk_shadow_node_get_child (GskRenderNode *node); GDK_AVAILABLE_IN_ALL -const GskShadow * gsk_shadow_node_peek_shadow (GskRenderNode *node, +const GskShadow * gsk_shadow_node_get_shadow (GskRenderNode *node, gsize i); GDK_AVAILABLE_IN_ALL gsize gsk_shadow_node_get_n_shadows (GskRenderNode *node); @@ -445,15 +445,15 @@ GskRenderNode * gsk_text_node_new (PangoFont const GdkRGBA *color, const graphene_point_t *offset); GDK_AVAILABLE_IN_ALL -PangoFont * gsk_text_node_peek_font (GskRenderNode *node); +PangoFont * gsk_text_node_get_font (GskRenderNode *node); gboolean gsk_text_node_has_color_glyphs (GskRenderNode *node); GDK_AVAILABLE_IN_ALL guint gsk_text_node_get_num_glyphs (GskRenderNode *node); GDK_AVAILABLE_IN_ALL -const PangoGlyphInfo *gsk_text_node_peek_glyphs (GskRenderNode *node, +const PangoGlyphInfo *gsk_text_node_get_glyphs (GskRenderNode *node, guint *n_glyphs); GDK_AVAILABLE_IN_ALL -const GdkRGBA * gsk_text_node_peek_color (GskRenderNode *node); +const GdkRGBA * gsk_text_node_get_color (GskRenderNode *node); GDK_AVAILABLE_IN_ALL const graphene_point_t *gsk_text_node_get_offset (GskRenderNode *node); diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index b104372baf..e5228d88c9 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c @@ -86,7 +86,7 @@ gsk_color_node_diff (GskRenderNode *node1, } /** - * gsk_color_node_peek_color: + * gsk_color_node_get_color: * @node: (type GskColorNode): a #GskColorNode * * Retrieves the color of the given @node. @@ -94,7 +94,7 @@ gsk_color_node_diff (GskRenderNode *node1, * Returns: (transfer none): the color of the node */ const GdkRGBA * -gsk_color_node_peek_color (GskRenderNode *node) +gsk_color_node_get_color (GskRenderNode *node) { GskColorNode *self = (GskColorNode *) node; @@ -322,7 +322,7 @@ gsk_repeating_linear_gradient_node_new (const graphene_rect_t *bounds, } /** - * gsk_linear_gradient_node_peek_start: + * gsk_linear_gradient_node_get_start: * @node: (type GskLinearGradientNode): a #GskRenderNode for a linear gradient * * Retrieves the initial point of the linear gradient. @@ -330,7 +330,7 @@ gsk_repeating_linear_gradient_node_new (const graphene_rect_t *bounds, * Returns: (transfer none): the initial point */ const graphene_point_t * -gsk_linear_gradient_node_peek_start (GskRenderNode *node) +gsk_linear_gradient_node_get_start (GskRenderNode *node) { GskLinearGradientNode *self = (GskLinearGradientNode *) node; @@ -338,7 +338,7 @@ gsk_linear_gradient_node_peek_start (GskRenderNode *node) } /** - * gsk_linear_gradient_node_peek_end: + * gsk_linear_gradient_node_get_end: * @node: (type GskLinearGradientNode): a #GskRenderNode for a linear gradient * * Retrieves the final point of the linear gradient. @@ -346,7 +346,7 @@ gsk_linear_gradient_node_peek_start (GskRenderNode *node) * Returns: (transfer none): the final point */ const graphene_point_t * -gsk_linear_gradient_node_peek_end (GskRenderNode *node) +gsk_linear_gradient_node_get_end (GskRenderNode *node) { GskLinearGradientNode *self = (GskLinearGradientNode *) node; @@ -370,7 +370,7 @@ gsk_linear_gradient_node_get_n_color_stops (GskRenderNode *node) } /** - * gsk_linear_gradient_node_peek_color_stops: + * gsk_linear_gradient_node_get_color_stops: * @node: (type GskLinearGradientNode): a #GskRenderNode for a linear gradient * @n_stops: (out) (optional): the number of color stops in the returned array * @@ -379,8 +379,8 @@ gsk_linear_gradient_node_get_n_color_stops (GskRenderNode *node) * Returns: (array length=n_stops): the color stops in the gradient */ const GskColorStop * -gsk_linear_gradient_node_peek_color_stops (GskRenderNode *node, - gsize *n_stops) +gsk_linear_gradient_node_get_color_stops (GskRenderNode *node, + gsize *n_stops) { GskLinearGradientNode *self = (GskLinearGradientNode *) node; @@ -641,7 +641,7 @@ gsk_radial_gradient_node_get_n_color_stops (GskRenderNode *node) } /** - * gsk_radial_gradient_node_peek_color_stops: + * gsk_radial_gradient_node_get_color_stops: * @node: (type GskRadialGradientNode): a #GskRenderNode for a radial gradient * @n_stops: (out) (optional): the number of color stops in the returned array * @@ -650,8 +650,8 @@ gsk_radial_gradient_node_get_n_color_stops (GskRenderNode *node) * Returns: (array length=n_stops): the color stops in the gradient */ const GskColorStop * -gsk_radial_gradient_node_peek_color_stops (GskRenderNode *node, - gsize *n_stops) +gsk_radial_gradient_node_get_color_stops (GskRenderNode *node, + gsize *n_stops) { GskRadialGradientNode *self = (GskRadialGradientNode *) node; @@ -662,7 +662,7 @@ gsk_radial_gradient_node_peek_color_stops (GskRenderNode *node, } /** - * gsk_radial_gradient_node_peek_center: + * gsk_radial_gradient_node_get_center: * @node: (type GskRadialGradientNode): a #GskRenderNode for a radial gradient * * Retrieves the center pointer for the gradient. @@ -670,7 +670,7 @@ gsk_radial_gradient_node_peek_color_stops (GskRenderNode *node, * Returns: the center point for the gradient */ const graphene_point_t * -gsk_radial_gradient_node_peek_center (GskRenderNode *node) +gsk_radial_gradient_node_get_center (GskRenderNode *node) { GskRadialGradientNode *self = (GskRadialGradientNode *) node; @@ -919,7 +919,7 @@ gsk_border_node_diff (GskRenderNode *node1, } /** - * gsk_border_node_peek_outline: + * gsk_border_node_get_outline: * @node: (type GskBorderNode): a #GskRenderNode for a border * * Retrieves the outline of the border. @@ -927,7 +927,7 @@ gsk_border_node_diff (GskRenderNode *node1, * Returns: the outline of the border */ const GskRoundedRect * -gsk_border_node_peek_outline (GskRenderNode *node) +gsk_border_node_get_outline (GskRenderNode *node) { GskBorderNode *self = (GskBorderNode *) node; @@ -935,7 +935,7 @@ gsk_border_node_peek_outline (GskRenderNode *node) } /** - * gsk_border_node_peek_widths: + * gsk_border_node_get_widths: * @node: (type GskBorderNode): a #GskRenderNode for a border * * Retrieves the stroke widths of the border. @@ -945,7 +945,7 @@ gsk_border_node_peek_outline (GskRenderNode *node) * respectively */ const float * -gsk_border_node_peek_widths (GskRenderNode *node) +gsk_border_node_get_widths (GskRenderNode *node) { GskBorderNode *self = (GskBorderNode *) node; @@ -953,7 +953,7 @@ gsk_border_node_peek_widths (GskRenderNode *node) } /** - * gsk_border_node_peek_colors: + * gsk_border_node_get_colors: * @node: (type GskBorderNode): a #GskRenderNode for a border * * Retrieves the colors of the border. @@ -962,7 +962,7 @@ gsk_border_node_peek_widths (GskRenderNode *node) * for the top, right, bottom and left color of the border */ const GdkRGBA * -gsk_border_node_peek_colors (GskRenderNode *node) +gsk_border_node_get_colors (GskRenderNode *node) { GskBorderNode *self = (GskBorderNode *) node; @@ -1588,7 +1588,7 @@ gsk_inset_shadow_node_new (const GskRoundedRect *outline, } /** - * gsk_inset_shadow_node_peek_outline: + * gsk_inset_shadow_node_get_outline: * @node: (type GskInsetShadowNode): a #GskRenderNode for an inset shadow * * Retrieves the outline rectangle of the inset shadow. @@ -1596,7 +1596,7 @@ gsk_inset_shadow_node_new (const GskRoundedRect *outline, * Returns: (transfer none): a rounded rectangle */ const GskRoundedRect * -gsk_inset_shadow_node_peek_outline (GskRenderNode *node) +gsk_inset_shadow_node_get_outline (GskRenderNode *node) { GskInsetShadowNode *self = (GskInsetShadowNode *) node; @@ -1606,7 +1606,7 @@ gsk_inset_shadow_node_peek_outline (GskRenderNode *node) } /** - * gsk_inset_shadow_node_peek_color: + * gsk_inset_shadow_node_get_color: * @node: (type GskInsetShadowNode): a #GskRenderNode for an inset shadow * * Retrieves the color of the inset shadow. @@ -1614,7 +1614,7 @@ gsk_inset_shadow_node_peek_outline (GskRenderNode *node) * Returns: (transfer none): the color of the shadow */ const GdkRGBA * -gsk_inset_shadow_node_peek_color (GskRenderNode *node) +gsk_inset_shadow_node_get_color (GskRenderNode *node) { GskInsetShadowNode *self = (GskInsetShadowNode *) node; @@ -1897,7 +1897,7 @@ gsk_outset_shadow_node_new (const GskRoundedRect *outline, } /** - * gsk_outset_shadow_node_peek_outline: + * gsk_outset_shadow_node_get_outline: * @node: (type GskOutsetShadowNode): a #GskRenderNode for an outset shadow * * Retrieves the outline rectangle of the outset shadow. @@ -1905,7 +1905,7 @@ gsk_outset_shadow_node_new (const GskRoundedRect *outline, * Returns: (transfer none): a rounded rectangle */ const GskRoundedRect * -gsk_outset_shadow_node_peek_outline (GskRenderNode *node) +gsk_outset_shadow_node_get_outline (GskRenderNode *node) { GskOutsetShadowNode *self = (GskOutsetShadowNode *) node; @@ -1915,7 +1915,7 @@ gsk_outset_shadow_node_peek_outline (GskRenderNode *node) } /** - * gsk_outset_shadow_node_peek_color: + * gsk_outset_shadow_node_get_color: * @node: (type GskOutsetShadowNode): a #GskRenderNode for an outset shadow * * Retrieves the color of the outset shadow. @@ -1923,7 +1923,7 @@ gsk_outset_shadow_node_peek_outline (GskRenderNode *node) * Returns: (transfer none): a color */ const GdkRGBA * -gsk_outset_shadow_node_peek_color (GskRenderNode *node) +gsk_outset_shadow_node_get_color (GskRenderNode *node) { GskOutsetShadowNode *self = (GskOutsetShadowNode *) node; @@ -2039,7 +2039,7 @@ gsk_cairo_node_draw (GskRenderNode *node, } /** - * gsk_cairo_node_peek_surface: + * gsk_cairo_node_get_surface: * @node: (type GskCairoNode): a #GskRenderNode for a Cairo surface * * Retrieves the Cairo surface used by the render node. @@ -2047,7 +2047,7 @@ gsk_cairo_node_draw (GskRenderNode *node, * Returns: (transfer none): a Cairo surface */ cairo_surface_t * -gsk_cairo_node_peek_surface (GskRenderNode *node) +gsk_cairo_node_get_surface (GskRenderNode *node) { GskCairoNode *self = (GskCairoNode *) node; @@ -2824,7 +2824,7 @@ gsk_color_matrix_node_get_child (GskRenderNode *node) } /** - * gsk_color_matrix_node_peek_color_matrix: + * gsk_color_matrix_node_get_color_matrix: * @node: (type GskColorMatrixNode): a color matrix #GskRenderNode * * Retrieves the color matrix used by the @node. @@ -2832,7 +2832,7 @@ gsk_color_matrix_node_get_child (GskRenderNode *node) * Returns: a 4x4 color matrix */ const graphene_matrix_t * -gsk_color_matrix_node_peek_color_matrix (GskRenderNode *node) +gsk_color_matrix_node_get_color_matrix (GskRenderNode *node) { GskColorMatrixNode *self = (GskColorMatrixNode *) node; @@ -2842,7 +2842,7 @@ gsk_color_matrix_node_peek_color_matrix (GskRenderNode *node) } /** - * gsk_color_matrix_node_peek_color_offset: + * gsk_color_matrix_node_get_color_offset: * @node: (type GskColorMatrixNode): a color matrix #GskRenderNode * * Retrieves the color offset used by the @node. @@ -2850,7 +2850,7 @@ gsk_color_matrix_node_peek_color_matrix (GskRenderNode *node) * Returns: a color vector */ const graphene_vec4_t * -gsk_color_matrix_node_peek_color_offset (GskRenderNode *node) +gsk_color_matrix_node_get_color_offset (GskRenderNode *node) { GskColorMatrixNode *self = (GskColorMatrixNode *) node; @@ -2974,7 +2974,7 @@ gsk_repeat_node_get_child (GskRenderNode *node) } /** - * gsk_repeat_node_peek_child_bounds: + * gsk_repeat_node_get_child_bounds: * @node: (type GskRepeatNode): a repeat #GskRenderNode * * Retrieves the bounding rectangle of the child of @node. @@ -2982,7 +2982,7 @@ gsk_repeat_node_get_child (GskRenderNode *node) * Returns: (transfer none): a bounding rectangle */ const graphene_rect_t * -gsk_repeat_node_peek_child_bounds (GskRenderNode *node) +gsk_repeat_node_get_child_bounds (GskRenderNode *node) { GskRepeatNode *self = (GskRepeatNode *) node; @@ -3104,7 +3104,7 @@ gsk_clip_node_get_child (GskRenderNode *node) } /** - * gsk_clip_node_peek_clip: + * gsk_clip_node_get_clip: * @node: (type GskClipNode): a #GskClipNode * * Retrieves the clip rectangle for @node. @@ -3112,7 +3112,7 @@ gsk_clip_node_get_child (GskRenderNode *node) * Returns: a clip rectangle */ const graphene_rect_t * -gsk_clip_node_peek_clip (GskRenderNode *node) +gsk_clip_node_get_clip (GskRenderNode *node) { GskClipNode *self = (GskClipNode *) node; @@ -3234,7 +3234,7 @@ gsk_rounded_clip_node_get_child (GskRenderNode *node) } /** - * gsk_rounded_clip_node_peek_clip: + * gsk_rounded_clip_node_get_clip: * @node: (type GskRoundedClipNode): a rounded clip #GskRenderNode * * Retrievs the rounded rectangle used to clip the contents of the @node. @@ -3242,7 +3242,7 @@ gsk_rounded_clip_node_get_child (GskRenderNode *node) * Returns: (transfer none): a rounded rectangle */ const GskRoundedRect * -gsk_rounded_clip_node_peek_clip (GskRenderNode *node) +gsk_rounded_clip_node_get_clip (GskRenderNode *node) { GskRoundedClipNode *self = (GskRoundedClipNode *) node; @@ -3452,7 +3452,7 @@ gsk_shadow_node_get_child (GskRenderNode *node) } /** - * gsk_shadow_node_peek_shadow: + * gsk_shadow_node_get_shadow: * @node: (type GskShadowNode): a shadow #GskRenderNode * @i: the given index * @@ -3461,8 +3461,8 @@ gsk_shadow_node_get_child (GskRenderNode *node) * Returns: (transfer none): the shadow data */ const GskShadow * -gsk_shadow_node_peek_shadow (GskRenderNode *node, - gsize i) +gsk_shadow_node_get_shadow (GskRenderNode *node, + gsize i) { GskShadowNode *self = (GskShadowNode *) node; @@ -3984,7 +3984,7 @@ gsk_text_node_new (PangoFont *font, } /** - * gsk_text_node_peek_color: + * gsk_text_node_get_color: * @node: (type GskTextNode): a text #GskRenderNode * * Retrieves the color used by the text @node. @@ -3992,7 +3992,7 @@ gsk_text_node_new (PangoFont *font, * Returns: (transfer none): the text color */ const GdkRGBA * -gsk_text_node_peek_color (GskRenderNode *node) +gsk_text_node_get_color (GskRenderNode *node) { GskTextNode *self = (GskTextNode *) node; @@ -4002,7 +4002,7 @@ gsk_text_node_peek_color (GskRenderNode *node) } /** - * gsk_text_node_peek_font: + * gsk_text_node_get_font: * @node: (type GskTextNode): The #GskRenderNode * * Returns the font used by the text @node. @@ -4010,7 +4010,7 @@ gsk_text_node_peek_color (GskRenderNode *node) * Returns: (transfer none): the font */ PangoFont * -gsk_text_node_peek_font (GskRenderNode *node) +gsk_text_node_get_font (GskRenderNode *node) { GskTextNode *self = (GskTextNode *) node; @@ -4056,7 +4056,7 @@ gsk_text_node_get_num_glyphs (GskRenderNode *node) } /** - * gsk_text_node_peek_glyphs: + * gsk_text_node_get_glyphs: * @node: (type GskTextNode): a text #GskRenderNode * @n_glyphs: (out) (optional): the number of glyphs returned * @@ -4065,8 +4065,8 @@ gsk_text_node_get_num_glyphs (GskRenderNode *node) * Returns: (transfer none) (array length=n_glyphs): the glyph information */ const PangoGlyphInfo * -gsk_text_node_peek_glyphs (GskRenderNode *node, - guint *n_glyphs) +gsk_text_node_get_glyphs (GskRenderNode *node, + guint *n_glyphs) { GskTextNode *self = (GskTextNode *) node; diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c index 2be0a55393..fd62b6d4c3 100644 --- a/gsk/gskrendernodeparser.c +++ b/gsk/gskrendernodeparser.c @@ -2274,7 +2274,7 @@ render_node_print (Printer *p, { start_node (p, "color"); append_rect_param (p, "bounds", &node->bounds); - append_rgba_param (p, "color", gsk_color_node_peek_color (node)); + append_rgba_param (p, "color", gsk_color_node_get_color (node)); end_node (p); } break; @@ -2295,7 +2295,7 @@ render_node_print (Printer *p, case GSK_LINEAR_GRADIENT_NODE: { const gsize n_stops = gsk_linear_gradient_node_get_n_color_stops (node); - const GskColorStop *stops = gsk_linear_gradient_node_peek_color_stops (node, NULL); + const GskColorStop *stops = gsk_linear_gradient_node_get_color_stops (node, NULL); gsize i; if (gsk_render_node_get_node_type (node) == GSK_REPEATING_LINEAR_GRADIENT_NODE) @@ -2304,8 +2304,8 @@ render_node_print (Printer *p, start_node (p, "linear-gradient"); append_rect_param (p, "bounds", &node->bounds); - append_point_param (p, "end", gsk_linear_gradient_node_peek_end (node)); - append_point_param (p, "start", gsk_linear_gradient_node_peek_start (node)); + append_point_param (p, "end", gsk_linear_gradient_node_get_end (node)); + append_point_param (p, "start", gsk_linear_gradient_node_get_start (node)); _indent (p); g_string_append (p->str, "stops: "); @@ -2328,7 +2328,7 @@ render_node_print (Printer *p, case GSK_RADIAL_GRADIENT_NODE: { const gsize n_stops = gsk_radial_gradient_node_get_n_color_stops (node); - const GskColorStop *stops = gsk_radial_gradient_node_peek_color_stops (node, NULL); + const GskColorStop *stops = gsk_radial_gradient_node_get_color_stops (node, NULL); gsize i; if (gsk_render_node_get_node_type (node) == GSK_REPEATING_RADIAL_GRADIENT_NODE) @@ -2337,7 +2337,7 @@ render_node_print (Printer *p, start_node (p, "radial-gradient"); append_rect_param (p, "bounds", &node->bounds); - append_point_param (p, "center", gsk_radial_gradient_node_peek_center (node)); + append_point_param (p, "center", gsk_radial_gradient_node_get_center (node)); append_float_param (p, "hradius", gsk_radial_gradient_node_get_hradius (node), 0.0f); append_float_param (p, "vradius", gsk_radial_gradient_node_get_vradius (node), 0.0f); append_float_param (p, "start", gsk_radial_gradient_node_get_start (node), 0.0f); @@ -2373,7 +2373,7 @@ render_node_print (Printer *p, case GSK_OUTSET_SHADOW_NODE: { - const GdkRGBA *color = gsk_outset_shadow_node_peek_color (node); + const GdkRGBA *color = gsk_outset_shadow_node_get_color (node); start_node (p, "outset-shadow"); @@ -2382,7 +2382,7 @@ render_node_print (Printer *p, append_rgba_param (p, "color", color); append_float_param (p, "dx", gsk_outset_shadow_node_get_dx (node), 1.0f); append_float_param (p, "dy", gsk_outset_shadow_node_get_dy (node), 1.0f); - append_rounded_rect_param (p, "outline", gsk_outset_shadow_node_peek_outline (node)); + append_rounded_rect_param (p, "outline", gsk_outset_shadow_node_get_outline (node)); append_float_param (p, "spread", gsk_outset_shadow_node_get_spread (node), 0.0f); end_node (p); @@ -2394,7 +2394,7 @@ render_node_print (Printer *p, start_node (p, "clip"); append_node_param (p, "child", gsk_clip_node_get_child (node)); - append_rect_param (p, "clip", gsk_clip_node_peek_clip (node)); + append_rect_param (p, "clip", gsk_clip_node_get_clip (node)); end_node (p); } @@ -2405,7 +2405,7 @@ render_node_print (Printer *p, start_node (p, "rounded-clip"); append_node_param (p, "child", gsk_rounded_clip_node_get_child (node)); - append_rounded_rect_param (p, "clip", gsk_rounded_clip_node_peek_clip (node)); + append_rounded_rect_param (p, "clip", gsk_rounded_clip_node_get_clip (node)); end_node (p); @@ -2430,10 +2430,10 @@ render_node_print (Printer *p, start_node (p, "color-matrix"); append_node_param (p, "child", gsk_color_matrix_node_get_child (node)); - if (!graphene_matrix_is_identity (gsk_color_matrix_node_peek_color_matrix (node))) - append_matrix_param (p, "matrix", gsk_color_matrix_node_peek_color_matrix (node)); - if (!graphene_vec4_equal (gsk_color_matrix_node_peek_color_offset (node), graphene_vec4_zero ())) - append_vec4_param (p, "offset", gsk_color_matrix_node_peek_color_offset (node)); + if (!graphene_matrix_is_identity (gsk_color_matrix_node_get_color_matrix (node))) + append_matrix_param (p, "matrix", gsk_color_matrix_node_get_color_matrix (node)); + if (!graphene_vec4_equal (gsk_color_matrix_node_get_color_offset (node), graphene_vec4_zero ())) + append_vec4_param (p, "offset", gsk_color_matrix_node_get_color_offset (node)); end_node (p); } @@ -2441,8 +2441,8 @@ render_node_print (Printer *p, case GSK_BORDER_NODE: { - const GdkRGBA *colors = gsk_border_node_peek_colors (node); - const float *widths = gsk_border_node_peek_widths (node); + const GdkRGBA *colors = gsk_border_node_get_colors (node); + const float *widths = gsk_border_node_get_widths (node); guint i, n; start_node (p, "border"); @@ -2470,7 +2470,7 @@ render_node_print (Printer *p, g_string_append (p->str, ";\n"); } - append_rounded_rect_param (p, "outline", gsk_border_node_peek_outline (node)); + append_rounded_rect_param (p, "outline", gsk_border_node_get_outline (node)); if (widths[3] != widths[1]) n = 4; @@ -2513,7 +2513,7 @@ render_node_print (Printer *p, g_string_append (p->str, "shadows: "); for (i = 0; i < n_shadows; i ++) { - const GskShadow *s = gsk_shadow_node_peek_shadow (node, i); + const GskShadow *s = gsk_shadow_node_get_shadow (node, i); char *color; if (i > 0) @@ -2543,7 +2543,7 @@ render_node_print (Printer *p, case GSK_INSET_SHADOW_NODE: { - const GdkRGBA *color = gsk_inset_shadow_node_peek_color (node); + const GdkRGBA *color = gsk_inset_shadow_node_get_color (node); start_node (p, "inset-shadow"); append_float_param (p, "blur", gsk_inset_shadow_node_get_blur_radius (node), 0.0f); @@ -2551,7 +2551,7 @@ render_node_print (Printer *p, append_rgba_param (p, "color", color); append_float_param (p, "dx", gsk_inset_shadow_node_get_dx (node), 1.0f); append_float_param (p, "dy", gsk_inset_shadow_node_get_dy (node), 1.0f); - append_rounded_rect_param (p, "outline", gsk_inset_shadow_node_peek_outline (node)); + append_rounded_rect_param (p, "outline", gsk_inset_shadow_node_get_outline (node)); append_float_param (p, "spread", gsk_inset_shadow_node_get_spread (node), 0.0f); end_node (p); @@ -2587,10 +2587,10 @@ render_node_print (Printer *p, case GSK_TEXT_NODE: { const guint n_glyphs = gsk_text_node_get_num_glyphs (node); - const PangoGlyphInfo *glyphs = gsk_text_node_peek_glyphs (node, NULL); + const PangoGlyphInfo *glyphs = gsk_text_node_get_glyphs (node, NULL); const graphene_point_t *offset = gsk_text_node_get_offset (node); - const GdkRGBA *color = gsk_text_node_peek_color (node); - PangoFont *font = gsk_text_node_peek_font (node); + const GdkRGBA *color = gsk_text_node_get_color (node); + PangoFont *font = gsk_text_node_get_font (node); PangoFontDescription *desc; char *font_name; GString *str; @@ -2825,7 +2825,7 @@ render_node_print (Printer *p, case GSK_REPEAT_NODE: { GskRenderNode *child = gsk_repeat_node_get_child (node); - const graphene_rect_t *child_bounds = gsk_repeat_node_peek_child_bounds (node); + const graphene_rect_t *child_bounds = gsk_repeat_node_get_child_bounds (node); start_node (p, "repeat"); @@ -2872,7 +2872,7 @@ render_node_print (Printer *p, case GSK_CAIRO_NODE: { - cairo_surface_t *surface = gsk_cairo_node_peek_surface (node); + cairo_surface_t *surface = gsk_cairo_node_get_surface (node); GByteArray *array; start_node (p, "cairo"); diff --git a/gsk/vulkan/gskvulkanrenderpass.c b/gsk/vulkan/gskvulkanrenderpass.c index d7489c42d5..103412487f 100644 --- a/gsk/vulkan/gskvulkanrenderpass.c +++ b/gsk/vulkan/gskvulkanrenderpass.c @@ -337,7 +337,7 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self, return; case GSK_CAIRO_NODE: - if (gsk_cairo_node_peek_surface (node) == NULL) + if (gsk_cairo_node_get_surface (node) == NULL) return; /* We're using recording surfaces, so drawing them to an image * surface and uploading them is the right thing. @@ -347,8 +347,8 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self, case GSK_TEXT_NODE: { - const PangoFont *font = gsk_text_node_peek_font (node); - const PangoGlyphInfo *glyphs = gsk_text_node_peek_glyphs (node, NULL); + const PangoFont *font = gsk_text_node_get_font (node); + const PangoGlyphInfo *glyphs = gsk_text_node_get_glyphs (node, NULL); guint num_glyphs = gsk_text_node_get_num_glyphs (node); gboolean has_color_glyphs = gsk_text_node_has_color_glyphs (node); int i; @@ -571,7 +571,7 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self, case GSK_CLIP_NODE: { - if (!gsk_vulkan_push_constants_intersect_rect (&op.constants.constants, constants, gsk_clip_node_peek_clip (node))) + if (!gsk_vulkan_push_constants_intersect_rect (&op.constants.constants, constants, gsk_clip_node_get_clip (node))) FALLBACK ("Failed to find intersection between clip of type %u and rectangle", constants->clip.type); if (op.constants.constants.clip.type == GSK_VULKAN_CLIP_ALL_CLIPPED) return; @@ -590,7 +590,7 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self, { if (!gsk_vulkan_push_constants_intersect_rounded (&op.constants.constants, constants, - gsk_rounded_clip_node_peek_clip (node))) + gsk_rounded_clip_node_get_clip (node))) FALLBACK ("Failed to find intersection between clip of type %u and rounded rectangle", constants->clip.type); if (op.constants.constants.clip.type == GSK_VULKAN_CLIP_ALL_CLIPPED) return; @@ -932,7 +932,7 @@ gsk_vulkan_render_pass_upload (GskVulkanRenderPass *self, { GskRenderNode *child = gsk_repeat_node_get_child (op->render.node); const graphene_rect_t *bounds = &op->render.node->bounds; - const graphene_rect_t *child_bounds = gsk_repeat_node_peek_child_bounds (op->render.node); + const graphene_rect_t *child_bounds = gsk_repeat_node_get_child_bounds (op->render.node); op->render.source = gsk_vulkan_render_pass_get_node_as_texture (self, render, @@ -1195,10 +1195,10 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self, data + n_bytes + offset, GSK_VULKAN_RENDERER (gsk_vulkan_render_get_renderer (render)), &op->text.node->bounds, - (PangoFont *)gsk_text_node_peek_font (op->text.node), + (PangoFont *)gsk_text_node_get_font (op->text.node), gsk_text_node_get_num_glyphs (op->text.node), - gsk_text_node_peek_glyphs (op->text.node, NULL), - gsk_text_node_peek_color (op->text.node), + gsk_text_node_get_glyphs (op->text.node, NULL), + gsk_text_node_get_color (op->text.node), gsk_text_node_get_offset (op->text.node), op->text.start_glyph, op->text.num_glyphs, @@ -1214,9 +1214,9 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self, data + n_bytes + offset, GSK_VULKAN_RENDERER (gsk_vulkan_render_get_renderer (render)), &op->text.node->bounds, - (PangoFont *)gsk_text_node_peek_font (op->text.node), + (PangoFont *)gsk_text_node_get_font (op->text.node), gsk_text_node_get_num_glyphs (op->text.node), - gsk_text_node_peek_glyphs (op->text.node, NULL), + gsk_text_node_get_glyphs (op->text.node, NULL), gsk_text_node_get_offset (op->text.node), op->text.start_glyph, op->text.num_glyphs, @@ -1231,7 +1231,7 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self, gsk_vulkan_color_pipeline_collect_vertex_data (GSK_VULKAN_COLOR_PIPELINE (op->render.pipeline), data + n_bytes + offset, &op->render.node->bounds, - gsk_color_node_peek_color (op->render.node)); + gsk_color_node_get_color (op->render.node)); n_bytes += op->render.vertex_count; } break; @@ -1242,11 +1242,11 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self, gsk_vulkan_linear_gradient_pipeline_collect_vertex_data (GSK_VULKAN_LINEAR_GRADIENT_PIPELINE (op->render.pipeline), data + n_bytes + offset, &op->render.node->bounds, - gsk_linear_gradient_node_peek_start (op->render.node), - gsk_linear_gradient_node_peek_end (op->render.node), + gsk_linear_gradient_node_get_start (op->render.node), + gsk_linear_gradient_node_get_end (op->render.node), gsk_render_node_get_node_type (op->render.node) == GSK_REPEATING_LINEAR_GRADIENT_NODE, gsk_linear_gradient_node_get_n_color_stops (op->render.node), - gsk_linear_gradient_node_peek_color_stops (op->render.node, NULL)); + gsk_linear_gradient_node_get_color_stops (op->render.node, NULL)); n_bytes += op->render.vertex_count; } break; @@ -1295,8 +1295,8 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self, data + n_bytes + offset, &op->render.node->bounds, &op->render.source_rect, - gsk_color_matrix_node_peek_color_matrix (op->render.node), - gsk_color_matrix_node_peek_color_offset (op->render.node)); + gsk_color_matrix_node_get_color_matrix (op->render.node), + gsk_color_matrix_node_get_color_offset (op->render.node)); n_bytes += op->render.vertex_count; } break; @@ -1306,9 +1306,9 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self, op->render.vertex_offset = offset + n_bytes; gsk_vulkan_border_pipeline_collect_vertex_data (GSK_VULKAN_BORDER_PIPELINE (op->render.pipeline), data + n_bytes + offset, - gsk_border_node_peek_outline (op->render.node), - gsk_border_node_peek_widths (op->render.node), - gsk_border_node_peek_colors (op->render.node)); + gsk_border_node_get_outline (op->render.node), + gsk_border_node_get_widths (op->render.node), + gsk_border_node_get_colors (op->render.node)); n_bytes += op->render.vertex_count; } break; @@ -1318,8 +1318,8 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self, op->render.vertex_offset = offset + n_bytes; gsk_vulkan_box_shadow_pipeline_collect_vertex_data (GSK_VULKAN_BOX_SHADOW_PIPELINE (op->render.pipeline), data + n_bytes + offset, - gsk_inset_shadow_node_peek_outline (op->render.node), - gsk_inset_shadow_node_peek_color (op->render.node), + gsk_inset_shadow_node_get_outline (op->render.node), + gsk_inset_shadow_node_get_color (op->render.node), gsk_inset_shadow_node_get_dx (op->render.node), gsk_inset_shadow_node_get_dy (op->render.node), gsk_inset_shadow_node_get_spread (op->render.node), @@ -1333,8 +1333,8 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self, op->render.vertex_offset = offset + n_bytes; gsk_vulkan_box_shadow_pipeline_collect_vertex_data (GSK_VULKAN_BOX_SHADOW_PIPELINE (op->render.pipeline), data + n_bytes + offset, - gsk_outset_shadow_node_peek_outline (op->render.node), - gsk_outset_shadow_node_peek_color (op->render.node), + gsk_outset_shadow_node_get_outline (op->render.node), + gsk_outset_shadow_node_get_color (op->render.node), gsk_outset_shadow_node_get_dx (op->render.node), gsk_outset_shadow_node_get_dy (op->render.node), gsk_outset_shadow_node_get_spread (op->render.node), diff --git a/gtk/gtkshortcut.c b/gtk/gtkshortcut.c index bf97d54fec..caacf810a6 100644 --- a/gtk/gtkshortcut.c +++ b/gtk/gtkshortcut.c @@ -97,7 +97,7 @@ gtk_shortcut_get_property (GObject *object, switch (property_id) { case PROP_ACTION: - g_value_set_boxed (value, self->action); + g_value_set_object (value, self->action); break; case PROP_ARGUMENTS: diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index dcbecc1813..e3b3538c2f 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -65,6 +65,7 @@ typedef GskRenderNode * (* GtkSnapshotCollectFunc) (GtkSnapshot *snapshot, GtkSnapshotState *state, GskRenderNode **nodes, guint n_nodes); +typedef void (* GtkSnapshotClearFunc) (GtkSnapshotState *state); struct _GtkSnapshotState { guint start_node_index; @@ -73,6 +74,7 @@ struct _GtkSnapshotState { GskTransform * transform; GtkSnapshotCollectFunc collect_func; + GtkSnapshotClearFunc clear_func; union { struct { double opacity; @@ -208,7 +210,8 @@ gtk_snapshot_collect_default (GtkSnapshot *snapshot, static GtkSnapshotState * gtk_snapshot_push_state (GtkSnapshot *snapshot, GskTransform *transform, - GtkSnapshotCollectFunc collect_func) + GtkSnapshotCollectFunc collect_func, + GtkSnapshotClearFunc clear_func) { const gsize n_states = gtk_snapshot_states_get_size (&snapshot->state_stack); GtkSnapshotState *state; @@ -218,6 +221,7 @@ gtk_snapshot_push_state (GtkSnapshot *snapshot, state->transform = gsk_transform_ref (transform); state->collect_func = collect_func; + state->clear_func = clear_func; state->start_node_index = gtk_snapshot_nodes_get_size (&snapshot->nodes); state->n_nodes = 0; @@ -259,6 +263,9 @@ gtk_snapshot_get_nth_previous_state (const GtkSnapshot *snapshot, static void gtk_snapshot_state_clear (GtkSnapshotState *state) { + if (state->clear_func) + state->clear_func (state); + gsk_transform_unref (state->transform); } @@ -281,7 +288,8 @@ gtk_snapshot_new (void) gtk_snapshot_push_state (snapshot, NULL, - gtk_snapshot_collect_default); + gtk_snapshot_collect_default, + NULL); return snapshot; } @@ -356,7 +364,8 @@ gtk_snapshot_autopush_transform (GtkSnapshot *snapshot) { gtk_snapshot_push_state (snapshot, NULL, - gtk_snapshot_collect_autopush_transform); + gtk_snapshot_collect_autopush_transform, + NULL); } static gboolean @@ -378,12 +387,19 @@ gtk_snapshot_collect_debug (GtkSnapshot *snapshot, return NULL; debug_node = gsk_debug_node_new (node, state->data.debug.message); + state->data.debug.message = NULL; gsk_render_node_unref (node); return debug_node; } +static void +gtk_snapshot_clear_debug (GtkSnapshotState *state) +{ + g_clear_pointer (&state->data.debug.message, g_free); +} + /** * gtk_snapshot_push_debug: * @snapshot: a #GtkSnapshot @@ -408,7 +424,8 @@ gtk_snapshot_push_debug (GtkSnapshot *snapshot, state = gtk_snapshot_push_state (snapshot, current_state->transform, - gtk_snapshot_collect_debug); + gtk_snapshot_collect_debug, + gtk_snapshot_clear_debug); @@ -420,7 +437,8 @@ gtk_snapshot_push_debug (GtkSnapshot *snapshot, { gtk_snapshot_push_state (snapshot, current_state->transform, - gtk_snapshot_collect_default); + gtk_snapshot_collect_default, + NULL); } } @@ -472,7 +490,8 @@ gtk_snapshot_push_opacity (GtkSnapshot *snapshot, state = gtk_snapshot_push_state (snapshot, current_state->transform, - gtk_snapshot_collect_opacity); + gtk_snapshot_collect_opacity, + NULL); state->data.opacity.opacity = CLAMP (opacity, 0.0, 1.0); } @@ -519,7 +538,8 @@ gtk_snapshot_push_blur (GtkSnapshot *snapshot, state = gtk_snapshot_push_state (snapshot, current_state->transform, - gtk_snapshot_collect_blur); + gtk_snapshot_collect_blur, + NULL); state->data.blur.radius = radius; } @@ -528,8 +548,8 @@ merge_color_matrix_nodes (const graphene_matrix_t *matrix2, const graphene_vec4_t *offset2, GskRenderNode *child) { - const graphene_matrix_t *mat1 = gsk_color_matrix_node_peek_color_matrix (child); - const graphene_vec4_t *offset1 = gsk_color_matrix_node_peek_color_offset (child); + const graphene_matrix_t *mat1 = gsk_color_matrix_node_get_color_matrix (child); + const graphene_vec4_t *offset1 = gsk_color_matrix_node_get_color_offset (child); graphene_matrix_t mat2 = *matrix2; graphene_vec4_t off2 = *offset2; GskRenderNode *result; @@ -629,7 +649,8 @@ gtk_snapshot_push_color_matrix (GtkSnapshot *snapshot, state = gtk_snapshot_push_state (snapshot, current_state->transform, - gtk_snapshot_collect_color_matrix); + gtk_snapshot_collect_color_matrix, + NULL); graphene_matrix_init_from_matrix (&state->data.color_matrix.matrix, color_matrix); graphene_vec4_init_from_vec4 (&state->data.color_matrix.offset, color_offset); @@ -654,7 +675,7 @@ gtk_snapshot_collect_repeat (GtkSnapshot *snapshot, { /* Repeating a color node entirely is pretty easy by just increasing * the size of the color node. */ - GskRenderNode *color_node = gsk_color_node_new (gsk_color_node_peek_color (node), bounds); + GskRenderNode *color_node = gsk_color_node_new (gsk_color_node_get_color (node), bounds); gsk_render_node_unref (node); @@ -793,7 +814,8 @@ gtk_snapshot_push_repeat (GtkSnapshot *snapshot, state = gtk_snapshot_push_state (snapshot, gtk_snapshot_get_current_state (snapshot)->transform, - gtk_snapshot_collect_repeat); + gtk_snapshot_collect_repeat, + NULL); gtk_graphene_rect_scale_affine (bounds, scale_x, scale_y, dx, dy, &state->data.repeat.bounds); state->data.repeat.child_bounds = real_child_bounds; @@ -846,7 +868,8 @@ gtk_snapshot_push_clip (GtkSnapshot *snapshot, state = gtk_snapshot_push_state (snapshot, gtk_snapshot_get_current_state (snapshot)->transform, - gtk_snapshot_collect_clip); + gtk_snapshot_collect_clip, + NULL); gtk_graphene_rect_scale_affine (bounds, scale_x, scale_y, dx, dy, &state->data.clip.bounds); } @@ -879,15 +902,30 @@ gtk_snapshot_collect_gl_shader (GtkSnapshot *snapshot, state->data.glshader.args, nodes, n_children); + return shader_node; +} + +static void +gtk_snapshot_clear_gl_shader (GtkSnapshotState *state) +{ + GskRenderNode **nodes; + guint i, n_children; + + n_children = gsk_gl_shader_get_n_textures (state->data.glshader.shader); + + if (state->data.glshader.nodes) + nodes = state->data.glshader.nodes; + else + nodes = &state->data.glshader.internal_nodes[0]; + g_object_unref (state->data.glshader.shader); g_bytes_unref (state->data.glshader.args); - for (guint i = 0; i < n_children; i++) + for (i = 0; i < n_children; i++) gsk_render_node_unref (nodes[i]); g_free (state->data.glshader.nodes); - return shader_node; } static GskRenderNode * @@ -973,7 +1011,8 @@ gtk_snapshot_push_gl_shader (GtkSnapshot *snapshot, state = gtk_snapshot_push_state (snapshot, gtk_snapshot_get_current_state (snapshot)->transform, - gtk_snapshot_collect_gl_shader); + gtk_snapshot_collect_gl_shader, + gtk_snapshot_clear_gl_shader); gtk_graphene_rect_scale_affine (bounds, scale_x, scale_y, dx, dy, &transformed_bounds); state->data.glshader.bounds = transformed_bounds; state->data.glshader.shader = g_object_ref (shader); @@ -987,7 +1026,8 @@ gtk_snapshot_push_gl_shader (GtkSnapshot *snapshot, { state = gtk_snapshot_push_state (snapshot, gtk_snapshot_get_current_state (snapshot)->transform, - gtk_snapshot_collect_gl_shader_texture); + gtk_snapshot_collect_gl_shader_texture, + NULL); state->data.glshader_texture.bounds = transformed_bounds; state->data.glshader_texture.node_idx = n_children - 1 - i;/* We pop in reverse order */ state->data.glshader_texture.n_children = n_children; @@ -1056,7 +1096,8 @@ gtk_snapshot_push_rounded_clip (GtkSnapshot *snapshot, state = gtk_snapshot_push_state (snapshot, gtk_snapshot_get_current_state (snapshot)->transform, - gtk_snapshot_collect_rounded_clip); + gtk_snapshot_collect_rounded_clip, + NULL); gtk_rounded_rect_scale_affine (&state->data.rounded_clip.bounds, bounds, scale_x, scale_y, dx, dy); } @@ -1080,11 +1121,16 @@ gtk_snapshot_collect_shadow (GtkSnapshot *snapshot, state->data.shadow.n_shadows); gsk_render_node_unref (node); - g_free (state->data.shadow.shadows); return shadow_node; } +static void +gtk_snapshot_clear_shadow (GtkSnapshotState *state) +{ + g_free (state->data.shadow.shadows); +} + /** * gtk_snapshot_push_shadow: * @snapshot: a #GtkSnapshot @@ -1105,7 +1151,8 @@ gtk_snapshot_push_shadow (GtkSnapshot *snapshot, state = gtk_snapshot_push_state (snapshot, current_state->transform, - gtk_snapshot_collect_shadow); + gtk_snapshot_collect_shadow, + gtk_snapshot_clear_shadow); state->data.shadow.n_shadows = n_shadows; if (n_shadows == 1) @@ -1131,7 +1178,7 @@ gtk_snapshot_collect_blend_top (GtkSnapshot *snapshot, GdkRGBA transparent = { 0, 0, 0, 0 }; top_node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes); - bottom_node = state->data.blend.bottom_node; + bottom_node = gsk_render_node_ref (state->data.blend.bottom_node); g_assert (top_node != NULL || bottom_node != NULL); @@ -1149,6 +1196,12 @@ gtk_snapshot_collect_blend_top (GtkSnapshot *snapshot, return blend_node; } +static void +gtk_snapshot_clear_blend_top (GtkSnapshotState *state) +{ + gsk_render_node_unref (state->data.blend.bottom_node); +} + static GskRenderNode * gtk_snapshot_collect_blend_bottom (GtkSnapshot *snapshot, GtkSnapshotState *state, @@ -1186,12 +1239,14 @@ gtk_snapshot_push_blend (GtkSnapshot *snapshot, top_state = gtk_snapshot_push_state (snapshot, current_state->transform, - gtk_snapshot_collect_blend_top); + gtk_snapshot_collect_blend_top, + gtk_snapshot_clear_blend_top); top_state->data.blend.blend_mode = blend_mode; gtk_snapshot_push_state (snapshot, top_state->transform, - gtk_snapshot_collect_blend_bottom); + gtk_snapshot_collect_blend_bottom, + NULL); } static GskRenderNode * @@ -1204,6 +1259,7 @@ gtk_snapshot_collect_cross_fade_end (GtkSnapshot *snapshot, end_node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes); start_node = state->data.cross_fade.start_node; + state->data.cross_fade.start_node = NULL; if (state->data.cross_fade.progress <= 0.0) { @@ -1246,6 +1302,12 @@ gtk_snapshot_collect_cross_fade_end (GtkSnapshot *snapshot, return node; } +static void +gtk_snapshot_clear_cross_fade_end (GtkSnapshotState *state) +{ + g_clear_pointer (&state->data.cross_fade.start_node, gsk_render_node_unref); +} + static GskRenderNode * gtk_snapshot_collect_cross_fade_start (GtkSnapshot *snapshot, GtkSnapshotState *state, @@ -1284,12 +1346,14 @@ gtk_snapshot_push_cross_fade (GtkSnapshot *snapshot, end_state = gtk_snapshot_push_state (snapshot, current_state->transform, - gtk_snapshot_collect_cross_fade_end); + gtk_snapshot_collect_cross_fade_end, + gtk_snapshot_clear_cross_fade_end); end_state->data.cross_fade.progress = progress; gtk_snapshot_push_state (snapshot, end_state->transform, - gtk_snapshot_collect_cross_fade_start); + gtk_snapshot_collect_cross_fade_start, + NULL); } static GskRenderNode * @@ -1399,7 +1463,8 @@ gtk_snapshot_push_collect (GtkSnapshot *snapshot) { gtk_snapshot_push_state (snapshot, NULL, - gtk_snapshot_collect_default); + gtk_snapshot_collect_default, + NULL); } GskRenderNode * @@ -1556,6 +1621,7 @@ gtk_snapshot_save (GtkSnapshot *snapshot) gtk_snapshot_push_state (snapshot, gtk_snapshot_get_current_state (snapshot)->transform, + NULL, NULL); } diff --git a/gtk/gtktestutils.c b/gtk/gtktestutils.c index 35691d0c3d..690931a153 100644 --- a/gtk/gtktestutils.c +++ b/gtk/gtktestutils.c @@ -40,6 +40,16 @@ #include <gtk/gtk.h> #define GTK_COMPILATION +#include <gsk/gl/gskglrenderer.h> + +#ifdef GDK_WINDOWING_BROADWAY +#include <gsk/broadway/gskbroadwayrenderer.h> +#endif + +#ifdef GDK_RENDERING_VULKAN +#include <gsk/vulkan/gskvulkanrenderer.h> +#endif + #ifdef GDK_WINDOWING_X11 #include <gdk/x11/gdkx.h> #endif diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c index c7dd9d8c46..3302d07261 100644 --- a/gtk/gtktextbuffer.c +++ b/gtk/gtktextbuffer.c @@ -114,8 +114,6 @@ enum { PROP_TEXT, PROP_HAS_SELECTION, PROP_CURSOR_POSITION, - PROP_COPY_TARGET_LIST, - PROP_PASTE_TARGET_LIST, PROP_CAN_UNDO, PROP_CAN_REDO, PROP_ENABLE_UNDO, @@ -538,32 +536,6 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass) 0, GTK_PARAM_READABLE); - /** - * GtkTextBuffer:copy-target-list: - * - * The list of targets this buffer supports for clipboard copying - * and as DND source. - */ - text_buffer_props[PROP_COPY_TARGET_LIST] = - g_param_spec_boxed ("copy-target-list", - P_("Copy target list"), - P_("The list of targets this buffer supports for clipboard copying and DND source"), - GDK_TYPE_CONTENT_FORMATS, - GTK_PARAM_READABLE); - - /** - * GtkTextBuffer:paste-target-list: - * - * The list of targets this buffer supports for clipboard pasting - * and as DND destination. - */ - text_buffer_props[PROP_PASTE_TARGET_LIST] = - g_param_spec_boxed ("paste-target-list", - P_("Paste target list"), - P_("The list of targets this buffer supports for clipboard pasting and DND destination"), - GDK_TYPE_CONTENT_FORMATS, - GTK_PARAM_READABLE); - g_object_class_install_properties (object_class, LAST_PROP, text_buffer_props); /** diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c index 135b0b2def..dd9a1de67e 100644 --- a/gtk/inspector/recorder.c +++ b/gtk/inspector/recorder.c @@ -329,7 +329,7 @@ node_name (GskRenderNode *node) return g_strdup (gsk_debug_node_get_message (node)); case GSK_COLOR_NODE: - return gdk_rgba_to_string (gsk_color_node_peek_color (node)); + return gdk_rgba_to_string (gsk_color_node_get_color (node)); case GSK_TEXTURE_NODE: { @@ -645,16 +645,16 @@ populate_render_node_properties (GtkListStore *store, break; case GSK_COLOR_NODE: - add_color_row (store, "Color", gsk_color_node_peek_color (node)); + add_color_row (store, "Color", gsk_color_node_get_color (node)); break; case GSK_LINEAR_GRADIENT_NODE: case GSK_REPEATING_LINEAR_GRADIENT_NODE: { - const graphene_point_t *start = gsk_linear_gradient_node_peek_start (node); - const graphene_point_t *end = gsk_linear_gradient_node_peek_end (node); + const graphene_point_t *start = gsk_linear_gradient_node_get_start (node); + const graphene_point_t *end = gsk_linear_gradient_node_get_end (node); const gsize n_stops = gsk_linear_gradient_node_get_n_color_stops (node); - const GskColorStop *stops = gsk_linear_gradient_node_peek_color_stops (node, NULL); + const GskColorStop *stops = gsk_linear_gradient_node_get_color_stops (node, NULL); int i; GString *s; GdkTexture *texture; @@ -686,13 +686,13 @@ populate_render_node_properties (GtkListStore *store, case GSK_RADIAL_GRADIENT_NODE: case GSK_REPEATING_RADIAL_GRADIENT_NODE: { - const graphene_point_t *center = gsk_radial_gradient_node_peek_center (node); + const graphene_point_t *center = gsk_radial_gradient_node_get_center (node); const float start = gsk_radial_gradient_node_get_start (node); const float end = gsk_radial_gradient_node_get_end (node); const float hradius = gsk_radial_gradient_node_get_hradius (node); const float vradius = gsk_radial_gradient_node_get_vradius (node); const gsize n_stops = gsk_radial_gradient_node_get_n_color_stops (node); - const GskColorStop *stops = gsk_radial_gradient_node_peek_color_stops (node, NULL); + const GskColorStop *stops = gsk_radial_gradient_node_get_color_stops (node, NULL); int i; GString *s; GdkTexture *texture; @@ -731,9 +731,9 @@ populate_render_node_properties (GtkListStore *store, case GSK_TEXT_NODE: { - const PangoFont *font = gsk_text_node_peek_font (node); - const PangoGlyphInfo *glyphs = gsk_text_node_peek_glyphs (node, NULL); - const GdkRGBA *color = gsk_text_node_peek_color (node); + const PangoFont *font = gsk_text_node_get_font (node); + const PangoGlyphInfo *glyphs = gsk_text_node_get_glyphs (node, NULL); + const GdkRGBA *color = gsk_text_node_get_color (node); guint num_glyphs = gsk_text_node_get_num_glyphs (node); const graphene_point_t *offset = gsk_text_node_get_offset (node); PangoFontDescription *desc; @@ -763,8 +763,8 @@ populate_render_node_properties (GtkListStore *store, case GSK_BORDER_NODE: { const char *name[4] = { "Top", "Right", "Bottom", "Left" }; - const float *widths = gsk_border_node_peek_widths (node); - const GdkRGBA *colors = gsk_border_node_peek_colors (node); + const float *widths = gsk_border_node_get_widths (node); + const GdkRGBA *colors = gsk_border_node_get_colors (node); int i; for (i = 0; i < 4; i++) @@ -897,7 +897,7 @@ populate_render_node_properties (GtkListStore *store, case GSK_INSET_SHADOW_NODE: { - const GdkRGBA *color = gsk_inset_shadow_node_peek_color (node); + const GdkRGBA *color = gsk_inset_shadow_node_get_color (node); float dx = gsk_inset_shadow_node_get_dx (node); float dy = gsk_inset_shadow_node_get_dy (node); float spread = gsk_inset_shadow_node_get_spread (node); @@ -916,8 +916,8 @@ populate_render_node_properties (GtkListStore *store, case GSK_OUTSET_SHADOW_NODE: { - const GskRoundedRect *outline = gsk_outset_shadow_node_peek_outline (node); - const GdkRGBA *color = gsk_outset_shadow_node_peek_color (node); + const GskRoundedRect *outline = gsk_outset_shadow_node_get_outline (node); + const GdkRGBA *color = gsk_outset_shadow_node_get_color (node); float dx = gsk_outset_shadow_node_get_dx (node); float dy = gsk_outset_shadow_node_get_dy (node); float spread = gsk_outset_shadow_node_get_spread (node); @@ -943,7 +943,7 @@ populate_render_node_properties (GtkListStore *store, case GSK_REPEAT_NODE: { - const graphene_rect_t *child_bounds = gsk_repeat_node_peek_child_bounds (node); + const graphene_rect_t *child_bounds = gsk_repeat_node_get_child_bounds (node); tmp = g_strdup_printf ("%.2f x %.2f + %.2f + %.2f", child_bounds->size.width, @@ -957,8 +957,8 @@ populate_render_node_properties (GtkListStore *store, case GSK_COLOR_MATRIX_NODE: { - const graphene_matrix_t *matrix = gsk_color_matrix_node_peek_color_matrix (node); - const graphene_vec4_t *offset = gsk_color_matrix_node_peek_color_offset (node); + const graphene_matrix_t *matrix = gsk_color_matrix_node_get_color_matrix (node); + const graphene_vec4_t *offset = gsk_color_matrix_node_get_color_offset (node); tmp = g_strdup_printf ("% .2f % .2f % .2f % .2f\n" "% .2f % .2f % .2f % .2f\n" @@ -994,7 +994,7 @@ populate_render_node_properties (GtkListStore *store, case GSK_CLIP_NODE: { - const graphene_rect_t *clip = gsk_clip_node_peek_clip (node); + const graphene_rect_t *clip = gsk_clip_node_get_clip (node); tmp = g_strdup_printf ("%.2f x %.2f + %.2f + %.2f", clip->size.width, clip->size.height, @@ -1007,7 +1007,7 @@ populate_render_node_properties (GtkListStore *store, case GSK_ROUNDED_CLIP_NODE: { - const GskRoundedRect *clip = gsk_rounded_clip_node_peek_clip (node); + const GskRoundedRect *clip = gsk_rounded_clip_node_get_clip (node); tmp = g_strdup_printf ("%.2f x %.2f + %.2f + %.2f", clip->bounds.size.width, clip->bounds.size.height, @@ -1052,7 +1052,7 @@ populate_render_node_properties (GtkListStore *store, { char *label; char *value; - const GskShadow *shadow = gsk_shadow_node_peek_shadow (node, i); + const GskShadow *shadow = gsk_shadow_node_get_shadow (node, i); label = g_strdup_printf ("Color %d", i); add_color_row (store, label, &shadow->color); diff --git a/gtk/meson.build b/gtk/meson.build index d7e042d857..7894b1de86 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -926,6 +926,7 @@ typefuncs = custom_target('gtktypefuncs.inc', depends: [ gdkenum_h, gskenum_h, ], output: 'gtktypefuncs.inc', input: gdk_headers + + gsk_public_headers + gtk_public_headers + gtk_deprecated_headers + [ gtktypebuiltins_h, ] + diff --git a/tests/testcolumnview.c b/tests/testcolumnview.c index 04f09f1ee5..79b1740cb8 100644 --- a/tests/testcolumnview.c +++ b/tests/testcolumnview.c @@ -771,8 +771,6 @@ main (int argc, char *argv[]) update_statusbar (GTK_STATUSBAR (statusbar)); gtk_box_append (GTK_BOX (vbox), statusbar); - g_object_unref (filter); - list = gtk_list_view_new ( GTK_SELECTION_MODEL (gtk_single_selection_new (g_object_ref (gtk_column_view_get_columns (GTK_COLUMN_VIEW (view))))), gtk_builder_list_item_factory_new_from_bytes (scope, g_bytes_new_static (factory_ui, strlen (factory_ui)))); diff --git a/testsuite/gtk/defaultvalue.c b/testsuite/gtk/defaultvalue.c index f1b4d1f7fc..22146a5c90 100644 --- a/testsuite/gtk/defaultvalue.c +++ b/testsuite/gtk/defaultvalue.c @@ -123,6 +123,12 @@ test_type (gconstpointer data) NULL); g_object_unref (list_store); } + else if (g_type_is_a (type, GSK_TYPE_GL_SHADER)) + { + GBytes *bytes = g_bytes_new_static ("", 0); + instance = g_object_new (type, "source", bytes, NULL); + g_bytes_unref (bytes); + } else if (g_type_is_a (type, GDK_TYPE_CLIPBOARD) || g_str_equal (g_type_name (type), "GdkX11Cursor")) instance = g_object_new (type, "display", display, NULL); @@ -137,6 +143,7 @@ test_type (gconstpointer data) { GParamSpec *pspec = pspecs[i]; GValue value = G_VALUE_INIT; + gboolean check = TRUE; if (pspec->owner_type != type) continue; @@ -147,79 +154,84 @@ test_type (gconstpointer data) /* This is set via class_init, and we have a11y tests to verify it */ if (g_type_is_a (type, GTK_TYPE_ACCESSIBLE) && strcmp (pspec->name, "accessible-role") == 0) - continue; + check = FALSE; /* This is set via construct property */ if (g_type_is_a (type, GTK_TYPE_BUILDER) && strcmp (pspec->name, "scope") == 0) - continue; + check = FALSE; if (g_type_is_a (type, GDK_TYPE_CLIPBOARD) && strcmp (pspec->name, "display") == 0) - continue; + check = FALSE; /* These are set in init() */ if ((g_type_is_a (type, GDK_TYPE_CLIPBOARD) || g_type_is_a (type, GDK_TYPE_CONTENT_PROVIDER) || g_type_is_a (type, GTK_TYPE_DROP_TARGET)) && strcmp (pspec->name, "formats") == 0) - continue; + check = FALSE; if (g_type_is_a (type, GDK_TYPE_CONTENT_PROVIDER) && strcmp (pspec->name, "storable-formats") == 0) - continue; + check = FALSE; + + /* set in the constructor */ + if (g_type_is_a (type, GSK_TYPE_GL_SHADER) && + strcmp (pspec->name, "source") == 0) + check = FALSE; /* This one has a special-purpose default value */ if (g_type_is_a (type, GTK_TYPE_DIALOG) && (strcmp (pspec->name, "use-header-bar") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_ASSISTANT) && (strcmp (pspec->name, "use-header-bar") == 0 || strcmp (pspec->name, "pages") == 0)) /* pages always gets a non-NULL value */ - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_STACK) && (strcmp (pspec->name, "pages") == 0)) /* pages always gets a non-NULL value */ - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_NOTEBOOK) && (strcmp (pspec->name, "pages") == 0)) /* pages always gets a non-NULL value */ - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_COMBO_BOX) && (strcmp (pspec->name, "child") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_POPOVER) && (strcmp (pspec->name, "pointing-to") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GDK_TYPE_DISPLAY_MANAGER) && (strcmp (pspec->name, "default-display") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GDK_TYPE_MONITOR) && (strcmp (pspec->name, "geometry") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_ABOUT_DIALOG) && (strcmp (pspec->name, "program-name") == 0)) - continue; + check = FALSE; /* These are set to the current date */ if (g_type_is_a (type, GTK_TYPE_CALENDAR) && (strcmp (pspec->name, "year") == 0 || strcmp (pspec->name, "month") == 0 || strcmp (pspec->name, "day") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_CELL_AREA_CONTEXT) && (strcmp (pspec->name, "minimum-width") == 0 || strcmp (pspec->name, "minimum-height") == 0 || strcmp (pspec->name, "natural-width") == 0 || strcmp (pspec->name, "natural-height") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_CELL_RENDERER_TEXT) && (strcmp (pspec->name, "background-gdk") == 0 || @@ -228,7 +240,7 @@ test_type (gconstpointer data) strcmp (pspec->name, "foreground-rgba") == 0 || strcmp (pspec->name, "font") == 0 || strcmp (pspec->name, "font-desc") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_CELL_VIEW) && (strcmp (pspec->name, "background-gdk") == 0 || @@ -237,24 +249,24 @@ test_type (gconstpointer data) strcmp (pspec->name, "background-rgba") == 0 || strcmp (pspec->name, "cell-area") == 0 || strcmp (pspec->name, "cell-area-context") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_COLOR_BUTTON) && (strcmp (pspec->name, "color") == 0 || strcmp (pspec->name, "rgba") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_COLUMN_VIEW) && (strcmp (pspec->name, "columns") == 0 || strcmp (pspec->name, "sorter") == 0)) - continue; + check = FALSE; G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (g_type_is_a (type, GTK_TYPE_COMBO_BOX) && (strcmp (pspec->name, "cell-area") == 0 || strcmp (pspec->name, "cell-area-context") == 0)) - continue; + check = FALSE; G_GNUC_END_IGNORE_DEPRECATIONS @@ -264,19 +276,19 @@ G_GNUC_END_IGNORE_DEPRECATIONS if (g_type_is_a (type, GTK_TYPE_ENTRY) && (strcmp (pspec->name, "invisible-char") == 0 || strcmp (pspec->name, "buffer") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_TEXT) && (strcmp (pspec->name, "invisible-char") == 0 || strcmp (pspec->name, "buffer") == 0)) - continue; + check = FALSE; G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (g_type_is_a (type, GTK_TYPE_ENTRY_COMPLETION) && (strcmp (pspec->name, "cell-area") == 0 || strcmp (pspec->name, "cell-area-context") == 0)) - continue; + check = FALSE; G_GNUC_END_IGNORE_DEPRECATIONS @@ -285,82 +297,82 @@ G_GNUC_END_IGNORE_DEPRECATIONS g_type_is_a (type, GTK_TYPE_SINGLE_SELECTION) || g_type_is_a (type, GTK_TYPE_MULTI_SELECTION)) && strcmp (pspec->name, "model") == 0) - continue; + check = FALSE; /* This is set in init() */ if (g_type_is_a (type, GTK_TYPE_FONT_CHOOSER_WIDGET) && strcmp (pspec->name, "tweak-action") == 0) - continue; + check = FALSE; G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (g_type_is_a (type, GTK_TYPE_ICON_VIEW) && (strcmp (pspec->name, "cell-area") == 0 || strcmp (pspec->name, "cell-area-context") == 0)) - continue; + check = FALSE; G_GNUC_END_IGNORE_DEPRECATIONS if (g_type_is_a (type, GTK_TYPE_MESSAGE_DIALOG) && (strcmp (pspec->name, "image") == 0 || strcmp (pspec->name, "message-area") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_PANED) && strcmp (pspec->name, "max-position") == 0) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_PRINT_OPERATION) && strcmp (pspec->name, "job-name") == 0) - continue; + check = FALSE; #ifdef G_OS_UNIX if (g_type_is_a (type, GTK_TYPE_PRINT_UNIX_DIALOG) && (strcmp (pspec->name, "page-setup") == 0 || strcmp (pspec->name, "print-settings") == 0)) - continue; + check = FALSE; #endif if (g_type_is_a (type, GTK_TYPE_PROGRESS_BAR) && strcmp (pspec->name, "adjustment") == 0) - continue; + check = FALSE; /* filename value depends on $HOME */ if (g_type_is_a (type, GTK_TYPE_RECENT_MANAGER) && (strcmp (pspec->name, "filename") == 0 || strcmp (pspec->name, "size") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_SCALE_BUTTON) && strcmp (pspec->name, "adjustment") == 0) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_SCROLLED_WINDOW) && (strcmp (pspec->name, "hadjustment") == 0 || strcmp (pspec->name, "vadjustment") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_SETTINGS)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_SHORTCUT) && (strcmp (pspec->name, "action") == 0 || strcmp (pspec->name, "trigger") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_SPIN_BUTTON) && (strcmp (pspec->name, "adjustment") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_STYLE_CONTEXT) && strcmp (pspec->name, "display") == 0) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_TEXT_BUFFER) && (strcmp (pspec->name, "tag-table") == 0 || strcmp (pspec->name, "copy-target-list") == 0 || strcmp (pspec->name, "paste-target-list") == 0)) - continue; + check = FALSE; /* language depends on the current locale */ if (g_type_is_a (type, GTK_TYPE_TEXT_TAG) && @@ -369,77 +381,79 @@ G_GNUC_END_IGNORE_DEPRECATIONS strcmp (pspec->name, "language") == 0 || strcmp (pspec->name, "font") == 0 || strcmp (pspec->name, "font-desc") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_TEXT_VIEW) && strcmp (pspec->name, "buffer") == 0) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_TREE_VIEW) && (strcmp (pspec->name, "hadjustment") == 0 || strcmp (pspec->name, "vadjustment") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_TREE_VIEW_COLUMN) && (strcmp (pspec->name, "cell-area") == 0 || strcmp (pspec->name, "cell-area-context") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_VIEWPORT) && (strcmp (pspec->name, "hadjustment") == 0 || strcmp (pspec->name, "vadjustment") == 0)) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_WIDGET) && (strcmp (pspec->name, "name") == 0 || strcmp (pspec->name, "display") == 0 || strcmp (pspec->name, "style") == 0)) - continue; + check = FALSE; /* resize-grip-visible is determined at runtime */ if (g_type_is_a (type, GTK_TYPE_WINDOW) && strcmp (pspec->name, "resize-grip-visible") == 0) - continue; + check = FALSE; /* show-desktop depends on desktop environment */ if (g_str_equal (g_type_name (type), "GtkPlacesSidebar") && strcmp (pspec->name, "show-desktop") == 0) - continue; + check = FALSE; /* GtkRange constructs an adjustment on its own if NULL is set and * the property is a CONSTRUCT one, so the returned value is never NULL. */ if (g_type_is_a (type, GTK_TYPE_RANGE) && strcmp (pspec->name, "adjustment") == 0) - continue; + check = FALSE; /* ... and GtkScrollbar wraps that property. */ if (g_type_is_a (type, GTK_TYPE_SCROLLBAR) && strcmp (pspec->name, "adjustment") == 0) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_DROP_DOWN) && strcmp (pspec->name, "factory") == 0) - continue; + check = FALSE; if (g_type_is_a (type, GTK_TYPE_BOOKMARK_LIST) && (strcmp (pspec->name, "filename") == 0 || strcmp (pspec->name, "loading") == 0)) - continue; + check = FALSE; /* All the icontheme properties depend on the environment */ if (g_type_is_a (type, GTK_TYPE_ICON_THEME)) - continue; + check = FALSE; if (g_test_verbose ()) { - g_print ("Property %s:%s\n", + g_print ("Property %s:%s%s\n", g_type_name (pspec->owner_type), - pspec->name); + pspec->name, + check ? "" : " (no check)"); } g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec)); g_object_get_property (instance, pspec->name, &value); - check_property ("Property", pspec, &value); + if (check) + check_property ("Property", pspec, &value); g_value_unset (&value); } g_free (pspecs); diff --git a/testsuite/gtk/notify.c b/testsuite/gtk/notify.c index 80df7dda62..f90fb66be2 100644 --- a/testsuite/gtk/notify.c +++ b/testsuite/gtk/notify.c @@ -454,6 +454,12 @@ test_type (gconstpointer data) NULL); gdk_content_formats_unref (formats); } + else if (g_type_is_a (type, GSK_TYPE_GL_SHADER)) + { + GBytes *bytes = g_bytes_new_static ("", 0); + instance = g_object_new (type, "source", bytes, NULL); + g_bytes_unref (bytes); + } else if (g_type_is_a (type, GTK_TYPE_FILTER_LIST_MODEL) || g_type_is_a (type, GTK_TYPE_NO_SELECTION) || g_type_is_a (type, GTK_TYPE_SINGLE_SELECTION) || diff --git a/testsuite/gtk/objects-finalize.c b/testsuite/gtk/objects-finalize.c index c105ca265c..2167d384d5 100644 --- a/testsuite/gtk/objects-finalize.c +++ b/testsuite/gtk/objects-finalize.c @@ -69,6 +69,12 @@ test_finalize_object (gconstpointer data) NULL); gdk_content_formats_unref (formats); } + else if (g_type_is_a (test_type, GSK_TYPE_GL_SHADER)) + { + GBytes *bytes = g_bytes_new_static ("", 0); + object = g_object_new (test_type, "source", bytes, NULL); + g_bytes_unref (bytes); + } else if (g_type_is_a (test_type, GTK_TYPE_FILTER_LIST_MODEL) || g_type_is_a (test_type, GTK_TYPE_NO_SELECTION) || g_type_is_a (test_type, GTK_TYPE_SINGLE_SELECTION) || |