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