VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/7.1/xorg/damagestr.h@ 38013

Last change on this file since 38013 was 17236, checked in by vboxsync, 16 years ago

Additions/x11/x11include: blast! Reverted r43555 and r43556

  • Property svn:eol-style set to native
File size: 3.5 KB
Line 
1/*
2 * $Id: damagestr.h,v 1.6 2005/07/03 07:02:01 daniels Exp $
3 *
4 * Copyright © 2003 Keith Packard
5 *
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of Keith Packard not be used in
11 * advertising or publicity pertaining to distribution of the software without
12 * specific, written prior permission. Keith Packard makes no
13 * representations about the suitability of this software for any purpose. It
14 * is provided "as is" without express or implied warranty.
15 *
16 * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 * PERFORMANCE OF THIS SOFTWARE.
23 */
24
25#ifdef HAVE_DIX_CONFIG_H
26#include <dix-config.h>
27#endif
28
29#ifndef _DAMAGESTR_H_
30#define _DAMAGESTR_H_
31
32#include "damage.h"
33#include "gcstruct.h"
34#ifdef RENDER
35# include "picturestr.h"
36#endif
37
38typedef struct _damage {
39 DamagePtr pNext;
40 DamagePtr pNextWin;
41 RegionRec damage;
42
43 DamageReportLevel damageLevel;
44 Bool isInternal;
45 void *closure;
46 Bool isWindow;
47 DrawablePtr pDrawable;
48
49 DamageReportFunc damageReport;
50 DamageDestroyFunc damageDestroy;
51} DamageRec;
52
53typedef struct _damageScrPriv {
54 int internalLevel;
55
56 /*
57 * For DDXen which don't provide GetScreenPixmap, this provides
58 * a place to hook damage for windows on the screen
59 */
60 DamagePtr pScreenDamage;
61
62 PaintWindowBackgroundProcPtr PaintWindowBackground;
63 PaintWindowBorderProcPtr PaintWindowBorder;
64 CopyWindowProcPtr CopyWindow;
65 CloseScreenProcPtr CloseScreen;
66 CreateGCProcPtr CreateGC;
67 DestroyPixmapProcPtr DestroyPixmap;
68 SetWindowPixmapProcPtr SetWindowPixmap;
69 DestroyWindowProcPtr DestroyWindow;
70#ifdef RENDER
71 CompositeProcPtr Composite;
72 GlyphsProcPtr Glyphs;
73#endif
74 BSFuncRec BackingStoreFuncs;
75} DamageScrPrivRec, *DamageScrPrivPtr;
76
77typedef struct _damageGCPriv {
78 GCOps *ops;
79 GCFuncs *funcs;
80} DamageGCPrivRec, *DamageGCPrivPtr;
81
82extern int damageScrPrivateIndex;
83extern int damagePixPrivateIndex;
84extern int damageGCPrivateIndex;
85extern int damageWinPrivateIndex;
86
87#define damageGetScrPriv(pScr) \
88 ((DamageScrPrivPtr) (pScr)->devPrivates[damageScrPrivateIndex].ptr)
89
90#define damageScrPriv(pScr) \
91 DamageScrPrivPtr pScrPriv = damageGetScrPriv(pScr)
92
93#define damageGetPixPriv(pPix) \
94 ((DamagePtr) (pPix)->devPrivates[damagePixPrivateIndex].ptr)
95
96#define damgeSetPixPriv(pPix,v) \
97 ((pPix)->devPrivates[damagePixPrivateIndex].ptr = (pointer ) (v))
98
99#define damagePixPriv(pPix) \
100 DamagePtr pDamage = damageGetPixPriv(pPix)
101
102#define damageGetGCPriv(pGC) \
103 ((DamageGCPrivPtr) (pGC)->devPrivates[damageGCPrivateIndex].ptr)
104
105#define damageGCPriv(pGC) \
106 DamageGCPrivPtr pGCPriv = damageGetGCPriv(pGC)
107
108#define damageGetWinPriv(pWin) \
109 ((DamagePtr) (pWin)->devPrivates[damageWinPrivateIndex].ptr)
110
111#define damageSetWinPriv(pWin,d) \
112 ((pWin)->devPrivates[damageWinPrivateIndex].ptr = (d))
113
114#endif /* _DAMAGESTR_H_ */
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