VirtualBox

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

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

Additions/x11/vboxvideo: support X.Org Server 1.17 (still untested).

  • Property svn:eol-style set to native
File size: 8.7 KB
Line 
1/***********************************************************
2
3Copyright 1987, 1998 The Open Group
4
5Permission to use, copy, modify, distribute, and sell this software and its
6documentation for any purpose is hereby granted without fee, provided that
7the above copyright notice appear in all copies and that both that
8copyright notice and this permission notice appear in supporting
9documentation.
10
11The above copyright notice and this permission notice shall be included in
12all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21Except as contained in this notice, the name of The Open Group shall not be
22used in advertising or otherwise to promote the sale, use or other dealings
23in this Software without prior written authorization from The Open Group.
24
25Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
26
27 All Rights Reserved
28
29Permission to use, copy, modify, and distribute this software and its
30documentation for any purpose and without fee is hereby granted,
31provided that the above copyright notice appear in all copies and that
32both that copyright notice and this permission notice appear in
33supporting documentation, and that the name of Digital not be
34used in advertising or publicity pertaining to distribution of the
35software without specific, written prior permission.
36
37DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
38ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
39DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
40ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
41WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
42ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
43SOFTWARE.
44
45******************************************************************/
46
47#ifndef WINDOWSTRUCT_H
48#define WINDOWSTRUCT_H
49
50#include "window.h"
51#include "pixmapstr.h"
52#include "regionstr.h"
53#include "cursor.h"
54#include "property.h"
55#include "resource.h" /* for ROOT_WINDOW_ID_BASE */
56#include "dix.h"
57#include "privates.h"
58#include "miscstruct.h"
59#include <X11/Xprotostr.h>
60#include "opaque.h"
61
62#define GuaranteeNothing 0
63#define GuaranteeVisBack 1
64
65#define SameBackground(as, a, bs, b) \
66 ((as) == (bs) && ((as) == None || \
67 (as) == ParentRelative || \
68 SamePixUnion(a,b,as == BackgroundPixel)))
69
70#define SameBorder(as, a, bs, b) \
71 EqualPixUnion(as, a, bs, b)
72
73/* used as NULL-terminated list */
74typedef struct _DevCursorNode {
75 CursorPtr cursor;
76 DeviceIntPtr dev;
77 struct _DevCursorNode *next;
78} DevCursNodeRec, *DevCursNodePtr, *DevCursorList;
79
80typedef struct _WindowOpt {
81 CursorPtr cursor; /* default: window.cursorNone */
82 VisualID visual; /* default: same as parent */
83 Colormap colormap; /* default: same as parent */
84 Mask dontPropagateMask; /* default: window.dontPropagate */
85 Mask otherEventMasks; /* default: 0 */
86 struct _OtherClients *otherClients; /* default: NULL */
87 struct _GrabRec *passiveGrabs; /* default: NULL */
88 PropertyPtr userProps; /* default: NULL */
89 CARD32 backingBitPlanes; /* default: ~0L */
90 CARD32 backingPixel; /* default: 0 */
91 RegionPtr boundingShape; /* default: NULL */
92 RegionPtr clipShape; /* default: NULL */
93 RegionPtr inputShape; /* default: NULL */
94 struct _OtherInputMasks *inputMasks; /* default: NULL */
95 DevCursorList deviceCursors; /* default: NULL */
96} WindowOptRec, *WindowOptPtr;
97
98#define BackgroundPixel 2L
99#define BackgroundPixmap 3L
100
101/*
102 * The redirectDraw field can have one of three values:
103 *
104 * RedirectDrawNone
105 * A normal window; painted into the same pixmap as the parent
106 * and clipping parent and siblings to its geometry. These
107 * windows get a clip list equal to the intersection of their
108 * geometry with the parent geometry, minus the geometry
109 * of overlapping None and Clipped siblings.
110 * RedirectDrawAutomatic
111 * A redirected window which clips parent and sibling drawing.
112 * Contents for these windows are manage inside the server.
113 * These windows get an internal clip list equal to their
114 * geometry.
115 * RedirectDrawManual
116 * A redirected window which does not clip parent and sibling
117 * drawing; the window must be represented within the parent
118 * geometry by the client performing the redirection management.
119 * Contents for these windows are managed outside the server.
120 * These windows get an internal clip list equal to their
121 * geometry.
122 */
123
124#define RedirectDrawNone 0
125#define RedirectDrawAutomatic 1
126#define RedirectDrawManual 2
127
128typedef struct _Window {
129 DrawableRec drawable;
130 PrivateRec *devPrivates;
131 WindowPtr parent; /* ancestor chain */
132 WindowPtr nextSib; /* next lower sibling */
133 WindowPtr prevSib; /* next higher sibling */
134 WindowPtr firstChild; /* top-most child */
135 WindowPtr lastChild; /* bottom-most child */
136 RegionRec clipList; /* clipping rectangle for output */
137 RegionRec borderClip; /* NotClippedByChildren + border */
138 union _Validate *valdata;
139 RegionRec winSize;
140 RegionRec borderSize;
141 DDXPointRec origin; /* position relative to parent */
142 unsigned short borderWidth;
143 unsigned short deliverableEvents; /* all masks from all clients */
144 Mask eventMask; /* mask from the creating client */
145 PixUnion background;
146 PixUnion border;
147 WindowOptPtr optional;
148 unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */
149 unsigned borderIsPixel:1;
150 unsigned cursorIsNone:1; /* else real cursor (might inherit) */
151 unsigned backingStore:2;
152 unsigned backStorage:1; /* if bs is allocated */
153 unsigned saveUnder:1;
154 unsigned bitGravity:4;
155 unsigned winGravity:4;
156 unsigned overrideRedirect:1;
157 unsigned visibility:2;
158 unsigned mapped:1;
159 unsigned realized:1; /* ancestors are all mapped */
160 unsigned viewable:1; /* realized && InputOutput */
161 unsigned dontPropagate:3; /* index into DontPropagateMasks */
162 unsigned forcedBS:1; /* system-supplied backingStore */
163 unsigned redirectDraw:2; /* COMPOSITE rendering redirect */
164 unsigned forcedBG:1; /* must have an opaque background */
165#ifdef ROOTLESS
166 unsigned rootlessUnhittable:1; /* doesn't hit-test */
167#endif
168#ifdef COMPOSITE
169 unsigned damagedDescendants:1; /* some descendants are damaged */
170 unsigned inhibitBGPaint:1; /* paint the background? */
171#endif
172} WindowRec;
173
174/*
175 * Ok, a bunch of macros for accessing the optional record
176 * fields (or filling the appropriate default value)
177 */
178
179extern _X_EXPORT Mask DontPropagateMasks[];
180
181#define wTrackParent(w,field) ((w)->optional ? \
182 (w)->optional->field \
183 : FindWindowWithOptional(w)->optional->field)
184#define wUseDefault(w,field,def) ((w)->optional ? \
185 (w)->optional->field \
186 : def)
187
188#define wVisual(w) wTrackParent(w, visual)
189#define wCursor(w) ((w)->cursorIsNone ? None : wTrackParent(w, cursor))
190#define wColormap(w) ((w)->drawable.class == InputOnly ? None : wTrackParent(w, colormap))
191#define wDontPropagateMask(w) wUseDefault(w, dontPropagateMask, DontPropagateMasks[(w)->dontPropagate])
192#define wOtherEventMasks(w) wUseDefault(w, otherEventMasks, 0)
193#define wOtherClients(w) wUseDefault(w, otherClients, NULL)
194#define wOtherInputMasks(w) wUseDefault(w, inputMasks, NULL)
195#define wPassiveGrabs(w) wUseDefault(w, passiveGrabs, NULL)
196#define wUserProps(w) wUseDefault(w, userProps, NULL)
197#define wBackingBitPlanes(w) wUseDefault(w, backingBitPlanes, ~0L)
198#define wBackingPixel(w) wUseDefault(w, backingPixel, 0)
199#define wBoundingShape(w) wUseDefault(w, boundingShape, NULL)
200#define wClipShape(w) wUseDefault(w, clipShape, NULL)
201#define wInputShape(w) wUseDefault(w, inputShape, NULL)
202#define wClient(w) (clients[CLIENT_ID((w)->drawable.id)])
203#define wBorderWidth(w) ((int) (w)->borderWidth)
204
205/* true when w needs a border drawn. */
206
207#define HasBorder(w) ((w)->borderWidth || wClipShape(w))
208
209typedef struct _ScreenSaverStuff *ScreenSaverStuffPtr;
210
211#define SCREEN_IS_BLANKED 0
212#define SCREEN_ISNT_SAVED 1
213#define SCREEN_IS_TILED 2
214#define SCREEN_IS_BLACK 3
215
216#define HasSaverWindow(pScreen) (pScreen->screensaver.pWindow != NullWindow)
217
218extern _X_EXPORT int screenIsSaved;
219
220#endif /* WINDOWSTRUCT_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