#define assert(expr)
#endif
-#define good(reg) assert(pixman_region_selfcheck(reg))
+#define PREFIX(x) x
+
+#define good(reg) assert(PREFIX(pixman_region_selfcheck) (reg))
#undef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
* work.
*/
void
-pixman_region_set_static_pointers (pixman_box16_t *empty_box,
+PREFIX(pixman_region_set_static_pointers) (pixman_box16_t *empty_box,
pixman_region16_data_t *empty_data,
pixman_region16_data_t *broken_data)
{
}
pixman_bool_t
-pixman_region_equal(reg1, reg2)
+PREFIX(pixman_region_equal) (reg1, reg2)
pixman_region16_t * reg1;
pixman_region16_t * reg2;
{
}
int
-pixman_region16_print(rgn)
+PREFIX(pixman_region16_print) (rgn)
pixman_region16_t * rgn;
{
int num, size;
void
-pixman_region_init (pixman_region16_t *region)
+PREFIX(pixman_region_init) (pixman_region16_t *region)
{
region->extents = *pixman_region_emptyBox;
region->data = pixman_region_emptyData;
}
void
-pixman_region_init_rect (pixman_region16_t *region,
+PREFIX(pixman_region_init_rect) (pixman_region16_t *region,
int x, int y, unsigned int width, unsigned int height)
{
region->extents.x1 = x;
}
void
-pixman_region_init_with_extents (pixman_region16_t *region, pixman_box16_t *extents)
+PREFIX(pixman_region_init_with_extents) (pixman_region16_t *region, pixman_box16_t *extents)
{
region->extents = *extents;
region->data = NULL;
}
void
-pixman_region_fini (pixman_region16_t *region)
+PREFIX(pixman_region_fini) (pixman_region16_t *region)
{
good (region);
freeData (region);
}
int
-pixman_region_n_rects (pixman_region16_t *region)
+PREFIX(pixman_region_n_rects) (pixman_region16_t *region)
{
return PIXREGION_NUM_RECTS (region);
}
pixman_box16_t *
-pixman_region_rects (pixman_region16_t *region)
+PREFIX(pixman_region_rects) (pixman_region16_t *region)
{
return PIXREGION_RECTS (region);
}
pixman_box16_t *
-pixman_region_rectangles (pixman_region16_t *region,
- int *n_rects)
+PREFIX(pixman_region_rectangles) (pixman_region16_t *region,
+ int *n_rects)
{
if (n_rects)
*n_rects = PIXREGION_NUM_RECTS (region);
}
pixman_bool_t
-pixman_region_copy (pixman_region16_t *dst, pixman_region16_t *src)
+PREFIX(pixman_region_copy) (pixman_region16_t *dst, pixman_region16_t *src)
{
good(dst);
good(src);
}
pixman_bool_t
-pixman_region_intersect (pixman_region16_t * newReg,
+PREFIX(pixman_region_intersect) (pixman_region16_t * newReg,
pixman_region16_t * reg1,
pixman_region16_t * reg2)
{
}
else if (!reg2->data && SUBSUMES(®2->extents, ®1->extents))
{
- return pixman_region_copy(newReg, reg1);
+ return PREFIX(pixman_region_copy) (newReg, reg1);
}
else if (!reg1->data && SUBSUMES(®1->extents, ®2->extents))
{
- return pixman_region_copy(newReg, reg2);
+ return PREFIX(pixman_region_copy) (newReg, reg2);
}
else if (reg1 == reg2)
{
- return pixman_region_copy(newReg, reg1);
+ return PREFIX(pixman_region_copy) (newReg, reg1);
}
else
{
* single rectangle
*/
pixman_bool_t
-pixman_region_union_rect (pixman_region16_t *dest,
+PREFIX(pixman_region_union_rect) (pixman_region16_t *dest,
pixman_region16_t *source,
int x, int y,
unsigned int width, unsigned int height)
pixman_region16_t region;
if (!width || !height)
- return pixman_region_copy (dest, source);
+ return PREFIX(pixman_region_copy) (dest, source);
region.data = NULL;
region.extents.x1 = x;
region.extents.y1 = y;
region.extents.x2 = x + width;
region.extents.y2 = y + height;
- return pixman_region_union (dest, source, ®ion);
+ return PREFIX(pixman_region_union) (dest, source, ®ion);
}
pixman_bool_t
-pixman_region_union (pixman_region16_t *newReg,
+PREFIX(pixman_region_union) (pixman_region16_t *newReg,
pixman_region16_t *reg1,
pixman_region16_t *reg2)
{
*/
if (reg1 == reg2)
{
- return pixman_region_copy(newReg, reg1);
+ return PREFIX(pixman_region_copy) (newReg, reg1);
}
/*
if (PIXREGION_NAR(reg1))
return pixman_break (newReg);
if (newReg != reg2)
- return pixman_region_copy(newReg, reg2);
+ return PREFIX(pixman_region_copy) (newReg, reg2);
return TRUE;
}
if (PIXREGION_NAR(reg2))
return pixman_break (newReg);
if (newReg != reg1)
- return pixman_region_copy(newReg, reg1);
+ return PREFIX(pixman_region_copy) (newReg, reg1);
return TRUE;
}
if (!reg1->data && SUBSUMES(®1->extents, ®2->extents))
{
if (newReg != reg1)
- return pixman_region_copy(newReg, reg1);
+ return PREFIX(pixman_region_copy) (newReg, reg1);
return TRUE;
}
if (!reg2->data && SUBSUMES(®2->extents, ®1->extents))
{
if (newReg != reg2)
- return pixman_region_copy(newReg, reg2);
+ return PREFIX(pixman_region_copy) (newReg, reg2);
return TRUE;
}
*
*/
pixman_bool_t
-pixman_region_append (pixman_region16_t * dstrgn,
+PREFIX(pixman_region_append) (pixman_region16_t * dstrgn,
pixman_region16_t * rgn)
{
int numRects, dnumRects, size;
*/
pixman_bool_t
-pixman_region_validate(pixman_region16_t * badreg,
+PREFIX(pixman_region_validate) (pixman_region16_t * badreg,
int *pOverlap)
{
/* Descriptor for regions under construction in Step 2. */
*-----------------------------------------------------------------------
*/
pixman_bool_t
-pixman_region_subtract(pixman_region16_t * regD,
+PREFIX(pixman_region_subtract) (pixman_region16_t * regD,
pixman_region16_t * regM,
pixman_region16_t * regS)
{
{
if (PIXREGION_NAR (regS))
return pixman_break (regD);
- return pixman_region_copy(regD, regM);
+ return PREFIX(pixman_region_copy) (regD, regM);
}
else if (regM == regS)
{
*-----------------------------------------------------------------------
*/
pixman_bool_t
-pixman_region_inverse(pixman_region16_t * newReg, /* Destination region */
+PREFIX(pixman_region_inverse) (pixman_region16_t * newReg, /* Destination region */
pixman_region16_t * reg1, /* Region to invert */
pixman_box16_t * invRect) /* Bounding box for inversion */
{
*/
pixman_region_overlap_t
-pixman_region_contains_rectangle(pixman_region16_t * region,
+PREFIX(pixman_region_contains_rectangle) (pixman_region16_t * region,
pixman_box16_t * prect)
{
int x;
}
}
-/* pixman_region_translate (region, x, y)
+/* PREFIX(pixman_region_translate) (region, x, y)
translates in place
*/
void
-pixman_region_translate (pixman_region16_t * region, int x, int y)
+PREFIX(pixman_region_translate) (pixman_region16_t * region, int x, int y)
{
int x1, x2, y1, y2;
int nbox;
*/
void
-pixman_region_reset(pixman_region16_t *region, pixman_box16_t *box)
+PREFIX(pixman_region_reset) (pixman_region16_t *region, pixman_box16_t *box)
{
good(region);
assert(box->x1<=box->x2);
/* box is "return" value */
int
-pixman_region_contains_point(pixman_region16_t * region,
+PREFIX(pixman_region_contains_point) (pixman_region16_t * region,
int x, int y,
pixman_box16_t * box)
{
}
int
-pixman_region_not_empty(pixman_region16_t * region)
+PREFIX(pixman_region_not_empty) (pixman_region16_t * region)
{
good(region);
return(!PIXREGION_NIL(region));
*/
void
-pixman_region_empty(pixman_region16_t * region)
+PREFIX(pixman_region_empty) (pixman_region16_t * region)
{
good(region);
freeData(region);
}
pixman_box16_t *
-pixman_region_extents(pixman_region16_t * region)
+PREFIX(pixman_region_extents) (pixman_region16_t * region)
{
good(region);
return(®ion->extents);
pixman_bool_t
-pixman_region_selfcheck (reg)
+PREFIX(pixman_region_selfcheck) (reg)
pixman_region16_t * reg;
{
int i, numRects;
}
pixman_bool_t
-pixman_region_init_rects (pixman_region16_t *region,
+PREFIX(pixman_region_init_rects) (pixman_region16_t *region,
pixman_box16_t *boxes, int count)
{
int overlap;
/* if it's 1, then we just want to set the extents, so call
* the existing method. */
if (count == 1) {
- pixman_region_init_rect(region,
+ PREFIX(pixman_region_init_rect) (region,
boxes[0].x1,
boxes[0].y1,
boxes[0].x2 - boxes[0].x1,
return TRUE;
}
- pixman_region_init(region);
+ PREFIX(pixman_region_init) (region);
/* if it's 0, don't call pixman_rect_alloc -- 0 rectangles is
* a special case, and causing pixman_rect_alloc would cause
/* Validate */
region->extents.x1 = region->extents.x2 = 0;
- return pixman_region_validate (region, &overlap);
+ return PREFIX(pixman_region_validate) (region, &overlap);
}