VirtualBox

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

Last change on this file since 78293 was 54163, checked in by vboxsync, 10 years ago

Additions/x11/vboxvideo: support X.Org Server 1.17 (still untested).

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