2
* Copyright © 2003 Keith Packard
4
* Permission to use, copy, modify, distribute, and sell this software and its
5
* documentation for any purpose is hereby granted without fee, provided that
6
* the above copyright notice appear in all copies and that both that
7
* copyright notice and this permission notice appear in supporting
8
* documentation, and that the name of Keith Packard not be used in
9
* advertising or publicity pertaining to distribution of the software without
10
* specific, written prior permission. Keith Packard makes no
11
* representations about the suitability of this software for any purpose. It
12
* is provided "as is" without express or implied warranty.
14
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20
* PERFORMANCE OF THIS SOFTWARE.
23
#ifdef HAVE_DIX_CONFIG_H
24
#include <dix-config.h>
33
# include "picturestr.h"
36
typedef struct _damage {
41
DamageReportLevel damageLevel;
45
DrawablePtr pDrawable;
47
DamageReportFunc damageReport;
48
DamageDestroyFunc damageDestroy;
51
RegionRec pendingDamage;
54
typedef struct _damageScrPriv {
58
* For DDXen which don't provide GetScreenPixmap, this provides
59
* a place to hook damage for windows on the screen
61
DamagePtr pScreenDamage;
63
PaintWindowBackgroundProcPtr PaintWindowBackground;
64
PaintWindowBorderProcPtr PaintWindowBorder;
65
CopyWindowProcPtr CopyWindow;
66
CloseScreenProcPtr CloseScreen;
67
CreateGCProcPtr CreateGC;
68
DestroyPixmapProcPtr DestroyPixmap;
69
SetWindowPixmapProcPtr SetWindowPixmap;
70
DestroyWindowProcPtr DestroyWindow;
72
CompositeProcPtr Composite;
75
BSFuncRec BackingStoreFuncs;
76
} DamageScrPrivRec, *DamageScrPrivPtr;
78
typedef struct _damageGCPriv {
81
} DamageGCPrivRec, *DamageGCPrivPtr;
83
/* XXX should move these into damage.c, damageScrPrivateIndex is static */
84
#define damageGetScrPriv(pScr) \
85
((DamageScrPrivPtr) (pScr)->devPrivates[damageScrPrivateIndex].ptr)
87
#define damageScrPriv(pScr) \
88
DamageScrPrivPtr pScrPriv = damageGetScrPriv(pScr)
90
#define damageGetPixPriv(pPix) \
91
((DamagePtr) (pPix)->devPrivates[damagePixPrivateIndex].ptr)
93
#define damgeSetPixPriv(pPix,v) \
94
((pPix)->devPrivates[damagePixPrivateIndex].ptr = (pointer ) (v))
96
#define damagePixPriv(pPix) \
97
DamagePtr pDamage = damageGetPixPriv(pPix)
99
#define damageGetGCPriv(pGC) \
100
((DamageGCPrivPtr) (pGC)->devPrivates[damageGCPrivateIndex].ptr)
102
#define damageGCPriv(pGC) \
103
DamageGCPrivPtr pGCPriv = damageGetGCPriv(pGC)
105
#define damageGetWinPriv(pWin) \
106
((DamagePtr) (pWin)->devPrivates[damageWinPrivateIndex].ptr)
108
#define damageSetWinPriv(pWin,d) \
109
((pWin)->devPrivates[damageWinPrivateIndex].ptr = (d))
111
#endif /* _DAMAGESTR_H_ */