Remove MetaRegion

In many places, MetaRegion was being used entirely internally, rather
than for gtk2/gtk3 compatibility. In these cases, it's simpler to just
depend on cairo-1.10 (for both gtk2 and gtk3) and use cairo_region_t.

The few places where we did need GDK compatibility (GdkEvent.region and
gdk_window_shape_combine_mask) are replaced with a combination of
converting GdkRegion to cairo_region_t and conditional code.

https://bugzilla.gnome.org/show_bug.cgi?id=632474
This commit is contained in:
Owen W. Taylor
2010-10-18 11:32:50 -04:00
parent 9a4d1686a6
commit 804117c456
14 changed files with 189 additions and 244 deletions

View File

@ -880,29 +880,5 @@ meta_later_remove (guint later_id)
}
}
#ifdef USE_CAIRO_REGION
#include "region.h"
void
meta_region_get_rectangles (MetaRegion *region,
GdkRectangle **rectangles,
int *n_rectangles)
{
int n = cairo_region_num_rectangles (region);
if (n_rectangles != NULL)
*n_rectangles = n;
if (rectangles != NULL)
{
int i;
*rectangles = g_new (cairo_rectangle_int_t, n);
for (i = 0; i < n; i++)
cairo_region_get_rectangle (region, i, *rectangles + i);
}
}
#endif
/* eof util.c */