diff options
author | Benjamin Otte <otte@redhat.com> | 2017-01-13 04:46:09 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2017-01-13 04:46:09 +0100 |
commit | 6055028c9653b01c8623763dac0a213396bc81eb (patch) | |
tree | 03b49c37c59bf9ab2f5a96e81a2690ecb013b450 /gtk | |
parent | e5e5beafa5b86eeb33e8384942e96e8fcf20c514 (diff) | |
download | gtk+-6055028c9653b01c8623763dac0a213396bc81eb.tar.gz |
snapshot: Rename append APIs
Instead of having gtk_snapshot_append_foo_node(), just have
gtk_snapshot_append_foo(). Nobody needs to know that this internally
uses nodes.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkcalendar.c | 14 | ||||
-rw-r--r-- | gtk/gtkcellrenderer.c | 14 | ||||
-rw-r--r-- | gtk/gtkcellrendererspinner.c | 12 | ||||
-rw-r--r-- | gtk/gtkcellrenderertext.c | 14 | ||||
-rw-r--r-- | gtk/gtkcolorplane.c | 6 | ||||
-rw-r--r-- | gtk/gtkcolorscale.c | 6 | ||||
-rw-r--r-- | gtk/gtkcolorswatch.c | 22 | ||||
-rw-r--r-- | gtk/gtkcssimage.c | 6 | ||||
-rw-r--r-- | gtk/gtkcssimagebuiltin.c | 6 | ||||
-rw-r--r-- | gtk/gtkcssimagefallback.c | 2 | ||||
-rw-r--r-- | gtk/gtkcssimageicontheme.c | 18 | ||||
-rw-r--r-- | gtk/gtkcssimagelinear.c | 8 | ||||
-rw-r--r-- | gtk/gtkcssimagesurface.c | 12 | ||||
-rw-r--r-- | gtk/gtkdebugupdates.c | 8 | ||||
-rw-r--r-- | gtk/gtkdrawingarea.c | 12 | ||||
-rw-r--r-- | gtk/gtkentry.c | 12 | ||||
-rw-r--r-- | gtk/gtkflowbox.c | 6 | ||||
-rw-r--r-- | gtk/gtklabel.c | 12 | ||||
-rw-r--r-- | gtk/gtkpopover.c | 6 | ||||
-rw-r--r-- | gtk/gtkrenderbackground.c | 16 | ||||
-rw-r--r-- | gtk/gtkrenderborder.c | 12 | ||||
-rw-r--r-- | gtk/gtkrendericon.c | 4 | ||||
-rw-r--r-- | gtk/gtkscale.c | 16 | ||||
-rw-r--r-- | gtk/gtksnapshot.c | 44 | ||||
-rw-r--r-- | gtk/gtksnapshot.h | 6 | ||||
-rw-r--r-- | gtk/gtkstylecontext.c | 6 | ||||
-rw-r--r-- | gtk/gtktreeview.c | 70 | ||||
-rw-r--r-- | gtk/gtkwidget.c | 12 | ||||
-rw-r--r-- | gtk/inspector/cellrenderergraph.c | 12 | ||||
-rw-r--r-- | gtk/inspector/rendernodeview.c | 6 |
30 files changed, 201 insertions, 199 deletions
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 9381394263..532bc36ca5 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -2588,13 +2588,13 @@ calendar_snapshot_day (GtkCalendar *calendar, gtk_style_context_get_color (context, &color); - gtk_snapshot_append_color_node (snapshot, - &color, - &GRAPHENE_RECT_INIT ( - day_rect.x + 2, y_loc, - day_rect.width - 2, 1 - ), - "CalendarDetailSeparator"); + gtk_snapshot_append_color (snapshot, + &color, + &GRAPHENE_RECT_INIT ( + day_rect.x + 2, y_loc, + day_rect.width - 2, 1 + ), + "CalendarDetailSeparator"); y_loc += 2; } diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c index 334ddcaaae..a76474ce42 100644 --- a/gtk/gtkcellrenderer.c +++ b/gtk/gtkcellrenderer.c @@ -756,13 +756,13 @@ gtk_cell_renderer_snapshot (GtkCellRenderer *cell, if (priv->cell_background_set && !selected) { - gtk_snapshot_append_color_node (snapshot, - &priv->cell_background, - &GRAPHENE_RECT_INIT ( - background_area->x, background_area->y, - background_area->width, background_area->height - ), - "CellBackground"); + gtk_snapshot_append_color (snapshot, + &priv->cell_background, + &GRAPHENE_RECT_INIT ( + background_area->x, background_area->y, + background_area->width, background_area->height + ), + "CellBackground"); } gtk_snapshot_push_clip (snapshot, diff --git a/gtk/gtkcellrendererspinner.c b/gtk/gtkcellrendererspinner.c index 8803d36e43..527a7455b8 100644 --- a/gtk/gtkcellrendererspinner.c +++ b/gtk/gtkcellrendererspinner.c @@ -417,12 +417,12 @@ gtk_cell_renderer_spinner_snapshot (GtkCellRenderer *cellr, if (!gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect)) return; - cr = gtk_snapshot_append_cairo_node (snapshot, - &GRAPHENE_RECT_INIT ( - cell_area->x, cell_area->y, - cell_area->width, cell_area->height - ), - "CellSpinner"); + cr = gtk_snapshot_append_cairo (snapshot, + &GRAPHENE_RECT_INIT ( + cell_area->x, cell_area->y, + cell_area->width, cell_area->height + ), + "CellSpinner"); gtk_paint_spinner (gtk_widget_get_style_context (widget), cr, diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c index a969a3649d..691f19562a 100644 --- a/gtk/gtkcellrenderertext.c +++ b/gtk/gtkcellrenderertext.c @@ -1735,13 +1735,13 @@ gtk_cell_renderer_text_snapshot (GtkCellRenderer *cell, if (priv->background_set && (flags & GTK_CELL_RENDERER_SELECTED) == 0) { - gtk_snapshot_append_color_node (snapshot, - &priv->background, - &GRAPHENE_RECT_INIT( - background_area->x, background_area->y, - background_area->width, background_area->height - ), - "CellTextBackground"); + gtk_snapshot_append_color (snapshot, + &priv->background, + &GRAPHENE_RECT_INIT( + background_area->x, background_area->y, + background_area->width, background_area->height + ), + "CellTextBackground"); } gtk_cell_renderer_get_padding (cell, &xpad, &ypad); diff --git a/gtk/gtkcolorplane.c b/gtk/gtkcolorplane.c index a9295652d7..8b9c1f92a5 100644 --- a/gtk/gtkcolorplane.c +++ b/gtk/gtkcolorplane.c @@ -80,9 +80,9 @@ plane_snapshot (GtkWidget *widget, width = gtk_widget_get_allocated_width (widget); height = gtk_widget_get_allocated_height (widget); - cr = gtk_snapshot_append_cairo_node (snapshot, - &GRAPHENE_RECT_INIT (0, 0, width, height), - "ColorPlane"); + cr = gtk_snapshot_append_cairo (snapshot, + &GRAPHENE_RECT_INIT (0, 0, width, height), + "ColorPlane"); cairo_set_source_surface (cr, plane->priv->surface, 0, 0); cairo_paint (cr); diff --git a/gtk/gtkcolorscale.c b/gtk/gtkcolorscale.c index b8564ae13a..417caeffdf 100644 --- a/gtk/gtkcolorscale.c +++ b/gtk/gtkcolorscale.c @@ -67,9 +67,9 @@ gtk_color_scale_snapshot_trough (GtkColorScale *scale, if (width <= 1 || height <= 1) return; - cr = gtk_snapshot_append_cairo_node (snapshot, - &GRAPHENE_RECT_INIT(x, y, width, height), - "ColorScaleTrough"); + cr = gtk_snapshot_append_cairo (snapshot, + &GRAPHENE_RECT_INIT(x, y, width, height), + "ColorScaleTrough"); cairo_translate (cr, x, y); if (gtk_orientable_get_orientation (GTK_ORIENTABLE (widget)) == GTK_ORIENTATION_HORIZONTAL && diff --git a/gtk/gtkcolorswatch.c b/gtk/gtkcolorswatch.c index a7af9a7ffe..7a4c5e36ca 100644 --- a/gtk/gtkcolorswatch.c +++ b/gtk/gtkcolorswatch.c @@ -143,9 +143,9 @@ gtk_color_swatch_render (GtkCssGadget *gadget, { cairo_t *cr; - cr = gtk_snapshot_append_cairo_node (snapshot, - &content_box.bounds, - "CheckeredBackground"); + cr = gtk_snapshot_append_cairo (snapshot, + &content_box.bounds, + "CheckeredBackground"); cairo_set_source_rgb (cr, 0.33, 0.33, 0.33); cairo_paint (cr); @@ -159,10 +159,10 @@ gtk_color_swatch_render (GtkCssGadget *gadget, cairo_destroy (cr); - gtk_snapshot_append_color_node (snapshot, - &swatch->priv->color, - &content_box.bounds, - "ColorSwatch Color"); + gtk_snapshot_append_color (snapshot, + &swatch->priv->color, + &content_box.bounds, + "ColorSwatch Color"); } else { @@ -170,10 +170,10 @@ gtk_color_swatch_render (GtkCssGadget *gadget, color.alpha = 1.0; - gtk_snapshot_append_color_node (snapshot, - &color, - &content_box.bounds, - "ColorSwatch Opaque Color"); + gtk_snapshot_append_color (snapshot, + &color, + &content_box.bounds, + "ColorSwatch Opaque Color"); } gtk_snapshot_pop (snapshot); diff --git a/gtk/gtkcssimage.c b/gtk/gtkcssimage.c index 822ba4726f..bcf22f8ce4 100644 --- a/gtk/gtkcssimage.c +++ b/gtk/gtkcssimage.c @@ -126,9 +126,9 @@ gtk_css_image_real_snapshot (GtkCssImage *image, { cairo_t *cr; - cr = gtk_snapshot_append_cairo_node (snapshot, - &GRAPHENE_RECT_INIT (0, 0, width, height), - "Fallback<%s>", G_OBJECT_TYPE_NAME (image)); + cr = gtk_snapshot_append_cairo (snapshot, + &GRAPHENE_RECT_INIT (0, 0, width, height), + "Fallback<%s>", G_OBJECT_TYPE_NAME (image)); _gtk_css_image_draw (image, cr, width, height); cairo_destroy (cr); } diff --git a/gtk/gtkcssimagebuiltin.c b/gtk/gtkcssimagebuiltin.c index 67cc061472..5732a79ae6 100644 --- a/gtk/gtkcssimagebuiltin.c +++ b/gtk/gtkcssimagebuiltin.c @@ -662,9 +662,9 @@ gtk_css_image_builtin_snapshot (GtkCssImage *image, return; } - cr = gtk_snapshot_append_cairo_node (snapshot, - &GRAPHENE_RECT_INIT (0, 0, width, height), - "BuiltinImage<%d>", (int) image_type); + cr = gtk_snapshot_append_cairo (snapshot, + &GRAPHENE_RECT_INIT (0, 0, width, height), + "BuiltinImage<%d>", (int) image_type); gtk_css_image_builtin_draw (image, cr, width, height, image_type); cairo_destroy (cr); } diff --git a/gtk/gtkcssimagefallback.c b/gtk/gtkcssimagefallback.c index a1f74e6859..b34cde9d25 100644 --- a/gtk/gtkcssimagefallback.c +++ b/gtk/gtkcssimagefallback.c @@ -79,7 +79,7 @@ gtk_css_image_fallback_snapshot (GtkCssImage *image, else color = &red; - gtk_snapshot_append_color_node (snapshot, color, &GRAPHENE_RECT_INIT (0, 0, width, height), "image() Fallback Color"); + gtk_snapshot_append_color (snapshot, color, &GRAPHENE_RECT_INIT (0, 0, width, height), "image() Fallback Color"); } else gtk_css_image_snapshot (fallback->images[fallback->used], snapshot, width, height); diff --git a/gtk/gtkcssimageicontheme.c b/gtk/gtkcssimageicontheme.c index 22457909f2..da6d9fa536 100644 --- a/gtk/gtkcssimageicontheme.c +++ b/gtk/gtkcssimageicontheme.c @@ -86,15 +86,15 @@ gtk_css_image_icon_theme_snapshot (GtkCssImage *image, texture_width = (double) gdk_pixbuf_get_width (pixbuf) / icon_theme->scale; texture_height = (double) gdk_pixbuf_get_height (pixbuf) / icon_theme->scale; - gtk_snapshot_append_texture_node (snapshot, - texture, - &GRAPHENE_RECT_INIT( - (width - texture_width) / 2.0, - (height - texture_height) / 2.0, - texture_width, - texture_height - ), - "CssImageIconTheme<%s@%d>", icon_theme->name, icon_theme->scale); + gtk_snapshot_append_texture (snapshot, + texture, + &GRAPHENE_RECT_INIT( + (width - texture_width) / 2.0, + (height - texture_height) / 2.0, + texture_width, + texture_height + ), + "CssImageIconTheme<%s@%d>", icon_theme->name, icon_theme->scale); g_object_unref (texture); g_object_unref (pixbuf); diff --git a/gtk/gtkcssimagelinear.c b/gtk/gtkcssimagelinear.c index 7200c48951..e25c1b6f79 100644 --- a/gtk/gtkcssimagelinear.c +++ b/gtk/gtkcssimagelinear.c @@ -187,10 +187,10 @@ gtk_css_image_linear_snapshot (GtkCssImage *image, * get the color of the last color stop */ GtkCssImageLinearColorStop *stop = &g_array_index (linear->stops, GtkCssImageLinearColorStop, linear->stops->len - 1); - gtk_snapshot_append_color_node (snapshot, - _gtk_css_rgba_value_get_rgba (stop->color), - &GRAPHENE_RECT_INIT (0, 0, width, height), - "RepeatingLinearGradient<degenerate>"); + gtk_snapshot_append_color (snapshot, + _gtk_css_rgba_value_get_rgba (stop->color), + &GRAPHENE_RECT_INIT (0, 0, width, height), + "RepeatingLinearGradient<degenerate>"); return; } diff --git a/gtk/gtkcssimagesurface.c b/gtk/gtkcssimagesurface.c index 426a6d1ac3..a41781f682 100644 --- a/gtk/gtkcssimagesurface.c +++ b/gtk/gtkcssimagesurface.c @@ -56,12 +56,12 @@ gtk_css_image_surface_snapshot (GtkCssImage *image, if (surface->texture == NULL) return; - gtk_snapshot_append_texture_node (snapshot, - surface->texture, - &GRAPHENE_RECT_INIT (0, 0, width, height), - "Surface Image %dx%d", - gsk_texture_get_width (surface->texture), - gsk_texture_get_height (surface->texture)); + gtk_snapshot_append_texture (snapshot, + surface->texture, + &GRAPHENE_RECT_INIT (0, 0, width, height), + "Surface Image %dx%d", + gsk_texture_get_width (surface->texture), + gsk_texture_get_height (surface->texture)); } static void diff --git a/gtk/gtkdebugupdates.c b/gtk/gtkdebugupdates.c index 4ae6289512..81ef6ad0cc 100644 --- a/gtk/gtkdebugupdates.c +++ b/gtk/gtkdebugupdates.c @@ -284,10 +284,10 @@ gtk_debug_updates_snapshot (GtkWidget *widget, for (i = 0; i < cairo_region_num_rectangles (draw->region); i++) { cairo_region_get_rectangle (draw->region, i, &rect); - gtk_snapshot_append_color_node (snapshot, - &(GdkRGBA) { 1, 0, 0, 0.4 * (1 - progress) }, - &GRAPHENE_RECT_INIT(rect.x, rect.y, rect.width, rect.height), - "Debug Updates<%g>", progress); + gtk_snapshot_append_color (snapshot, + &(GdkRGBA) { 1, 0, 0, 0.4 * (1 - progress) }, + &GRAPHENE_RECT_INIT(rect.x, rect.y, rect.width, rect.height), + "Debug Updates<%g>", progress); } } } diff --git a/gtk/gtkdrawingarea.c b/gtk/gtkdrawingarea.c index ecea4c6e9a..7478256ff4 100644 --- a/gtk/gtkdrawingarea.c +++ b/gtk/gtkdrawingarea.c @@ -239,11 +239,13 @@ gtk_drawing_area_snapshot (GtkWidget *widget, if (!priv->draw_func) return; - cr = gtk_snapshot_append_cairo_node (snapshot, - &GRAPHENE_RECT_INIT (0, 0, - gtk_widget_get_allocated_width (widget), - gtk_widget_get_allocated_height (widget)), - "DrawingAreaContents"); + cr = gtk_snapshot_append_cairo (snapshot, + &GRAPHENE_RECT_INIT ( + 0, 0, + gtk_widget_get_allocated_width (widget), + gtk_widget_get_allocated_height (widget) + ), + "DrawingAreaContents"); priv->draw_func (self, cr, gtk_widget_get_allocated_width (widget), diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 2a04129483..9d2b1a9429 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -3601,12 +3601,12 @@ gtk_entry_render (GtkCssGadget *gadget, gtk_css_gadget_snapshot (priv->progress_gadget, snapshot); /* Draw text and cursor */ - cr = gtk_snapshot_append_cairo_node (snapshot, - &GRAPHENE_RECT_INIT (x + priv->text_x, - y, - priv->text_width, - height), - "Entry Text"); + cr = gtk_snapshot_append_cairo (snapshot, + &GRAPHENE_RECT_INIT (x + priv->text_x, + y, + priv->text_width, + height), + "Entry Text"); if (priv->dnd_position != -1) gtk_entry_draw_cursor (GTK_ENTRY (widget), cr, CURSOR_DND); diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c index 6a6a4a6611..a014e491e6 100644 --- a/gtk/gtkflowbox.c +++ b/gtk/gtkflowbox.c @@ -2560,9 +2560,9 @@ gtk_flow_box_render (GtkCssGadget *gadget, vertical = priv->orientation == GTK_ORIENTATION_VERTICAL; - cr = gtk_snapshot_append_cairo_node (snapshot, - &GRAPHENE_RECT_INIT (x, y, width, height), - "FlowBox Rubberband"); + cr = gtk_snapshot_append_cairo (snapshot, + &GRAPHENE_RECT_INIT (x, y, width, height), + "FlowBox Rubberband"); context = gtk_widget_get_style_context (widget); gtk_style_context_save_to_node (context, priv->rubberband_node); diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 575621d27d..bc5ae4c3ef 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -4236,9 +4236,9 @@ gtk_label_render (GtkCssGadget *gadget, range_clip = gdk_pango_layout_get_clip_region (priv->layout, lx, ly, range, 1); cairo_region_get_extents (range_clip, &clip_extents); - cr = gtk_snapshot_append_cairo_node (snapshot, - &GRAPHENE_RECT_FROM_RECT (&clip_extents), - "Selected Text"); + cr = gtk_snapshot_append_cairo (snapshot, + &GRAPHENE_RECT_FROM_RECT (&clip_extents), + "Selected Text"); gtk_style_context_save_to_node (context, info->selection_node); gdk_cairo_region (cr, range_clip); @@ -4286,9 +4286,9 @@ gtk_label_render (GtkCssGadget *gadget, range_clip = gdk_pango_layout_get_clip_region (priv->layout, lx, ly, range, 1); cairo_region_get_extents (range_clip, &clip_extents); - cr = gtk_snapshot_append_cairo_node (snapshot, - &GRAPHENE_RECT_FROM_RECT(&clip_extents), - "Active Link"); + cr = gtk_snapshot_append_cairo (snapshot, + &GRAPHENE_RECT_FROM_RECT(&clip_extents), + "Active Link"); gdk_cairo_region (cr, range_clip); cairo_clip (cr); cairo_region_destroy (range_clip); diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c index 3376ec027e..4a6c753c96 100644 --- a/gtk/gtkpopover.c +++ b/gtk/gtkpopover.c @@ -1127,9 +1127,9 @@ gtk_popover_snapshot (GtkWidget *widget, graphene_rect_init (&bounds, clip.x - allocation.x, clip.y - allocation.y, clip.width, clip.height); - cr = gtk_snapshot_append_cairo_node (snapshot, - &bounds, - "Popover"); + cr = gtk_snapshot_append_cairo (snapshot, + &bounds, + "Popover"); /* Render the rect background */ gtk_render_background (context, cr, rect_x, rect_y, diff --git a/gtk/gtkrenderbackground.c b/gtk/gtkrenderbackground.c index bca7dc13f7..b7a46bd7af 100644 --- a/gtk/gtkrenderbackground.c +++ b/gtk/gtkrenderbackground.c @@ -91,20 +91,20 @@ gtk_theming_background_snapshot_color (GtkThemingBackground *bg, if (gsk_rounded_rect_is_rectilinear (&bg->boxes[clip])) { - gtk_snapshot_append_color_node (snapshot, - bg_color, - &bg->boxes[clip].bounds, - "BackgroundColor"); + gtk_snapshot_append_color (snapshot, + bg_color, + &bg->boxes[clip].bounds, + "BackgroundColor"); } else { gtk_snapshot_push_rounded_clip (snapshot, &bg->boxes[clip], "BackgroundColorClip"); - gtk_snapshot_append_color_node (snapshot, - bg_color, - &bg->boxes[clip].bounds, - "BackgroundColor"); + gtk_snapshot_append_color (snapshot, + bg_color, + &bg->boxes[clip].bounds, + "BackgroundColor"); gtk_snapshot_pop (snapshot); } } diff --git a/gtk/gtkrenderborder.c b/gtk/gtkrenderborder.c index a42f74e42b..7d671a2fb3 100644 --- a/gtk/gtkrenderborder.c +++ b/gtk/gtkrenderborder.c @@ -589,9 +589,9 @@ snapshot_frame_stroke (GtkSnapshot *snapshot, double double_width[4] = { border_width[0], border_width[1], border_width[2], border_width[3] }; cairo_t *cr; - cr = gtk_snapshot_append_cairo_node (snapshot, - &outline->bounds, - "BorderStroke"); + cr = gtk_snapshot_append_cairo (snapshot, + &outline->bounds, + "BorderStroke"); render_frame_stroke (cr, outline, double_width, colors, hidden_side, stroke_style); cairo_destroy (cr); } @@ -941,9 +941,9 @@ gtk_css_style_snapshot_border (GtkCssStyle *style, { double double_width[4] = { border_width[0], border_width[1], border_width[2], border_width[3] }; - cr = gtk_snapshot_append_cairo_node (snapshot, - &bounds, - "Border Image"); + cr = gtk_snapshot_append_cairo (snapshot, + &bounds, + "Border Image"); gtk_border_image_render (&border_image, double_width, cr, 0, 0, width, height); cairo_destroy (cr); } diff --git a/gtk/gtkrendericon.c b/gtk/gtkrendericon.c index f8c50fa6a4..ff7eac978e 100644 --- a/gtk/gtkrendericon.c +++ b/gtk/gtkrendericon.c @@ -305,7 +305,7 @@ gtk_css_style_snapshot_icon_texture (GtkCssStyle *style, 0, 0, gsk_texture_get_width (texture) / texture_scale, gsk_texture_get_height (texture) / texture_scale); - gtk_snapshot_append_texture_node (snapshot, texture, &bounds, "Icon"); + gtk_snapshot_append_texture (snapshot, texture, &bounds, "Icon"); } else { @@ -320,7 +320,7 @@ gtk_css_style_snapshot_icon_texture (GtkCssStyle *style, gtk_snapshot_push_transform (snapshot, &matrix, "Icon Transform"); graphene_rect_init (&bounds, 0, 0, gsk_texture_get_width (texture), gsk_texture_get_height (texture)); - gtk_snapshot_append_texture_node (snapshot, texture, &bounds, "Icon"); + gtk_snapshot_append_texture (snapshot, texture, &bounds, "Icon"); gtk_snapshot_pop (snapshot); } diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index baa5c7722e..46afb9e47d 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -1758,15 +1758,15 @@ gtk_scale_render_mark_indicator (GtkCssGadget *gadget, gtk_style_context_get_color (context, &color); if (orientation == GTK_ORIENTATION_HORIZONTAL) - gtk_snapshot_append_color_node (snapshot, - &color, - &GRAPHENE_RECT_INIT(x + width / 2, y, 1, height), - "ScaleMark"); + gtk_snapshot_append_color (snapshot, + &color, + &GRAPHENE_RECT_INIT(x + width / 2, y, 1, height), + "ScaleMark"); else - gtk_snapshot_append_color_node (snapshot, - &color, - &GRAPHENE_RECT_INIT(x, y + height / 2, width, 1), - "ScaleMark"); + gtk_snapshot_append_color (snapshot, + &color, + &GRAPHENE_RECT_INIT(x, y + height / 2, width, 1), + "ScaleMark"); gtk_style_context_restore (context); diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index 7c9a75a143..00d6242b93 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -40,7 +40,7 @@ * a cairo context, and maintains a stack of render nodes and their associated * transformations. * - * The node at the top of the stack is the the one that gtk_snapshot_append_node() + * The node at the top of the stack is the the one that gtk_snapshot_append() * operates on. Use the gtk_snapshot_push() and gtk_snapshot_pop() functions to * change the current node. * @@ -987,10 +987,10 @@ gtk_snapshot_translate_2d (GtkSnapshot *snapshot, * * Use this offset to determine how to offset nodes that you * manually add to the snapshot using - * gtk_snapshot_append_node(). + * gtk_snapshot_append(). * * Note that other functions that add nodes for you, such as - * gtk_snapshot_append_cairo_node() will add this offset for + * gtk_snapshot_append_cairo() will add this offset for * you. **/ void @@ -1033,7 +1033,7 @@ gtk_snapshot_append_node (GtkSnapshot *snapshot, } /** - * gtk_snapshot_append_cairo_node: + * gtk_snapshot_append_cairo: * @snapshot: a #GtkSnapshot * @bounds: the bounds for the new node * @name: (transfer none): a printf() style format string for the name for the new node @@ -1048,10 +1048,10 @@ gtk_snapshot_append_node (GtkSnapshot *snapshot, * Since: 3.90 */ cairo_t * -gtk_snapshot_append_cairo_node (GtkSnapshot *snapshot, - const graphene_rect_t *bounds, - const char *name, - ...) +gtk_snapshot_append_cairo (GtkSnapshot *snapshot, + const graphene_rect_t *bounds, + const char *name, + ...) { GskRenderNode *node; graphene_rect_t real_bounds; @@ -1088,7 +1088,7 @@ gtk_snapshot_append_cairo_node (GtkSnapshot *snapshot, } /** - * gtk_snapshot_append_texture_node: + * gtk_snapshot_append_texture: * @snapshot: a #GtkSnapshot * @texture: the #GskTexture to render * @bounds: the bounds for the new node @@ -1099,11 +1099,11 @@ gtk_snapshot_append_cairo_node (GtkSnapshot *snapshot, * to the current render node of @snapshot. **/ void -gtk_snapshot_append_texture_node (GtkSnapshot *snapshot, - GskTexture *texture, - const graphene_rect_t *bounds, - const char *name, - ...) +gtk_snapshot_append_texture (GtkSnapshot *snapshot, + GskTexture *texture, + const graphene_rect_t *bounds, + const char *name, + ...) { GskRenderNode *node; graphene_rect_t real_bounds; @@ -1134,7 +1134,7 @@ gtk_snapshot_append_texture_node (GtkSnapshot *snapshot, } /** - * gtk_snapshot_append_color_node: + * gtk_snapshot_append_color: * @snapshot: a #GtkSnapshot * @color: the #GdkRGBA to draw * @bounds: the bounds for the new node @@ -1147,11 +1147,11 @@ gtk_snapshot_append_texture_node (GtkSnapshot *snapshot, * You should try to avoid calling this function if @color is transparent. **/ void -gtk_snapshot_append_color_node (GtkSnapshot *snapshot, - const GdkRGBA *color, - const graphene_rect_t *bounds, - const char *name, - ...) +gtk_snapshot_append_color (GtkSnapshot *snapshot, + const GdkRGBA *color, + const graphene_rect_t *bounds, + const char *name, + ...) { GskRenderNode *node; graphene_rect_t real_bounds; @@ -1193,7 +1193,7 @@ gtk_snapshot_append_color_node (GtkSnapshot *snapshot, * Since: 3.90 */ gboolean -gtk_snapshot_clips_rect (GtkSnapshot *snapshot, +gtk_snapshot_clips_rect (GtkSnapshot *snapshot, const cairo_rectangle_int_t *rect) { cairo_rectangle_int_t offset_rect; @@ -1352,7 +1352,7 @@ gtk_snapshot_render_layout (GtkSnapshot *snapshot, gtk_snapshot_translate_2d (snapshot, x, y); - cr = gtk_snapshot_append_cairo_node (snapshot, &bounds, "Text<%dchars>", pango_layout_get_character_count (layout)); + cr = gtk_snapshot_append_cairo (snapshot, &bounds, "Text<%dchars>", pango_layout_get_character_count (layout)); _gtk_css_shadows_value_paint_layout (shadow, cr, layout); diff --git a/gtk/gtksnapshot.h b/gtk/gtksnapshot.h index d44ad4d84d..1e28dd12fe 100644 --- a/gtk/gtksnapshot.h +++ b/gtk/gtksnapshot.h @@ -105,18 +105,18 @@ GDK_AVAILABLE_IN_3_90 void gtk_snapshot_append_node (GtkSnapshot *snapshot, GskRenderNode *node); GDK_AVAILABLE_IN_3_90 -cairo_t * gtk_snapshot_append_cairo_node (GtkSnapshot *snapshot, +cairo_t * gtk_snapshot_append_cairo (GtkSnapshot *snapshot, const graphene_rect_t *bounds, const char *name, ...) G_GNUC_PRINTF(3, 4); GDK_AVAILABLE_IN_3_90 -void gtk_snapshot_append_texture_node (GtkSnapshot *snapshot, +void gtk_snapshot_append_texture (GtkSnapshot *snapshot, GskTexture *texture, const graphene_rect_t *bounds, const char *name, ...) G_GNUC_PRINTF (4, 5); GDK_AVAILABLE_IN_3_90 -void gtk_snapshot_append_color_node (GtkSnapshot *snapshot, +void gtk_snapshot_append_color (GtkSnapshot *snapshot, const GdkRGBA *color, const graphene_rect_t *bounds, const char *name, diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index 683bee8752..83746631ff 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -2123,9 +2123,9 @@ snapshot_insertion_cursor (GtkSnapshot *snapshot, cairo_t *cr; get_insertion_cursor_bounds (height, direction, draw_arrow, &bounds); - cr = gtk_snapshot_append_cairo_node (snapshot, - &bounds, - "%s Cursor", is_primary ? "Primary" : "Secondary"); + cr = gtk_snapshot_append_cairo (snapshot, + &bounds, + "%s Cursor", is_primary ? "Primary" : "Secondary"); draw_insertion_cursor (context, cr, 0, 0, height, is_primary, direction, draw_arrow); diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 7e7f3d5edd..10d80f4f23 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -4678,14 +4678,14 @@ gtk_tree_view_snapshot_line (GtkTreeView *tree_view, GtkStyleContext *context; cairo_t *cr; - cr = gtk_snapshot_append_cairo_node (snapshot, - &GRAPHENE_RECT_INIT ( - MIN (x1, x2), - MIN (y1, y2), - ABS (x2 - x1) + 1, - ABS (y2 - y1) + 1 - ), - "TreeViewGridLine"); + cr = gtk_snapshot_append_cairo (snapshot, + &GRAPHENE_RECT_INIT ( + MIN (x1, x2), + MIN (y1, y2), + ABS (x2 - x1) + 1, + ABS (y2 - y1) + 1 + ), + "TreeViewGridLine"); context = gtk_widget_get_style_context (GTK_WIDGET (tree_view)); @@ -5078,15 +5078,15 @@ gtk_tree_view_bin_snapshot (GtkWidget *widget, gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR); gtk_style_context_get_color (context, &color); - gtk_snapshot_append_color_node (snapshot, - &color, - &GRAPHENE_RECT_INIT( - cell_area.x, - cell_area.y + cell_area.height / 2, - cell_area.x + cell_area.width, - 1 - ), - "Separator"); + gtk_snapshot_append_color (snapshot, + &color, + &GRAPHENE_RECT_INIT( + cell_area.x, + cell_area.y + cell_area.height / 2, + cell_area.x + cell_area.width, + 1 + ), + "Separator"); gtk_style_context_restore (context); } @@ -5119,15 +5119,15 @@ gtk_tree_view_bin_snapshot (GtkWidget *widget, gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR); gtk_style_context_get_color (context, &color); - gtk_snapshot_append_color_node (snapshot, - &color, - &GRAPHENE_RECT_INIT( - cell_area.x, - cell_area.y + cell_area.height / 2, - cell_area.x + cell_area.width, - 1 - ), - "Separator"); + gtk_snapshot_append_color (snapshot, + &color, + &GRAPHENE_RECT_INIT( + cell_area.x, + cell_area.y + cell_area.height / 2, + cell_area.x + cell_area.width, + 1 + ), + "Separator"); gtk_style_context_restore (context); } @@ -14228,15 +14228,15 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view, gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR); gtk_style_context_get_color (context, &color); - gtk_snapshot_append_color_node (&snapshot, - &color, - &GRAPHENE_RECT_INIT( - cell_area.x, - cell_area.y + cell_area.height / 2, - cell_area.x + cell_area.width, - 1 - ), - "Separator"); + gtk_snapshot_append_color (&snapshot, + &color, + &GRAPHENE_RECT_INIT( + cell_area.x, + cell_area.y + cell_area.height / 2, + cell_area.x + cell_area.width, + 1 + ), + "Separator"); gtk_style_context_restore (context); } diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index e84179ded4..0c1b7407a9 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -15632,9 +15632,9 @@ gtk_widget_snapshot (GtkWidget *widget, { cairo_t *cr; - cr = gtk_snapshot_append_cairo_node (snapshot, - &bounds, "Fallback<%s>", - G_OBJECT_TYPE_NAME (widget)); + cr = gtk_snapshot_append_cairo (snapshot, + &bounds, "Fallback<%s>", + G_OBJECT_TYPE_NAME (widget)); gtk_widget_draw_internal (widget, cr, TRUE); cairo_destroy (cr); } @@ -15653,9 +15653,9 @@ gtk_widget_snapshot (GtkWidget *widget, gboolean result; cairo_t *cr; - cr = gtk_snapshot_append_cairo_node (snapshot, - &bounds, - "DrawSignalContents<%s>", G_OBJECT_TYPE_NAME (widget)); + cr = gtk_snapshot_append_cairo (snapshot, + &bounds, + "DrawSignalContents<%s>", G_OBJECT_TYPE_NAME (widget)); g_signal_emit (widget, widget_signals[DRAW], 0, cr, &result); cairo_destroy (cr); } diff --git a/gtk/inspector/cellrenderergraph.c b/gtk/inspector/cellrenderergraph.c index 08e4e8d95f..0d63bf6135 100644 --- a/gtk/inspector/cellrenderergraph.c +++ b/gtk/inspector/cellrenderergraph.c @@ -195,12 +195,12 @@ gtk_cell_renderer_graph_snapshot (GtkCellRenderer *cell, context = gtk_widget_get_style_context (widget); gtk_style_context_get_color (context, &color); - cr = gtk_snapshot_append_cairo_node (snapshot, - &GRAPHENE_RECT_INIT ( - background_area->x, background_area->y, - background_area->width, background_area->height - ), - "CellGraph"); + cr = gtk_snapshot_append_cairo (snapshot, + &GRAPHENE_RECT_INIT ( + background_area->x, background_area->y, + background_area->width, background_area->height + ), + "CellGraph"); cairo_set_line_width (cr, 1.0); diff --git a/gtk/inspector/rendernodeview.c b/gtk/inspector/rendernodeview.c index 3d0b81b5f1..0272211fe2 100644 --- a/gtk/inspector/rendernodeview.c +++ b/gtk/inspector/rendernodeview.c @@ -236,9 +236,9 @@ gtk_render_node_view_snapshot (GtkWidget *widget, height = gtk_widget_get_allocated_height (widget); graphene_rect_init (&rect, 0, 0, width, height); - cr = gtk_snapshot_append_cairo_node (snapshot, - &rect, - "RenderNodeView"); + cr = gtk_snapshot_append_cairo (snapshot, + &rect, + "RenderNodeView"); cairo_translate (cr, width / 2.0, height / 2.0); if (width < viewport.width || height < viewport.height) |