VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.7.7/damagestr.h

最後變更 在這個檔案是 43272,由 vboxsync 提交於 12 年 前

Additions/x11: more original X server headers.

  • 屬性 svn:eol-style 設為 native
檔案大小: 3.7 KB
 
1/*
2 * Copyright © 2003 Keith Packard
3 *
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.
13 *
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.
21 */
22
23#ifdef HAVE_DIX_CONFIG_H
24#include <dix-config.h>
25#endif
26
27#ifndef _DAMAGESTR_H_
28#define _DAMAGESTR_H_
29
30#include "damage.h"
31#include "gcstruct.h"
32#include "privates.h"
33#ifdef RENDER
34# include "picturestr.h"
35#endif
36
37typedef struct _damage {
38 DamagePtr pNext;
39 DamagePtr pNextWin;
40 RegionRec damage;
41
42 DamageReportLevel damageLevel;
43 Bool isInternal;
44 void *closure;
45 Bool isWindow;
46 DrawablePtr pDrawable;
47
48 DamageReportFunc damageReport;
49 DamageReportFunc damageReportPostRendering;
50 DamageDestroyFunc damageDestroy;
51 DamageMarkerFunc damageMarker;
52
53 Bool reportAfter;
54 RegionRec pendingDamage; /* will be flushed post submission at the latest */
55 RegionRec backupDamage; /* for use with damageMarker */
56 ScreenPtr pScreen;
57 PrivateRec *devPrivates;
58} DamageRec;
59
60typedef struct _damageScrPriv {
61 int internalLevel;
62
63 /*
64 * For DDXen which don't provide GetScreenPixmap, this provides
65 * a place to hook damage for windows on the screen
66 */
67 DamagePtr pScreenDamage;
68
69 CopyWindowProcPtr CopyWindow;
70 CloseScreenProcPtr CloseScreen;
71 CreateGCProcPtr CreateGC;
72 DestroyPixmapProcPtr DestroyPixmap;
73 SetWindowPixmapProcPtr SetWindowPixmap;
74 DestroyWindowProcPtr DestroyWindow;
75#ifdef RENDER
76 CompositeProcPtr Composite;
77 GlyphsProcPtr Glyphs;
78 AddTrapsProcPtr AddTraps;
79#endif
80
81 /* Table of wrappable function pointers */
82 DamageScreenFuncsRec funcs;
83} DamageScrPrivRec, *DamageScrPrivPtr;
84
85typedef struct _damageGCPriv {
86 GCOps *ops;
87 GCFuncs *funcs;
88} DamageGCPrivRec, *DamageGCPrivPtr;
89
90/* XXX should move these into damage.c, damageScrPrivateIndex is static */
91#define damageGetScrPriv(pScr) ((DamageScrPrivPtr) \
92 dixLookupPrivate(&(pScr)->devPrivates, damageScrPrivateKey))
93
94#define damageScrPriv(pScr) \
95 DamageScrPrivPtr pScrPriv = damageGetScrPriv(pScr)
96
97#define damageGetPixPriv(pPix) \
98 dixLookupPrivate(&(pPix)->devPrivates, damagePixPrivateKey)
99
100#define damgeSetPixPriv(pPix,v) \
101 dixSetPrivate(&(pPix)->devPrivates, damagePixPrivateKey, v)
102
103#define damagePixPriv(pPix) \
104 DamagePtr pDamage = damageGetPixPriv(pPix)
105
106#define damageGetGCPriv(pGC) \
107 dixLookupPrivate(&(pGC)->devPrivates, damageGCPrivateKey)
108
109#define damageGCPriv(pGC) \
110 DamageGCPrivPtr pGCPriv = damageGetGCPriv(pGC)
111
112#define damageGetWinPriv(pWin) \
113 ((DamagePtr)dixLookupPrivate(&(pWin)->devPrivates, damageWinPrivateKey))
114
115#define damageSetWinPriv(pWin,d) \
116 dixSetPrivate(&(pWin)->devPrivates, damageWinPrivateKey, d)
117
118#endif /* _DAMAGESTR_H_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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