Commit 300e6b84 authored by Benjamin Otte's avatar Benjamin Otte

s/GdkRegion/cairo_region_t/ in all of gtk

https://bugzilla.gnome.org/show_bug.cgi?id=613284
parent 3e96cfe8
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
#include "gdkinternals.h" #include "gdkinternals.h"
#include "gdkregion-generic.h"
#include "gdkalias.h" #include "gdkalias.h"
#include "cairo-directfb.h" #include "cairo-directfb.h"
...@@ -226,7 +225,7 @@ void ...@@ -226,7 +225,7 @@ void
gdk_directfb_clip_region (GdkDrawable *drawable, gdk_directfb_clip_region (GdkDrawable *drawable,
GdkGC *gc, GdkGC *gc,
GdkRectangle *draw_rect, GdkRectangle *draw_rect,
GdkRegion *ret_clip) cairo_region_t *ret_clip)
{ {
GdkDrawableImplDirectFB *private; GdkDrawableImplDirectFB *private;
GdkRectangle rect; GdkRectangle rect;
...@@ -264,7 +263,7 @@ gdk_directfb_clip_region (GdkDrawable *drawable, ...@@ -264,7 +263,7 @@ gdk_directfb_clip_region (GdkDrawable *drawable,
if (gc) if (gc)
{ {
GdkGCDirectFB *gc_private = GDK_GC_DIRECTFB (gc); GdkGCDirectFB *gc_private = GDK_GC_DIRECTFB (gc);
GdkRegion *region = &gc_private->clip_region; cairo_region_t *region = &gc_private->clip_region;
if (region->numRects) if (region->numRects)
{ {
...@@ -299,7 +298,7 @@ gdk_directfb_clip_region (GdkDrawable *drawable, ...@@ -299,7 +298,7 @@ gdk_directfb_clip_region (GdkDrawable *drawable,
!GDK_WINDOW_OBJECT (private->wrapper)->input_only) !GDK_WINDOW_OBJECT (private->wrapper)->input_only)
{ {
GList *cur; GList *cur;
GdkRegion temp; cairo_region_t temp;
temp.numRects = 1; temp.numRects = 1;
temp.rects = &temp.extents; temp.rects = &temp.extents;
...@@ -428,7 +427,7 @@ gdk_directfb_draw_rectangle (GdkDrawable *drawable, ...@@ -428,7 +427,7 @@ gdk_directfb_draw_rectangle (GdkDrawable *drawable,
gint height) gint height)
{ {
GdkDrawableImplDirectFB *impl; GdkDrawableImplDirectFB *impl;
GdkRegion clip; cairo_region_t clip;
GdkGCDirectFB *gc_private = NULL; GdkGCDirectFB *gc_private = NULL;
IDirectFBSurface *surface = NULL; IDirectFBSurface *surface = NULL;
gint i; gint i;
...@@ -543,7 +542,7 @@ gdk_directfb_draw_rectangle (GdkDrawable *drawable, ...@@ -543,7 +542,7 @@ gdk_directfb_draw_rectangle (GdkDrawable *drawable,
for (i = 0; i < clip.numRects; i++) for (i = 0; i < clip.numRects; i++)
{ {
GdkRegionBox *box = &clip.rects[i]; cairo_region_tBox *box = &clip.rects[i];
rects[i].x = box->x1; rects[i].x = box->x1;
rects[i].y = box->y1; rects[i].y = box->y1;
...@@ -606,7 +605,7 @@ gdk_directfb_draw_polygon (GdkDrawable *drawable, ...@@ -606,7 +605,7 @@ gdk_directfb_draw_polygon (GdkDrawable *drawable,
points[0].y == points[npoints-1].y)) points[0].y == points[npoints-1].y))
{ {
GdkDrawableImplDirectFB *impl; GdkDrawableImplDirectFB *impl;
GdkRegion clip; cairo_region_t clip;
gint i; gint i;
impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable); impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
...@@ -671,7 +670,7 @@ gdk_directfb_draw_drawable (GdkDrawable *drawable, ...@@ -671,7 +670,7 @@ gdk_directfb_draw_drawable (GdkDrawable *drawable,
{ {
GdkDrawableImplDirectFB *impl; GdkDrawableImplDirectFB *impl;
GdkDrawableImplDirectFB *src_impl; GdkDrawableImplDirectFB *src_impl;
GdkRegion clip; cairo_region_t clip;
GdkRectangle dest_rect = { xdest, GdkRectangle dest_rect = { xdest,
ydest, ydest,
xdest + width , xdest + width ,
...@@ -721,7 +720,7 @@ gdk_directfb_draw_points (GdkDrawable *drawable, ...@@ -721,7 +720,7 @@ gdk_directfb_draw_points (GdkDrawable *drawable,
gint npoints) gint npoints)
{ {
GdkDrawableImplDirectFB *impl; GdkDrawableImplDirectFB *impl;
GdkRegion clip; cairo_region_t clip;
DFBRegion region = { points->x, points->y, points->x, points->y }; DFBRegion region = { points->x, points->y, points->x, points->y };
...@@ -769,7 +768,7 @@ gdk_directfb_draw_segments (GdkDrawable *drawable, ...@@ -769,7 +768,7 @@ gdk_directfb_draw_segments (GdkDrawable *drawable,
gint nsegs) gint nsegs)
{ {
GdkDrawableImplDirectFB *impl; GdkDrawableImplDirectFB *impl;
GdkRegion clip; cairo_region_t clip;
gint i; gint i;
// DFBRegion region = { segs->x1, segs->y1, segs->x2, segs->y2 }; // DFBRegion region = { segs->x1, segs->y1, segs->x2, segs->y2 };
...@@ -847,7 +846,7 @@ gdk_directfb_draw_lines (GdkDrawable *drawable, ...@@ -847,7 +846,7 @@ gdk_directfb_draw_lines (GdkDrawable *drawable,
gint npoints) gint npoints)
{ {
GdkDrawableImplDirectFB *impl; GdkDrawableImplDirectFB *impl;
GdkRegion clip; cairo_region_t clip;
gint i; gint i;
DFBRegion lines[npoints > 1 ? npoints - 1 : 1]; DFBRegion lines[npoints > 1 ? npoints - 1 : 1];
...@@ -920,7 +919,7 @@ gdk_directfb_draw_image (GdkDrawable *drawable, ...@@ -920,7 +919,7 @@ gdk_directfb_draw_image (GdkDrawable *drawable,
{ {
GdkDrawableImplDirectFB *impl; GdkDrawableImplDirectFB *impl;
GdkImageDirectFB *image_private; GdkImageDirectFB *image_private;
GdkRegion clip; cairo_region_t clip;
GdkRectangle dest_rect = { xdest, ydest, width, height }; GdkRectangle dest_rect = { xdest, ydest, width, height };
gint pitch = 0; gint pitch = 0;
...@@ -1156,8 +1155,8 @@ gdk_directfb_draw_pixbuf (GdkDrawable *drawable, ...@@ -1156,8 +1155,8 @@ gdk_directfb_draw_pixbuf (GdkDrawable *drawable,
{ {
GdkPixbuf *composited = NULL; GdkPixbuf *composited = NULL;
#if 0 #if 0
GdkRegion *clip; cairo_region_t *clip;
GdkRegion *drect; cairo_region_t *drect;
GdkRectangle tmp_rect; GdkRectangle tmp_rect;
#endif #endif
GdkDrawableImplDirectFB *impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable); GdkDrawableImplDirectFB *impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include "gdkgc.h" #include "gdkgc.h"
#include "gdkpixmap.h" #include "gdkpixmap.h"
#include "gdkregion-generic.h"
#include "gdkalias.h" #include "gdkalias.h"
...@@ -313,7 +312,7 @@ gc_unset_clip_mask (GdkGC *gc) ...@@ -313,7 +312,7 @@ gc_unset_clip_mask (GdkGC *gc)
void void
_gdk_windowing_gc_set_clip_region (GdkGC *gc, _gdk_windowing_gc_set_clip_region (GdkGC *gc,
const GdkRegion *region, const cairo_region_t *region,
gboolean reset_origin) gboolean reset_origin)
{ {
GdkGCDirectFB *data; GdkGCDirectFB *data;
......
...@@ -53,7 +53,7 @@ _gdk_directfb_window_get_offsets (GdkWindow *window, ...@@ -53,7 +53,7 @@ _gdk_directfb_window_get_offsets (GdkWindow *window,
gboolean gboolean
_gdk_windowing_window_queue_antiexpose (GdkWindow *window, _gdk_windowing_window_queue_antiexpose (GdkWindow *window,
GdkRegion *area) cairo_region_t *area)
{ {
return FALSE; return FALSE;
} }
...@@ -75,7 +75,7 @@ _gdk_directfb_window_scroll (GdkWindow *window, ...@@ -75,7 +75,7 @@ _gdk_directfb_window_scroll (GdkWindow *window,
{ {
GdkWindowObject *private; GdkWindowObject *private;
GdkDrawableImplDirectFB *impl; GdkDrawableImplDirectFB *impl;
GdkRegion *invalidate_region = NULL; cairo_region_t *invalidate_region = NULL;
GList *list; GList *list;
g_return_if_fail (GDK_IS_WINDOW (window)); g_return_if_fail (GDK_IS_WINDOW (window));
...@@ -104,7 +104,7 @@ _gdk_directfb_window_scroll (GdkWindow *window, ...@@ -104,7 +104,7 @@ _gdk_directfb_window_scroll (GdkWindow *window,
(!private->update_area || (!private->update_area ||
!cairo_region_contains_rectangle (private->update_area, &rect))) !cairo_region_contains_rectangle (private->update_area, &rect)))
{ {
GdkRegion *region; cairo_region_t *region;
region = cairo_region_create_rectangle (&rect); region = cairo_region_create_rectangle (&rect);
cairo_region_subtract (invalidate_region, region); cairo_region_subtract (invalidate_region, region);
...@@ -148,7 +148,7 @@ _gdk_directfb_window_scroll (GdkWindow *window, ...@@ -148,7 +148,7 @@ _gdk_directfb_window_scroll (GdkWindow *window,
/** /**
* gdk_window_move_region: * gdk_window_move_region:
* @window: a #GdkWindow * @window: a #GdkWindow
* @region: The #GdkRegion to move * @region: The #cairo_region_t to move
* @dx: Amount to move in the X direction * @dx: Amount to move in the X direction
* @dy: Amount to move in the Y direction * @dy: Amount to move in the Y direction
* *
...@@ -162,17 +162,17 @@ _gdk_directfb_window_scroll (GdkWindow *window, ...@@ -162,17 +162,17 @@ _gdk_directfb_window_scroll (GdkWindow *window,
**/ **/
void void
_gdk_directfb_window_move_region (GdkWindow *window, _gdk_directfb_window_move_region (GdkWindow *window,
const GdkRegion *region, const cairo_region_t *region,
gint dx, gint dx,
gint dy) gint dy)
{ {
GdkWindowObject *private; GdkWindowObject *private;
GdkDrawableImplDirectFB *impl; GdkDrawableImplDirectFB *impl;
GdkRegion *window_clip; cairo_region_t *window_clip;
GdkRegion *src_region; cairo_region_t *src_region;
GdkRegion *brought_in; cairo_region_t *brought_in;
GdkRegion *dest_region; cairo_region_t *dest_region;
GdkRegion *moving_invalid_region; cairo_region_t *moving_invalid_region;
GdkRectangle dest_extents; GdkRectangle dest_extents;
g_return_if_fail (GDK_IS_WINDOW (window)); g_return_if_fail (GDK_IS_WINDOW (window));
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include "gdkinternals.h" #include "gdkinternals.h"
#include "gdkcursor.h" #include "gdkcursor.h"
#include "gdkdisplay-directfb.h" #include "gdkdisplay-directfb.h"
#include "gdkregion-generic.h"
#include <cairo.h> #include <cairo.h>
#include <string.h> #include <string.h>
...@@ -72,14 +71,14 @@ struct _GdkDrawableImplDirectFB ...@@ -72,14 +71,14 @@ struct _GdkDrawableImplDirectFB
gboolean buffered; gboolean buffered;
GdkRegion paint_region; cairo_region_t paint_region;
gint paint_depth; gint paint_depth;
gint width; gint width;
gint height; gint height;
gint abs_x; gint abs_x;
gint abs_y; gint abs_y;
GdkRegion clip_region; cairo_region_t clip_region;
GdkColormap *colormap; GdkColormap *colormap;
...@@ -179,7 +178,7 @@ void _gdk_directfb_window_scroll (GdkWindow *window, ...@@ -179,7 +178,7 @@ void _gdk_directfb_window_scroll (GdkWindow *window,
gint dx, gint dx,
gint dy); gint dy);
void _gdk_directfb_window_move_region (GdkWindow *window, void _gdk_directfb_window_move_region (GdkWindow *window,
const GdkRegion *region, const cairo_region_t *region,
gint dx, gint dx,
gint dy); gint dy);
...@@ -213,7 +212,7 @@ typedef struct ...@@ -213,7 +212,7 @@ typedef struct
{ {
GdkGC parent_instance; GdkGC parent_instance;
GdkRegion clip_region; cairo_region_t clip_region;
GdkGCValuesMask values_mask; GdkGCValuesMask values_mask;
GdkGCValues values; GdkGCValues values;
...@@ -335,14 +334,14 @@ void gdk_fb_window_set_child_handler (GdkWindow *window, ...@@ -335,14 +334,14 @@ void gdk_fb_window_set_child_handler (GdkWindow *window,
void gdk_directfb_clip_region (GdkDrawable *drawable, void gdk_directfb_clip_region (GdkDrawable *drawable,
GdkGC *gc, GdkGC *gc,
GdkRectangle *draw_rect, GdkRectangle *draw_rect,
GdkRegion *ret_clip); cairo_region_t *ret_clip);
/* Utilities for avoiding mallocs */ /* Utilities for avoiding mallocs */
static inline void static inline void
temp_region_init_copy( GdkRegion *region, temp_region_init_copy( cairo_region_t *region,
const GdkRegion *source) const cairo_region_t *source)
{ {
if (region != source) /* don't want to copy to itself */ if (region != source) /* don't want to copy to itself */
{ {
...@@ -351,19 +350,19 @@ temp_region_init_copy( GdkRegion *region, ...@@ -351,19 +350,19 @@ temp_region_init_copy( GdkRegion *region,
if (region->rects && region->rects != &region->extents) if (region->rects && region->rects != &region->extents)
g_free( region->rects ); g_free( region->rects );
region->rects = g_new (GdkRegionBox, source->numRects); region->rects = g_new (cairo_region_tBox, source->numRects);
region->size = source->numRects; region->size = source->numRects;
} }
region->numRects = source->numRects; region->numRects = source->numRects;
region->extents = source->extents; region->extents = source->extents;
memcpy( region->rects, source->rects, source->numRects * sizeof (GdkRegionBox) ); memcpy( region->rects, source->rects, source->numRects * sizeof (cairo_region_tBox) );
} }
} }
static inline void static inline void
temp_region_init_rectangle( GdkRegion *region, temp_region_init_rectangle( cairo_region_t *region,
const GdkRectangle *rect ) const GdkRectangle *rect )
{ {
region->numRects = 1; region->numRects = 1;
...@@ -376,7 +375,7 @@ temp_region_init_rectangle( GdkRegion *region, ...@@ -376,7 +375,7 @@ temp_region_init_rectangle( GdkRegion *region,
} }
static inline void static inline void
temp_region_init_rectangle_vals( GdkRegion *region, temp_region_init_rectangle_vals( cairo_region_t *region,
int x, int x,
int y, int y,
int w, int w,
...@@ -392,7 +391,7 @@ temp_region_init_rectangle_vals( GdkRegion *region, ...@@ -392,7 +391,7 @@ temp_region_init_rectangle_vals( GdkRegion *region,
} }
static inline void static inline void
temp_region_reset( GdkRegion *region ) temp_region_reset( cairo_region_t *region )
{ {
if (region->size > 32 && region->rects && region->rects != &region->extents) { if (region->size > 32 && region->rects && region->rects != &region->extents) {
g_free( region->rects ); g_free( region->rects );
...@@ -405,7 +404,7 @@ temp_region_reset( GdkRegion *region ) ...@@ -405,7 +404,7 @@ temp_region_reset( GdkRegion *region )
} }
static inline void static inline void
temp_region_deinit( GdkRegion *region ) temp_region_deinit( cairo_region_t *region )
{ {
if (region->rects && region->rects != &region->extents) { if (region->rects && region->rects != &region->extents) {
g_free( region->rects ); g_free( region->rects );
......
...@@ -40,8 +40,6 @@ ...@@ -40,8 +40,6 @@
#include "gdkprivate-directfb.h" #include "gdkprivate-directfb.h"
#include "gdkdisplay-directfb.h" #include "gdkdisplay-directfb.h"
#include "gdkregion-generic.h"
#include "gdkinternals.h" #include "gdkinternals.h"
#include "gdkalias.h" #include "gdkalias.h"
#include "cairo.h" #include "cairo.h"
...@@ -57,7 +55,7 @@ D_DEBUG_DOMAIN( GDKDFB_Paintable, "GDKDFB/Paintable", "GDK DirectFB Paintable" ) ...@@ -57,7 +55,7 @@ D_DEBUG_DOMAIN( GDKDFB_Paintable, "GDKDFB/Paintable", "GDK DirectFB Paintable" )
D_DEBUG_DOMAIN( GDKDFB_Window, "GDKDFB/Window", "GDK DirectFB Window" ); D_DEBUG_DOMAIN( GDKDFB_Window, "GDKDFB/Window", "GDK DirectFB Window" );
static GdkRegion * gdk_window_impl_directfb_get_visible_region (GdkDrawable *drawable); static cairo_region_t * gdk_window_impl_directfb_get_visible_region (GdkDrawable *drawable);
static void gdk_window_impl_directfb_set_colormap (GdkDrawable *drawable, static void gdk_window_impl_directfb_set_colormap (GdkDrawable *drawable,
GdkColormap *colormap); GdkColormap *colormap);
static void gdk_window_impl_directfb_init (GdkWindowImplDirectFB *window); static void gdk_window_impl_directfb_init (GdkWindowImplDirectFB *window);
...@@ -209,7 +207,7 @@ gdk_window_impl_directfb_finalize (GObject *object) ...@@ -209,7 +207,7 @@ gdk_window_impl_directfb_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object); G_OBJECT_CLASS (parent_class)->finalize (object);
} }
static GdkRegion* static cairo_region_t*
gdk_window_impl_directfb_get_visible_region (GdkDrawable *drawable) gdk_window_impl_directfb_get_visible_region (GdkDrawable *drawable)
{ {
GdkDrawableImplDirectFB *priv = GDK_DRAWABLE_IMPL_DIRECTFB (drawable); GdkDrawableImplDirectFB *priv = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
...@@ -1942,7 +1940,7 @@ gdk_directfb_window_set_events (GdkWindow *window, ...@@ -1942,7 +1940,7 @@ gdk_directfb_window_set_events (GdkWindow *window,
static void static void
gdk_directfb_window_shape_combine_region (GdkWindow *window, gdk_directfb_window_shape_combine_region (GdkWindow *window,
const GdkRegion *shape_region, const cairo_region_t *shape_region,
gint offset_x, gint offset_x,
gint offset_y) gint offset_y)
{ {
...@@ -1950,7 +1948,7 @@ gdk_directfb_window_shape_combine_region (GdkWindow *window, ...@@ -1950,7 +1948,7 @@ gdk_directfb_window_shape_combine_region (GdkWindow *window,
void void
gdk_directfb_window_input_shape_combine_region (GdkWindow *window, gdk_directfb_window_input_shape_combine_region (GdkWindow *window,
const GdkRegion *shape_region, const cairo_region_t *shape_region,
gint offset_x, gint offset_x,
gint offset_y) gint offset_y)
{ {
...@@ -1959,7 +1957,7 @@ gdk_directfb_window_input_shape_combine_region (GdkWindow *window, ...@@ -1959,7 +1957,7 @@ gdk_directfb_window_input_shape_combine_region (GdkWindow *window,
static void static void
gdk_directfb_window_queue_translation (GdkWindow *window, gdk_directfb_window_queue_translation (GdkWindow *window,
GdkGC *gc, GdkGC *gc,
GdkRegion *region, cairo_region_t *region,
gint dx, gint dx,
gint dy) gint dy)
{ {
...@@ -2622,7 +2620,7 @@ gdk_window_set_urgency_hint (GdkWindow *window, ...@@ -2622,7 +2620,7 @@ gdk_window_set_urgency_hint (GdkWindow *window,
static void static void
gdk_window_impl_directfb_begin_paint_region (GdkPaintable *paintable, gdk_window_impl_directfb_begin_paint_region (GdkPaintable *paintable,
GdkWindow *window, GdkWindow *window,
const GdkRegion *region) const cairo_region_t *region)
{ {
GdkDrawableImplDirectFB *impl; GdkDrawableImplDirectFB *impl;
GdkWindowImplDirectFB *wimpl; GdkWindowImplDirectFB *wimpl;
...@@ -2679,7 +2677,7 @@ gdk_window_impl_directfb_begin_paint_region (GdkPaintable *paintable, ...@@ -2679,7 +2677,7 @@ gdk_window_impl_directfb_begin_paint_region (GdkPaintable *paintable,
for (i = 0; i < region->numRects; i++) for (i = 0; i < region->numRects; i++)
{ {
GdkRegionBox *box = &region->rects[i]; cairo_region_tBox *box = &region->rects[i];
D_DEBUG_AT( GDKDFB_Window, " -> [%2d] %4d,%4d-%4dx%4d\n", i, GDKDFB_RECTANGLE_VALS_FROM_BOX( box ) ); D_DEBUG_AT( GDKDFB_Window, " -> [%2d] %4d,%4d-%4dx%4d\n", i, GDKDFB_RECTANGLE_VALS_FROM_BOX( box ) );
...@@ -2766,13 +2764,13 @@ gdk_window_impl_directfb_end_paint (GdkPaintable *paintable) ...@@ -2766,13 +2764,13 @@ gdk_window_impl_directfb_end_paint (GdkPaintable *paintable)
D_DEBUG_AT( GDKDFB_Window, " -> depth is still %d\n", impl->paint_depth ); D_DEBUG_AT( GDKDFB_Window, " -> depth is still %d\n", impl->paint_depth );
} }
GdkRegion * cairo_region_t *
_gdk_windowing_get_shape_for_mask (GdkBitmap *mask) _gdk_windowing_get_shape_for_mask (GdkBitmap *mask)
{ {
return NULL; return NULL;
} }
GdkRegion * cairo_region_t *
_gdk_windowing_window_get_shape (GdkWindow *window) _gdk_windowing_window_get_shape (GdkWindow *window)
{ {
return NULL; return NULL;
...@@ -2784,7 +2782,7 @@ _gdk_windowing_window_get_next_serial (GdkDisplay *display) ...@@ -2784,7 +2782,7 @@ _gdk_windowing_window_get_next_serial (GdkDisplay *display)
return 0; return 0;
} }
GdkRegion * cairo_region_t *
_gdk_windowing_window_get_input_shape (GdkWindow *window) _gdk_windowing_window_get_input_shape (GdkWindow *window)
{ {
return NULL; return NULL;
...@@ -2802,7 +2800,7 @@ _gdk_windowing_after_process_all_updates (void) ...@@ -2802,7 +2800,7 @@ _gdk_windowing_after_process_all_updates (void)
void void
_gdk_windowing_window_process_updates_recurse (GdkWindow *window, _gdk_windowing_window_process_updates_recurse (GdkWindow *window,
GdkRegion *region) cairo_region_t *region)
{ </