VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.1.0/xaawrap.h

Last change on this file was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
1/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaawrap.h,v 1.3 1998/10/25 07:12:14 dawes Exp $ */
2
3#define XAA_SCREEN_PROLOGUE(pScreen, field)\
4 ((pScreen)->field = \
5 ((XAAScreenPtr) (pScreen)->devPrivates[XAAGetScreenIndex()].ptr)->field)
6
7#define XAA_SCREEN_EPILOGUE(pScreen, field, wrapper)\
8 ((pScreen)->field = wrapper)
9
10
11#define XAA_GC_FUNC_PROLOGUE(pGC)\
12 XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr;\
13 (pGC)->funcs = pGCPriv->wrapFuncs;\
14 if(pGCPriv->flags)\
15 (pGC)->ops = pGCPriv->wrapOps
16
17#define XAA_GC_FUNC_EPILOGUE(pGC)\
18 pGCPriv->wrapFuncs = (pGC)->funcs;\
19 (pGC)->funcs = &XAAGCFuncs;\
20 if(pGCPriv->flags) {\
21 pGCPriv->wrapOps = (pGC)->ops;\
22 (pGC)->ops = (pGCPriv->flags & OPS_ARE_ACCEL) ? pGCPriv->XAAOps :\
23 &XAAPixmapOps;\
24 }
25
26
27#define XAA_GC_OP_PROLOGUE(pGC)\
28 XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\
29 GCFuncs *oldFuncs = pGC->funcs;\
30 pGC->funcs = pGCPriv->wrapFuncs;\
31 pGC->ops = pGCPriv->wrapOps
32
33#define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\
34 XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\
35 GCFuncs *oldFuncs = pGC->funcs;\
36 if(!REGION_NUM_RECTS(pGC->pCompositeClip)) return; \
37 pGC->funcs = pGCPriv->wrapFuncs;\
38 pGC->ops = pGCPriv->wrapOps
39
40
41#define XAA_GC_OP_EPILOGUE(pGC)\
42 pGCPriv->wrapOps = pGC->ops;\
43 pGC->funcs = oldFuncs;\
44 pGC->ops = pGCPriv->XAAOps
45
46
47#define XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw)\
48 XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\
49 XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\
50 GCFuncs *oldFuncs = pGC->funcs;\
51 pGC->funcs = pGCPriv->wrapFuncs;\
52 pGC->ops = pGCPriv->wrapOps
53
54
55#define XAA_PIXMAP_OP_EPILOGUE(pGC)\
56 pGCPriv->wrapOps = pGC->ops;\
57 pGC->funcs = oldFuncs;\
58 pGC->ops = &XAAPixmapOps;\
59 pixPriv->flags |= DIRTY
60
61#ifdef HAVE_XORG_CONFIG_H
62#include <xorg-config.h>
63#endif
64
65#ifdef RENDER
66#define XAA_RENDER_PROLOGUE(pScreen,field)\
67 (GetPictureScreen(pScreen)->field = \
68 ((XAAScreenPtr) (pScreen)->devPrivates[XAAGetScreenIndex()].ptr)->field)
69
70#define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\
71 (GetPictureScreen(pScreen)->field = wrapper)
72#endif
73
74/* This also works fine for drawables */
75
76#define SYNC_CHECK(pGC) {\
77 XAAInfoRecPtr infoRec =\
78((XAAScreenPtr)((pGC)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec;\
79 if(infoRec->NeedToSync) {\
80 (*infoRec->Sync)(infoRec->pScrn);\
81 infoRec->NeedToSync = FALSE;\
82 }}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette