VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.6.99-20090831/compint.h@ 32041

Last change on this file since 32041 was 22658, checked in by vboxsync, 15 years ago

export Xorg 1.6.99 headers to OSE

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