Run PKG_CHECK_MODULES on slim.

Require slim.
Mark hidden. (PixRegionCopy, PixRegionUnion): Mark hidden.
Include and use X11/Xfuncproto.h. Include slim_{export,import}.h as appropriate. Mark all functions with __external_linkage.
Rename include protect to _PIXREGIONINT_H_.
This commit is contained in:
Richard Henderson 2003-07-30 10:06:34 +00:00
parent 9fecd258a6
commit b9be119a3f
6 changed files with 65 additions and 29 deletions

View file

@ -1,3 +1,14 @@
2003-07-30 Richard Henderson <rth@twiddle.net>
* configure.in: Run PKG_CHECK_MODULES on slim.
* libpixregion.pc.in: Require slim.
* src/pixregion.c (PixRegionCreateSimple): Mark hidden.
(PixRegionCopy, PixRegionUnion): Mark hidden.
* src/pixregion.h: Include and use X11/Xfuncproto.h. Include
slim_{export,import}.h as appropriate. Mark all functions with
__external_linkage.
* src/pixregionint.h: Rename include protect to _PIXREGIONINT_H_.
2003-04-22 Carl Worth <cworth@isi.edu>
* configure.in (LIBPIXREGION_MAJOR_VERSION): Fixed typo (Owen Taylor)

View file

@ -43,6 +43,9 @@ AC_PATH_XTRA
dnl ===========================================================================
SLIM_REQUIRED=0.1.0
PKG_CHECK_MODULES(LIBPIXREGION, slim >= $SLIM_REQUIRED)
AC_SUBST(LIBPIXREGION_CFLAGS)
AC_SUBST(LIBPIXREGION_LIBS)

View file

@ -5,6 +5,7 @@ includedir=@includedir@
Name: libpixregion
Description: Pixel region library
Requires: slim
Version: @VERSION@
Libs: -L${libdir} -lpixregion
Cflags: -I${includedir}

View file

