#include "gtkshortcutcontroller.h"
#include "gtkshortcuttrigger.h"
#include "gtkshow.h"
-#include "deprecated/gtkrender.h"
+#include "gtksnapshot.h"
+#include "gtkrenderbackgroundprivate.h"
+#include "gtkrenderborderprivate.h"
+#include "gtkrenderlayoutprivate.h"
#include "gtkstylecontextprivate.h"
#include "gtktextutilprivate.h"
#include "gtktooltip.h"
GtkStyleContext *context;
int lx, ly;
int width, height;
+ GtkCssBoxes boxes;
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (!self->text || (*self->text == '\0'))
return;
context = _gtk_widget_get_style_context (widget);
get_layout_location (self, &lx, &ly);
- gtk_snapshot_render_layout (snapshot, context, lx, ly, self->layout);
+ gtk_css_boxes_init (&boxes, widget);
+ gtk_css_style_snapshot_layout (&boxes, snapshot, lx, ly, self->layout);
info = self->select_info;
if (!info)
gtk_style_context_save_to_node (context, info->selection_node);
+ gtk_css_boxes_init_border_box (&boxes,
+ gtk_style_context_lookup_style (context),
+ 0, 0, width, height);
+
range_clip = gdk_pango_layout_get_clip_region (self->layout, lx, ly, range, 1);
for (i = 0; i < cairo_region_num_rectangles (range_clip); i++)
{
cairo_region_get_rectangle (range_clip, i, &clip_rect);
gtk_snapshot_push_clip (snapshot, &GRAPHENE_RECT_FROM_RECT (&clip_rect));
- gtk_snapshot_render_background (snapshot, context, 0, 0, width, height);
- gtk_snapshot_render_layout (snapshot, context, lx, ly, self->layout);
+ gtk_css_style_snapshot_background (&boxes, snapshot);
+ gtk_css_style_snapshot_layout (&boxes, snapshot, lx, ly, self->layout);
gtk_snapshot_pop (snapshot);
}
PangoDirection cursor_direction;
cursor_direction = get_cursor_direction (self);
- gtk_snapshot_render_insertion_cursor (snapshot, context,
- lx, ly,
- self->layout, self->select_info->selection_end,
- cursor_direction);
+ gtk_css_style_snapshot_caret (&boxes, gtk_widget_get_display (widget),
+ snapshot,
+ lx, ly,
+ self->layout,
+ self->select_info->selection_end,
+ cursor_direction);
}
focus_link = gtk_label_get_focus_link (self, NULL);
gtk_style_context_save_to_node (context, active_link->cssnode);
+ gtk_css_boxes_init_border_box (&boxes,
+ gtk_style_context_lookup_style (context),
+ 0, 0, width, height);
+
range_clip = gdk_pango_layout_get_clip_region (self->layout, lx, ly, range, 1);
for (i = 0; i < cairo_region_num_rectangles (range_clip); i++)
{
cairo_region_get_rectangle (range_clip, i, &clip_rect);
gtk_snapshot_push_clip (snapshot, &GRAPHENE_RECT_FROM_RECT (&clip_rect));
- gtk_snapshot_render_background (snapshot, context, 0, 0, width, height);
- gtk_snapshot_render_layout (snapshot, context, lx, ly, self->layout);
+ gtk_css_style_snapshot_background (&boxes, snapshot);
+ gtk_css_style_snapshot_layout (&boxes, snapshot, lx, ly, self->layout);
gtk_snapshot_pop (snapshot);
}
range_clip = gdk_pango_layout_get_clip_region (self->layout, lx, ly, range, 1);
cairo_region_get_extents (range_clip, &rect);
- gtk_snapshot_render_focus (snapshot, context, rect.x, rect.y, rect.width, rect.height);
+ gtk_css_boxes_init_border_box (&boxes,
+ gtk_style_context_lookup_style (context),
+ rect.x, rect.y, rect.width, rect.height);
+ gtk_css_style_snapshot_outline (&boxes, snapshot);
cairo_region_destroy (range_clip);
gtk_style_context_restore (context);
}
}
-G_GNUC_END_IGNORE_DEPRECATIONS
}
static GtkSizeRequestMode