Deprecate the GdkRegion API

Includes fixing all callers to use the cairo region API instead. This is
usually just replacing the function names, the only difference is
gdk_region_get_rectangles() being replaced by
cairo_region_num_rectangles() and cairo_region_get_rectangle() which
required a bit more work.

https://bugzilla.gnome.org/show_bug.cgi?id=613284
This commit is contained in:
Benjamin Otte
2010-05-23 23:27:15 +02:00
parent dde9cf2882
commit 821dd33918
34 changed files with 629 additions and 589 deletions

View File

@ -426,7 +426,7 @@ get_selected_clip (GtkTextRenderer *text_renderer,
{
gint *ranges;
gint n_ranges, i;
GdkRegion *clip_region = gdk_region_new ();
GdkRegion *clip_region = cairo_region_create ();
GdkRegion *tmp_region;
pango_layout_line_get_x_ranges (line, start_index, end_index, &ranges, &n_ranges);
@ -440,12 +440,12 @@ get_selected_clip (GtkTextRenderer *text_renderer,
rect.width = PANGO_PIXELS (ranges[2*i + 1]) - PANGO_PIXELS (ranges[2*i]);
rect.height = height;
gdk_region_union_with_rect (clip_region, &rect);
cairo_region_union_rectangle (clip_region, &rect);
}
tmp_region = gdk_region_rectangle (&text_renderer->clip_rect);
gdk_region_intersect (clip_region, tmp_region);
gdk_region_destroy (tmp_region);
tmp_region = cairo_region_create_rectangle (&text_renderer->clip_rect);
cairo_region_intersect (clip_region, tmp_region);
cairo_region_destroy (tmp_region);
g_free (ranges);
return clip_region;
@ -612,7 +612,7 @@ render_para (GtkTextRenderer *text_renderer,
gdk_gc_set_clip_region (fg_gc, NULL);
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (text_renderer), fg_gc);
gdk_region_destroy (clip_region);
cairo_region_destroy (clip_region);
/* Paint in the ends of the line */
if (line_rect.x > line_display->left_margin * PANGO_SCALE &&