VirtualBox

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

Last change on this file since 87454 was 43251, checked in by vboxsync, 12 years ago

Additions/x11: added headers for X.Org Server 1.13.

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