VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.14.0/shadow.h@ 103415

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

Additions/X11: build vboxvideo_drv.so for X.Org Server 1.14.

  • 屬性 svn:eol-style 設為 native
檔案大小: 5.1 KB
 
1/*
2 *
3 * Copyright © 2000 Keith Packard
4 *
5 * Permission to use, copy, modify, distribute, and sell this software and its
6 * documentation for any purpose is hereby granted without fee, provided that
7 * the above copyright notice appear in all copies and that both that
8 * copyright notice and this permission notice appear in supporting
9 * documentation, and that the name of Keith Packard not be used in
10 * advertising or publicity pertaining to distribution of the software without
11 * specific, written prior permission. Keith Packard makes no
12 * representations about the suitability of this software for any purpose. It
13 * is provided "as is" without express or implied warranty.
14 *
15 * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
17 * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
18 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
19 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
20 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21 * PERFORMANCE OF THIS SOFTWARE.
22 */
23
24#ifndef _SHADOW_H_
25#define _SHADOW_H_
26
27#include "scrnintstr.h"
28
29#include "picturestr.h"
30
31#include "damage.h"
32#include "damagestr.h"
33typedef struct _shadowBuf *shadowBufPtr;
34
35typedef void (*ShadowUpdateProc) (ScreenPtr pScreen, shadowBufPtr pBuf);
36
37#define SHADOW_WINDOW_RELOCATE 1
38#define SHADOW_WINDOW_READ 2
39#define SHADOW_WINDOW_WRITE 4
40
41typedef void *(*ShadowWindowProc) (ScreenPtr pScreen,
42 CARD32 row,
43 CARD32 offset,
44 int mode, CARD32 *size, void *closure);
45
46/* BC hack: do not move the damage member. see shadow.c for explanation. */
47typedef struct _shadowBuf {
48 DamagePtr pDamage;
49 ShadowUpdateProc update;
50 ShadowWindowProc window;
51 RegionRec damage;
52 PixmapPtr pPixmap;
53 void *closure;
54 int randr;
55
56 /* screen wrappers */
57 GetImageProcPtr GetImage;
58 CloseScreenProcPtr CloseScreen;
59} shadowBufRec;
60
61/* Match defines from randr extension */
62#define SHADOW_ROTATE_0 1
63#define SHADOW_ROTATE_90 2
64#define SHADOW_ROTATE_180 4
65#define SHADOW_ROTATE_270 8
66#define SHADOW_ROTATE_ALL (SHADOW_ROTATE_0|SHADOW_ROTATE_90|\
67 SHADOW_ROTATE_180|SHADOW_ROTATE_270)
68#define SHADOW_REFLECT_X 16
69#define SHADOW_REFLECT_Y 32
70#define SHADOW_REFLECT_ALL (SHADOW_REFLECT_X|SHADOW_REFLECT_Y)
71
72extern _X_EXPORT DevPrivateKey shadowScrPrivateKey;
73
74#define shadowGetBuf(pScr) ((shadowBufPtr) \
75 dixLookupPrivate(&(pScr)->devPrivates, shadowScrPrivateKey))
76#define shadowBuf(pScr) shadowBufPtr pBuf = shadowGetBuf(pScr)
77#define shadowDamage(pBuf) DamageRegion(pBuf->pDamage)
78
79extern _X_EXPORT Bool
80 shadowSetup(ScreenPtr pScreen);
81
82extern _X_EXPORT Bool
83
84shadowAdd(ScreenPtr pScreen,
85 PixmapPtr pPixmap,
86 ShadowUpdateProc update,
87 ShadowWindowProc window, int randr, void *closure);
88
89extern _X_EXPORT void
90 shadowRemove(ScreenPtr pScreen, PixmapPtr pPixmap);
91
92extern _X_EXPORT Bool
93
94shadowInit(ScreenPtr pScreen, ShadowUpdateProc update, ShadowWindowProc window);
95
96extern _X_EXPORT void *shadowAlloc(int width, int height, int bpp);
97
98extern _X_EXPORT void
99 shadowUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf);
100
101extern _X_EXPORT void
102 shadowUpdatePlanar4(ScreenPtr pScreen, shadowBufPtr pBuf);
103
104extern _X_EXPORT void
105 shadowUpdatePlanar4x8(ScreenPtr pScreen, shadowBufPtr pBuf);
106
107extern _X_EXPORT void
108 shadowUpdateRotatePacked(ScreenPtr pScreen, shadowBufPtr pBuf);
109
110extern _X_EXPORT void
111 shadowUpdateRotate8_90(ScreenPtr pScreen, shadowBufPtr pBuf);
112
113extern _X_EXPORT void
114 shadowUpdateRotate16_90(ScreenPtr pScreen, shadowBufPtr pBuf);
115
116extern _X_EXPORT void
117 shadowUpdateRotate16_90YX(ScreenPtr pScreen, shadowBufPtr pBuf);
118
119extern _X_EXPORT void
120 shadowUpdateRotate32_90(ScreenPtr pScreen, shadowBufPtr pBuf);
121
122extern _X_EXPORT void
123 shadowUpdateRotate8_180(ScreenPtr pScreen, shadowBufPtr pBuf);
124
125extern _X_EXPORT void
126 shadowUpdateRotate16_180(ScreenPtr pScreen, shadowBufPtr pBuf);
127
128extern _X_EXPORT void
129 shadowUpdateRotate32_180(ScreenPtr pScreen, shadowBufPtr pBuf);
130
131extern _X_EXPORT void
132 shadowUpdateRotate8_270(ScreenPtr pScreen, shadowBufPtr pBuf);
133
134extern _X_EXPORT void
135 shadowUpdateRotate16_270(ScreenPtr pScreen, shadowBufPtr pBuf);
136
137extern _X_EXPORT void
138 shadowUpdateRotate16_270YX(ScreenPtr pScreen, shadowBufPtr pBuf);
139
140extern _X_EXPORT void
141 shadowUpdateRotate32_270(ScreenPtr pScreen, shadowBufPtr pBuf);
142
143extern _X_EXPORT void
144 shadowUpdateRotate8(ScreenPtr pScreen, shadowBufPtr pBuf);
145
146extern _X_EXPORT void
147 shadowUpdateRotate16(ScreenPtr pScreen, shadowBufPtr pBuf);
148
149extern _X_EXPORT void
150 shadowUpdateRotate32(ScreenPtr pScreen, shadowBufPtr pBuf);
151
152typedef void (*shadowUpdateProc) (ScreenPtr, shadowBufPtr);
153
154extern _X_EXPORT shadowUpdateProc shadowUpdatePackedWeak(void);
155extern _X_EXPORT shadowUpdateProc shadowUpdatePlanar4Weak(void);
156extern _X_EXPORT shadowUpdateProc shadowUpdatePlanar4x8Weak(void);
157extern _X_EXPORT shadowUpdateProc shadowUpdateRotatePackedWeak(void);
158
159#endif /* _SHADOW_H_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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