@ -44,10 +44,20 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/* $Id: pixman.h,v 1.3 2003-04-25 20:21:42 cworth Exp $ */
/* $Id: pixman.h,v 1.4 2003-07-30 17:06:34 rth Exp $ */
#ifndef PIXREGION_H
#define PIXREGION_H
#ifndef _PIXREGION_H_
#define _PIXREGION_H_
#include <X11/Xfuncproto.h>
#ifdef _PIXREGIONINT_H_
#include <slim_export.h>
#else
#include <slim_import.h>
#endif
_XFUNCPROTOBEGIN
typedef struct _PixRegion PixRegion;
@ -62,51 +72,51 @@ typedef enum {
/* creation/destruction */
PixRegion *
extern PixRegion * __external_linkage
PixRegionCreate (void);
PixRegion *
extern PixRegion * __external_linkage
PixRegionCreateSimple (PixRegionBox *extents);
void
extern void __external_linkage
PixRegionDestroy (PixRegion *region);
/* manipulation */
void
extern void __external_linkage
PixRegionTranslate (PixRegion *region, int x, int y);
PixRegionStatus
extern PixRegionStatus __external_linkage
PixRegionCopy (PixRegion *dest, PixRegion *source);
PixRegionStatus
extern PixRegionStatus __external_linkage
PixRegionIntersect (PixRegion *newReg, PixRegion *reg1, PixRegion *reg2);
PixRegionStatus
extern PixRegionStatus __external_linkage
PixRegionUnion (PixRegion *newReg, PixRegion *reg1, PixRegion *reg2);
PixRegionStatus
extern PixRegionStatus __external_linkage
PixRegionUnionRect(PixRegion *dest, PixRegion *source,
int x, int y, unsigned int width, unsigned int height);
PixRegionStatus
extern PixRegionStatus __external_linkage
PixRegionSubtract (PixRegion *regD, PixRegion *regM, PixRegion *regS);
PixRegionStatus
extern PixRegionStatus __external_linkage
PixRegionInverse (PixRegion *newReg, PixRegion *reg1, PixRegionBox *invRect);
/* XXX: Need to fix this so it doesn't depend on an X data structure
PixRegion *
extern PixRegion * __external_linkage
RectsToPixRegion (int nrects, xRectanglePtr prect, int ctype);
*/
/* querying */
/* XXX: These should proably be combined: PixRegionGetRects? */
int
extern int __external_linkage
PixRegionNumRects (PixRegion *region);
PixRegionBox *
extern PixRegionBox * __external_linkage
PixRegionRects (PixRegion *region);
/* XXX: Change to an enum */
@ -114,36 +124,39 @@ PixRegionRects (PixRegion *region);
#define rgnIN 1
#define rgnPART 2
int
extern int __external_linkage
PixRegionPointInRegion (PixRegion *region, int x, int y, PixRegionBox *box);
int
extern int __external_linkage
PixRegionRectIn (PixRegion *PixRegion, PixRegionBox *prect);
int
extern int __external_linkage
PixRegionNotEmpty (PixRegion *region);
PixRegionBox *
extern PixRegionBox * __external_linkage
PixRegionExtents (PixRegion *region);
/* mucking around */
/* WARNING: calling PixRegionAppend may leave dest as an invalid
region. Follow-up with PixRegionValidate to fix it up. */
PixRegionStatus
extern PixRegionStatus __external_linkage
PixRegionAppend (PixRegion *dest, PixRegion *region);
PixRegionStatus
extern PixRegionStatus __external_linkage
PixRegionValidate (PixRegion *badreg, int *pOverlap);
/* Unclassified functionality
* XXX: Do all of these need to be exported?
*/
void
extern void __external_linkage
PixRegionReset (PixRegion *region, PixRegionBox *pBox);
void
extern void __external_linkage
PixRegionEmpty (PixRegion *region);
#endif /* PIXREGION_H */
_XFUNCPROTOEND
#undef __external_linkage
#endif /* _PIXREGION_H_ */

View file

@ -51,6 +51,7 @@ SOFTWARE.
#include <string.h>
#include "pixregionint.h"
#include <slim_internal.h>
#if defined (__GNUC__) && !defined (NO_INLINES)
#define INLINE __inline
@ -87,6 +88,10 @@ PixRegionInit (PixRegion *region, PixRegionBox *rect);
static void
PixRegionUninit (PixRegion *region);
slim_hidden_proto(PixRegionCreateSimple)
slim_hidden_proto(PixRegionCopy)
slim_hidden_proto(PixRegionUnion)
/*
* The functions in this file implement the Region abstraction used extensively
* throughout the X11 sample server. A Region is simply a set of disjoint
@ -325,6 +330,7 @@ PixRegionCreateSimple (PixRegionBox *extents)
return region;
}
slim_hidden_def(PixRegionCreateSimple)
/*****************************************************************
* RegionInit(pReg, rect, size)
@ -449,6 +455,7 @@ PixRegionCopy(PixRegion *dst, PixRegion *src)
dst->data->numRects * sizeof(PixRegionBox));
return PixRegionStatusSuccess;
}
slim_hidden_def(PixRegionCopy)
/*======================================================================
@ -1232,6 +1239,7 @@ PixRegionUnion(PixRegion *newReg, PixRegion *reg1, PixRegion *reg2)
good(newReg);
return PixRegionStatusSuccess;
}
slim_hidden_def(PixRegionUnion)
/*======================================================================

View file

@ -44,10 +44,10 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/* $Id: pixregionint.h,v 1.2 2003-04-25 20:21:42 cworth Exp $ */
/* $Id: pixregionint.h,v 1.3 2003-07-30 17:06:34 rth Exp $ */
#ifndef PIXREGIONINT_H
#define PIXREGIONINT_H
#ifndef _PIXREGIONINT_H_
#define _PIXREGIONINT_H_
#include "pixregion.h"
@ -80,4 +80,4 @@ typedef struct _PixRegionPoint {
#define PIXREGION_END(reg) PIXREGION_BOX(reg, (reg)->data->numRects - 1)
#define PIXREGION_SZOF(n) (sizeof(PixRegionData) + ((n) * sizeof(PixRegionBox)))
#endif
#endif /* _PIXREGIONINT_H_ */