#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "gcstruct.h"
#include "picturestr.h"
#include "privates.h"
typedef struct {
GCPtr pBackingGC;
unsigned long serialNumber;
unsigned long stateChanges;
GCOps *wrapOps;
GCFuncs *wrapFuncs;
} cwGCRec, *cwGCPtr;
extern DevPrivateKey cwGCKey;
#define getCwGC(pGC) ((cwGCPtr)dixLookupPrivate(&(pGC)->devPrivates, cwGCKey))
#define setCwGC(pGC,p) dixSetPrivate(&(pGC)->devPrivates, cwGCKey, p)
typedef struct {
PicturePtr pBackingPicture;
unsigned long serialNumber;
unsigned long stateChanges;
} cwPictureRec, *cwPicturePtr;
#define getCwPicture(pPicture) (pPicture->pDrawable ? \
(cwPicturePtr)dixLookupPrivate(&(pPicture)->devPrivates, cwPictureKey) : 0)
#define setCwPicture(pPicture,p) dixSetPrivate(&(pPicture)->devPrivates, cwPictureKey, p)
extern DevPrivateKey cwPictureKey;
extern DevPrivateKey cwWindowKey;
#define cwWindowPrivate(pWin) dixLookupPrivate(&(pWin)->devPrivates, cwWindowKey)
#define getCwPixmap(pWindow) ((PixmapPtr) cwWindowPrivate(pWindow))
#define setCwPixmap(pWindow,pPixmap) \
dixSetPrivate(&(pWindow)->devPrivates, cwWindowKey, pPixmap)
#define cwDrawableIsRedirWindow(pDraw) \
((pDraw)->type == DRAWABLE_WINDOW && \
getCwPixmap((WindowPtr) (pDraw)) != NULL)
typedef struct {
CloseScreenProcPtr CloseScreen;
GetImageProcPtr GetImage;
GetSpansProcPtr GetSpans;
CreateGCProcPtr CreateGC;
CopyWindowProcPtr CopyWindow;
GetWindowPixmapProcPtr GetWindowPixmap;
SetWindowPixmapProcPtr SetWindowPixmap;
#ifdef RENDER
DestroyPictureProcPtr DestroyPicture;
ChangePictureClipProcPtr ChangePictureClip;
DestroyPictureClipProcPtr DestroyPictureClip;
ChangePictureProcPtr ChangePicture;
ValidatePictureProcPtr ValidatePicture;
CompositeProcPtr Composite;
CompositeRectsProcPtr CompositeRects;
TrapezoidsProcPtr Trapezoids;
TrianglesProcPtr Triangles;
TriStripProcPtr TriStrip;
TriFanProcPtr TriFan;
RasterizeTrapezoidProcPtr RasterizeTrapezoid;
#endif
} cwScreenRec, *cwScreenPtr;
extern DevPrivateKey cwScreenKey;
#define getCwScreen(pScreen) ((cwScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, cwScreenKey))
#define setCwScreen(pScreen,p) dixSetPrivate(&(pScreen)->devPrivates, cwScreenKey, p)
#define CW_OFFSET_XYPOINTS(ppt, npt) do { \
DDXPointPtr _ppt = (DDXPointPtr)(ppt); \
int _i; \
for (_i = 0; _i < npt; _i++) { \
_ppt[_i].x += dst_off_x; \
_ppt[_i].y += dst_off_y; \
} \
} while (0)
#define CW_OFFSET_RECTS(prect, nrect) do { \
int _i; \
for (_i = 0; _i < nrect; _i++) { \
(prect)[_i].x += dst_off_x; \
(prect)[_i].y += dst_off_y; \
} \
} while (0)
#define CW_OFFSET_ARCS(parc, narc) do { \
int _i; \
for (_i = 0; _i < narc; _i++) { \
(parc)[_i].x += dst_off_x; \
(parc)[_i].y += dst_off_y; \
} \
} while (0)
#define CW_OFFSET_XY_DST(x, y) do { \
(x) = (x) + dst_off_x; \
(y) = (y) + dst_off_y; \
} while (0)
#define CW_OFFSET_XY_SRC(x, y) do { \
(x) = (x) + src_off_x; \
(y) = (y) + src_off_y; \
} while (0)
DrawablePtr
cwGetBackingDrawable(DrawablePtr pDrawable, int *x_off, int *y_off);
void
cwInitializeRender (ScreenPtr pScreen);
void
cwFiniRender (ScreenPtr pScreen);
void
miInitializeCompositeWrapper(ScreenPtr pScreen);