VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.10.0/damage.h

Last change on this file was 36308, checked in by vboxsync, 14 years ago

fix OSE

  • Property svn:eol-style set to native
File size: 4.5 KB
Line 
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 _DAMAGE_H_
28#define _DAMAGE_H_
29
30typedef struct _damage *DamagePtr;
31
32typedef enum _damageReportLevel {
33 DamageReportRawRegion,
34 DamageReportDeltaRegion,
35 DamageReportBoundingBox,
36 DamageReportNonEmpty,
37 DamageReportNone
38} DamageReportLevel;
39
40typedef void (*DamageReportFunc) (DamagePtr pDamage, RegionPtr pRegion, void *closure);
41typedef void (*DamageDestroyFunc) (DamagePtr pDamage, void *closure);
42/* It's the responsibility of the driver to duplicate both regions. */
43/* At some point DamageRegionRendered() must be called. */
44typedef void (*DamageMarkerFunc) (DrawablePtr pDrawable, DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pRegion, void *closure);
45
46typedef void (*DamageScreenCreateFunc) (DamagePtr);
47typedef void (*DamageScreenRegisterFunc) (DrawablePtr, DamagePtr);
48typedef void (*DamageScreenUnregisterFunc) (DrawablePtr, DamagePtr);
49typedef void (*DamageScreenDestroyFunc) (DamagePtr);
50
51typedef struct _damageScreenFuncs {
52 DamageScreenCreateFunc Create;
53 DamageScreenRegisterFunc Register;
54 DamageScreenUnregisterFunc Unregister;
55 DamageScreenDestroyFunc Destroy;
56} DamageScreenFuncsRec, *DamageScreenFuncsPtr;
57
58extern _X_EXPORT void miDamageCreate (DamagePtr);
59extern _X_EXPORT void miDamageRegister (DrawablePtr, DamagePtr);
60extern _X_EXPORT void miDamageUnregister (DrawablePtr, DamagePtr);
61extern _X_EXPORT void miDamageDestroy (DamagePtr);
62
63extern _X_EXPORT Bool
64DamageSetup (ScreenPtr pScreen);
65
66extern _X_EXPORT DamagePtr
67DamageCreate (DamageReportFunc damageReport,
68 DamageDestroyFunc damageDestroy,
69 DamageReportLevel damageLevel,
70 Bool isInternal,
71 ScreenPtr pScreen,
72 void * closure);
73
74extern _X_EXPORT void
75DamageDrawInternal (ScreenPtr pScreen, Bool enable);
76
77extern _X_EXPORT void
78DamageRegister (DrawablePtr pDrawable,
79 DamagePtr pDamage);
80
81extern _X_EXPORT void
82DamageUnregister (DrawablePtr pDrawable,
83 DamagePtr pDamage);
84
85extern _X_EXPORT void
86DamageDestroy (DamagePtr pDamage);
87
88extern _X_EXPORT Bool
89DamageSubtract (DamagePtr pDamage,
90 const RegionPtr pRegion);
91
92extern _X_EXPORT void
93DamageEmpty (DamagePtr pDamage);
94
95extern _X_EXPORT RegionPtr
96DamageRegion (DamagePtr pDamage);
97
98extern _X_EXPORT RegionPtr
99DamagePendingRegion (DamagePtr pDamage);
100
101/* In case of rendering, call this before the submitting the commands. */
102extern _X_EXPORT void
103DamageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion);
104
105/* Call this directly after the rendering operation has been submitted. */
106extern _X_EXPORT void
107DamageRegionProcessPending (DrawablePtr pDrawable);
108
109/* Call this some time after rendering is done, only relevant when a damageMarker is provided. */
110extern _X_EXPORT void
111DamageRegionRendered (DrawablePtr pDrawable, DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pRegion);
112
113/* Avoid using this call, it only exists for API compatibility. */
114extern _X_EXPORT void
115DamageDamageRegion (DrawablePtr pDrawable,
116 const RegionPtr pRegion);
117
118extern _X_EXPORT void
119DamageSetReportAfterOp (DamagePtr pDamage, Bool reportAfter);
120
121extern _X_EXPORT void
122DamageSetPostRenderingFunctions(DamagePtr pDamage, DamageReportFunc damageReportPostRendering,
123 DamageMarkerFunc damageMarker);
124
125extern _X_EXPORT DamageScreenFuncsPtr
126DamageGetScreenFuncs (ScreenPtr);
127
128#endif /* _DAMAGE_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