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>
34
# include "picturestr.h"
37
typedef struct _damage {
42
DamageReportLevel damageLevel;
46
DrawablePtr pDrawable;
48
DamageReportFunc damageReport;
49
DamageDestroyFunc damageDestroy;
52
RegionRec pendingDamage;
55
typedef struct _damageScrPriv {
59
* For DDXen which don't provide GetScreenPixmap, this provides
60
* a place to hook damage for windows on the screen
62
DamagePtr pScreenDamage;
64
CopyWindowProcPtr CopyWindow;
65
CloseScreenProcPtr CloseScreen;
66
CreateGCProcPtr CreateGC;
67
DestroyPixmapProcPtr DestroyPixmap;
68
SetWindowPixmapProcPtr SetWindowPixmap;
69
DestroyWindowProcPtr DestroyWindow;
71
CompositeProcPtr Composite;
73
AddTrapsProcPtr AddTraps;
75
} DamageScrPrivRec, *DamageScrPrivPtr;
77
typedef struct _damageGCPriv {
80
} DamageGCPrivRec, *DamageGCPrivPtr;
82
/* XXX should move these into damage.c, damageScrPrivateIndex is static */
83
#define damageGetScrPriv(pScr) ((DamageScrPrivPtr) \
84
dixLookupPrivate(&(pScr)->devPrivates, damageScrPrivateKey))
86
#define damageScrPriv(pScr) \
87
DamageScrPrivPtr pScrPriv = damageGetScrPriv(pScr)
89
#define damageGetPixPriv(pPix) \
90
dixLookupPrivate(&(pPix)->devPrivates, damagePixPrivateKey)
92
#define damgeSetPixPriv(pPix,v) \
93
dixSetPrivate(&(pPix)->devPrivates, damagePixPrivateKey, v)
95
#define damagePixPriv(pPix) \
96
DamagePtr pDamage = damageGetPixPriv(pPix)
98
#define damageGetGCPriv(pGC) \
99
dixLookupPrivate(&(pGC)->devPrivates, damageGCPrivateKey)
101
#define damageGCPriv(pGC) \
102
DamageGCPrivPtr pGCPriv = damageGetGCPriv(pGC)
104
#define damageGetWinPriv(pWin) \
105
((DamagePtr)dixLookupPrivate(&(pWin)->devPrivates, damageWinPrivateKey))
107
#define damageSetWinPriv(pWin,d) \
108
dixSetPrivate(&(pWin)->devPrivates, damageWinPrivateKey, d)
110
#endif /* _DAMAGESTR_H_ */