Unverified Commit aba2a534 authored by Mihai Moldovan's avatar Mihai Moldovan

Merge branch 'sunweaver-pr/nxagent-no-compiler-warnings' into arctica-3.6.x

parents 6c6b6b96 52dc4960
......@@ -28,6 +28,7 @@ Build-Depends:
pkg-config,
x11proto-core-dev,
expat,
libpixman-1-dev,
Standards-Version: 3.9.6
Homepage: http://code.x2go.org/gitweb?p=nx-libs.git;a=summary
Vcs-Git: git://code.x2go.org/nx-libs.git
......
#!/bin/sh
git diff --check |
sed -n 's!^\([^:]*\):\([^:]*\):.*!sed -i "\2 s/[ \t]*$//; \2 s/ *\t/\t/g" \1!p' |
sh
......@@ -786,9 +786,9 @@ XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese
# endif
# ifndef DefaultCCOptions
# if defined(UseInstalled)
# define DefaultCCOptions /* -ansi */
# define DefaultCCOptions /* -std=c99 */
# else
# define DefaultCCOptions -ansi GccWarningOptions
# define DefaultCCOptions -std=c99 GccWarningOptions
# endif
# endif
# if defined(UseInstalled)
......
......@@ -43,7 +43,8 @@ LinkSourceFile(indirect_size.h, $(MESASRCDIR)/src/glx/x11)
INCLUDES = -I$(SERVERSRC)/GL/glx -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/include -I$(INCLUDESRC) -I$(MESASRCDIR)/include \
-I$(XINCLUDESRC) -I$(SERVERSRC)/mi \
-I$(EXTINCSRC) -I$(LIBSRC)/GL/include \
-I$(XF86SRC)
-I$(XF86SRC) \
`pkg-config --cflags-only-I pixman-1`
#if defined(DarwinArchitecture) && ((OSMajorVersion == 6 && OSMinorVersion < 3) || OSMajorVersion < 6)
NO_EXT_DEFS = -DMISSING_GL_EXTS
......
......@@ -39,7 +39,8 @@ LinkSourceFile(compsize.c,$(MESASRCDIR)/src/glx/x11)
-I$(SERVERSRC)/include -I$(SERVERSRC)/GL/include \
-I$(SERVERSRC)/GL/glx \
-I$(XF86OSSRC) \
-I$(DRMSRCDIR)/shared-core
-I$(DRMSRCDIR)/shared-core \
`pkg-config --cflags-only-I pixman-1`
DEFINES = $(GLX_DEFINES) $(GLXSRV_DEFINES) -DNXAGENT_SERVER /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/
......
......@@ -384,10 +384,12 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \
dix/main.o
#endif
XPMLIB = -lXpm
XPMLIB = -lXpm
XMLLIB = `pkg-config --libs libxml-2.0`
PIXMANLIB = `pkg-config --libs pixman-1`
NXAGENT = hw/nxagent/LibraryTargetName(nxagent)
NXAGENTLIBS = PreFbLibs $(NXAGENT) FbPostFbLibs $(NXAGENT) $(MI)
NXAGENTSYSLIBS = $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB)
NXAGENTSYSLIBS = $(LDPRELIBS) $(XLIB) $(SYSLIBS) $(XPMLIB) $(XMLLIB) $(PIXMANLIB)
#if HasParallelMake
MakeMutex($(NXAGENTDIRS) $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS))
#endif
......@@ -403,18 +405,15 @@ $(NXAGENTOBJS) $(NXAGENTLIBS) $(NXAGENTSYSLIBS):: $(NXAGENTDIRS)
#if defined(SunArchitecture)
NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \
-lXcomp -lXcompext -lXcompshad -lrt -L/usr/sfw/lib -lXrender -lXfixes -lXfont \
-L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXdmcp \
`pkg-config --libs libxml-2.0`
-L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXdmcp
#elif defined(cygwinArchitecture)
NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \
-lXcomp -lXcompext -lXrender -lX11 -lNX_Xext -lXcomposite -lXfixes -lXfont \
-L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp \
`pkg-config --libs libxml-2.0`
-L ../../../nxcompshad -lXcompshad -L../../../nx-X11/exports/lib -lXtst -lXdmcp
#else
NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \
-lXcomp -lXcompext -lXcompshad -lXrender -lNX_X11 -lNX_Xext -lXfixes -lXfont \
-L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXinerama -lXdmcp \
`pkg-config --libs libxml-2.0`
-L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXinerama -lXdmcp
#endif
#endif
......
......@@ -11,7 +11,7 @@ XCOMM $XFree86: xc/programs/Xserver/XTrap/Imakefile,v 1.1 2001/11/02 23:29:29 da
#endif
SRCS = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c
OBJS = xtrapddmi.o xtrapdi.o xtrapdiswp.o xtrapditbl.o
INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) -I$(SERVERSRC)/Xext
INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) -I$(SERVERSRC)/Xext `pkg-config --cflags-only-I pixman-1`
NormalLibraryTarget(xtrap,$(OBJS))
LintLibraryTarget(xtrap,$(SRCS))
......
......@@ -161,7 +161,8 @@ XF86INCLUDES = -I$(XF86COMSRC)
#endif
INCLUDES = -I. -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \
$(PNRXINCLUDES) $(XF86INCLUDES) \
$(FONTCACHEINCLUDES) $(DMXINCLUDES)
$(FONTCACHEINCLUDES) $(DMXINCLUDES) \
`pkg-config --cflags-only-I pixman-1`
LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln
#if defined(NXAgentServer) && NXAgentServer
......
......@@ -903,9 +903,9 @@ ProcClearImageBufferArea (client)
box.y1 = clearRect.y;
box.x2 = clearRect.x + clearRect.width;
box.y2 = clearRect.y + clearRect.height;
REGION_INIT(pScreen, &region, &box, 1);
RegionInit(&region, &box, 1);
MultibufferExpose(pMultibuffer, &region);
REGION_UNINIT(pScreen, &region);
RegionUninit(&region);
}
return Success;
}
......@@ -1202,13 +1202,13 @@ PerformDisplayRequest (ppMultibuffers, pMultibuffer, nbuf)
* window-relative so that region ops involving
* pExposed and pWinSize behave sensibly.
*/
REGION_TRANSLATE(pWin->drawable.pScreen, pWinSize,
RegionTranslate(pWinSize,
-pWin->drawable.x, -pWin->drawable.y);
REGION_INTERSECT(pWin->drawable.pScreen, pExposed,
RegionIntersect(pExposed,
pExposed, pWinSize);
REGION_DESTROY(pWin->drawable.pScreen, pWinSize);
RegionDestroy(pWinSize);
MultibufferExpose (pPrevMultibuffer, pExposed);
REGION_DESTROY(pWin->drawable.pScreen, pExposed);
RegionDestroy(pExposed);
}
graphicsExpose = FALSE;
DoChangeGC (pGC, GCGraphicsExposures, &graphicsExpose, FALSE);
......@@ -1371,7 +1371,7 @@ MultibufferExpose (pMultibuffer, pRegion)
MultibufferPtr pMultibuffer;
RegionPtr pRegion;
{
if (pRegion && !REGION_NIL(pRegion))
if (pRegion && !RegionNil(pRegion))
{
xEvent *pEvent;
PixmapPtr pPixmap;
......@@ -1381,11 +1381,11 @@ MultibufferExpose (pMultibuffer, pRegion)
int numRects;
pPixmap = pMultibuffer->pPixmap;
REGION_TRANSLATE(pPixmap->drawable.pScreen, pRegion,
RegionTranslate(pRegion,
-pPixmap->drawable.x, -pPixmap->drawable.y);
/* XXX MultibufferExpose "knows" the region representation */
numRects = REGION_NUM_RECTS(pRegion);
pBox = REGION_RECTS(pRegion);
numRects = RegionNumRects(pRegion);
pBox = RegionRects(pRegion);
pEvent = (xEvent *) ALLOCATE_LOCAL(numRects * sizeof(xEvent));
if (pEvent) {
......
......@@ -245,9 +245,9 @@ bufMultibufferInit(pScreen, pMBScreen)
box.y2 = pScreen->height;
pMBPriv->rgnChanged = TRUE;
REGION_INIT(pScreen, &pMBPriv->backBuffer, &box, 1);
REGION_INIT(pScreen, &pMBPriv->subtractRgn, &box, 1);
REGION_NULL(pScreen, &pMBPriv->unionRgn);
RegionInit(&pMBPriv->backBuffer, &box, 1);
RegionInit(&pMBPriv->subtractRgn, &box, 1);
RegionNull(&pMBPriv->unionRgn);
/* Misc functions */
pMBPriv->CopyBufferBits = bufCopyBufferBitsFunc[pScreen->myNum];
......@@ -374,10 +374,10 @@ bufCreateImageBuffers (pWin, nbuf, ids, action, hint)
pMBScreen = MB_SCREEN_PRIV(pScreen);
pMBWindow = MB_WINDOW_PRIV(pWin);
pMBWindow->devPrivate.ptr = (void *) REGION_CREATE(pScreen, 0,0);
pMBWindow->devPrivate.ptr = (void *) RegionCreate(0,0);
if (!pMBWindow->devPrivate.ptr)
return(0);
REGION_COPY(pScreen, (RegionPtr) pMBWindow->devPrivate.ptr,
RegionCopy((RegionPtr) pMBWindow->devPrivate.ptr,
&pWin->clipList);
for (i = 0; i < nbuf; i++)
......@@ -429,7 +429,7 @@ bufDestroyImageBuffers(pWin)
if (pWin->realized && (pMBWindow->displayedMultibuffer == BACK_BUFFER))
{
(* pMBPriv->CopyBufferBits)(pMBWindow, BACK_BUFFER, FRONT_BUFFER);
REGION_SUBTRACT(pScreen, &pMBPriv->backBuffer,
RegionSubtract(&pMBPriv->backBuffer,
&pMBPriv->backBuffer, &pWin->clipList);
(* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane,
&pWin->clipList, FRONT_BUFFER);
......@@ -439,7 +439,7 @@ bufDestroyImageBuffers(pWin)
pWin->devPrivates[frameWindowPrivateIndex] =
pMBPriv->frameBuffer[FRONT_BUFFER];
REGION_DESTROY(pScreen, (RegionPtr) pMBWindow->devPrivate.ptr);
RegionDestroy((RegionPtr) pMBWindow->devPrivate.ptr);
pMBWindow->devPrivate.ptr = NULL;
}
}
......@@ -506,7 +506,7 @@ bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures)
box.y2 = y2;
pScreen = pBuffer->drawable.pScreen;
REGION_INIT(pScreen, &reg, &box, 1);
RegionInit(&reg, &box, 1);
if (pBuffer->backStorage)
{
/*
......@@ -520,7 +520,7 @@ bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures)
generateExposures);
}
REGION_INTERSECT(pScreen, &reg, &reg, &pBuffer->clipList);
RegionIntersect(&reg, &reg, &pBuffer->clipList);
if (pBuffer->backgroundState != None)
(*pScreen->PaintWindowBackground)(pBuffer, &reg, PW_BACKGROUND);
if (generateExposures)
......@@ -537,9 +537,9 @@ bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures)
else if (pBuffer->backgroundState != None)
(*pScreen->PaintWindowBackground)(pBuffer, &reg, PW_BACKGROUND);
#endif
REGION_UNINIT(pScreen, &reg);
RegionUninit(&reg);
if (pBSReg)
REGION_DESTROY(pScreen, pBSReg);
RegionDestroy(pBSReg);
}
static void
......@@ -567,9 +567,9 @@ bufResetProc(pScreen)
* whoever called RegisterDoubleBufferHardware
*/
REGION_UNINIT(pScreen, &pMBPriv->backBuffer);
REGION_UNINIT(pScreen, &pMBPriv->subtractRgn);
REGION_UNINIT(pScreen, &pMBPriv->unionRgn);
RegionUninit(&pMBPriv->backBuffer);
RegionUninit(&pMBPriv->subtractRgn);
RegionUninit(&pMBPriv->unionRgn);
xfree(pMBPriv);
}
......@@ -624,7 +624,7 @@ bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum)
int numRects;
XID value;
if (REGION_NUM_RECTS(prgn) == 0)
if (RegionNumRects(prgn) == 0)
return;
pDrawable = (DrawablePtr) selectPlane.ptr;
......@@ -632,7 +632,7 @@ bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum)
if (!pGC)
return;
prect = (xRectangle *)ALLOCATE_LOCAL(REGION_NUM_RECTS(prgn) *
prect = (xRectangle *)ALLOCATE_LOCAL(RegionNumRects(prgn) *
sizeof(xRectangle));
if (!prect)
{
......@@ -644,8 +644,8 @@ bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum)
DoChangeGC(pGC, GCForeground, &value, 0);
ValidateGC(pDrawable, pGC);
numRects = REGION_NUM_RECTS(prgn);
pbox = REGION_RECTS(prgn);
numRects = RegionNumRects(prgn);
pbox = RegionRects(prgn);
for (i= numRects; --i >= 0; pbox++, prect++)
{
prect->x = pbox->x1;
......@@ -697,10 +697,10 @@ bufDisplayImageBuffers(pScreen, ppMBWindow, ppMBBuffer, nbuf)
&pWin->clipList, number);
if (number == BACK_BUFFER)
REGION_UNION(pScreen, backBuffer, backBuffer,
RegionUnion(backBuffer, backBuffer,
&pWin->clipList);
else
REGION_SUBTRACT(pScreen, backBuffer, backBuffer,
RegionSubtract(backBuffer, backBuffer,
&pWin->clipList);
/* Switch which framebuffer the window draws into */
......@@ -764,36 +764,36 @@ bufPostValidateTree(pParent, pChild, kind)
pSubtractRgn = &pMBPriv->subtractRgn;
pUnionRgn = &pMBPriv->unionRgn;
REGION_VALIDATE(pScreen, pSubtractRgn, &overlap);
RegionValidate(pSubtractRgn, &overlap);
#ifdef DEBUG
if (overlap)
FatalError("bufPostValidateTree: subtractRgn overlaps");
#endif
REGION_VALIDATE(pScreen, pUnionRgn, &overlap);
RegionValidate(pUnionRgn, &overlap);
#ifdef DEBUG
if (overlap)
FatalError("bufPostValidateTree: unionRgn overlaps");
#endif
/* Update backBuffer: subtract must come before union */
REGION_SUBTRACT(pScreen, &pMBPriv->backBuffer, &pMBPriv->backBuffer,
RegionSubtract(&pMBPriv->backBuffer, &pMBPriv->backBuffer,
pSubtractRgn);
REGION_UNION(pScreen, &pMBPriv->backBuffer, &pMBPriv->backBuffer,
RegionUnion(&pMBPriv->backBuffer, &pMBPriv->backBuffer,
pUnionRgn);
/* Paint gained and lost backbuffer areas in select plane */
REGION_NULL(pScreen, &exposed);
REGION_SUBTRACT(pScreen, &exposed, pSubtractRgn, pUnionRgn);
RegionNull(&exposed);
RegionSubtract(&exposed, pSubtractRgn, pUnionRgn);
(* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane,
&exposed, FRONT_BUFFER);
REGION_SUBTRACT(pScreen, &exposed, pUnionRgn, pSubtractRgn);
RegionSubtract(&exposed, pUnionRgn, pSubtractRgn);
(* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane,
&exposed, BACK_BUFFER);
REGION_UNINIT(pScreen, &exposed);
REGION_EMPTY(pScreen, pSubtractRgn);
REGION_EMPTY(pScreen, pUnionRgn);
RegionUninit(&exposed);
RegionEmpty(pSubtractRgn);
RegionEmpty(pUnionRgn);
}
}
......@@ -826,16 +826,16 @@ bufClipNotify(pWin, dx,dy)
{
RegionPtr pOldClipList = (RegionPtr) pMBWindow->devPrivate.ptr;
if (! REGION_EQUAL(pScreen, pOldClipList, &pWin->clipList))
if (! RegionEqual(pOldClipList, &pWin->clipList))
{
if (pMBWindow->displayedMultibuffer == BACK_BUFFER)
{
pMBPriv->rgnChanged = TRUE;
REGION_APPEND(pScreen, &pMBPriv->subtractRgn, pOldClipList);
REGION_APPEND(pScreen, &pMBPriv->unionRgn, &pWin->clipList);
RegionAppend(&pMBPriv->subtractRgn, pOldClipList);
RegionAppend(&pMBPriv->unionRgn, &pWin->clipList);
}
REGION_COPY(pScreen, pOldClipList,&pWin->clipList);
RegionCopy(pOldClipList,&pWin->clipList);
}
/* Update buffer x,y,w,h, and clipList */
......@@ -912,13 +912,13 @@ bufWindowExposures(pWin, prgn, other_exposed)
handleBuffers = (!pMBPriv->inClearToBackground) &&
(pWin->drawable.type == DRAWABLE_WINDOW) &&
pMBWindow && (prgn && !REGION_NIL(prgn));
pMBWindow && (prgn && !RegionNil(prgn));
/* miWindowExposures munges prgn and other_exposed. */
if (handleBuffers)
{
REGION_NULL(pScreen, &tmp_rgn);
REGION_COPY(pScreen, &tmp_rgn, prgn);
RegionNull(&tmp_rgn);
RegionCopy(&tmp_rgn, prgn);
}
UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, WindowExposures);
......@@ -950,7 +950,7 @@ bufWindowExposures(pWin, prgn, other_exposed)
MultibufferExpose(pMBBuffer, &tmp_rgn);
}
REGION_UNINIT(pScreen, &tmp_rgn);
RegionUninit(&tmp_rgn);
}
/*
......@@ -1018,7 +1018,7 @@ bufCopyWindow(pWin, ptOldOrg, prgnSrc)
*/
/* CopyWindow translates prgnSrc... translate it back for 2nd call. */
REGION_TRANSLATE(pScreen, prgnSrc,
RegionTranslate(prgnSrc,
ptOldOrg.x - pWin->drawable.x,
ptOldOrg.y - pWin->drawable.y);
pwinroot->devPrivates[frameWindowPrivateIndex] =
......
......@@ -262,8 +262,8 @@ MultibufferPaintBackgroundRegion(pWin, pDrawable, pRegion)
RegionPtr pRegion;
{
xRectangle *pRects;
int nrects = REGION_NUM_RECTS(pRegion);
BoxPtr pbox = REGION_RECTS(pRegion);
int nrects = RegionNumRects(pRegion);
BoxPtr pbox = RegionRects(pRegion);
pRects = (xRectangle *)ALLOCATE_LOCAL(nrects * sizeof(xRectangle));
if (pRects)
......@@ -390,13 +390,13 @@ pixDisplayImageBuffers(pScreen, ppMBWindow, ppMBBuffer, nbuf)
* window-relative so that region ops involving
* pExposed and pWinSize behave sensibly.
*/
REGION_TRANSLATE(pScreen, pWinSize,
RegionTranslate(pWinSize,
-pWin->drawable.x,
-pWin->drawable.y);
REGION_INTERSECT(pScreen, pExposed, pExposed, pWinSize);
REGION_DESTROY(pScreen, pWinSize);
RegionIntersect(pExposed, pExposed, pWinSize);
RegionDestroy(pWinSize);
MultibufferExpose (pPrevMBBuffer, pExposed);
REGION_DESTROY(pScreen, pExposed);
RegionDestroy(pExposed);
}
bool = FALSE;
DoChangeGC (pGC, GCGraphicsExposures, &bool, FALSE);
......@@ -522,7 +522,7 @@ pixPositionWindow (pWin, x, y)
box.x1 = box.y1 = 0;
box.x2 = width;
box.y2 = height;
REGION_INIT(pScreen, &exposedRegion, &box, 1);
RegionInit(&exposedRegion, &box, 1);
if (pWin->bitGravity != ForgetGravity)
{
RegionRec preservedRegion;
......@@ -530,9 +530,9 @@ pixPositionWindow (pWin, x, y)
box.y1 = desty;
box.x2 = destx + savewidth;
box.y2 = desty + saveheight;
REGION_INIT(pScreen, &preservedRegion, &box, 1);
REGION_SUBTRACT(pScreen, &exposedRegion, &exposedRegion, &preservedRegion);
REGION_UNINIT(pScreen, &preservedRegion);
RegionInit(&preservedRegion, &box, 1);
RegionSubtract(&exposedRegion, &exposedRegion, &preservedRegion);
RegionUninit(&preservedRegion);
}
} /* end if (clear) */
......@@ -575,7 +575,7 @@ pixPositionWindow (pWin, x, y)
}
FreeScratchGC (pGC);
if (clear)
REGION_UNINIT(pScreen, &exposedRegion);
RegionUninit(&exposedRegion);
return TRUE;
}
......@@ -628,7 +628,7 @@ pixClearImageBufferArea(pMBBuffer, x,y, width,height, exposures)
if (box.x2 > w_width) box.x2 = w_width;
if (box.y2 > w_height) box.y2 = w_height;
REGION_INIT(pScreen, &region, &box, 1);
RegionInit(&region, &box, 1);
if (pMBBuffer->number == pMBBuffer->pMBWindow->displayedMultibuffer)
pDrawable = (DrawablePtr) pWin;
......@@ -640,7 +640,7 @@ pixClearImageBufferArea(pMBBuffer, x,y, width,height, exposures)
if (exposures)
MultibufferExpose(pMBBuffer, &region);
REGION_UNINIT(pScreen, &region);
RegionUninit(&region);
}
static void
......
......@@ -161,9 +161,9 @@ XineramaCloseScreen (int i, ScreenPtr pScreen)
pScreen->CloseScreen = pScreenPriv->CloseScreen;
pScreen->CreateGC = pScreenPriv->CreateGC;
REGION_UNINIT(pScreen, &XineramaScreenRegions[pScreen->myNum]);
RegionUninit(&XineramaScreenRegions[pScreen->myNum]);
if (pScreen->myNum == 0)
REGION_UNINIT(pScreen, &PanoramiXScreenRegion);
RegionUninit(&PanoramiXScreenRegion);
xfree ((void *) pScreenPriv);
......@@ -434,7 +434,7 @@ static void XineramaInitData(ScreenPtr pScreen)
{
int i, w, h;
REGION_NULL(pScreen, &PanoramiXScreenRegion)
RegionNull(&PanoramiXScreenRegion);
for (i = 0; i < PanoramiXNumScreens; i++) {
BoxRec TheBox;
......@@ -450,8 +450,8 @@ static void XineramaInitData(ScreenPtr pScreen)
TheBox.y1 = panoramiXdataPtr[i].y;
TheBox.y2 = TheBox.y1 + panoramiXdataPtr[i].height;
REGION_INIT(pScreen, &XineramaScreenRegions[i], &TheBox, 1);
REGION_UNION(pScreen, &PanoramiXScreenRegion, &PanoramiXScreenRegion,
RegionInit(&XineramaScreenRegions[i], &TheBox, 1);
RegionUnion(&PanoramiXScreenRegion, &PanoramiXScreenRegion,
&XineramaScreenRegions[i]);
}
......@@ -473,9 +473,9 @@ void XineramaReinitData(ScreenPtr pScreen)
{
int i;
REGION_UNINIT(pScreen, &PanoramiXScreenRegion);
RegionUninit(&PanoramiXScreenRegion);
for (i = 0; i < PanoramiXNumScreens; i++)
REGION_UNINIT(pScreen, &XineramaScreenRegions[i]);
RegionUninit(&XineramaScreenRegions[i]);
XineramaInitData(pScreen);
}
......@@ -1182,15 +1182,15 @@ XineramaGetImageData(
SrcBox.x2 = SrcBox.x1 + width;
SrcBox.y2 = SrcBox.y1 + height;
REGION_INIT(pScreen, &SrcRegion, &SrcBox, 1);
REGION_NULL(pScreen, &GrabRegion);
RegionInit(&SrcRegion, &SrcBox, 1);
RegionNull(&GrabRegion);
depth = (format == XYPixmap) ? 1 : pDraw->depth;
for(i = 0; i < PanoramiXNumScreens; i++) {
pDraw = pDrawables[i];
inOut = RECT_IN_REGION(pScreen,&XineramaScreenRegions[i],&SrcBox);
inOut = RegionContainsRect(&XineramaScreenRegions[i],&SrcBox);
if(inOut == rgnIN) {
(*pDraw->pScreen->GetImage)(pDraw,
......@@ -1201,13 +1201,13 @@ XineramaGetImageData(
} else if (inOut == rgnOUT)
continue;
REGION_INTERSECT(pScreen, &GrabRegion, &SrcRegion,
RegionIntersect(&GrabRegion, &SrcRegion,
&XineramaScreenRegions[i]);
nbox = REGION_NUM_RECTS(&GrabRegion);
nbox = RegionNumRects(&GrabRegion);
if(nbox) {
pbox = REGION_RECTS(&GrabRegion);
pbox = RegionRects(&GrabRegion);
while(nbox--) {
w = pbox->x2 - pbox->x1;
......@@ -1284,8 +1284,8 @@ XineramaGetImageData(
pbox++;
}
REGION_SUBTRACT(pScreen, &SrcRegion, &SrcRegion, &GrabRegion);
if(!REGION_NOTEMPTY(pScreen, &SrcRegion))
RegionSubtract(&SrcRegion, &SrcRegion, &GrabRegion);
if(!RegionNotEmpty(&SrcRegion))
break;
}
......@@ -1294,6 +1294,6 @@ XineramaGetImageData(
if(ScratchMem)
xfree(ScratchMem);
REGION_UNINIT(pScreen, &SrcRegion);
REGION_UNINIT(pScreen, &GrabRegion);
RegionUninit(&SrcRegion);
RegionUninit(&GrabRegion);
}
......@@ -621,7 +621,7 @@ int PanoramiXTranslateCoords(ClientPtr client)
* borderSize
*/
&& (!wBoundingShape(pWin) ||
POINT_IN_REGION(pWin->drawable.pScreen,
RegionContainsPoint(
wBoundingShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box))
......@@ -1109,21 +1109,21 @@ int PanoramiXCopyArea(ClientPtr client)
RegionRec totalReg;
Bool overlap;
REGION_NULL(pScreen, &totalReg);
RegionNull(&totalReg);
FOR_NSCREENS_BACKWARD(j) {
if(pRgn[j]) {
if(srcIsRoot) {
REGION_TRANSLATE(pScreen, pRgn[j],
RegionTranslate(pRgn[j],
panoramiXdataPtr[j].x, panoramiXdataPtr[j].y);
}
REGION_APPEND(pScreen, &totalReg, pRgn[j]);
REGION_DESTROY(pScreen, pRgn[j]);
RegionAppend(&totalReg, pRgn[j]);
RegionDestroy(pRgn[j]);
}
}
REGION_VALIDATE(pScreen, &totalReg, &overlap);
RegionValidate(&totalReg, &overlap);
(*pScreen->SendGraphicsExpose)(
client, &totalReg, stuff->dstDrawable, X_CopyArea, 0);
REGION_UNINIT(pScreen, &totalReg);
RegionUninit(&totalReg);
}
result = client->noClientException;
......@@ -1220,17 +1220,17 @@ int PanoramiXCopyPlane(ClientPtr client)
RegionRec totalReg;
Bool overlap;
REGION_NULL(pScreen, &totalReg);
RegionNull(&totalReg);
FOR_NSCREENS_BACKWARD(j) {
if(pRgn[j]) {
REGION_APPEND(pScreen, &totalReg, pRgn[j]);
REGION_DESTROY(pScreen, pRgn[j]);
RegionAppend(&totalReg, pRgn[j]);
RegionDestroy(pRgn[j]);
}
}
REGION_VALIDATE(pScreen, &totalReg, &overlap);
RegionValidate(&totalReg, &overlap);
(*pScreen->SendGraphicsExpose)(
client, &totalReg, stuff->dstDrawable, X_CopyPlane, 0);
REGION_UNINIT(pScreen, &totalReg);
RegionUninit(&totalReg);
}
return (client->noClientException);
......
......@@ -37,11 +37,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "EVIstruct.h"
#include "scrnintstr.h"
#if HAVE_STDINT_H
#include <stdint.h>
#elif !defined(UINT32_MAX)
#define UINT32_MAX 0xffffffffU
#endif
static int sampleGetVisualInfo(
VisualID32 *visual,
......
......@@ -1400,12 +1400,12 @@ SecurityCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
imageBox.y1 = y;
imageBox.x2 = x + w;
imageBox.y2 = y + h;
REGION_INIT(pScreen, &imageRegion, &imageBox, 1);
REGION_NULL(pScreen, &censorRegion);
RegionInit(&imageRegion, &imageBox, 1);
RegionNull(&censorRegion);
/* censorRegion = imageRegion - visibleRegion */
REGION_SUBTRACT(pScreen, &censorRegion, &imageRegion, pVisibleRegion);
nRects = REGION_NUM_RECTS(&censorRegion);
RegionSubtract(&censorRegion, &imageRegion, pVisibleRegion);
nRects = RegionNumRects(&censorRegion);
if (nRects > 0)
{ /* we have something to censor */
GCPtr pScratchGC = NULL;
......@@ -1425,7 +1425,7 @@ SecurityCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
failed = TRUE;
goto failSafe;
}
for (pBox = REGION_RECTS(&censorRegion), i = 0;
for (pBox = RegionRects(&censorRegion), i = 0;
i < nRects;
i++, pBox++)
{
......@@ -1475,8 +1475,8 @@ SecurityCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
if (pScratchGC) FreeScratchGC(pScratchGC);
if (pPix) FreeScratchPixmapHeader(pPix);
}
REGION_UNINIT(pScreen, &imageRegion);
REGION_UNINIT(pScreen, &censorRegion);
RegionUninit(&imageRegion);
RegionUninit(&censorRegion);
} /* SecurityCensorImage */
/**********************************************************************/
......
......@@ -186,11 +186,11 @@ RegionOperate (client, pWin, kind, destRgnp, srcRgn, op, xoff, yoff, create)
ScreenPtr pScreen = pWin->drawable.pScreen;
if (srcRgn && (xoff || yoff))
REGION_TRANSLATE(pScreen, srcRgn, xoff, yoff);
RegionTranslate(srcRgn, xoff, yoff);
if (!pWin->parent)
{
if (srcRgn)
REGION_DESTROY(pScreen, srcRgn);
RegionDestroy(srcRgn);
return Success;
}
......@@ -201,7 +201,7 @@ RegionOperate (client, pWin, kind, destRgnp, srcRgn, op, xoff, yoff, create)
*/
if (srcRgn == NULL) {
if (*destRgnp != NULL) {
REGION_DESTROY (pScreen, *destRgnp);
RegionDestroy(*destRgnp);
*destRgnp = 0;
/* go on to remove shape and generate ShapeNotify */
}
......@@ -220,17 +220,17 @@ RegionOperate (client, pWin, kind, destRgnp, srcRgn, op, xoff, yoff, create)
else switch (op) {
case ShapeSet:
if (*destRgnp)
REGION_DESTROY(pScreen, *destRgnp);
RegionDestroy(*destRgnp);
*destRgnp = srcRgn;
srcRgn = 0;
break;
case ShapeUnion:
if (*destRgnp)
REGION_UNION(pScreen, *destRgnp, *destRgnp, srcRgn);
RegionUnion(*destRgnp, *destRgnp, srcRgn);
break;
case ShapeIntersect:
if (*destRgnp)
REGION_INTERSECT(pScreen, *destRgnp, *destRgnp, srcRgn);
RegionIntersect(*destRgnp, *destRgnp, srcRgn);
else {
*destRgnp = srcRgn;
srcRgn = 0;
......@@ -239,20 +239,20 @@ RegionOperate (client, pWin, kind, destRgnp, srcRgn, op, xoff, yoff, create)
case ShapeSubtract:
if (!*destRgnp)
*destRgnp = (*create)(pWin);
REGION_SUBTRACT(pScreen, *destRgnp, *destRgnp, srcRgn);
RegionSubtract(*destRgnp, *destRgnp, srcRgn);
break;
case ShapeInvert:
if (!*destRgnp)
*destRgnp = REGION_CREATE(pScreen, (BoxPtr) 0, 0);
*destRgnp = RegionCreate((BoxPtr) 0, 0);
else
REGION_SUBTRACT(pScreen, *destRgnp, srcRgn, *destRgnp);
RegionSubtract(*destRgnp, srcRgn, *destRgnp);
break;
default:
client->errorValue = op;
return BadValue;
}
if (srcRgn)
REGION_DESTROY(pScreen, srcRgn);
RegionDestroy(srcRgn);
(*pScreen->SetShape) (pWin);
SendShapeNotify (pWin, kind);
return Success;
......@@ -268,7 +268,7 @@ CreateBoundingShape (pWin)
extents.y1 = -wBorderWidth (pWin);
extents.x2 = pWin->drawable.width + wBorderWidth (pWin);
extents.y2 = pWin->drawable.height + wBorderWidth (pWin);
return REGION_CREATE(pWin->drawable.pScreen, &extents, 1);
return RegionCreate(&extents, 1);
}
RegionPtr
......@@ -281,7 +281,7 @@ CreateClipShape (pWin)
extents.y1 = 0;
extents.x2 = pWin->drawable.width;
extents.y2 = pWin->drawable.height;
return REGION_CREATE(pWin->drawable.pScreen, &extents, 1);
return RegionCreate(&extents, 1);
}
static int
......@@ -360,7 +360,7 @@ ProcShapeRectangles (client)
ctype = VerifyRectOrder(nrects, prects, (int)stuff->ordering);
if (ctype < 0)
return BadMatch;
srcRgn = RECTS_TO_REGION(pScreen, nrects, prects, ctype);
srcRgn = RegionFromRects(nrects, prects, ctype);
if (!pWin->optional)
MakeWindowOptional (pWin);
......@@ -455,7 +455,7 @@ ProcShapeMask (client)
if (pPixmap->drawable.pScreen != pScreen ||
pPixmap->drawable.depth != 1)
return BadMatch;
srcRgn = BITMAP_TO_REGION(pScreen, pPixmap);
srcRgn = BitmapToRegion(pScreen, pPixmap);
if (!srcRgn)
return BadAlloc;
}
......@@ -581,8 +581,8 @@ ProcShapeCombine (client)
}
if (srcRgn) {
tmp = REGION_CREATE(pScreen, (BoxPtr) 0, 0);
REGION_COPY(pScreen, tmp, srcRgn);
tmp = RegionCreate((BoxPtr) 0, 0);
RegionCopy(tmp, srcRgn);
srcRgn = tmp;
} else
srcRgn = (*createSrc) (pSrcWin);
......@@ -673,7 +673,7 @@ ProcShapeOffset (client)
pScreen = pWin->drawable.pScreen;
if (srcRgn)
{
REGION_TRANSLATE(pScreen, srcRgn, stuff->xOff, stuff->yOff);
RegionTranslate(srcRgn, stuff->xOff, stuff->yOff);
(*pScreen->SetShape) (pWin);
}
SendShapeNotify (pWin, (int)stuff->destKind);
......@@ -729,7 +729,7 @@ ProcShapeQueryExtents (client)
rep.clipShaped = (wClipShape(pWin) != 0);
if ((region = wBoundingShape(pWin))) {
/* this is done in two steps because of a compiler bug on SunOS 4.1.3 */
pExtents = REGION_EXTENTS(pWin->drawable.pScreen, region);
pExtents = RegionExtents(region);
extents = *pExtents;
} else {
extents.x1 = -wBorderWidth (pWin);
......@@ -743,7 +743,7 @@ ProcShapeQueryExtents (client)
rep.heightBoundingShape = extents.y2 - extents.y1;
if ((region = wClipShape(pWin))) {
/* this is done in two steps because of a compiler bug on SunOS 4.1.3 */
pExtents = REGION_EXTENTS(pWin->drawable.pScreen, region);
pExtents = RegionExtents(region);
extents = *pExtents;
} else {
extents.x1 = 0;
......@@ -932,7 +932,7 @@ SendShapeNotify (pWin, which)
case ShapeBounding:
region = wBoundingShape(pWin);
if (region) {
extents = *REGION_EXTENTS(pWin->drawable.pScreen, region);
extents = *RegionExtents(region);
shaped = xTrue;
} else {
extents.x1 = -wBorderWidth (pWin);
......@@ -945,7 +945,7 @@ SendShapeNotify (pWin, which)
case ShapeClip:
region = wClipShape(pWin);
if (region) {
extents = *REGION_EXTENTS(pWin->drawable.pScreen, region);
extents = *RegionExtents(region);
shaped = xTrue;
} else {
extents.x1 = 0;
......@@ -958,7 +958,7 @@ SendShapeNotify (pWin, which)
case ShapeInput:
region = wInputShape(pWin);
if (region) {
extents = *REGION_EXTENTS(pWin->drawable.pScreen, region);
extents = *RegionExtents(region);
shaped = xTrue;
} else {
extents.x1 = -wBorderWidth (pWin);
......@@ -1087,8 +1087,8 @@ ProcShapeGetRectangles (client)
}
} else {
BoxPtr box;
nrects = REGION_NUM_RECTS(region);
box = REGION_RECTS(region);
nrects = RegionNumRects(region);
box = RegionRects(region);
rects = (xRectangle *) ALLOCATE_LOCAL (nrects * sizeof (xRectangle));
if (!rects && nrects)
return BadAlloc;
......
......@@ -44,11 +44,7 @@ from The Open Group.
#include <nx-X11/extensions/xcmiscstr.h>
#include "modinit.h"
#if HAVE_STDINT_H
#include <stdint.h>
#elif !defined(UINT32_MAX)
#define UINT32_MAX 0xffffffffU
#endif
#if 0
static unsigned char XCMiscCode;
......
......@@ -402,11 +402,11 @@ ProcXTestFakeInput(client)
int i;
int x = ev->u.keyButtonPointer.rootX + panoramiXdataPtr[0].x;
int y = ev->u.keyButtonPointer.rootY + panoramiXdataPtr[0].y;
if (!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
if (!RegionContainsPoint(&XineramaScreenRegions[pScreen->myNum],
x, y, &box)) {
FOR_NSCREENS(i) {
if (i == pScreen->myNum) continue;
if (POINT_IN_REGION(pScreen,
if (RegionContainsPoint(
&XineramaScreenRegions[i],
x, y, &box)) {
root = WindowTable[i];
......
......@@ -83,7 +83,7 @@ XCOMM $XFree86: xc/programs/Xserver/Xi/Imakefile,v 3.2 1999/04/17 09:08:22 dawes
ungrdev.o \
ungrdevb.o \
ungrdevk.o
INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC)
INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) `pkg-config --cflags-only-I pixman-1`
LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln
NormalLibraryTarget(xinput,$(OBJS))
......
......@@ -6,7 +6,8 @@
INCLUDES = -I../include -I../mi -I../Xext -I../render -I../xfixes \
-I../damageext -I../miext/damage -I$(EXTINCSRC) \
-I$(XINCLUDESRC)
-I$(XINCLUDESRC) \
`pkg-config --cflags-only-I pixman-1`
LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln
......
......@@ -103,7 +103,7 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update)
if (wasMapped)
UnmapWindow (pWin, FALSE);
REGION_NULL (pScreen, &cw->borderClip);
RegionNull(&cw->borderClip);
cw->update = CompositeRedirectAutomatic;
cw->clients = 0;
cw->oldx = COMP_ORIGIN_INVALID;
......@@ -177,7 +177,7 @@ compFreeClientWindow (WindowPtr pWin, XID id)
if (cw->damage)
DamageDestroy (cw->damage);
REGION_UNINIT (pScreen, &cw->borderClip);
RegionUninit(&cw->borderClip);
pWin->devPrivates[CompWindowPrivateIndex].ptr = 0;
xfree (cw);
......@@ -503,7 +503,7 @@ compFreePixmap (WindowPtr pWin)
* case correctly. Unmap adds the window borderClip to the
* parent exposed area; regions beyond the parent cause crashes
*/
REGION_COPY (pScreen, &pWin->borderClip, &cw->borderClip);
RegionCopy(&pWin->borderClip, &cw->borderClip);
pRedirectPixmap = (*pScreen->GetWindowPixmap) (pWin);
pParentPixmap = (*pScreen->GetWindowPixmap) (pWin->parent);
pWin->redirectDraw = FALSE;
......
......@@ -201,7 +201,7 @@ ProcCompositeCreateRegionFromBorderClip (ClientPtr client)
pRegion = XFixesRegionCopy (pBorderClip);
if (!pRegion)
return BadAlloc;
REGION_TRANSLATE (pScreen, pRegion, -pWin->drawable.x, -pWin->drawable.y);
RegionTranslate(pRegion, -pWin->drawable.x, -pWin->drawable.y);
if (!AddResource (stuff->region, RegionResType, (void *) pRegion))
return BadAlloc;
......
......@@ -79,10 +79,10 @@ compRepaintBorder (ClientPtr pClient, void * closure)
{
RegionRec exposed;
REGION_NULL(pScreen, &exposed);
REGION_SUBTRACT(pScreen, &exposed, &pWindow->borderClip, &pWindow->winSize);
RegionNull(&exposed);
RegionSubtract(&exposed, &pWindow->borderClip, &pWindow->winSize);
(*pWindow->drawable.pScreen->PaintWindowBorder)(pWindow, &exposed, PW_BORDER);
REGION_UNINIT(pScreen, &exposed);
RegionUninit(&exposed);
}
return TRUE;
}
......@@ -245,7 +245,7 @@ compClipNotify (WindowPtr pWin, int dx, int dy)
if (cw->borderClipX != pWin->drawable.x ||
cw->borderClipY != pWin->drawable.y)
{
REGION_TRANSLATE (pScreen, &cw->borderClip,
RegionTranslate(&cw->borderClip,
pWin->drawable.x - cw->borderClipX,
pWin->drawable.y - cw->borderClipY);
cw->borderClipX = pWin->drawable.x;
......@@ -492,14 +492,14 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy);
RegionTranslate(prgnSrc, -dx, -dy);
REGION_NULL (pWin->drawable.pScreen, &rgnDst);
RegionNull(&rgnDst);
REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst,
RegionIntersect(&rgnDst,
&pWin->borderClip, prgnSrc);
REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst,
RegionTranslate(&rgnDst,
-pPixmap->screen_x, -pPixmap->screen_y);
dx = dx + pPixmap->screen_x - cw->oldx;
......@@ -507,8 +507,8 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
pGC = GetScratchGC (pPixmap->drawable.depth, pScreen);
if (pGC)
{
BoxPtr pBox = REGION_RECTS (&rgnDst);
int nBox = REGION_NUM_RECTS (&rgnDst);
BoxPtr pBox = RegionRects (&rgnDst);
int nBox = RegionNumRects (&rgnDst);
ValidateGC(&pPixmap->drawable, pGC);
while (nBox--)
......@@ -536,16 +536,16 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
if (ptOldOrg.x != pWin->drawable.x || ptOldOrg.y != pWin->drawable.y)
{
if (dx || dy)
REGION_TRANSLATE (pScreen, prgnSrc, dx, dy);
RegionTranslate(prgnSrc, dx, dy);
(*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc);
if (dx || dy)
REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy);
RegionTranslate(prgnSrc, -dx, -dy);
}
else
{
ptOldOrg.x -= dx;
ptOldOrg.y -= dy;
REGION_TRANSLATE (prgnSrc, prgnSrc,
RegionTranslate(prgnSrc,
pWin->drawable.x - ptOldOrg.x,
pWin->drawable.y - ptOldOrg.y);
DamageDamageRegion (&pWin->drawable, prgnSrc);
......@@ -613,26 +613,26 @@ compSetRedirectBorderClip (WindowPtr pWin, RegionPtr pRegion)
CompWindowPtr cw = GetCompWindow (pWin);
RegionRec damage;
REGION_NULL (pScreen, &damage);
RegionNull(&damage);
/*
* Align old border clip with new border clip
*/
REGION_TRANSLATE (pScreen, &cw->borderClip,
RegionTranslate(&cw->borderClip,
pWin->drawable.x - cw->borderClipX,
pWin->drawable.y - cw->borderClipY);
/*
* Compute newly visible portion of window for repaint
*/
REGION_SUBTRACT (pScreen, &damage, pRegion, &cw->borderClip);
RegionSubtract(&damage, pRegion, &cw->borderClip);
/*
* Report that as damaged so it will be redrawn
*/
DamageDamageRegion (&pWin->drawable, &damage);
REGION_UNINIT (pScreen, &damage);
RegionUninit(&damage);
/*
* Save the new border clip region
*/
REGION_COPY (pScreen, &cw->borderClip, pRegion);
RegionCopy(&cw->borderClip, pRegion);
cw->borderClipX = pWin->drawable.x;
cw->borderClipY = pWin->drawable.y;
}
......@@ -694,18 +694,18 @@ compWindowUpdateAutomatic (WindowPtr pWin)
/*
* First move the region from window to screen coordinates
*/
REGION_TRANSLATE (pScreen, pRegion,
RegionTranslate(pRegion,
pWin->drawable.x, pWin->drawable.y);
/*
* Clip against the "real" border clip
*/
REGION_INTERSECT (pScreen, pRegion, pRegion, &cw->borderClip);
RegionIntersect(pRegion, pRegion, &cw->borderClip);
/*
* Now translate from screen to dest coordinates
*/
REGION_TRANSLATE (pScreen, pRegion,
RegionTranslate(pRegion,
-pParent->drawable.x, -pParent->drawable.y);
/*
......
......@@ -5,7 +5,8 @@
OBJS = damageext.o
INCLUDES = -I../include -I../Xext -I../render -I../xfixes -I../miext/damage \
-I$(EXTINCSRC) -I$(XINCLUDESRC)
-I$(EXTINCSRC) -I$(XINCLUDESRC) \
`pkg-config --cflags-only-I pixman-1`
LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln
......
......@@ -99,10 +99,10 @@ DamageExtReport (DamagePtr pDamage, RegionPtr pRegion, void *closure)
switch (pDamageExt->level) {
case DamageReportRawRegion:
case DamageReportDeltaRegion:
DamageExtNotify (pDamageExt, REGION_RECTS(pRegion), REGION_NUM_RECTS(pRegion));
DamageExtNotify (pDamageExt, RegionRects(pRegion), RegionNumRects(pRegion));
break;
case DamageReportBoundingBox:
DamageExtNotify (pDamageExt, REGION_EXTENTS(prScreen, pRegion), 1);
DamageExtNotify (pDamageExt, RegionExtents(pRegion), 1);
break;
case DamageReportNonEmpty:
DamageExtNotify (pDamageExt, NullBox, 0);
......@@ -261,14 +261,14 @@ ProcDamageSubtract (ClientPtr client)
if (pRepair)
{
if (pParts)
REGION_INTERSECT (prScreen, pParts, DamageRegion (pDamage), pRepair);
RegionIntersect(pParts, DamageRegion (pDamage), pRepair);
if (DamageSubtract (pDamage, pRepair))
DamageExtReport (pDamage, DamageRegion (pDamage), (void *) pDamageExt);
}
else
{
if (pParts)
REGION_COPY (prScreen, pParts, DamageRegion (pDamage));
RegionCopy(pParts, DamageRegion (pDamage));
DamageEmpty (pDamage);
}
}
......
......@@ -17,7 +17,7 @@ XCOMM $XFree86: xc/programs/Xserver/dbe/Imakefile,v 3.10 2001/01/17 22:36:41 daw
SRCS = dbe.c midbe.c
OBJS = dbe.o midbe.o
INCLUDES = -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(EXTINCSRC) $(EXTRAINCLUDES)
INCLUDES = -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(EXTINCSRC) $(EXTRAINCLUDES) `pkg-config --cflags-only-I pixman-1`
LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln
NormalLibraryObjectRule()
......
......@@ -17,15 +17,16 @@ FFS_OBJ = ffs.o
SRCS = atom.c colormap.c cursor.c devices.c dispatch.c dixutils.c events.c \
extension.c gc.c globals.c glyphcurs.c grabs.c \
main.c property.c resource.c swaprep.c swapreq.c \
main.c property.c region.c resource.c swaprep.c swapreq.c \
tables.c window.c initatoms.c dixfonts.c privates.c pixmap.c $(FFS_SRC)
OBJS = atom.o colormap.o cursor.o devices.o dispatch.o dixutils.o events.o \
extension.o gc.o globals.o glyphcurs.o grabs.o \
main.o property.o resource.o swaprep.o swapreq.o \
main.o property.o region.o resource.o swaprep.o swapreq.o \
tables.o window.o initatoms.o dixfonts.o privates.o pixmap.o $(FFS_OBJ)
INCLUDES = -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \
-I$(SERVERSRC)/Xext -I$(SERVERSRC)/lbx
-I$(SERVERSRC)/Xext -I$(SERVERSRC)/lbx \
`pkg-config --cflags-only-I pixman-1`
LINTLIBS = ../os/llib-los.ln
/*
......
......@@ -75,7 +75,7 @@ static NodePtr *nodeTable;
void FreeAtom(NodePtr patom);
Atom
MakeAtom(char *string, unsigned len, Bool makeit)
MakeAtom(const char *string, unsigned len, Bool makeit)
{
register NodePtr * np;
unsigned i;
......
......@@ -1266,11 +1266,11 @@ ProcTranslateCoords(register ClientPtr client)
* borderSize
*/
&& (!wBoundingShape(pWin) ||
POINT_IN_REGION(pWin->drawable.pScreen,
RegionContainsPoint(
&pWin->borderSize, x, y, &box))
&& (!wInputShape(pWin) ||
POINT_IN_REGION(pWin->drawable.pScreen,
RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box))
......@@ -1758,7 +1758,7 @@ ProcCopyArea(register ClientPtr client)
(*pDst->pScreen->SendGraphicsExpose)
(client, pRgn, stuff->dstDrawable, X_CopyArea, 0);
if (pRgn)
REGION_DESTROY(pDst->pScreen, pRgn);
RegionDestroy(pRgn);
}
return(client->noClientException);
......@@ -1806,7 +1806,7 @@ ProcCopyPlane(register ClientPtr client)
(*pdstDraw->pScreen->SendGraphicsExpose)
(client, pRgn, stuff->dstDrawable, X_CopyPlane, 0);
if (pRgn)
REGION_DESTROY(pdstDraw->pScreen, pRgn);
RegionDestroy(pRgn);
}
return(client->noClientException);
}
......@@ -2228,7 +2228,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw);
if (pVisibleRegion)
{
REGION_TRANSLATE(pDraw->pScreen, pVisibleRegion, -pDraw->x, -pDraw->y);
RegionTranslate(pVisibleRegion, -pDraw->x, -pDraw->y);
}
}
#endif
......@@ -2322,7 +2322,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
}
#ifdef XCSECURITY
if (pVisibleRegion)
REGION_DESTROY(pDraw->pScreen, pVisibleRegion);
RegionDestroy(pVisibleRegion);
#endif
if (!im_return)
DEALLOCATE_LOCAL(pBuf);
......
......@@ -144,6 +144,8 @@ _NXGetFontPathError:
#define QUERYCHARINFO(pci, pr) *(pr) = (pci)->metrics
extern void register_fpe_functions(void);
extern void * fosNaturalParams;
extern FontPtr defaultFont;
......
......@@ -171,7 +171,7 @@ ISOLatin1ToLower (unsigned char source)
void
CopyISOLatin1Lowered(unsigned char *dest, unsigned char *source, int length)
CopyISOLatin1Lowered(char *dest, const char *source, int length)
{
register int i;
......
......@@ -346,14 +346,14 @@ XineramaSetCursorPosition(
x += panoramiXdataPtr[0].x;
y += panoramiXdataPtr[0].y;
if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
if(!RegionContainsPoint(&XineramaScreenRegions[pScreen->myNum],
x, y, &box))
{
FOR_NSCREENS(i)
{
if(i == pScreen->myNum)
continue;
if(POINT_IN_REGION(pScreen, &XineramaScreenRegions[i], x, y, &box))
if(RegionContainsPoint(&XineramaScreenRegions[i], x, y, &box))
{
pScreen = screenInfo.screens[i];
break;
......@@ -483,7 +483,7 @@ XineramaCheckVirtualMotion(
i = PanoramiXNumScreens - 1;
REGION_COPY(sprite.screen, &sprite.Reg2,
RegionCopy(&sprite.Reg2,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
......@@ -493,16 +493,16 @@ XineramaCheckVirtualMotion(
y = off_y - panoramiXdataPtr[i].y;
if(x || y)
REGION_TRANSLATE(sprite.screen, &sprite.Reg2, x, y);
RegionTranslate(&sprite.Reg2, x, y);
REGION_UNION(sprite.screen, &sprite.Reg2, &sprite.Reg2,
RegionUnion(&sprite.Reg2, &sprite.Reg2,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
}
lims = *REGION_EXTENTS(sprite.screen, &sprite.Reg2);
lims = *RegionExtents(&sprite.Reg2);
if (sprite.hot.x < lims.x1)
#ifdef XEVIE
......@@ -525,7 +525,7 @@ XineramaCheckVirtualMotion(
#endif
sprite.hot.y = lims.y2 - 1;
if (REGION_NUM_RECTS(&sprite.Reg2) > 1)
if (RegionNumRects(&sprite.Reg2) > 1)
ConfineToShape(&sprite.Reg2, &sprite.hot.x, &sprite.hot.y);
if (qe)
......@@ -632,7 +632,7 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents)
i = PanoramiXNumScreens - 1;
REGION_COPY(sprite.screen, &sprite.Reg1,
RegionCopy(&sprite.Reg1,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
......@@ -642,18 +642,18 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents)
y = off_y - panoramiXdataPtr[i].y;
if(x || y)
REGION_TRANSLATE(sprite.screen, &sprite.Reg1, x, y);
RegionTranslate(&sprite.Reg1, x, y);
REGION_UNION(sprite.screen, &sprite.Reg1, &sprite.Reg1,
RegionUnion(&sprite.Reg1, &sprite.Reg1,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
}
sprite.hotLimits = *REGION_EXTENTS(sprite.screen, &sprite.Reg1);
sprite.hotLimits = *RegionExtents(&sprite.Reg1);
if(REGION_NUM_RECTS(&sprite.Reg1) > 1)
if(RegionNumRects(&sprite.Reg1) > 1)
sprite.hotShape = &sprite.Reg1;
else
sprite.hotShape = NullRegion;
......@@ -732,9 +732,9 @@ ConfineToShape(RegionPtr shape, int *px, int *py)
int x = *px, y = *py;
int incx = 1, incy = 1;
if (POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box))
if (RegionContainsPoint(shape, x, y, &box))
return;
box = *REGION_EXTENTS(sprite.hot.pScreen, shape);
box = *RegionExtents(shape);
/* this is rather crude */
do {
x += incx;
......@@ -756,7 +756,7 @@ ConfineToShape(RegionPtr shape, int *px, int *py)
else if (y < box.y1)
return; /* should never get here! */
}
} while (!POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box));
} while (!RegionContainsPoint(shape, x, y, &box));
*px = x;
*py = y;
}
......@@ -844,7 +844,7 @@ CheckVirtualMotion(
#endif
sprite.hot.x = sprite.hot.y = 0;
}
lims = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin->borderSize);
lims = *RegionExtents(&pWin->borderSize);
if (sprite.hot.x < lims.x1)
#ifdef XEVIE
xeviehot.x =
......@@ -898,7 +898,7 @@ ConfineCursorToWindow(WindowPtr pWin, Bool generateEvents, Bool confineToScreen)
}
else
{
sprite.hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize);
sprite.hotLimits = *RegionExtents(&pWin->borderSize);
#ifdef SHAPE
sprite.hotShape = wBoundingShape(pWin) ? &pWin->borderSize
: NullRegion;
......@@ -1972,7 +1972,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
{
BoxRec box;
if(POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderSize, x, y, &box))
if(RegionContainsPoint(&pWin->borderSize, x, y, &box))
return TRUE;
#ifdef PANORAMIX
......@@ -1980,7 +1980,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
int i;
for(i = 1; i < PanoramiXNumScreens; i++) {
if(POINT_IN_REGION(sprite.screen,
if(RegionContainsPoint(
&sprite.windows[i]->borderSize,
x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x,
y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y,
......@@ -2016,7 +2016,7 @@ XYToWindow(int x, int y)
*/
&& (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
&& (!wInputShape(pWin) ||
POINT_IN_REGION(pWin->drawable.pScreen,
RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box))
......@@ -2156,10 +2156,10 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
sprite.hotLimits.x2 -= xoff;
sprite.hotLimits.y2 -= yoff;
if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg1))
REGION_TRANSLATE(sprite.screen, &sprite.Reg1, xoff, yoff);
if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg2))
REGION_TRANSLATE(sprite.screen, &sprite.Reg2, xoff, yoff);
if (RegionNotEmpty(&sprite.Reg1))
RegionTranslate(&sprite.Reg1, xoff, yoff);
if (RegionNotEmpty(&sprite.Reg2))
RegionTranslate(&sprite.Reg2, xoff, yoff);
/* FIXME: if we call ConfineCursorToWindow, must we do anything else? */
if ((grab = inputInfo.pointer->grab) && grab->confineTo) {
......@@ -2211,8 +2211,8 @@ DefineInitialRootWindow(register WindowPtr win)
#endif
sprite.screen = pScreen;
/* gotta UNINIT these someplace */
REGION_NULL(pScreen, &sprite.Reg1);
REGION_NULL(pScreen, &sprite.Reg2);
RegionNull(&sprite.Reg1);
RegionNull(&sprite.Reg2);
}
#endif
}
......@@ -2278,7 +2278,7 @@ XineramaPointInWindowIsVisible(
if (!pWin->realized) return FALSE;
if (POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box))
if (RegionContainsPoint(&pWin->borderClip, x, y, &box))
return TRUE;
if(!XineramaSetWindowPntrs(pWin)) return FALSE;
......@@ -2292,9 +2292,9 @@ XineramaPointInWindowIsVisible(
x = xoff - panoramiXdataPtr[i].x;
y = yoff - panoramiXdataPtr[i].y;
if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box)
if(RegionContainsPoint(&pWin->borderClip, x, y, &box)
&& (!wInputShape(pWin) ||
POINT_IN_REGION(pWin->drawable.pScreen,
RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box)))
......@@ -2470,7 +2470,7 @@ ProcWarpPointer(ClientPtr client)
static Bool
BorderSizeNotEmpty(WindowPtr pWin)
{
if(REGION_NOTEMPTY(sprite.hotPhys.pScreen, &pWin->borderSize))
if(RegionNotEmpty(&pWin->borderSize))
return TRUE;
#ifdef PANORAMIX
......@@ -2478,7 +2478,7 @@ BorderSizeNotEmpty(WindowPtr pWin)
int i;
for(i = 1; i < PanoramiXNumScreens; i++) {
if(REGION_NOTEMPTY(sprite.screen, &sprite.windows[i]->borderSize))
if(RegionNotEmpty(&sprite.windows[i]->borderSize))
return TRUE;
}
}
......
......@@ -123,7 +123,8 @@ OBJS = $(XFMODOBJ) \
INCLUDES = -I$(SERVERSRC)/fb -I$(SERVERSRC)/mi -I$(SERVERSRC)/include \
-I$(XINCLUDESRC) \
-I$(XF86SRC)/common $(EXTRAINCLUDES) \
-I$(SERVERSRC)/render -I$(EXTINCSRC) -I$(SERVERSRC)/Xext
-I$(SERVERSRC)/render -I$(EXTINCSRC) -I$(SERVERSRC)/Xext \
`pkg-config --cflags-only-I pixman-1`
LINTLIBS = $(SERVERSRC)/dix/llib-ldix.ln $(SERVERSRC)/os/llib-los.ln \
$(SERVERSRC)/mi/llib-lmi.ln
......
......@@ -703,7 +703,7 @@ typedef struct {
*/
#define fbWindowEnabled(pWin) \
REGION_NOTEMPTY((pWin)->drawable.pScreen, \
RegionNotEmpty(\
&WindowTable[(pWin)->drawable.pScreen->myNum]->borderClip)
#define fbDrawableEnabled(pDrawable) \
......
......@@ -338,8 +338,8 @@ fb24_32SetSpans (DrawablePtr pDrawable,
{
d = dst + (ppt->y + dstYoff) * dstStride;
s = (CARD8 *) src;
n = REGION_NUM_RECTS(pClip);
pbox = REGION_RECTS (pClip);
n = RegionNumRects(pClip);
pbox = RegionRects (pClip);
while (n--)
{
if (pbox->y1 > ppt->y)
......@@ -400,8 +400,8 @@ fb24_32PutZImage (DrawablePtr pDrawable,
dstStride *= sizeof(FbBits);
dst = (CARD8 *) dstBits;
for (nbox = REGION_NUM_RECTS (pClip),
pbox = REGION_RECTS(pClip);
for (nbox = RegionNumRects (pClip),
pbox = RegionRects(pClip);
nbox--;
pbox++)
{
......
......@@ -101,7 +101,7 @@ fbPolyArc (DrawablePtr pDrawable,
y2 = box.y1 + (int)parcs->height + 1;
box.y2 = y2;
if ( (x2 <= MAXSHORT) && (y2 <= MAXSHORT) &&
(RECT_IN_REGION(pDrawable->pScreen, cclip, &box) == rgnIN) )
(RegionContainsRect(cclip, &box) == rgnIN) )
(*arc) (dst, dstStride, dstBpp,
parcs, pDrawable->x + dstXoff, pDrawable->y + dstYoff,
pPriv->and, pPriv->xor);
......
......@@ -668,7 +668,7 @@ POLYLINE (DrawablePtr pDrawable,
int xoff = pDrawable->x;
int yoff = pDrawable->y;
unsigned int bias = miGetZeroLineBias(pDrawable->pScreen);
BoxPtr pBox = REGION_EXTENTS (pDrawable->pScreen, fbGetCompositeClip (pGC));
BoxPtr pBox = RegionExtents(fbGetCompositeClip (pGC));
FbBits *dst;
int dstStride;
......@@ -800,7 +800,7 @@ POLYSEGMENT (DrawablePtr pDrawable,
int xoff = pDrawable->x;
int yoff = pDrawable->y;
unsigned int bias = miGetZeroLineBias(pDrawable->pScreen);
BoxPtr pBox = REGION_EXTENTS (pDrawable->pScreen, fbGetCompositeClip (pGC));
BoxPtr pBox = RegionExtents(fbGetCompositeClip (pGC));
FbBits *dst;
int dstStride;
......
......@@ -39,8 +39,8 @@ fbSaveAreas(PixmapPtr pPixmap,
fbCopyWindowProc (&pWin->drawable,
&pPixmap->drawable,
0,
REGION_RECTS(prgnSave),
REGION_NUM_RECTS(prgnSave),
RegionRects(prgnSave),
RegionNumRects(prgnSave),
xorg, yorg,
FALSE,
FALSE,
......@@ -57,8 +57,8 @@ fbRestoreAreas(PixmapPtr pPixmap,
fbCopyWindowProc (&pPixmap->drawable,
&pWin->drawable,
0,
REGION_RECTS(prgnRestore),
REGION_NUM_RECTS(prgnRestore),
RegionRects(prgnRestore),
RegionNumRects(prgnRestore),
-xorg, -yorg,
FALSE,
FALSE,
......
......@@ -2896,7 +2896,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
if (pict->filter == PictFilterNearest)
{
if (pict->repeatType == RepeatNormal) {
if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
if (RegionNumRects(pict->pCompositeClip) == 1) {
box = pict->pCompositeClip->extents;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
......@@ -2927,7 +2927,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
y = MOD(v.vector[1]>>16, pict->pDrawable->height);
x = MOD(v.vector[0]>>16, pict->pDrawable->width);
}
if (POINT_IN_REGION (0, pict->pCompositeClip, x, y, &box))
if (RegionContainsPoint(pict->pCompositeClip, x, y, &box))
buffer[i] = fetch(bits + (y + pict->pDrawable->y)*stride, x + pict->pDrawable->x, indexed);
else
buffer[i] = 0;
......@@ -2938,7 +2938,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
}
}
} else {
if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
if (RegionNumRects(pict->pCompositeClip) == 1) {
box = pict->pCompositeClip->extents;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
......@@ -2970,7 +2970,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
y = v.vector[1]>>16;
x = v.vector[0]>>16;
}
if (POINT_IN_REGION (0, pict->pCompositeClip, x, y, &box))
if (RegionContainsPoint(pict->pCompositeClip, x, y, &box))
buffer[i] = fetch(bits + (y + pict->pDrawable->y)*stride, x + pict->pDrawable->x, indexed);
else
buffer[i] = 0;
......@@ -2983,7 +2983,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
}
} else if (pict->filter == PictFilterBilinear) {
if (pict->repeatType == RepeatNormal) {
if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
if (RegionNumRects(pict->pCompositeClip) == 1) {
box = pict->pCompositeClip->extents;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
......@@ -3082,14 +3082,14 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
b = bits + (y1 + pict->pDrawable->y)*stride;
tl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y1, &box)
tl = RegionContainsPoint(pict->pCompositeClip, x1, y1, &box)
? fetch(b, x1 + pict->pDrawable->x, indexed) : 0;
tr = POINT_IN_REGION(0, pict->pCompositeClip, x2, y1, &box)
tr = RegionContainsPoint(pict->pCompositeClip, x2, y1, &box)
? fetch(b, x2 + pict->pDrawable->x, indexed) : 0;
b = bits + (y2 + pict->pDrawable->y)*stride;
bl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y2, &box)
bl = RegionContainsPoint(pict->pCompositeClip, x1, y2, &box)
? fetch(b, x1 + pict->pDrawable->x, indexed) : 0;
br = POINT_IN_REGION(0, pict->pCompositeClip, x2, y2, &box)
br = RegionContainsPoint(pict->pCompositeClip, x2, y2, &box)
? fetch(b, x2 + pict->pDrawable->x, indexed) : 0;
ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
......@@ -3112,7 +3112,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
}
}
} else {
if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
if (RegionNumRects(pict->pCompositeClip) == 1) {
box = pict->pCompositeClip->extents;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
......@@ -3209,14 +3209,14 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
b = bits + (y1 + pict->pDrawable->y)*stride;
x_off = x1 + pict->pDrawable->x;
tl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y1, &box)
tl = RegionContainsPoint(pict->pCompositeClip, x1, y1, &box)
? fetch(b, x_off, indexed) : 0;
tr = POINT_IN_REGION(0, pict->pCompositeClip, x2, y1, &box)
tr = RegionContainsPoint(pict->pCompositeClip, x2, y1, &box)
? fetch(b, x_off + 1, indexed) : 0;
b += stride;
bl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y2, &box)
bl = RegionContainsPoint(pict->pCompositeClip, x1, y2, &box)
? fetch(b, x_off, indexed) : 0;
br = POINT_IN_REGION(0, pict->pCompositeClip, x2, y2, &box)
br = RegionContainsPoint(pict->pCompositeClip, x2, y2, &box)
? fetch(b, x_off + 1, indexed) : 0;
ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
......@@ -3274,7 +3274,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
for (x = x1; x < x2; x++) {
if (*p) {
int tx = (pict->repeatType == RepeatNormal) ? MOD (x, pict->pDrawable->width) : x;
if (POINT_IN_REGION (0, pict->pCompositeClip, tx, ty, &box)) {
if (RegionContainsPoint(pict->pCompositeClip, tx, ty, &box)) {
FbBits *b = bits + (ty + pict->pDrawable->y)*stride;
CARD32 c = fetch(b, tx + pict->pDrawable->x, indexed);
......@@ -3563,8 +3563,8 @@ fbCompositeGeneral (CARD8 op,
if (width > SCANLINE_BUFFER_LENGTH)
scanline_buffer = (CARD32 *) malloc(width * 3 * sizeof(CARD32));
n = REGION_NUM_RECTS (&region);
pbox = REGION_RECTS (&region);
n = RegionNumRects (&region);
pbox = RegionRects (&region);
while (n--)
{
h = pbox->y2 - pbox->y1;
......@@ -3618,7 +3618,7 @@ fbCompositeGeneral (CARD8 op,
}
pbox++;
}
REGION_UNINIT (pDst->pDrawable->pScreen, &region);
RegionUninit(&region);
if (scanline_buffer != _scanline_buffer)
free(scanline_buffer);
......
......@@ -306,8 +306,8 @@ fbCopyRegion (DrawablePtr pSrcDrawable,
int nbox;
BoxPtr pboxNew1, pboxNew2, pboxBase, pboxNext, pboxTmp;
pbox = REGION_RECTS(pDstRegion);
nbox = REGION_NUM_RECTS(pDstRegion);
pbox = RegionRects(pDstRegion);
nbox = RegionNumRects(pDstRegion);
/* XXX we have to err on the side of safety when both are windows,
* because we don't know if IncludeInferiors is being used.
......@@ -466,7 +466,7 @@ fbDoCopy (DrawablePtr pSrcDrawable,
* VT is inactive, make sure the region isn't empty
*/
if (!((WindowPtr) pSrcDrawable)->parent &&
REGION_NOTEMPTY (pSrcDrawable->pScreen,
RegionNotEmpty(
&((WindowPtr) pSrcDrawable)->borderClip))
{
/*
......@@ -548,9 +548,9 @@ fbDoCopy (DrawablePtr pSrcDrawable,
blown region and call intersect */
cclip = fbGetCompositeClip(pGC);
if (REGION_NUM_RECTS(cclip) == 1)
if (RegionNumRects(cclip) == 1)
{
BoxPtr pBox = REGION_RECTS(cclip);
BoxPtr pBox = RegionRects(cclip);
if (box_x1 < pBox->x1) box_x1 = pBox->x1;
if (box_x2 > pBox->x2) box_x2 = pBox->x2;
......@@ -563,7 +563,7 @@ fbDoCopy (DrawablePtr pSrcDrawable,
/* Check to see if the region is empty */
if (box_x1 >= box_x2 || box_y1 >= box_y2)
{
REGION_NULL(pGC->pScreen, &rgnDst);
RegionNull(&rgnDst);
}
else
{
......@@ -572,25 +572,25 @@ fbDoCopy (DrawablePtr pSrcDrawable,
box.y1 = box_y1;
box.x2 = box_x2;
box.y2 = box_y2;
REGION_INIT(pGC->pScreen, &rgnDst, &box, 1);
RegionInit(&rgnDst, &box, 1);
}
/* Clip against complex source if needed */
if (!fastSrc)
{
REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip);
REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy);
RegionIntersect(&rgnDst, &rgnDst, prgnSrcClip);
RegionTranslate(&rgnDst, -dx, -dy);
}
/* Clip against complex dest if needed */
if (!fastDst)
{
REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst,
RegionIntersect(&rgnDst, &rgnDst,
fbGetCompositeClip(pGC));
}
/* Do bit blitting */
numRects = REGION_NUM_RECTS(&rgnDst);
numRects = RegionNumRects(&rgnDst);
if (numRects && widthSrc && heightSrc)
fbCopyRegion (pSrcDrawable, pDstDrawable, pGC,
&rgnDst, dx, dy, copyProc, bitPlane, closure);
......@@ -604,9 +604,9 @@ fbDoCopy (DrawablePtr pSrcDrawable,
xOut - pDstDrawable->x,
yOut - pDstDrawable->y,
(unsigned long) bitPlane);
REGION_UNINIT(pGC->pScreen, &rgnDst);
RegionUninit(&rgnDst);
if (freeSrcClip)
REGION_DESTROY(pGC->pScreen, prgnSrcClip);
RegionDestroy(prgnSrcClip);
fbValidateDrawable (pDstDrawable);
return prgnExposed;
}
......
......@@ -184,7 +184,7 @@ fbSolidBoxClipped (DrawablePtr pDrawable,
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
for (nbox = REGION_NUM_RECTS(pClip), pbox = REGION_RECTS(pClip);
for (nbox = RegionNumRects(pClip), pbox = RegionRects(pClip);
nbox--;
pbox++)
{
......
......@@ -47,7 +47,7 @@ fbPolyFillRect(DrawablePtr pDrawable,
xorg = pDrawable->x;
yorg = pDrawable->y;
pextent = REGION_EXTENTS(pGC->pScreen, pClip);
pextent = RegionExtents(pClip);
extentX1 = pextent->x1;
extentY1 = pextent->y1;
extentX2 = pextent->x2;
......@@ -74,7 +74,7 @@ fbPolyFillRect(DrawablePtr pDrawable,
if ((fullX1 >= fullX2) || (fullY1 >= fullY2))
continue;
n = REGION_NUM_RECTS (pClip);
n = RegionNumRects (pClip);
if (n == 1)
{
fbFill (pDrawable,
......@@ -83,7 +83,7 @@ fbPolyFillRect(DrawablePtr pDrawable,
}
else
{
pbox = REGION_RECTS(pClip);
pbox = RegionRects(pClip);
/*
* clip the rectangle to each box in the clip region
* this is logically equivalent to calling Intersect()
......
......@@ -44,7 +44,7 @@ fbFillSpans (DrawablePtr pDrawable,
int fullX1, fullX2, fullY1;
int partX1, partX2;
pextent = REGION_EXTENTS(pGC->pScreen, pClip);
pextent = RegionExtents(pClip);
extentX1 = pextent->x1;
extentY1 = pextent->y1;
extentX2 = pextent->x2;
......@@ -69,7 +69,7 @@ fbFillSpans (DrawablePtr pDrawable,
if (fullX1 >= fullX2)
continue;
nbox = REGION_NUM_RECTS (pClip);
nbox = RegionNumRects (pClip);
if (nbox == 1)
{
fbFill (pDrawable,
......@@ -78,7 +78,7 @@ fbFillSpans (DrawablePtr pDrawable,
}
else
{
pbox = REGION_RECTS(pClip);
pbox = RegionRects(pClip);
while(nbox--)
{
if (pbox->y1 <= fullY1 && fullY1 < pbox->y2)
......
......@@ -211,7 +211,7 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
)
{
miComputeCompositeClip (pGC, pDrawable);
pPriv->oneRect = REGION_NUM_RECTS(fbGetCompositeClip(pGC)) == 1;
pPriv->oneRect = RegionNumRects(fbGetCompositeClip(pGC)) == 1;
}
#ifdef FB_24_32BIT
......
......@@ -41,7 +41,7 @@ fbGlyphIn (RegionPtr pRegion,
int height)
{
BoxRec box;
BoxPtr pExtents = REGION_EXTENTS (dummyScreen, pRegion);
BoxPtr pExtents = RegionExtents(pRegion);
/*
* Check extents by hand to avoid 16 bit overflows
......@@ -58,7 +58,7 @@ fbGlyphIn (RegionPtr pRegion,
box.x2 = x + width;
box.y1 = y;
box.y2 = y + height;
return RECT_IN_REGION (dummyScreen, pRegion, &box) == rgnIN;
return RegionContainsRect(pRegion, &box) == rgnIN;
}
#ifdef FB_24BIT
......
......@@ -140,8 +140,8 @@ fbPutZImage (DrawablePtr pDrawable,
fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
for (nbox = REGION_NUM_RECTS (pClip),
pbox = REGION_RECTS(pClip);
for (nbox = RegionNumRects (pClip),
pbox = RegionRects(pClip);
nbox--;
pbox++)
{
......@@ -228,8 +228,8 @@ fbPutXYImage (DrawablePtr pDrawable,
}
}
for (nbox = REGION_NUM_RECTS (pClip),
pbox = REGION_RECTS(pClip);
for (nbox = RegionNumRects (pClip),
pbox = RegionRects(pClip);
nbox--;
pbox++)
{
......
......@@ -119,7 +119,7 @@ fbPolyLine (DrawablePtr pDrawable,
#ifndef FBNOPIXADDR
if (pGC->fillStyle == FillSolid &&
pGC->lineStyle == LineSolid &&
REGION_NUM_RECTS (fbGetCompositeClip(pGC)) == 1)
RegionNumRects (fbGetCompositeClip(pGC)) == 1)
{
switch (pDrawable->bitsPerPixel) {
case 8: line = fbPolyline8; break;
......@@ -156,7 +156,7 @@ fbPolySegment (DrawablePtr pDrawable,
#ifndef FBNOPIXADDR
if (pGC->fillStyle == FillSolid &&
pGC->lineStyle == LineSolid &&
REGION_NUM_RECTS (fbGetCompositeClip(pGC)) == 1)
RegionNumRects (fbGetCompositeClip(pGC)) == 1)
{
switch (pDrawable->bitsPerPixel) {
case 8: seg = fbPolySegment8; break;
......
......@@ -74,7 +74,7 @@ fbOverlayCreateWindow(WindowPtr pWin)
*/
if (!pWin->parent)
{
REGION_EMPTY (pWin->drawable.pScreen,
RegionEmpty(
&pScrPriv->layer[i].u.run.region);
}
return TRUE;
......@@ -92,7 +92,7 @@ fbOverlayCloseScreen (int iScreen, ScreenPtr pScreen)
for (i = 0; i < pScrPriv->nlayers; i++)
{
(*pScreen->DestroyPixmap)(pScrPriv->layer[i].u.run.pixmap);
REGION_UNINIT (pScreen, &pScrPriv->layer[i].u.run.region);
RegionUninit(&pScrPriv->layer[i].u.run.region);
}
return TRUE;
}
......@@ -146,7 +146,7 @@ fbOverlayCreateScreenResources(ScreenPtr pScreen)
pbits))
return FALSE;
pScrPriv->layer[i].u.run.pixmap = pPixmap;
REGION_INIT(pScreen, &pScrPriv->layer[i].u.run.region, &box, 0);
RegionInit(&pScrPriv->layer[i].u.run.region, &box, 0);
}
pScreen->devPrivate = pScrPriv->layer[0].u.run.pixmap;
return TRUE;
......@@ -174,24 +174,24 @@ fbOverlayUpdateLayerRegion (ScreenPtr pScreen,
int i;
RegionRec rgnNew;
if (!prgn || !REGION_NOTEMPTY(pScreen, prgn))
if (!prgn || !RegionNotEmpty(prgn))
return;
for (i = 0; i < pScrPriv->nlayers; i++)
{
if (i == layer)
{
/* add new piece to this fb */
REGION_UNION (pScreen,
RegionUnion(
&pScrPriv->layer[i].u.run.region,
&pScrPriv->layer[i].u.run.region,
prgn);
}
else if (REGION_NOTEMPTY (pScreen,
else if (RegionNotEmpty(
&pScrPriv->layer[i].u.run.region))
{
/* paint new piece with chroma key */
REGION_NULL (pScreen, &rgnNew);
REGION_INTERSECT (pScreen,
RegionNull(&rgnNew);
RegionIntersect(
&rgnNew,
prgn,
&pScrPriv->layer[i].u.run.region);
......@@ -199,9 +199,9 @@ fbOverlayUpdateLayerRegion (ScreenPtr pScreen,
&rgnNew,
pScrPriv->layer[i].key,
i);
REGION_UNINIT(pScreen, &rgnNew);
RegionUninit(&rgnNew);
/* remove piece from other fbs */
REGION_SUBTRACT (pScreen,
RegionSubtract(
&pScrPriv->layer[i].u.run.region,
&pScrPriv->layer[i].u.run.region,
prgn);
......@@ -231,21 +231,21 @@ fbOverlayCopyWindow(WindowPtr pWin,
/*
* Clip to existing bits
*/
REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy);
REGION_NULL (pScreen, &rgnDst);
REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc);
REGION_TRANSLATE(pScreen, &rgnDst, dx, dy);
RegionTranslate(prgnSrc, -dx, -dy);
RegionNull(&rgnDst);
RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc);
RegionTranslate(&rgnDst, dx, dy);
/*
* Compute the portion of each fb affected by this copy
*/
for (i = 0; i < pScrPriv->nlayers; i++)
{
REGION_NULL (pScreen, &layerRgn[i]);
REGION_INTERSECT(pScreen, &layerRgn[i], &rgnDst,
RegionNull(&layerRgn[i]);
RegionIntersect(&layerRgn[i], &rgnDst,
&pScrPriv->layer[i].u.run.region);
if (REGION_NOTEMPTY (pScreen, &layerRgn[i]))
if (RegionNotEmpty(&layerRgn[i]))
{
REGION_TRANSLATE(pScreen, &layerRgn[i], -dx, -dy);
RegionTranslate(&layerRgn[i], -dx, -dy);
pPixmap = pScrPriv->layer[i].u.run.pixmap;
fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable,
0,
......@@ -258,12 +258,12 @@ fbOverlayCopyWindow(WindowPtr pWin,
*/
for (i = 0; i < pScrPriv->nlayers; i++)
{
if (REGION_NOTEMPTY (pScreen, &layerRgn[i]))
if (RegionNotEmpty(&layerRgn[i]))
fbOverlayUpdateLayerRegion (pScreen, i, &layerRgn[i]);
REGION_UNINIT(pScreen, &layerRgn[i]);
RegionUninit(&layerRgn[i]);
}
REGION_UNINIT(pScreen, &rgnDst);
RegionUninit(&rgnDst);
}
void
......
......@@ -1248,8 +1248,8 @@ fbComposite (CARD8 op,
height))
return;
n = REGION_NUM_RECTS (&region);
pbox = REGION_RECTS (&region);
n = RegionNumRects (&region);
pbox = RegionRects (&region);
while (n--)
{
h = pbox->y2 - pbox->y1;
......@@ -1309,7 +1309,7 @@ fbComposite (CARD8 op,
}
pbox++;
}
REGION_UNINIT (pDst->pDrawable->pScreen, &region);
RegionUninit(&region);
}
#endif /* RENDER */
......
......@@ -118,8 +118,8 @@ if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \
{ \
if ((reg)->data->numRects == (reg)->data->size) \
{ \
miRectAlloc(reg, 1); \
fr = REGION_BOXPTR(reg); \
RegionRectAlloc(reg, 1); \
fr = RegionBoxptr(reg); \
r = fr + (reg)->data->numRects; \
} \
r->x1 = (rx1); \
......@@ -156,10 +156,10 @@ fbPixmapToRegion(PixmapPtr pPix)
FbBits *pwLine;
int nWidth;
pReg = REGION_CREATE(pPix->drawable.pScreen, NULL, 1);
pReg = RegionCreate(NULL, 1);
if(!pReg)
return NullRegion;
FirstRect = REGION_BOXPTR(pReg);
FirstRect = RegionBoxptr(pReg);
rects = FirstRect;
pwLine = (FbBits *) pPix->devPrivate.ptr;
......@@ -305,8 +305,8 @@ fbPixmapToRegion(PixmapPtr pPix)
pReg->extents.x1 = pReg->extents.x2 = 0;
else
{
pReg->extents.y1 = REGION_BOXPTR(pReg)->y1;
pReg->extents.y2 = REGION_END(pReg)->y2;
pReg->extents.y1 = RegionBoxptr(pReg)->y1;
pReg->extents.y2 = RegionEnd(pReg)->y2;
if (pReg->data->numRects == 1)
{
xfree(pReg->data);
......@@ -314,7 +314,7 @@ fbPixmapToRegion(PixmapPtr pPix)
}
}
#ifdef DEBUG
if (!miValidRegion(pReg))
if (!RegionIsValid(pReg))
FatalError("Assertion failed file %s, line %d: expr\n", __FILE__, __LINE__);
#endif
return(pReg);
......
......@@ -157,7 +157,7 @@ fbPolyPoint (DrawablePtr pDrawable,
case 32: dots = fbDots32; break;
}
#endif
for (nBox = REGION_NUM_RECTS (pClip), pBox = REGION_RECTS (pClip);
for (nBox = RegionNumRects (pClip), pBox = RegionRects (pClip);
nBox--; pBox++)
(*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit,
pDrawable->x, pDrawable->y, dstXoff, dstYoff, and, xor);
......
......@@ -192,8 +192,8 @@ fbPushImage (DrawablePtr pDrawable,
BoxPtr pbox;
int x1, y1, x2, y2;
for (nbox = REGION_NUM_RECTS (pClip),
pbox = REGION_RECTS(pClip);
for (nbox = RegionNumRects (pClip),
pbox = RegionRects(pClip);
nbox--;
pbox++)
{
......
......@@ -615,8 +615,8 @@ fbSegment (DrawablePtr pDrawable,
unsigned int oc1; /* outcode of point 1 */
unsigned int oc2; /* outcode of point 2 */
nBox = REGION_NUM_RECTS (pClip);
pBox = REGION_RECTS (pClip);
nBox = RegionNumRects (pClip);
pBox = RegionRects (pClip);
bres = fbSelectBres (pDrawable, pGC);
......
......@@ -63,8 +63,8 @@ fbSetSpans (DrawablePtr pDrawable,
xoff = (int) (((long) src) & (FB_MASK >> 3));
s = (FbBits *) (src - xoff);
xoff <<= 3;
n = REGION_NUM_RECTS(pClip);
pbox = REGION_RECTS (pClip);
n = RegionNumRects(pClip);
pbox = RegionRects (pClip);
while (n--)
{
if (pbox->y1 > ppt->y)
......
......@@ -132,15 +132,15 @@ fbCopyWindow(WindowPtr pWin,
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy);
RegionTranslate(prgnSrc, -dx, -dy);
REGION_NULL (pWin->drawable.pScreen, &rgnDst);
RegionNull(&rgnDst);
REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc);
RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc);
#ifdef COMPOSITE
if (pPixmap->screen_x || pPixmap->screen_y)
REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst,
RegionTranslate(&rgnDst,
-pPixmap->screen_x, -pPixmap->screen_y);
#endif
......@@ -148,7 +148,7 @@ fbCopyWindow(WindowPtr pWin,
0,
&rgnDst, dx, dy, fbCopyWindowProc, 0, 0);
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
RegionUninit(&rgnDst);
fbValidateDrawable (&pWin->drawable);
}
......@@ -215,8 +215,8 @@ fbFillRegionSolid (DrawablePtr pDrawable,
FbStride dstStride;
int dstBpp;
int dstXoff, dstYoff;
int n = REGION_NUM_RECTS(pRegion);
BoxPtr pbox = REGION_RECTS(pRegion);
int n = RegionNumRects(pRegion);
BoxPtr pbox = RegionRects(pRegion);
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
......@@ -253,8 +253,8 @@ fbFillRegionTiled (DrawablePtr pDrawable,
int tileBpp;
int tileXoff, tileYoff; /* XXX assumed to be zero */
int tileWidth, tileHeight;
int n = REGION_NUM_RECTS(pRegion);
BoxPtr pbox = REGION_RECTS(pRegion);
int n = RegionNumRects(pRegion);
BoxPtr pbox = RegionRects(pRegion);
int xRot = pDrawable->x;
int yRot = pDrawable->y;
......
#!/bin/sh
sed -i \
-e 's/miRegionCreate\b/RegionCreate/g' \
-e 's/miRegionInit\b/RegionInit/g' \
-e 's/miRegionDestroy\b/RegionDestroy/g' \
-e 's/miRegionUninit\b/RegionUninit/g' \
-e 's/miRegionCopy\b/RegionCopy/g' \
-e 's/miIntersect\b/RegionIntersect/g' \
-e 's/miUnion\b/RegionUnion/g' \
-e 's/miRegionAppend\b/RegionAppend/g' \
-e 's/miRegionValidate\b/RegionValidate/g' \
-e 's/miRectsToRegion\b/RegionFromRects/g' \
-e 's/miSubtract\b/RegionSubtract/g' \
-e 's/miInverse\b/RegionInverse/g' \
-e 's/miRectIn\b/RegionContainsRect/g' \
-e 's/miTranslateRegion\b/RegionTranslate/g' \
-e 's/miRegionReset\b/RegionReset/g' \
-e 's/miRegionBreak\b/RegionBreak/g' \
-e 's/miPointInRegion\b/RegionContainsPoint/g' \
-e 's/miRegionEqual\b/RegionEqual/g' \
-e 's/miRegionNotEmpty\b/RegionNotEmpty/g' \
-e 's/miRegionEmpty\b/RegionEmpty/g' \
-e 's/miRegionExtents\b/RegionExtents/g' \
-e 's/miPrintRegion\b/RegionPrint/g' \
-e 's/miRectAlloc\b/RegionRectAlloc/g' \
-e 's/miValidRegion\b/RegionIsValid/g' \
-e 's/miRegionBroken\b/RegionBroken/g' \
-e 's/miClipSpans\b/RegionClipSpans/g' \
"$@"
#!/bin/sh
sed -i \
-e 's/miEmptyBox\b/RegionEmptyBox/g' \
-e 's/miEmptyData\b/RegionEmptyData/g' \
-e 's/miBrokenData\b/RegionBrokenData/g' \
-e 's/miBrokenRegion\b/RegionBrokenRegion/g' \
-e 's/miCoalesce\b/RegionCoalesce/g' \
-e 's/miAppendNonO\b/RegionAppendNonO/g' \
-e 's/miRegionOp\b/RegionOp/g' \
-e 's/miSetExtents\b/RegionSetExtents/g' \
-e 's/miIntersectO\b/RegionIntersectO/g' \
-e 's/miUnionO\b/RegionUnionO/g' \
-e 's/miSubtractO\b/RegionSubtractO/g' \
"$@"
#!/bin/sh
sed -i \
-e 's/REGION_NIL\b/RegionNil/g' \
-e 's/REGION_NAR\b/RegionNar/g' \
-e 's/REGION_NUM_RECTS\b/RegionNumRects/g' \
-e 's/REGION_SIZE\b/RegionSize/g' \
-e 's/REGION_RECTS\b/RegionRects/g' \
-e 's/REGION_BOXPTR\b/RegionBoxptr/g' \
-e 's/REGION_BOX\b/RegionBox/g' \
-e 's/REGION_TOP\b/RegionTop/g' \
-e 's/REGION_END\b/RegionEnd/g' \
-e 's/REGION_SZOF\b/RegionSizeof/g' \
-e 's/REGION_CREATE *([^,]*, */RegionCreate(/g' \
-e 's/REGION_COPY *([^,]*, */RegionCopy(/g' \
-e 's/REGION_DESTROY *([^,]*, */RegionDestroy(/g' \
-e 's/REGION_INTERSECT *([^,]*, */RegionIntersect(/g' \
-e 's/REGION_UNION *([^,]*, */RegionUnion(/g' \
-e 's/REGION_SUBTRACT *([^,]*, */RegionSubtract(/g' \
-e 's/REGION_INVERSE *([^,]*, */RegionInverse(/g' \
-e 's/REGION_TRANSLATE *([^,]*, */RegionTranslate(/g' \
-e 's/RECT_IN_REGION *([^,]*, */RegionContainsRect(/g' \
-e 's/POINT_IN_REGION *([^,]*, */RegionContainsPoint(/g' \
-e 's/REGION_EQUAL *([^,]*, */RegionEqual(/g' \
-e 's/REGION_APPEND *([^,]*, */RegionAppend(/g' \
-e 's/REGION_VALIDATE *([^,]*, */RegionValidate(/g' \
-e 's/BITMAP_TO_REGION\b/BitmapToRegion/g' \
-e 's/RECTS_TO_REGION *([^,]*, */RegionFromRects(/g' \
-e 's/REGION_BREAK *([^,]*, */RegionBreak(/g' \
-e 's/REGION_INIT *([^,]*, */RegionInit(/g' \
-e 's/REGION_UNINIT *([^,]*, */RegionUninit(/g' \
-e 's/REGION_RESET *([^,]*, */RegionReset(/g' \
-e 's/REGION_NOTEMPTY *([^,]*, */RegionNotEmpty(/g' \
-e 's/REGION_BROKEN *([^,]*, */RegionBroken(/g' \
-e 's/REGION_EMPTY *([^,]*, */RegionEmpty(/g' \
-e 's/REGION_EXTENTS *([^,]*, */RegionExtents(/g' \
-e 's/REGION_NUM_RECTS *([^,]*, */RegionNumRects(/g' \
-e 's/REGION_RECTS *([^,]*, */RegionRects(/g' \
-e 's/REGION_NULL *([^,]*, */RegionNull(/g' \
-e 's/REGION_NULL$/RegionNull/g' \
"$@"
......@@ -269,7 +269,9 @@ void nxagentClearSelection(XEvent *X)
void nxagentRequestSelection(XEvent *X)
{
#ifdef DEBUG
int result;
#endif
int i = 0;
XSelectionEvent eventSelection;
......@@ -311,7 +313,7 @@ FIXME: Do we need this?
if (X->xselectionrequest.target == serverTARGETS)
{
Atom xa_STRING = XA_STRING;
result = XChangeProperty (nxagentDisplay,
XChangeProperty (nxagentDisplay,
X->xselectionrequest.requestor,
X->xselectionrequest.property,
XInternAtom(nxagentDisplay, "ATOM", 0),
......@@ -329,7 +331,7 @@ FIXME: Do we need this?
if (i < NumCurrentSelections)
{
result = XChangeProperty(nxagentDisplay,
XChangeProperty(nxagentDisplay,
X->xselectionrequest.requestor,
X->xselectionrequest.property,
X->xselectionrequest.target,
......@@ -349,7 +351,10 @@ FIXME: Do we need this?
eventSelection.target = X->xselectionrequest.target;
eventSelection.time = X->xselectionrequest.time;
result = XSendEvent(nxagentDisplay,
#ifdef DEBUG
result =
#endif
XSendEvent(nxagentDisplay,
eventSelection.requestor,
False,
0L,
......@@ -463,7 +468,10 @@ FIXME: Do we need this?
eventSelection.property = None;
eventSelection.time = X->xselectionrequest.time;
result = XSendEvent(nxagentDisplay,
#ifdef DEBUG
result =
#endif
XSendEvent(nxagentDisplay,
eventSelection.requestor,
False,
0L,
......
......@@ -572,10 +572,8 @@ static void nxagentReconnectColormap(void * p0, XID x1, void * p2)
Bool nxagentReconnectAllColormap(void *p0)
{
int flexibility;
int cid;
Bool success = True;
flexibility = *(int*)p0;
#if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_COLORMAP_DEBUG)
fprintf(stderr, "nxagentReconnectAllColormap\n");
......
......@@ -62,7 +62,11 @@ is" without express or implied warranty.
#include "Init.h"
#include "Args.h"
#include "Image.h"
#define Pixmap XlibPixmap
#include "Icons.h"
#undef Pixmap
#include "Render.h"
#include "Font.h"
#include "Reconnect.h"
......@@ -1934,7 +1938,7 @@ Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask)
XlibPixmap IconPixmap;
XlibPixmap IconShape;
char* agent_icon_name;
char* agentIconData;
char** agentIconData;
/*
* selecting x2go icon when running as X2Go agent
......@@ -2446,7 +2450,6 @@ Bool nxagentReconnectDisplay(void *p0)
{
int i;
int flexibility = *(int*)p0;
int packMethod, packQuality;
#if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_DISPLAY_DEBUG)
fprintf(stderr, "nxagentReconnectDisplay\n");
......@@ -2464,9 +2467,6 @@ Bool nxagentReconnectDisplay(void *p0)
* Reset the values to their defaults.
*/
packMethod = nxagentPackMethod;
packQuality = nxagentPackQuality;
nxagentPackMethod = -1;
nxagentPackQuality = -1;
nxagentSplitThreshold = -1;
......
......@@ -107,7 +107,7 @@ enum SynchronizationPredicate
nxagentWindowCorruptedRegion((WindowPtr) pDrawable))
#define nxagentDrawableStatus(pDrawable) \
(REGION_NIL(nxagentCorruptedRegion(pDrawable)) ? \
(RegionNil(nxagentCorruptedRegion(pDrawable)) ? \
Synchronized : NotSynchronized)
#define nxagentDrawableContainGlyphs(pDrawable) \
......@@ -155,7 +155,7 @@ extern RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, in
int width, int height);
#define nxagentFreeRegion(pDrawable, pRegion) \
REGION_DESTROY((pDrawable) -> pScreen, pRegion);
RegionDestroy(pRegion);
extern void nxagentMarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion);
extern void nxagentUnmarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion);
......@@ -204,8 +204,8 @@ do \
break; \
} \
\
numRects = REGION_NUM_RECTS(pRegion); \
pBox = REGION_RECTS(pRegion); \
numRects = RegionNumRects(pRegion); \
pBox = RegionRects(pRegion); \
\
fprintf(stderr, "printRegionBoxes:: Region " strRegion " at [%p] has [%d] boxes:\n", \
(void *) (pRegion), numRects); \
......
......@@ -156,7 +156,6 @@ int nxagentRandRGetInfo(ScreenPtr pScreen, Rotation *pRotations)
static int nxagentRandRInitSizes(ScreenPtr pScreen)
{
RRScreenSizePtr pSize;
rrScrPrivPtr pRandRScrPriv = rrGetScrPriv(pScreen);
int width;
int height;
......@@ -260,7 +259,6 @@ int nxagentRandRSetConfig(ScreenPtr pScreen, Rotation rotation,
int rate, RRScreenSizePtr pSize)
{
int r;
rrScrPrivPtr pRandRScrPriv;
UpdateCurrentTime();
......@@ -319,7 +317,6 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
CARD32 mmWidth, CARD32 mmHeight)
{
int result;
rrScrPrivPtr pRandRScrPriv;
UpdateCurrentTime();
......
......@@ -633,11 +633,11 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
case CT_YXSORTED:
case CT_YXBANDED:
{
RegionPtr pReg = RECTS_TO_REGION(pGC->pScreen, nRects, (xRectangle *)pValue, type);
RegionPtr pReg = RegionFromRects(nRects, (xRectangle *)pValue, type);
clipsMatch = nxagentCompareRegions(pGC -> clientClip, pReg);
REGION_DESTROY(pGC->pScreen, pReg);
RegionDestroy(pReg);
break;
}
......@@ -671,10 +671,10 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
{
if (clipsMatch == 0 && nxagentGCTrap == 0)
{
nRects = REGION_NUM_RECTS((RegionPtr)pValue);
nRects = RegionNumRects((RegionPtr)pValue);
size = nRects * sizeof(*pRects);
pRects = (XRectangle *) xalloc(size);
pBox = REGION_RECTS((RegionPtr)pValue);
pBox = RegionRects((RegionPtr)pValue);
for (i = nRects; i-- > 0;)
{
......@@ -768,7 +768,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
* CT_REGION client clips.
*/
pGC->clientClip = (void *) RECTS_TO_REGION(pGC->pScreen, nRects,
pGC->clientClip = (void *) RegionFromRects(nRects,
(xRectangle *)pValue, type);
xfree(pValue);
......@@ -820,7 +820,7 @@ void nxagentDestroyClipHelper(GCPtr pGC)
case CT_NONE:
break;
case CT_REGION:
REGION_DESTROY(pGC->pScreen, pGC->clientClip);
RegionDestroy(pGC->clientClip);
break;
case CT_PIXMAP:
nxagentDestroyPixmap((PixmapPtr)pGC->clientClip);
......@@ -848,8 +848,8 @@ void nxagentCopyClip(GCPtr pGCDst, GCPtr pGCSrc)
case CT_REGION:
if (nxagentGCPriv(pGCSrc)->pPixmap == NULL)
{
pRgn = REGION_CREATE(pGCDst->pScreen, NULL, 1);
REGION_COPY(pGCDst->pScreen, pRgn, pGCSrc->clientClip);
pRgn = RegionCreate(NULL, 1);
RegionCopy(pRgn, pGCSrc->clientClip);
nxagentChangeClip(pGCDst, CT_REGION, pRgn, 0);
}
else
......@@ -1151,12 +1151,9 @@ static void nxagentReconnectGC(void *param0, XID param1, void * param2)
Bool nxagentReconnectAllGCs(void *p0)
{
int flexibility;
int cid;
Bool GCSuccess = True;
flexibility = *(int*)p0;
#ifdef DEBUG
fprintf(stderr, "nxagentReconnectAllGCs\n");
#endif
......@@ -1281,10 +1278,10 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects)
case CT_REGION:
if (nxagentGCPriv(pGC)->pPixmap == NULL)
{
nRects = REGION_NUM_RECTS((RegionPtr)pValue);
nRects = RegionNumRects((RegionPtr)pValue);
size = nRects * sizeof(*pRects);
pRects = (XRectangle *) xalloc(size);
pBox = REGION_RECTS((RegionPtr)pValue);
pBox = RegionRects((RegionPtr)pValue);
for (i = nRects; i-- > 0;) {
pRects[i].x = pBox[i].x1;
pRects[i].y = pBox[i].y1;
......@@ -1370,7 +1367,7 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects)
* CT_PIXMAP and CT_REGION client clips.
*/
pGC->clientClip = (void *) RECTS_TO_REGION(pGC->pScreen, nRects,
pGC->clientClip = (void *) RegionFromRects(nRects,
(xRectangle *)pValue, type);
xfree(pValue);
pValue = pGC->clientClip;
......@@ -1403,26 +1400,26 @@ static int nxagentCompareRegions(RegionPtr r1, RegionPtr r2)
return 0;
}
if (REGION_NUM_RECTS(r1) != REGION_NUM_RECTS(r2))
if (RegionNumRects(r1) != RegionNumRects(r2))
{
return 0;
}
else if (REGION_NUM_RECTS(r1) == 0)
else if (RegionNumRects(r1) == 0)
{
return 1;
}
else if ((*REGION_EXTENTS(pScreen, r1)).x1 != (*REGION_EXTENTS(pScreen, r2)).x1) return 0;
else if ((*REGION_EXTENTS(pScreen, r1)).x2 != (*REGION_EXTENTS(pScreen, r2)).x2) return 0;
else if ((*REGION_EXTENTS(pScreen, r1)).y1 != (*REGION_EXTENTS(pScreen, r2)).y1) return 0;
else if ((*REGION_EXTENTS(pScreen, r1)).y2 != (*REGION_EXTENTS(pScreen, r2)).y2) return 0;
else if ((*RegionExtents(r1)).x1 != (*RegionExtents(r2)).x1) return 0;
else if ((*RegionExtents(r1)).x2 != (*RegionExtents(r2)).x2) return 0;
else if ((*RegionExtents(r1)).y1 != (*RegionExtents(r2)).y1) return 0;
else if ((*RegionExtents(r1)).y2 != (*RegionExtents(r2)).y2) return 0;
else
{
for (i = 0; i < REGION_NUM_RECTS(r1); i++)
for (i = 0; i < RegionNumRects(r1); i++)
{
if (REGION_RECTS(r1)[i].x1 != REGION_RECTS(r2)[i].x1) return 0;
else if (REGION_RECTS(r1)[i].x2 != REGION_RECTS(r2)[i].x2) return 0;
else if (REGION_RECTS(r1)[i].y1 != REGION_RECTS(r2)[i].y1) return 0;
else if (REGION_RECTS(r1)[i].y2 != REGION_RECTS(r2)[i].y2) return 0;
if (RegionRects(r1)[i].x1 != RegionRects(r2)[i].x1) return 0;
else if (RegionRects(r1)[i].x2 != RegionRects(r2)[i].x2) return 0;
else if (RegionRects(r1)[i].y1 != RegionRects(r2)[i].y1) return 0;
else if (RegionRects(r1)[i].y2 != RegionRects(r2)[i].y2) return 0;
}
}
......
......@@ -306,12 +306,12 @@ FIXME: The popup could be synchronized with one
pSrcRegion -> extents.x2, pSrcRegion -> extents.y2);
#endif
REGION_INIT(pSrcDrawable -> pScreen, &corruptedRegion, NullBox, 1);
RegionInit(&corruptedRegion, NullBox, 1);
REGION_INTERSECT(pSrcDrawable -> pScreen, &corruptedRegion,
RegionIntersect(&corruptedRegion,
pSrcRegion, nxagentCorruptedRegion(pSrcDrawable));
if (REGION_NIL(&corruptedRegion) == 0)
if (RegionNil(&corruptedRegion) == 0)
{
#ifdef TEST
fprintf(stderr, "nxagentDeferCopyArea: Forcing the synchronization of source drawable at [%p].\n",
......@@ -321,7 +321,7 @@ FIXME: The popup could be synchronized with one
nxagentSynchronizeRegion(pSrcDrawable, &corruptedRegion, EVENT_BREAK, NULL);
}
REGION_UNINIT(pSrcDrawable -> pScreen, &corruptedRegion);
RegionUninit(&corruptedRegion);
nxagentFreeRegion(pSrcDrawable, pSrcRegion);
......@@ -361,7 +361,7 @@ FIXME: The popup could be synchronized with one
pClipRegion -> extents.x2, pClipRegion -> extents.y2);
#endif
REGION_SUBTRACT(pSrcDrawable -> pScreen, pClipRegion, pClipRegion, nxagentCorruptedRegion(pSrcDrawable));
RegionSubtract(pClipRegion, pClipRegion, nxagentCorruptedRegion(pSrcDrawable));
#ifdef DEBUG
fprintf(stderr, "nxagentDeferCopyArea: Usable copy area source region is [%d,%d,%d,%d].\n",
......@@ -381,11 +381,11 @@ FIXME: The popup could be synchronized with one
#endif
REGION_TRANSLATE(pSrcDrawable -> pScreen, pClipRegion, dstx - srcx, dsty - srcy);
RegionTranslate(pClipRegion, dstx - srcx, dsty - srcy);
}
else
{
REGION_INIT(pDstDrawable -> pScreen, &tmpRegion, NullBox, 1);
RegionInit(&tmpRegion, NullBox, 1);
#ifdef DEBUG
fprintf(stderr, "nxagentDeferCopyArea: Going to modify the original GC [%p] with clip mask "
......@@ -396,18 +396,18 @@ FIXME: The popup could be synchronized with one
pGC -> clipOrg.x, pGC -> clipOrg.y);
#endif
REGION_COPY(pDstDrawable -> pScreen, &tmpRegion, (RegionPtr) pGC -> clientClip);
RegionCopy(&tmpRegion, (RegionPtr) pGC -> clientClip);
if (pGC -> clipOrg.x != 0 || pGC -> clipOrg.y != 0)
{
REGION_TRANSLATE(pDstDrawable -> pScreen, &tmpRegion, pGC -> clipOrg.x, pGC -> clipOrg.y);
RegionTranslate(&tmpRegion, pGC -> clipOrg.x, pGC -> clipOrg.y);
}
REGION_TRANSLATE(pSrcDrawable -> pScreen, pClipRegion, dstx - srcx, dsty - srcy);
RegionTranslate(pClipRegion, dstx - srcx, dsty - srcy);
REGION_INTERSECT(pSrcDrawable -> pScreen, pClipRegion, &tmpRegion, pClipRegion);
RegionIntersect(pClipRegion, &tmpRegion, pClipRegion);
REGION_UNINIT(pSrcDrawable -> pScreen, &tmpRegion);
RegionUninit(&tmpRegion);
}
/*
......@@ -416,18 +416,18 @@ FIXME: The popup could be synchronized with one
* destination that we are not going to copy.
*/
REGION_SUBTRACT(pSrcDrawable -> pScreen, pCorruptedRegion, pCorruptedRegion, pClipRegion);
RegionSubtract(pCorruptedRegion, pCorruptedRegion, pClipRegion);
#ifdef DEBUG
fprintf(stderr, "nxagentDeferCopyArea: Recomputed clip region is [%d,%d,%d,%d][%ld].\n",
pClipRegion -> extents.x1, pClipRegion -> extents.y1,
pClipRegion -> extents.x2, pClipRegion -> extents.y2,
REGION_NUM_RECTS(pClipRegion));
RegionNumRects(pClipRegion));
fprintf(stderr, "nxagentDeferCopyArea: Inherited corrupted region is [%d,%d,%d,%d][%ld].\n",
pCorruptedRegion -> extents.x1, pCorruptedRegion -> extents.y1,
pCorruptedRegion -> extents.x2, pCorruptedRegion -> extents.y2,
REGION_NUM_RECTS(pCorruptedRegion));
RegionNumRects(pCorruptedRegion));
#endif
/*
......@@ -435,17 +435,17 @@ FIXME: The popup could be synchronized with one
* synchronized and the corrupted region.
*/
if (REGION_NIL(pClipRegion) == 0)
if (RegionNil(pClipRegion) == 0)
{
nxagentUnmarkCorruptedRegion(pDstDrawable, pClipRegion);
}
if (REGION_NIL(pCorruptedRegion) == 0)
if (RegionNil(pCorruptedRegion) == 0)
{
nxagentMarkCorruptedRegion(pDstDrawable, pCorruptedRegion);
}
if (REGION_NIL(pClipRegion) == 0)
if (RegionNil(pClipRegion) == 0)
{
GCPtr targetGC;
......@@ -468,7 +468,7 @@ FIXME: The popup could be synchronized with one
GCClipXOrigin | GCClipYOrigin | GCClipMask | GCForeground |
GCBackground | GCGraphicsExposures);
if (REGION_NUM_RECTS(pClipRegion) == 1)
if (RegionNumRects(pClipRegion) == 1)
{
/*
* If the region to copy is formed by one
......@@ -563,12 +563,12 @@ FIXME: The popup could be synchronized with one
pSrcRegion -> extents.x2, pSrcRegion -> extents.y2);
#endif
REGION_INIT(pSrcDrawable -> pScreen, &corruptedRegion, NullBox, 1);
RegionInit(&corruptedRegion, NullBox, 1);
REGION_INTERSECT(pSrcDrawable -> pScreen, &corruptedRegion,
RegionIntersect(&corruptedRegion,
pSrcRegion, nxagentCorruptedRegion(pSrcDrawable));
if (REGION_NIL(&corruptedRegion) == 0)
if (RegionNil(&corruptedRegion) == 0)
{
#ifdef TEST
fprintf(stderr, "nxagentDeferCopyArea: Forcing the synchronization of source drawable at [%p].\n",
......@@ -578,7 +578,7 @@ FIXME: The popup could be synchronized with one
nxagentSynchronizeRegion(pSrcDrawable, &corruptedRegion /*pSrcRegion*/, NEVER_BREAK, NULL);
}
REGION_UNINIT(pSrcDrawable -> pScreen, &corruptedRegion);
RegionUninit(&corruptedRegion);
nxagentFreeRegion(pSrcDrawable, pSrcRegion);
}
......@@ -594,8 +594,6 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
unsigned int format;
unsigned long planeMask = 0xffffffff;
int oldDstxyValue;
RegionPtr pDstRegion;
int skip = 0;
......@@ -651,8 +649,6 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
}
}
oldDstxyValue = dsty;
if (dsty + pDstDrawable->y + height > 32767)
{
#ifdef WARNING
......@@ -1032,12 +1028,12 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
{
pSrcRegion = nxagentCreateRegion(pSrcDrawable, NULL, srcx, srcy, width, height);
REGION_INIT(pSrcDrawable -> pScreen, &corruptedRegion, NullBox, 1);
RegionInit(&corruptedRegion, NullBox, 1);
REGION_INTERSECT(pSrcDrawable -> pScreen, &corruptedRegion,
RegionIntersect(&corruptedRegion,
pSrcRegion, nxagentCorruptedRegion(pSrcDrawable));
if (REGION_NIL(&corruptedRegion) == 0)
if (RegionNil(&corruptedRegion) == 0)
{
#ifdef TEST
fprintf(stderr, "nxagentCopyPlane: Forcing the synchronization of source drawable at [%p].\n",
......@@ -1053,7 +1049,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
nxagentFreeRegion(pDstDrawable, pDstRegion);
}
REGION_UNINIT(pSrcDrawable -> pScreen, &corruptedRegion);
RegionUninit(&corruptedRegion);
nxagentFreeRegion(pSrcDrawable, pSrcRegion);
}
......@@ -1615,24 +1611,24 @@ void nxagentPolyFillRect(DrawablePtr pDrawable, GCPtr pGC,
if (inheritCorruptedRegion == 1 || nxagentDrawableStatus(pDrawable) == NotSynchronized)
{
rectRegion = RECTS_TO_REGION(pDrawable -> pScreen, nRectangles, pRectangles, CT_REGION);
rectRegion = RegionFromRects(nRectangles, pRectangles, CT_REGION);
if (pGC -> clientClip != NULL)
{
RegionRec tmpRegion;
REGION_INIT(pDrawable -> pScreen, &tmpRegion, NullBox, 1);
RegionInit(&tmpRegion, NullBox, 1);
REGION_COPY(pDrawable -> pScreen, &tmpRegion, ((RegionPtr) pGC -> clientClip));
RegionCopy(&tmpRegion, ((RegionPtr) pGC -> clientClip));
if (pGC -> clipOrg.x != 0 || pGC -> clipOrg.y != 0)
{
REGION_TRANSLATE(pDrawable -> pScreen, &tmpRegion, pGC -> clipOrg.x, pGC -> clipOrg.y);
RegionTranslate(&tmpRegion, pGC -> clipOrg.x, pGC -> clipOrg.y);
}
REGION_INTERSECT(pDrawable -> pScreen, rectRegion, rectRegion, &tmpRegion);
RegionIntersect(rectRegion, rectRegion, &tmpRegion);
REGION_UNINIT(pDrawable -> pScreen, &tmpRegion);
RegionUninit(&tmpRegion);
}
if (inheritCorruptedRegion == 1)
......@@ -1672,7 +1668,7 @@ void nxagentPolyFillRect(DrawablePtr pDrawable, GCPtr pGC,
}
}
REGION_DESTROY(pDrawable -> pScreen, rectRegion);
RegionDestroy(rectRegion);
}
if ((pDrawable)->type == DRAWABLE_PIXMAP)
......
......@@ -729,7 +729,6 @@ void nxagentShadowBlockHandler(void * data, struct timeval **timeout, void * mas
int changed;
int suspended = 0;
int result;
int width_, height_;
#ifdef BLOCKS
......@@ -796,7 +795,7 @@ void nxagentShadowBlockHandler(void * data, struct timeval **timeout, void * mas
nxagentShadowPoll(nxagentShadowPixmapPtr, nxagentShadowGCPtr, nxagentShadowDepth, nxagentShadowWidth,
nxagentShadowHeight, nxagentShadowBuffer, &changed, &suspended);
result = nxagentShadowSendUpdates(&suspended);
nxagentShadowSendUpdates(&suspended);
if (nxagentBlocking == 0)
{
......
......@@ -23,6 +23,7 @@
#include "scrnintstr.h"
#include "Agent.h"
#define GC XlibGC
#define Pixmap XlibPixmap
#define PIXEL_ALREADY_TYPEDEFED
#endif /* _XSERVER64 */
......
......@@ -566,7 +566,7 @@ void nxagentPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
pRegion = nxagentCreateRegion(pDrawable, pGC, dstX, dstY, dstWidth, dstHeight);
if (REGION_NIL(pRegion) == 1)
if (RegionNil(pRegion) == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentPutImage: WARNING! Prevented operation on fully clipped "
......@@ -1036,7 +1036,7 @@ void nxagentRealizeImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
clipRegion = nxagentCreateRegion(pDrawable, pGC, x, y, w, h);
}
if (clipRegion == NullRegion || REGION_NIL(clipRegion) == 0)
if (clipRegion == NullRegion || RegionNil(clipRegion) == 0)
{
nxagentPutSubImage(pDrawable, pGC, depth, x, y, w, h,
leftPad, format, data, pVisual);
......
......@@ -141,7 +141,8 @@ INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../
-I../../GL/glx -I../../GL/include -I../../../../lib/GL/include -I../../Xext \
-I$(EXTINCSRC) -I$(XINCLUDESRC) \
$(VFBINCLUDES) \
`pkg-config --cflags-only-I libxml-2.0`
`pkg-config --cflags-only-I libxml-2.0` \
`pkg-config --cflags-only-I pixman-1`
#ifdef SunArchitecture
INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../../nxcompshad \
-I../../../../extras/Mesa/include \
......@@ -153,6 +154,7 @@ INCLUDES = -I. -I../../../../../nxcomp -I../../../../../nxcompext -I../../../../
-I$(EXTINCSRC) -I$(XINCLUDESRC) \
$(VFBINCLUDES) \
`pkg-config --cflags-only-I libxml-2.0`
`pkg-config --cflags-only-I pixman-1`
#else
#ifdef cygwinArchitecture
INCLUDES = -I. -I$(XBUILDINCDIR) \
......@@ -164,6 +166,7 @@ INCLUDES = -I. -I$(XBUILDINCDIR) \
-I$(EXTINCSRC) -I$(XINCLUDESRC) \
$(VFBINCLUDES) \
`pkg-config --cflags-only-I libxml-2.0`
`pkg-config --cflags-only-I pixman-1`
#endif
#endif
......
......@@ -685,7 +685,9 @@ int nxagentKeyboardProc(DeviceIntPtr pDev, int onoff)
int free_model = 0, free_layout = 0;
XkbDescPtr xkb = NULL;
#ifdef TEST
int ret;
#endif
switch (onoff)
{
......@@ -842,7 +844,10 @@ XkbError:
memmove((char *) defaultKeyboardControl.autoRepeats,
(char *) values.auto_repeats, sizeof(values.auto_repeats));
ret = InitKeyboardDeviceStruct((DevicePtr) pDev, &keySyms, modmap,
#ifdef TEST
ret =
#endif
InitKeyboardDeviceStruct((DevicePtr) pDev, &keySyms, modmap,
nxagentBell, nxagentChangeKeyboardControl);
#ifdef TEST
......@@ -1208,11 +1213,9 @@ void nxagentNotifyKeyboardChanges(int oldMinKeycode, int oldMaxKeycode)
if (!noXkbExtension)
{
DeviceIntPtr dev;
XkbDescPtr xkb;
xkbNewKeyboardNotify nkn;
dev = inputInfo.keyboard;
xkb = dev -> key -> xkbInfo -> desc;
memset(&nkn, 0, sizeof(xkbNewKeyboardNotify));
nkn.deviceID = nkn.oldDeviceID = dev -> id;
......
......@@ -168,7 +168,7 @@ static int read_binding_from_xmlnode(xmlNode *node, struct nxagentSpecialKeystro
/* ignore attributes without data (which should never happen anyways) */
if (attr->children->content == NULL)
{
char *aname = (attr->name)?(attr->name):"unknown";
char *aname = (attr->name)?((char *)attr->name):"unknown";
fprintf(stderr, "attribute %s with NULL value", aname);
continue;
}
......
......@@ -154,7 +154,7 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
#endif
/* short circuit for empty regions */
if (!REGION_NOTEMPTY(pScreen, pRegion))
if (!RegionNotEmpty(pRegion))
return;
#ifdef COMPOSITE
......@@ -169,7 +169,7 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
screen_y = ((PixmapPtr) pDrawable)->screen_y - pDrawable->y;
}
if (screen_x || screen_y)
REGION_TRANSLATE (pScreen, pRegion, screen_x, screen_y);
RegionTranslate(pRegion, screen_x, screen_y);
#endif
if (pDrawable->type == DRAWABLE_WINDOW &&
......@@ -177,22 +177,22 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
{
if (subWindowMode == ClipByChildren)
{
REGION_INTERSECT(pScreen, pRegion, pRegion,
RegionIntersect(pRegion, pRegion,
&((WindowPtr)(pDrawable))->clipList);
}
else if (subWindowMode == IncludeInferiors)
{
RegionPtr pTempRegion =
NotClippedByChildren((WindowPtr)(pDrawable));
REGION_INTERSECT(pScreen, pRegion, pRegion, pTempRegion);
REGION_DESTROY(pScreen, pTempRegion);
RegionIntersect(pRegion, pRegion, pTempRegion);
RegionDestroy(pTempRegion);
}
/* If subWindowMode is set to an invalid value, don't perform
* any drawable-based clipping. */
}
REGION_NULL (pScreen, &clippedRec);
RegionNull(&clippedRec);
for (; pDamage; pDamage = pNext)
{
pNext = pDamage->pNext;
......@@ -240,7 +240,7 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
{
pDamageRegion = &clippedRec;
if (pDamage->pDrawable->type == DRAWABLE_WINDOW) {
REGION_INTERSECT (pScreen, pDamageRegion, pRegion,
RegionIntersect(pDamageRegion, pRegion,
&((WindowPtr)(pDamage->pDrawable))->borderClip);
} else {
BoxRec box;
......@@ -248,14 +248,14 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
box.y1 = draw_y;
box.x2 = draw_x + pDamage->pDrawable->width;
box.y2 = draw_y + pDamage->pDrawable->height;
REGION_INIT(pScreen, &pixClip, &box, 1);
REGION_INTERSECT (pScreen, pDamageRegion, pRegion, &pixClip);
REGION_UNINIT(pScreen, &pixClip);
RegionInit(&pixClip, &box, 1);
RegionIntersect(pDamageRegion, pRegion, &pixClip);
RegionUninit(&pixClip);
}
/*
* Short circuit empty results
*/
if (!REGION_NOTEMPTY(pScreen, pDamageRegion))
if (!RegionNotEmpty(pDamageRegion))
continue;
}
......@@ -270,39 +270,39 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
* Move region to target coordinate space
*/
if (draw_x || draw_y)
REGION_TRANSLATE (pScreen, pDamageRegion, -draw_x, -draw_y);
RegionTranslate(pDamageRegion, -draw_x, -draw_y);
switch (pDamage->damageLevel) {
case DamageReportRawRegion:
(*pDamage->damageReport) (pDamage, pDamageRegion, pDamage->closure);
break;
case DamageReportDeltaRegion:
REGION_NULL (pScreen, &tmpRegion);
REGION_SUBTRACT (pScreen, &tmpRegion, pDamageRegion, &pDamage->damage);
if (REGION_NOTEMPTY (pScreen, &tmpRegion))
RegionNull(&tmpRegion);
RegionSubtract(&tmpRegion, pDamageRegion, &pDamage->damage);
if (RegionNotEmpty(&tmpRegion))
{
REGION_UNION(pScreen, &pDamage->damage,
RegionUnion(&pDamage->damage,
&pDamage->damage, pDamageRegion);
(*pDamage->damageReport) (pDamage, &tmpRegion, pDamage->closure);
}
REGION_UNINIT(pScreen, &tmpRegion);
RegionUninit(&tmpRegion);
break;
case DamageReportBoundingBox:
tmpBox = *REGION_EXTENTS (pScreen, &pDamage->damage);
REGION_UNION(pScreen, &pDamage->damage,
tmpBox = *RegionExtents(&pDamage->damage);
RegionUnion(&pDamage->damage,
&pDamage->damage, pDamageRegion);
if (!BOX_SAME (&tmpBox, REGION_EXTENTS (pScreen, &pDamage->damage)))
if (!BOX_SAME (&tmpBox, RegionExtents(&pDamage->damage)))
(*pDamage->damageReport) (pDamage, &pDamage->damage, pDamage->closure);
break;
case DamageReportNonEmpty:
was_empty = !REGION_NOTEMPTY(pScreen, &pDamage->damage);
REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage,
was_empty = !RegionNotEmpty(&pDamage->damage);
RegionUnion(&pDamage->damage, &pDamage->damage,
pDamageRegion);
if (was_empty && REGION_NOTEMPTY(pScreen, &pDamage->damage))
if (was_empty && RegionNotEmpty(&pDamage->damage))
(*pDamage->damageReport) (pDamage, &pDamage->damage, pDamage->closure);
break;
case DamageReportNone:
REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage,
RegionUnion(&pDamage->damage, &pDamage->damage,
pDamageRegion);
break;
}
......@@ -310,14 +310,14 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
* translate original region back
*/
if (pDamageRegion == pRegion && (draw_x || draw_y))
REGION_TRANSLATE (pScreen, pDamageRegion, draw_x, draw_y);
RegionTranslate(pDamageRegion, draw_x, draw_y);
}
#ifdef COMPOSITE
if (screen_x || screen_y)
REGION_TRANSLATE (pScreen, pRegion, -screen_x, -screen_y);
RegionTranslate(pRegion, -screen_x, -screen_y);
#endif
REGION_UNINIT (pScreen, &clippedRec);
RegionUninit(&clippedRec);
}
#if DAMAGE_DEBUG_ENABLE
......@@ -331,13 +331,13 @@ damageDamageBox (DrawablePtr pDrawable, BoxPtr pBox, int subWindowMode)
{
RegionRec region;
REGION_INIT (pDrawable->pScreen, &region, pBox, 1);
RegionInit(&region, pBox, 1);
#if DAMAGE_DEBUG_ENABLE
_damageDamageRegion (pDrawable, &region, TRUE, subWindowMode, where);
#else
damageDamageRegion (pDrawable, &region, TRUE, subWindowMode);
#endif
REGION_UNINIT (pDrawable->pScreen, &region);
RegionUninit(&region);
}
static void damageValidateGC(GCPtr, unsigned long, DrawablePtr);
......@@ -506,7 +506,7 @@ damageDestroyClip(GCPtr pGC)
#define checkGCDamage(d,g) (getDrawableDamage(d) && \
(!g->pCompositeClip ||\
REGION_NOTEMPTY(d->pScreen, \
RegionNotEmpty(\
g->pCompositeClip)))
#ifdef RENDER
......@@ -520,7 +520,7 @@ damageDestroyClip(GCPtr pGC)
}
#define checkPictureDamage(p) (getDrawableDamage(p->pDrawable) && \
REGION_NOTEMPTY(pScreen, p->pCompositeClip))
RegionNotEmpty(p->pCompositeClip))
static void
damageComposite (CARD8 op,
......@@ -1722,9 +1722,9 @@ damageCopyWindow(WindowPtr pWindow,
* The region comes in source relative, but the damage occurs
* at the destination location. Translate back and forth.
*/
REGION_TRANSLATE (pScreen, prgnSrc, dx, dy);
RegionTranslate(prgnSrc, dx, dy);
damageDamageRegion (&pWindow->drawable, prgnSrc, FALSE, -1);
REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy);
RegionTranslate(prgnSrc, -dx, -dy);
}
unwrap (pScrPriv, pScreen, CopyWindow);
(*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc);
......@@ -1927,7 +1927,7 @@ DamageCreate (DamageReportFunc damageReport,
return 0;
pDamage->pNext = 0;
pDamage->pNextWin = 0;
REGION_NULL(pScreen, &pDamage->damage);
RegionNull(&pDamage->damage);
pDamage->damageLevel = damageLevel;
pDamage->isInternal = isInternal;
......@@ -2016,7 +2016,7 @@ DamageDestroy (DamagePtr pDamage)
{
if (pDamage->damageDestroy)
(*pDamage->damageDestroy) (pDamage, pDamage->closure);
REGION_UNINIT (pDamage->pDrawable->pScreen, &pDamage->damage);
RegionUninit(&pDamage->damage);
xfree (pDamage);
}
......@@ -2028,7 +2028,7 @@ DamageSubtract (DamagePtr pDamage,
RegionRec pixmapClip;
DrawablePtr pDrawable = pDamage->pDrawable;
REGION_SUBTRACT (pDrawable->pScreen, &pDamage->damage, &pDamage->damage, pRegion);
RegionSubtract(&pDamage->damage, &pDamage->damage, pRegion);
if (pDrawable)
{
if (pDrawable->type == DRAWABLE_WINDOW)
......@@ -2041,22 +2041,22 @@ DamageSubtract (DamagePtr pDamage,
box.y1 = pDrawable->y;
box.x2 = pDrawable->x + pDrawable->width;
box.y2 = pDrawable->y + pDrawable->height;
REGION_INIT (pDrawable->pScreen, &pixmapClip, &box, 1);
RegionInit(&pixmapClip, &box, 1);
pClip = &pixmapClip;
}
REGION_TRANSLATE (pDrawable->pScreen, &pDamage->damage, pDrawable->x, pDrawable->y);
REGION_INTERSECT (pDrawable->pScreen, &pDamage->damage, &pDamage->damage, pClip);
REGION_TRANSLATE (pDrawable->pScreen, &pDamage->damage, -pDrawable->x, -pDrawable->y);
RegionTranslate(&pDamage->damage, pDrawable->x, pDrawable->y);
RegionIntersect(&pDamage->damage, &pDamage->damage, pClip);
RegionTranslate(&pDamage->damage, -pDrawable->x, -pDrawable->y);
if (pDrawable->type != DRAWABLE_WINDOW)
REGION_UNINIT(pDrawable->pScreen, &pixmapClip);
RegionUninit(&pixmapClip);
}
return REGION_NOTEMPTY (pDrawable->pScreen, &pDamage->damage);
return RegionNotEmpty(&pDamage->damage);
}
void
DamageEmpty (DamagePtr pDamage)
{
REGION_EMPTY (pDamage->pDrawable->pScreen, &pDamage->damage);
RegionEmpty(&pDamage->damage);
}
RegionPtr
......
......@@ -1669,11 +1669,11 @@ ProcTranslateCoords(register ClientPtr client)
* borderSize
*/
&& (!wBoundingShape(pWin) ||
POINT_IN_REGION(pWin->drawable.pScreen,
RegionContainsPoint(
&pWin->borderSize, x, y, &box))
&& (!wInputShape(pWin) ||
POINT_IN_REGION(pWin->drawable.pScreen,
RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box))
......@@ -2291,7 +2291,7 @@ ProcCopyArea(register ClientPtr client)
(*pDst->pScreen->SendGraphicsExpose)
(client, pRgn, stuff->dstDrawable, X_CopyArea, 0);
if (pRgn)
REGION_DESTROY(pDst->pScreen, pRgn);
RegionDestroy(pRgn);
}
return(client->noClientException);
......@@ -2339,7 +2339,7 @@ ProcCopyPlane(register ClientPtr client)
(*pdstDraw->pScreen->SendGraphicsExpose)
(client, pRgn, stuff->dstDrawable, X_CopyPlane, 0);
if (pRgn)
REGION_DESTROY(pdstDraw->pScreen, pRgn);
RegionDestroy(pRgn);
}
return(client->noClientException);
}
......@@ -2777,7 +2777,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw);
if (pVisibleRegion)
{
REGION_TRANSLATE(pDraw->pScreen, pVisibleRegion, -pDraw->x, -pDraw->y);
RegionTranslate(pVisibleRegion, -pDraw->x, -pDraw->y);
}
}
#endif
......@@ -2871,7 +2871,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
}
#ifdef XCSECURITY
if (pVisibleRegion)
REGION_DESTROY(pDraw->pScreen, pVisibleRegion);
RegionDestroy(pVisibleRegion);
#endif
if (!im_return)
DEALLOCATE_LOCAL(pBuf);
......
......@@ -73,7 +73,6 @@ Equipment Corporation.
#include <dix-config.h>
#endif
#include <X11/fonts/fontstruct.h>
#include <nx-X11/X.h>
#include <nx-X11/Xmd.h>
#include <nx-X11/Xproto.h>
......@@ -177,6 +176,8 @@ _NXGetFontPathError:
#define QUERYCHARINFO(pci, pr) *(pr) = (pci)->metrics
extern void register_fpe_functions(void);
extern void * fosNaturalParams;
extern FontPtr defaultFont;
......
......@@ -379,14 +379,14 @@ XineramaSetCursorPosition(
x += panoramiXdataPtr[0].x;
y += panoramiXdataPtr[0].y;
if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
if(!RegionContainsPoint(&XineramaScreenRegions[pScreen->myNum],
x, y, &box))
{
FOR_NSCREENS(i)
{
if(i == pScreen->myNum)
continue;
if(POINT_IN_REGION(pScreen, &XineramaScreenRegions[i], x, y, &box))
if(RegionContainsPoint(&XineramaScreenRegions[i], x, y, &box))
{
pScreen = screenInfo.screens[i];
break;
......@@ -516,7 +516,7 @@ XineramaCheckVirtualMotion(
i = PanoramiXNumScreens - 1;
REGION_COPY(sprite.screen, &sprite.Reg2,
RegionCopy(&sprite.Reg2,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
......@@ -526,16 +526,16 @@ XineramaCheckVirtualMotion(
y = off_y - panoramiXdataPtr[i].y;
if(x || y)
REGION_TRANSLATE(sprite.screen, &sprite.Reg2, x, y);
RegionTranslate(&sprite.Reg2, x, y);
REGION_UNION(sprite.screen, &sprite.Reg2, &sprite.Reg2,
RegionUnion(&sprite.Reg2, &sprite.Reg2,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
}
lims = *REGION_EXTENTS(sprite.screen, &sprite.Reg2);
lims = *RegionExtents(&sprite.Reg2);
if (sprite.hot.x < lims.x1)
#ifdef XEVIE
......@@ -558,7 +558,7 @@ XineramaCheckVirtualMotion(
#endif
sprite.hot.y = lims.y2 - 1;
if (REGION_NUM_RECTS(&sprite.Reg2) > 1)
if (RegionNumRects(&sprite.Reg2) > 1)
ConfineToShape(&sprite.Reg2, &sprite.hot.x, &sprite.hot.y);
if (qe)
......@@ -665,7 +665,7 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents)
i = PanoramiXNumScreens - 1;
REGION_COPY(sprite.screen, &sprite.Reg1,
RegionCopy(&sprite.Reg1,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
......@@ -675,18 +675,18 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents)
y = off_y - panoramiXdataPtr[i].y;
if(x || y)
REGION_TRANSLATE(sprite.screen, &sprite.Reg1, x, y);
RegionTranslate(&sprite.Reg1, x, y);
REGION_UNION(sprite.screen, &sprite.Reg1, &sprite.Reg1,
RegionUnion(&sprite.Reg1, &sprite.Reg1,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
}
sprite.hotLimits = *REGION_EXTENTS(sprite.screen, &sprite.Reg1);
sprite.hotLimits = *RegionExtents(&sprite.Reg1);
if(REGION_NUM_RECTS(&sprite.Reg1) > 1)
if(RegionNumRects(&sprite.Reg1) > 1)
sprite.hotShape = &sprite.Reg1;
else
sprite.hotShape = NullRegion;
......@@ -765,9 +765,9 @@ ConfineToShape(RegionPtr shape, int *px, int *py)
int x = *px, y = *py;
int incx = 1, incy = 1;
if (POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box))
if (RegionContainsPoint(shape, x, y, &box))
return;
box = *REGION_EXTENTS(sprite.hot.pScreen, shape);
box = *RegionExtents(shape);
/* this is rather crude */
do {
x += incx;
......@@ -789,7 +789,7 @@ ConfineToShape(RegionPtr shape, int *px, int *py)
else if (y < box.y1)
return; /* should never get here! */
}
} while (!POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box));
} while (!RegionContainsPoint(shape, x, y, &box));
*px = x;
*py = y;
}
......@@ -877,7 +877,7 @@ CheckVirtualMotion(
#endif
sprite.hot.x = sprite.hot.y = 0;
}
lims = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin->borderSize);
lims = *RegionExtents(&pWin->borderSize);
if (sprite.hot.x < lims.x1)
#ifdef XEVIE
xeviehot.x =
......@@ -931,7 +931,7 @@ ConfineCursorToWindow(WindowPtr pWin, Bool generateEvents, Bool confineToScreen)
}
else
{
sprite.hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize);
sprite.hotLimits = *RegionExtents(&pWin->borderSize);
#ifdef SHAPE
sprite.hotShape = wBoundingShape(pWin) ? &pWin->borderSize
: NullRegion;
......@@ -2117,7 +2117,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
{
BoxRec box;
if(POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderSize, x, y, &box))
if(RegionContainsPoint(&pWin->borderSize, x, y, &box))
return TRUE;
#ifdef PANORAMIX
......@@ -2125,7 +2125,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
int i;
for(i = 1; i < PanoramiXNumScreens; i++) {
if(POINT_IN_REGION(sprite.screen,
if(RegionContainsPoint(
&sprite.windows[i]->borderSize,
x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x,
y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y,
......@@ -2180,7 +2180,7 @@ XYToWindow(int x, int y)
*/
&& (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
&& (!wInputShape(pWin) ||
POINT_IN_REGION(pWin->drawable.pScreen,
RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box))
......@@ -2313,7 +2313,6 @@ WindowsRestructured()
* compute correctly. */
void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
{
ScreenPtr pScreen = win->drawable.pScreen;
GrabPtr grab;
if (noPanoramiXExtension) return;
......@@ -2329,10 +2328,10 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
sprite.hotLimits.x2 -= xoff;
sprite.hotLimits.y2 -= yoff;
if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg1))
REGION_TRANSLATE(sprite.screen, &sprite.Reg1, xoff, yoff);
if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg2))
REGION_TRANSLATE(sprite.screen, &sprite.Reg2, xoff, yoff);
if (RegionNotEmpty(&sprite.Reg1))
RegionTranslate(&sprite.Reg1, xoff, yoff);
if (RegionNotEmpty(&sprite.Reg2))
RegionTranslate(&sprite.Reg2, xoff, yoff);
/* FIXME: if we call ConfineCursorToWindow, must we do anything else? */
if ((grab = inputInfo.pointer->grab) && grab->confineTo) {
......@@ -2388,8 +2387,8 @@ DefineInitialRootWindow(register WindowPtr win)
#endif
sprite.screen = pScreen;
/* gotta UNINIT these someplace */
REGION_NULL(pScreen, &sprite.Reg1);
REGION_NULL(pScreen, &sprite.Reg2);
RegionNull(&sprite.Reg1);
RegionNull(&sprite.Reg2);
}
#endif
......@@ -2461,13 +2460,12 @@ XineramaPointInWindowIsVisible(
int y
)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
BoxRec box;
int i, xoff, yoff;
if (!pWin->realized) return FALSE;
if (POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box))
if (RegionContainsPoint(&pWin->borderClip, x, y, &box))
return TRUE;
if(!XineramaSetWindowPntrs(pWin)) return FALSE;
......@@ -2477,13 +2475,12 @@ XineramaPointInWindowIsVisible(
for(i = 1; i < PanoramiXNumScreens; i++) {
pWin = sprite.windows[i];
pScreen = pWin->drawable.pScreen;
x = xoff - panoramiXdataPtr[i].x;
y = yoff - panoramiXdataPtr[i].y;
if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box)
if(RegionContainsPoint(&pWin->borderClip, x, y, &box)
&& (!wInputShape(pWin) ||
POINT_IN_REGION(pWin->drawable.pScreen,
RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box)))
......@@ -2659,7 +2656,7 @@ ProcWarpPointer(ClientPtr client)
static Bool
BorderSizeNotEmpty(WindowPtr pWin)
{
if(REGION_NOTEMPTY(sprite.hotPhys.pScreen, &pWin->borderSize))
if(RegionNotEmpty(&pWin->borderSize))
return TRUE;
#ifdef PANORAMIX
......@@ -2667,7 +2664,7 @@ BorderSizeNotEmpty(WindowPtr pWin)
int i;
for(i = 1; i < PanoramiXNumScreens; i++) {
if(REGION_NOTEMPTY(sprite.screen, &sprite.windows[i]->borderSize))
if(RegionNotEmpty(&sprite.windows[i]->borderSize))
return TRUE;
}
}
......
......@@ -76,11 +76,7 @@
#endif
#if HAVE_STDINT_H
#include <stdint.h>
#elif !defined(UINT32_MAX)
#define UINT32_MAX 0xffffffffU
#endif
/*
* From Knuth -- a good choice for hash/rehash values is p, p-2 where
......
......@@ -106,7 +106,6 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
PixmapPtr ppix;
long nby;
char *pbits;
ChangeGCVal gcval[3];
unsigned char char2b[2];
/* turn glyph index into a protocol-format char2b */
......@@ -165,7 +164,6 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
fbPolyFillRect((DrawablePtr)ppix, pGC, 1, &rect);
/* draw the glyph */
gcval[0].val = 1;
pGC->fgPixel = 1;
pGC->stateChanges |= GCForeground;
......
......@@ -1537,7 +1537,7 @@ SetPictureClipRects (PicturePtr pPicture,
RegionPtr clientClip;
int result;
clientClip = RECTS_TO_REGION(pScreen,
clientClip = RegionFromRects(
nRect, rects, CT_UNSORTED);
if (!clientClip)
return BadAlloc;
......@@ -1568,14 +1568,14 @@ SetPictureClipRegion (PicturePtr pPicture,
if (pRegion)
{
type = CT_REGION;
clientClip = REGION_CREATE (pScreen,
REGION_EXTENTS(pScreen, pRegion),
REGION_NUM_RECTS(pRegion));
clientClip = RegionCreate(
RegionExtents(pRegion),
RegionNumRects(pRegion));
if (!clientClip)
return BadAlloc;
if (!REGION_COPY (pSCreen, clientClip, pRegion))
if (!RegionCopy(clientClip, pRegion))
{
REGION_DESTROY (pScreen, clientClip);
RegionDestroy(clientClip);
return BadAlloc;
}
}
......@@ -1685,9 +1685,9 @@ CopyPicture (PicturePtr pSrc,
RegionPtr clientClip;
RegionPtr srcClientClip = (RegionPtr)pSrc->clientClip;
clientClip = REGION_CREATE(pSrc->pDrawable->pScreen,
REGION_EXTENTS(pSrc->pDrawable->pScreen, srcClientClip),
REGION_NUM_RECTS(srcClientClip));
clientClip = RegionCreate(
RegionExtents(srcClientClip),
RegionNumRects(srcClientClip));
(*ps->ChangePictureClip)(pDst, CT_REGION, clientClip, 0);
}
break;
......@@ -2144,12 +2144,6 @@ Bool nxagentReconnectAllPictFormat(void *p)
void nxagentReconnectPictFormat(void *p0, XID x1, void *p2)
{
PictFormatPtr pFormat;
Bool *pBool;
pFormat = (PictFormatPtr)p0;
pBool = (Bool*)p2;
#if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_PICTFORMAT_DEBUG)
fprintf(stderr, "nxagentReconnectPictFormat.\n");
#endif
......
......@@ -3033,13 +3033,11 @@ static void swapStops(void *stuff, int num)
{
int i, n;
CARD32 *stops;
CARD16 *colors;
stops = (CARD32 *)(stuff);
for (i = 0; i < num; ++i) {
swapl(stops, n);
++stops;
}
colors = (CARD16 *)(stops);
for (i = 0; i < 4*num; ++i) {
swaps(stops, n);
++stops;
......
......@@ -160,11 +160,11 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
box.x2 = width;
box.y2 = height;
pPixmapPriv -> corruptedRegion = REGION_CREATE(pPixmap -> drawable.pScreen, &box, 1);
pPixmapPriv -> corruptedRegion = RegionCreate(&box, 1);
}
else
{
pPixmapPriv -> corruptedRegion = REGION_CREATE(pPixmap -> drawable.pScreen, (BoxRec *) NULL, 1);
pPixmapPriv -> corruptedRegion = RegionCreate((BoxRec *) NULL, 1);
}
pPixmapPriv -> corruptedBackground = 0;
......@@ -269,7 +269,7 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
pVirtualPriv -> isVirtual = True;
pVirtualPriv -> isShared = nxagentShmPixmapTrap;
pVirtualPriv -> corruptedRegion = REGION_CREATE(pVirtual -> drawable.pScreen, (BoxRec *) NULL, 1);
pVirtualPriv -> corruptedRegion = RegionCreate((BoxRec *) NULL, 1);
pVirtualPriv -> corruptedBackground = 0;
......@@ -444,7 +444,7 @@ Bool nxagentDestroyPixmap(PixmapPtr pPixmap)
if (pPixmapPriv -> corruptedRegion != NullRegion)
{
REGION_DESTROY(pPixmap -> drawable.pScreen, pPixmapPriv -> corruptedRegion);
RegionDestroy(pPixmapPriv -> corruptedRegion);
pPixmapPriv -> corruptedRegion = NullRegion;
}
......@@ -512,7 +512,7 @@ Bool nxagentDestroyVirtualPixmap(PixmapPtr pPixmap)
if (pVirtualPriv -> corruptedRegion != NullRegion)
{
REGION_DESTROY(pVirtual -> drawable.pScreen, pVirtualPriv -> corruptedRegion);
RegionDestroy(pVirtualPriv -> corruptedRegion);
pVirtualPriv -> corruptedRegion = NullRegion;
}
......@@ -752,11 +752,11 @@ void nxagentDisconnectPixmap(void *p0, XID x1, void *p2)
{
PixmapPtr pPixmap = (PixmapPtr) p0;
#ifdef TEST
Bool *pBool;
pBool = (Bool*) p2;
#ifdef TEST
fprintf(stderr, "nxagentDisconnectPixmap: Called with bool [%d] and pixmap at [%p].\n",
*pBool, (void *) pPixmap);
......
......@@ -1240,7 +1240,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
pRegion = nxagentCreateRegion(pDst -> pDrawable, NULL, glyphBox.x1, glyphBox.y1,
glyphBox.x2 - glyphBox.x1, glyphBox.y2 - glyphBox.y1);
if (REGION_NIL(pRegion) == 1)
if (RegionNil(pRegion) == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentGlyphs: WARNING! Glyphs prevented on hidden window at [%p].\n",
......@@ -1602,24 +1602,24 @@ void nxagentCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color,
(op == PictOpSrc ||
(op == PictOpOver && color -> alpha == 0xffff)))
{
rectRegion = RECTS_TO_REGION(pDst -> pDrawable -> pScreen, nRect, rects, CT_REGION);
rectRegion = RegionFromRects(nRect, rects, CT_REGION);
if (pDst -> clientClipType != CT_NONE)
{
RegionRec tmpRegion;
REGION_INIT(pDst -> pDrawable -> pScreen, &tmpRegion, NullBox, 1);
RegionInit(&tmpRegion, NullBox, 1);
REGION_COPY(pDst -> pDrawable -> pScreen, &tmpRegion, (RegionPtr) pDst -> clientClip);
RegionCopy(&tmpRegion, (RegionPtr) pDst -> clientClip);
if (pDst -> clipOrigin.x != 0 || pDst -> clipOrigin.y != 0)
{
REGION_TRANSLATE(pDst -> pDrawable -> pScreen, &tmpRegion, pDst -> clipOrigin.x, pDst -> clipOrigin.y);
RegionTranslate(&tmpRegion, pDst -> clipOrigin.x, pDst -> clipOrigin.y);
}
REGION_INTERSECT(pDst -> pDrawable -> pScreen, rectRegion, rectRegion, &tmpRegion);
RegionIntersect(rectRegion, rectRegion, &tmpRegion);
REGION_UNINIT(pDst -> pDrawable -> pScreen, &tmpRegion);
RegionUninit(&tmpRegion);
}
#ifdef TEST
......@@ -1629,7 +1629,7 @@ void nxagentCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color,
nxagentUnmarkCorruptedRegion(pDst -> pDrawable, rectRegion);
REGION_DESTROY(pDrawable -> pScreen, rectRegion);
RegionDestroy(rectRegion);
}
XRenderFillRectangles(nxagentDisplay,
......@@ -1716,7 +1716,7 @@ FIXME: Is this useful or just a waste of bandwidth?
*/
if (nxagentDrawableStatus(pDst -> pDrawable) == NotSynchronized &&
RECT_IN_REGION(pDst -> pDrawable -> pScreen, nxagentCorruptedRegion(pDst -> pDrawable),
RegionContainsRect(nxagentCorruptedRegion(pDst -> pDrawable),
nxagentTrapezoidExtents) == rgnIN)
{
#ifdef TEST
......
......@@ -772,7 +772,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
{
#ifdef WARNING
fprintf(stderr, "nxagentExportProperty: WARNING! "
"Property [%lu] too long.\n", propertyX);
"Property [%lu] too long.\n", (long unsigned int)propertyX);
#endif
goto nxagentExportPropertyError;
......
......@@ -102,6 +102,8 @@ Bool nxagentResizeScreen(ScreenPtr pScreen, int width, int height,
int nxagentChangeScreenConfig(int screen, int width, int height, int mmWidth, int mmHeight);
int nxagentAdjustRandRXinerama(ScreenPtr pScreen);
extern Bool nxagentReconnectScreen(void *p0);
void nxagentSaveAreas(PixmapPtr pPixmap, RegionPtr prgnSave, int xorg, int yorg, WindowPtr pWin);
......
......@@ -165,7 +165,6 @@ int nxagentShowSplashWindow(Window parentWindow)
void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
{
XPoint rect[4];
XPoint m[12];
int w, h, c, w2, h2;
/*
......
......@@ -502,7 +502,7 @@ void nxagentReleaseSplit(DrawablePtr pDrawable)
(void *) pDrawable);
#endif
REGION_DESTROY(pDrawable -> pScreen, pResource -> region);
RegionDestroy(pResource -> region);
pResource -> region = NullRegion;
}
......@@ -623,11 +623,11 @@ void nxagentValidateSplit(DrawablePtr pDrawable, RegionPtr pRegion)
* streamed.
*/
REGION_INIT(pDrawable -> pScreen, &tmpRegion, NullBox, 1);
RegionInit(&tmpRegion, NullBox, 1);
REGION_INTERSECT(pDrawable -> pScreen, &tmpRegion, pResource -> region, pRegion);
RegionIntersect(&tmpRegion, pResource -> region, pRegion);
if (REGION_NIL(&tmpRegion) == 0)
if (RegionNil(&tmpRegion) == 0)
{
#ifdef TEST
fprintf(stderr, "nxagentValidateSplit: Marking the overlapping commits as invalid "
......@@ -644,7 +644,7 @@ void nxagentValidateSplit(DrawablePtr pDrawable, RegionPtr pRegion)
}
#endif
REGION_UNINIT(pDrawable -> pScreen, &tmpRegion);
RegionUninit(&tmpRegion);
}
}
......@@ -1097,9 +1097,9 @@ void nxagentHandleEndSplitEvent(int resource)
if (pResource -> drawable != NULL &&
pResource -> region != NullRegion)
{
if (REGION_NIL(pResource -> region) == 0)
if (RegionNil(pResource -> region) == 0)
{
REGION_SUBTRACT(pResource -> drawable -> pScreen,
RegionSubtract(
nxagentCorruptedRegion(pResource -> drawable),
nxagentCorruptedRegion(pResource -> drawable),
pResource -> region);
......
......@@ -36,4 +36,8 @@
#define MIN(A, B) ( (A) < (B) ? (A) : (B) )
#endif
#ifndef MAX
#define MAX(A, B) ( (A) > (B) ? (A) : (B) );
#endif
#endif /* __Utils_H__ */
......@@ -386,8 +386,8 @@ extern void ddxBeforeReset (void);
/* dixutils.c */
extern void CopyISOLatin1Lowered(
unsigned char * /*dest*/,
unsigned char * /*source*/,
char * /*dest*/,
const char * /*source*/,
int /*length*/);
extern int CompareISOLatin1Lowered(
......@@ -511,7 +511,7 @@ extern Bool ClientIsAsleep(
/* atom.c */
extern Atom MakeAtom(
char * /*string*/,
const char * /*string*/,
unsigned /*len*/,
Bool /*makeit*/);
......
......@@ -295,7 +295,7 @@ extern int Ones(
unsigned long /*mask*/);
typedef struct _xPoint *DDXPointPtr;
typedef struct _Box *BoxPtr;
typedef struct pixman_box16 *BoxPtr;
typedef struct _xEvent *xEventPtr;
typedef struct _xRectangle *xRectanglePtr;
typedef struct _GrabRec *GrabPtr;
......
......@@ -50,15 +50,15 @@ SOFTWARE.
#ifndef MISCSTRUCT_H
#define MISCSTRUCT_H 1
#include <pixman.h>
#include "misc.h"
#include <nx-X11/Xprotostr.h>
#include "gc.h"
typedef xPoint DDXPointRec;
typedef struct _Box {
short x1, y1, x2, y2;
} BoxRec;
typedef struct pixman_box16 BoxRec;
typedef union _DevUnion {
void * ptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment