VirtualBox

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

Last change on this file since 78293 was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

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