From 890f1a4280af4c7b8d8913ba592a9dd617482463 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann?= Date: Sun, 8 Jun 2008 21:13:52 -0400 Subject: [PATCH] Move PIXMAN_EXPORT into pixman-region.c --- pixman/Makefile.am | 1 + pixman/pixman-region.c | 50 ++++++++-------- pixman/pixman-region16.c | 2 + pixman/pixman.h | 145 ++++++++++++++++++----------------------------- 4 files changed, 82 insertions(+), 116 deletions(-) diff --git a/pixman/Makefile.am b/pixman/Makefile.am index 38021a5..dbc8d7d 100644 --- a/pixman/Makefile.am +++ b/pixman/Makefile.am @@ -1,6 +1,7 @@ lib_LTLIBRARIES = libpixman-1.la libpixman_1_la_LDFLAGS = -version-info $(LT_VERSION_INFO) libpixman_1_la_LIBADD = @DEP_LIBS@ -lm +libpixman_1_la_CFLAGS = -DPIXMAN_DISABLE_DEPRECATED libpixman_1_la_SOURCES = \ pixman.h \ pixman-access.c \ diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c index 41a9d4c..2ba5a70 100644 --- a/pixman/pixman-region.c +++ b/pixman/pixman-region.c @@ -95,7 +95,7 @@ static region_data_type_t *pixman_brokendata = (region_data_type_t *)&PREFIX(_br * the addresses of those structs which makes the existing code continue to * work. */ -void +PIXMAN_EXPORT void PREFIX(_set_static_pointers) (box_type_t *empty_box, region_data_type_t *empty_data, region_data_type_t *broken_data) @@ -296,14 +296,14 @@ PREFIX(_print) (rgn) } -void +PIXMAN_EXPORT void PREFIX(_init) (region_type_t *region) { region->extents = *pixman_region_emptyBox; region->data = pixman_region_emptyData; } -void +PIXMAN_EXPORT void PREFIX(_init_rect) (region_type_t *region, int x, int y, unsigned int width, unsigned int height) { @@ -314,33 +314,33 @@ PREFIX(_init_rect) (region_type_t *region, region->data = NULL; } -void +PIXMAN_EXPORT void PREFIX(_init_with_extents) (region_type_t *region, box_type_t *extents) { region->extents = *extents; region->data = NULL; } -void +PIXMAN_EXPORT void PREFIX(_fini) (region_type_t *region) { good (region); freeData (region); } -int +PIXMAN_EXPORT int PREFIX(_n_rects) (region_type_t *region) { return PIXREGION_NUM_RECTS (region); } -box_type_t * +PIXMAN_EXPORT box_type_t * PREFIX(_rects) (region_type_t *region) { return PIXREGION_RECTS (region); } -box_type_t * +PIXMAN_EXPORT box_type_t * PREFIX(_rectangles) (region_type_t *region, int *n_rects) { @@ -403,7 +403,7 @@ pixman_rect_alloc (region_type_t * region, int n) return TRUE; } -pixman_bool_t +PIXMAN_EXPORT pixman_bool_t PREFIX(_copy) (region_type_t *dst, region_type_t *src) { good(dst); @@ -967,7 +967,7 @@ pixman_region_intersectO (region_type_t *region, return TRUE; } -pixman_bool_t +PIXMAN_EXPORT pixman_bool_t PREFIX(_intersect) (region_type_t * newReg, region_type_t * reg1, region_type_t * reg2) @@ -1124,7 +1124,7 @@ pixman_region_unionO ( /* Convenience function for performing union of region with a * single rectangle */ -pixman_bool_t +PIXMAN_EXPORT pixman_bool_t PREFIX(_union_rect) (region_type_t *dest, region_type_t *source, int x, int y, @@ -1143,7 +1143,7 @@ PREFIX(_union_rect) (region_type_t *dest, return PREFIX(_union) (dest, source, ®ion); } -pixman_bool_t +PIXMAN_EXPORT pixman_bool_t PREFIX(_union) (region_type_t *newReg, region_type_t *reg1, region_type_t *reg2) @@ -1243,7 +1243,7 @@ PREFIX(_union) (region_type_t *newReg, * dstrgn is modified if rgn has rectangles. * */ -pixman_bool_t +PIXMAN_EXPORT pixman_bool_t PREFIX(_append) (region_type_t * dstrgn, region_type_t * rgn) { @@ -1428,7 +1428,7 @@ QuickSortRects( *----------------------------------------------------------------------- */ -pixman_bool_t +PIXMAN_EXPORT pixman_bool_t PREFIX(_validate) (region_type_t * badreg, int *pOverlap) { @@ -1771,7 +1771,7 @@ pixman_region_subtractO ( * *----------------------------------------------------------------------- */ -pixman_bool_t +PIXMAN_EXPORT pixman_bool_t PREFIX(_subtract) (region_type_t * regD, region_type_t * regM, region_type_t * regS) @@ -1836,7 +1836,7 @@ PREFIX(_subtract) (region_type_t * regD, *----------------------------------------------------------------------- */ pixman_bool_t -PREFIX(_inverse) (region_type_t * newReg, /* Destination region */ +PIXMAN_EXPORT PREFIX(_inverse) (region_type_t * newReg, /* Destination region */ region_type_t * reg1, /* Region to invert */ box_type_t * invRect) /* Bounding box for inversion */ { @@ -1895,7 +1895,7 @@ PREFIX(_inverse) (region_type_t * newReg, /* Destination region */ */ pixman_region_overlap_t -PREFIX(_contains_rectangle) (region_type_t * region, +PIXMAN_EXPORT PREFIX(_contains_rectangle) (region_type_t * region, box_type_t * prect) { int x; @@ -1999,7 +1999,7 @@ PREFIX(_contains_rectangle) (region_type_t * region, translates in place */ -void +PIXMAN_EXPORT void PREFIX(_translate) (region_type_t * region, int x, int y) { int x1, x2, y1, y2; @@ -2081,7 +2081,7 @@ PREFIX(_translate) (region_type_t * region, int x, int y) } } -void +PIXMAN_EXPORT void PREFIX(_reset) (region_type_t *region, box_type_t *box) { good(region); @@ -2093,7 +2093,7 @@ PREFIX(_reset) (region_type_t *region, box_type_t *box) } /* box is "return" value */ -int +PIXMAN_EXPORT int PREFIX(_contains_point) (region_type_t * region, int x, int y, box_type_t * box) @@ -2126,14 +2126,14 @@ PREFIX(_contains_point) (region_type_t * region, return(FALSE); } -int +PIXMAN_EXPORT int PREFIX(_not_empty) (region_type_t * region) { good(region); return(!PIXREGION_NIL(region)); } -void +PIXMAN_EXPORT void PREFIX(_empty) (region_type_t * region) { good(region); @@ -2143,7 +2143,7 @@ PREFIX(_empty) (region_type_t * region) region->data = pixman_region_emptyData; } -box_type_t * +PIXMAN_EXPORT box_type_t * PREFIX(_extents) (region_type_t * region) { good(region); @@ -2157,7 +2157,7 @@ PREFIX(_extents) (region_type_t * region) returns the number of new, clipped scanlines. */ -pixman_bool_t +PIXMAN_EXPORT pixman_bool_t PREFIX(_selfcheck) (reg) region_type_t * reg; { @@ -2203,7 +2203,7 @@ PREFIX(_selfcheck) (reg) } } -pixman_bool_t +PIXMAN_EXPORT pixman_bool_t PREFIX(_init_rects) (region_type_t *region, box_type_t *boxes, int count) { diff --git a/pixman/pixman-region16.c b/pixman/pixman-region16.c index 0eea051..8d4a050 100644 --- a/pixman/pixman-region16.c +++ b/pixman/pixman-region16.c @@ -26,6 +26,8 @@ #include #endif +#undef PIXMAN_DISABLE_DEPRECATED + #include "pixman-private.h" typedef pixman_box16_t box_type_t; diff --git a/pixman/pixman.h b/pixman/pixman.h index c493457..e6d9948 100644 --- a/pixman/pixman.h +++ b/pixman/pixman.h @@ -277,82 +277,66 @@ typedef enum /* This function exists only to make it possible to preserve the X ABI - it should * go away at first opportunity. */ -PIXMAN_EXPORT -void pixman_region_set_static_pointers (pixman_box16_t *empty_box, +void pixman_region_set_static_pointers (pixman_box16_t *empty_box, pixman_region16_data_t *empty_data, pixman_region16_data_t *broken_data); + /* creation/destruction */ -PIXMAN_EXPORT -void pixman_region_init (pixman_region16_t *region); -PIXMAN_EXPORT -void pixman_region_init_rect (pixman_region16_t *region, - int x, - int y, - unsigned int width, - unsigned int height); -PIXMAN_EXPORT -void pixman_region_init_with_extents (pixman_region16_t *region, - pixman_box16_t *extents); -PIXMAN_EXPORT -void pixman_region_fini (pixman_region16_t *region); +void pixman_region_init (pixman_region16_t *region); +void pixman_region_init_rect (pixman_region16_t *region, + int x, + int y, + unsigned int width, + unsigned int height); +void pixman_region_init_with_extents (pixman_region16_t *region, + pixman_box16_t *extents); +void pixman_region_fini (pixman_region16_t *region); + /* manipulation */ -PIXMAN_EXPORT -void pixman_region_translate (pixman_region16_t *region, - int x, - int y); -PIXMAN_EXPORT -pixman_bool_t pixman_region_copy (pixman_region16_t *dest, - pixman_region16_t *source); -PIXMAN_EXPORT -pixman_bool_t pixman_region_intersect (pixman_region16_t *newReg, - pixman_region16_t *reg1, - pixman_region16_t *reg2); -PIXMAN_EXPORT -pixman_bool_t pixman_region_union (pixman_region16_t *newReg, - pixman_region16_t *reg1, - pixman_region16_t *reg2); -PIXMAN_EXPORT -pixman_bool_t pixman_region_union_rect (pixman_region16_t *dest, - pixman_region16_t *source, - int x, - int y, - unsigned int width, - unsigned int height); -PIXMAN_EXPORT -pixman_bool_t pixman_region_subtract (pixman_region16_t *regD, - pixman_region16_t *regM, - pixman_region16_t *regS); -PIXMAN_EXPORT -pixman_bool_t pixman_region_inverse (pixman_region16_t *newReg, - pixman_region16_t *reg1, - pixman_box16_t *invRect); -PIXMAN_EXPORT -pixman_bool_t pixman_region_contains_point (pixman_region16_t *region, - int x, int y, pixman_box16_t *box); -PIXMAN_EXPORT -pixman_region_overlap_t pixman_region_contains_rectangle (pixman_region16_t *pixman_region16_t, - pixman_box16_t *prect); -PIXMAN_EXPORT -pixman_bool_t pixman_region_not_empty (pixman_region16_t *region); -PIXMAN_EXPORT -pixman_box16_t * pixman_region_extents (pixman_region16_t *region); -PIXMAN_EXPORT -int pixman_region_n_rects (pixman_region16_t *region); -PIXMAN_EXPORT -pixman_box16_t * pixman_region_rectangles (pixman_region16_t *region, - int *n_rects); -PIXMAN_EXPORT -pixman_bool_t pixman_region_equal (pixman_region16_t *region1, - pixman_region16_t *region2); -PIXMAN_EXPORT -pixman_bool_t pixman_region_selfcheck (pixman_region16_t *region); -PIXMAN_EXPORT -void pixman_region_reset (pixman_region16_t *region, pixman_box16_t *box); -PIXMAN_EXPORT -pixman_bool_t pixman_region_init_rects (pixman_region16_t *region, - pixman_box16_t *boxes, int count); +void pixman_region_translate (pixman_region16_t *region, + int x, + int y); +pixman_bool_t pixman_region_copy (pixman_region16_t *dest, + pixman_region16_t *source); +pixman_bool_t pixman_region_intersect (pixman_region16_t *newReg, + pixman_region16_t *reg1, + pixman_region16_t *reg2); +pixman_bool_t pixman_region_union (pixman_region16_t *newReg, + pixman_region16_t *reg1, + pixman_region16_t *reg2); +pixman_bool_t pixman_region_union_rect (pixman_region16_t *dest, + pixman_region16_t *source, + int x, + int y, + unsigned int width, + unsigned int height); +pixman_bool_t pixman_region_subtract (pixman_region16_t *regD, + pixman_region16_t *regM, + pixman_region16_t *regS); +pixman_bool_t pixman_region_inverse (pixman_region16_t *newReg, + pixman_region16_t *reg1, + pixman_box16_t *invRect); +pixman_bool_t pixman_region_contains_point (pixman_region16_t *region, + int x, + int y, + pixman_box16_t *box); +pixman_region_overlap_t pixman_region_contains_rectangle (pixman_region16_t *pixman_region16_t, + pixman_box16_t *prect); +pixman_bool_t pixman_region_not_empty (pixman_region16_t *region); +pixman_box16_t * pixman_region_extents (pixman_region16_t *region); +int pixman_region_n_rects (pixman_region16_t *region); +pixman_box16_t * pixman_region_rectangles (pixman_region16_t *region, + int *n_rects); +pixman_bool_t pixman_region_equal (pixman_region16_t *region1, + pixman_region16_t *region2); +pixman_bool_t pixman_region_selfcheck (pixman_region16_t *region); +void pixman_region_reset (pixman_region16_t *region, + pixman_box16_t *box); +pixman_bool_t pixman_region_init_rects (pixman_region16_t *region, + pixman_box16_t *boxes, + int count); /* * 32 bit regions @@ -386,78 +370,57 @@ struct pixman_region32 }; /* creation/destruction */ -PIXMAN_EXPORT void pixman_region32_init (pixman_region32_t *region); -PIXMAN_EXPORT void pixman_region32_init_rect (pixman_region32_t *region, int x, int y, unsigned int width, unsigned int height); -PIXMAN_EXPORT void pixman_region32_init_with_extents (pixman_region32_t *region, pixman_box32_t *extents); -PIXMAN_EXPORT void pixman_region32_fini (pixman_region32_t *region); /* manipulation */ -PIXMAN_EXPORT void pixman_region32_translate (pixman_region32_t *region, int x, int y); -PIXMAN_EXPORT pixman_bool_t pixman_region32_copy (pixman_region32_t *dest, pixman_region32_t *source); -PIXMAN_EXPORT pixman_bool_t pixman_region32_intersect (pixman_region32_t *newReg, pixman_region32_t *reg1, pixman_region32_t *reg2); -PIXMAN_EXPORT pixman_bool_t pixman_region32_union (pixman_region32_t *newReg, pixman_region32_t *reg1, pixman_region32_t *reg2); -PIXMAN_EXPORT pixman_bool_t pixman_region32_union_rect (pixman_region32_t *dest, pixman_region32_t *source, int x, int y, unsigned int width, unsigned int height); -PIXMAN_EXPORT pixman_bool_t pixman_region32_subtract (pixman_region32_t *regD, pixman_region32_t *regM, pixman_region32_t *regS); -PIXMAN_EXPORT pixman_bool_t pixman_region32_inverse (pixman_region32_t *newReg, pixman_region32_t *reg1, pixman_box32_t *invRect); -PIXMAN_EXPORT pixman_bool_t pixman_region32_contains_point (pixman_region32_t *region, int x, int y, pixman_box32_t *box); -PIXMAN_EXPORT pixman_region_overlap_t pixman_region32_contains_rectangle (pixman_region32_t *region, pixman_box32_t *prect); -PIXMAN_EXPORT pixman_bool_t pixman_region32_not_empty (pixman_region32_t *region); -PIXMAN_EXPORT pixman_box32_t * pixman_region32_extents (pixman_region32_t *region); -PIXMAN_EXPORT int pixman_region32_n_rects (pixman_region32_t *region); -PIXMAN_EXPORT pixman_box32_t * pixman_region32_rectangles (pixman_region32_t *region, int *n_rects); -PIXMAN_EXPORT pixman_bool_t pixman_region32_equal (pixman_region32_t *region1, pixman_region32_t *region2); -PIXMAN_EXPORT pixman_bool_t pixman_region32_selfcheck (pixman_region32_t *region); -PIXMAN_EXPORT void pixman_region32_reset (pixman_region32_t *region, pixman_box32_t *box); -PIXMAN_EXPORT pixman_bool_t pixman_region32_init_rects (pixman_region32_t *region, pixman_box32_t *boxes, int count); -- 2.7.4