VirtualBox

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

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

Additions/x11/x11include: add header files for X.Org Server 1.16.

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