VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.5.3/compint.h@ 79043

Last change on this file since 79043 was 17471, checked in by vboxsync, 16 years ago

export to OSE

  • Property svn:eol-style set to native
File size: 8.0 KB
Line 
1/*
2 * Copyright © 2006 Sun Microsystems
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 Sun Microsystems not be used in
9 * advertising or publicity pertaining to distribution of the software without
10 * specific, written prior permission. Sun Microsystems 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 * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL SUN MICROSYSTEMS 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 * Copyright © 2003 Keith Packard
23 *
24 * Permission to use, copy, modify, distribute, and sell this software and its
25 * documentation for any purpose is hereby granted without fee, provided that
26 * the above copyright notice appear in all copies and that both that
27 * copyright notice and this permission notice appear in supporting
28 * documentation, and that the name of Keith Packard not be used in
29 * advertising or publicity pertaining to distribution of the software without
30 * specific, written prior permission. Keith Packard makes no
31 * representations about the suitability of this software for any purpose. It
32 * is provided "as is" without express or implied warranty.
33 *
34 * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
35 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
36 * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
37 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
38 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
39 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
40 * PERFORMANCE OF THIS SOFTWARE.
41 */
42
43#ifdef HAVE_DIX_CONFIG_H
44#include <dix-config.h>
45#endif
46
47#ifndef _COMPINT_H_
48#define _COMPINT_H_
49
50#include "misc.h"
51#include "scrnintstr.h"
52#include "os.h"
53#include "regionstr.h"
54#include "validate.h"
55#include "windowstr.h"
56#include "input.h"
57#include "resource.h"
58#include "colormapst.h"
59#include "cursorstr.h"
60#include "dixstruct.h"
61#include "gcstruct.h"
62#include "servermd.h"
63#include "dixevents.h"
64#include "globals.h"
65#include "picturestr.h"
66#include "extnsionst.h"
67#include "privates.h"
68#include "mi.h"
69#include "damage.h"
70#include "damageextint.h"
71#include "xfixes.h"
72#include <X11/extensions/compositeproto.h>
73#include <assert.h>
74
75/*
76 * enable this for debugging
77
78 #define COMPOSITE_DEBUG
79 */
80
81typedef struct _CompClientWindow {
82 struct _CompClientWindow *next;
83 XID id;
84 int update;
85} CompClientWindowRec, *CompClientWindowPtr;
86
87typedef struct _CompWindow {
88 RegionRec borderClip;
89 DamagePtr damage; /* for automatic update mode */
90 Bool damageRegistered;
91 Bool damaged;
92 int update;
93 CompClientWindowPtr clients;
94 int oldx;
95 int oldy;
96 PixmapPtr pOldPixmap;
97 int borderClipX, borderClipY;
98} CompWindowRec, *CompWindowPtr;
99
100#define COMP_ORIGIN_INVALID 0x80000000
101
102typedef struct _CompSubwindows {
103 int update;
104 CompClientWindowPtr clients;
105} CompSubwindowsRec, *CompSubwindowsPtr;
106
107#ifndef COMP_INCLUDE_RGB24_VISUAL
108#define COMP_INCLUDE_RGB24_VISUAL 0
109#endif
110
111typedef struct _CompOverlayClientRec *CompOverlayClientPtr;
112
113typedef struct _CompOverlayClientRec {
114 CompOverlayClientPtr pNext;
115 ClientPtr pClient;
116 ScreenPtr pScreen;
117 XID resource;
118} CompOverlayClientRec;
119
120typedef struct _CompScreen {
121 PositionWindowProcPtr PositionWindow;
122 CopyWindowProcPtr CopyWindow;
123 CreateWindowProcPtr CreateWindow;
124 DestroyWindowProcPtr DestroyWindow;
125 RealizeWindowProcPtr RealizeWindow;
126 UnrealizeWindowProcPtr UnrealizeWindow;
127 ClipNotifyProcPtr ClipNotify;
128 /*
129 * Called from ConfigureWindow, these
130 * three track changes to the offscreen storage
131 * geometry
132 */
133 MoveWindowProcPtr MoveWindow;
134 ResizeWindowProcPtr ResizeWindow;
135 ChangeBorderWidthProcPtr ChangeBorderWidth;
136 /*
137 * Reparenting has an effect on Subwindows redirect
138 */
139 ReparentWindowProcPtr ReparentWindow;
140
141 /*
142 * Colormaps for new visuals better not get installed
143 */
144 InstallColormapProcPtr InstallColormap;
145
146 /*
147 * Fake backing store via automatic redirection
148 */
149 ChangeWindowAttributesProcPtr ChangeWindowAttributes;
150
151 ScreenBlockHandlerProcPtr BlockHandler;
152 CloseScreenProcPtr CloseScreen;
153 Bool damaged;
154 int numAlternateVisuals;
155 VisualID *alternateVisuals;
156
157 WindowPtr pOverlayWin;
158 CompOverlayClientPtr pOverlayClients;
159
160} CompScreenRec, *CompScreenPtr;
161
162extern DevPrivateKey CompScreenPrivateKey;
163extern DevPrivateKey CompWindowPrivateKey;
164extern DevPrivateKey CompSubwindowsPrivateKey;
165
166#define GetCompScreen(s) ((CompScreenPtr) \
167 dixLookupPrivate(&(s)->devPrivates, CompScreenPrivateKey))
168#define GetCompWindow(w) ((CompWindowPtr) \
169 dixLookupPrivate(&(w)->devPrivates, CompWindowPrivateKey))
170#define GetCompSubwindows(w) ((CompSubwindowsPtr) \
171 dixLookupPrivate(&(w)->devPrivates, CompSubwindowsPrivateKey))
172
173extern RESTYPE CompositeClientWindowType;
174extern RESTYPE CompositeClientSubwindowsType;
175
176/*
177 * compalloc.c
178 */
179
180Bool
181compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update);
182
183void
184compFreeClientWindow (WindowPtr pWin, XID id);
185
186int
187compUnredirectWindow (ClientPtr pClient, WindowPtr pWin, int update);
188
189int
190compRedirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update);
191
192void
193compFreeClientSubwindows (WindowPtr pWin, XID id);
194
195int
196compUnredirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update);
197
198int
199compRedirectOneSubwindow (WindowPtr pParent, WindowPtr pWin);
200
201int
202compUnredirectOneSubwindow (WindowPtr pParent, WindowPtr pWin);
203
204Bool
205compAllocPixmap (WindowPtr pWin);
206
207void
208compFreePixmap (WindowPtr pWin);
209
210Bool
211compReallocPixmap (WindowPtr pWin, int x, int y,
212 unsigned int w, unsigned int h, int bw);
213
214/*
215 * compext.c
216 */
217
218void
219CompositeExtensionInit (void);
220
221/*
222 * compinit.c
223 */
224
225Bool
226CompositeRegisterAlternateVisuals (ScreenPtr pScreen,
227 VisualID *vids, int nVisuals);
228
229Bool
230compScreenInit (ScreenPtr pScreen);
231
232/*
233 * compwindow.c
234 */
235
236#ifdef COMPOSITE_DEBUG
237void
238compCheckTree (ScreenPtr pScreen);
239#else
240#define compCheckTree(s)
241#endif
242
243PictFormatPtr
244compWindowFormat (WindowPtr pWin);
245
246void
247compSetPixmap (WindowPtr pWin, PixmapPtr pPixmap);
248
249Bool
250compCheckRedirect (WindowPtr pWin);
251
252Bool
253compPositionWindow (WindowPtr pWin, int x, int y);
254
255Bool
256compRealizeWindow (WindowPtr pWin);
257
258Bool
259compUnrealizeWindow (WindowPtr pWin);
260
261void
262compClipNotify (WindowPtr pWin, int dx, int dy);
263
264void
265compMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind);
266
267void
268compResizeWindow (WindowPtr pWin, int x, int y,
269 unsigned int w, unsigned int h, WindowPtr pSib);
270
271void
272compChangeBorderWidth (WindowPtr pWin, unsigned int border_width);
273
274void
275compReparentWindow (WindowPtr pWin, WindowPtr pPriorParent);
276
277Bool
278compCreateWindow (WindowPtr pWin);
279
280Bool
281compDestroyWindow (WindowPtr pWin);
282
283void
284compSetRedirectBorderClip (WindowPtr pWin, RegionPtr pRegion);
285
286RegionPtr
287compGetRedirectBorderClip (WindowPtr pWin);
288
289void
290compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
291
292void
293compWindowUpdate (WindowPtr pWin);
294
295void
296deleteCompOverlayClientsForScreen (ScreenPtr pScreen);
297
298WindowPtr
299CompositeRealChildHead (WindowPtr pWin);
300
301int
302DeleteWindowNoInputDevices(pointer value, XID wid);
303
304#endif /* _COMPINT_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