VirtualBox

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

最後變更 在這個檔案從67129是 51223,由 vboxsync 提交於 11 年 前

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

  • 屬性 svn:eol-style 設為 native
檔案大小: 8.3 KB
 
1/* $Xorg: windowstr.h,v 1.4 2001/02/09 02:05:16 xorgcvs Exp $ */
2/***********************************************************
3
4Copyright 1987, 1998 The Open Group
5
6Permission to use, copy, modify, distribute, and sell this software and its
7documentation for any purpose is hereby granted without fee, provided that
8the above copyright notice appear in all copies and that both that
9copyright notice and this permission notice appear in supporting
10documentation.
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from The Open Group.
25
26
27Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
28
29 All Rights Reserved
30
31Permission to use, copy, modify, and distribute this software and its
32documentation for any purpose and without fee is hereby granted,
33provided that the above copyright notice appear in all copies and that
34both that copyright notice and this permission notice appear in
35supporting documentation, and that the name of Digital not be
36used in advertising or publicity pertaining to distribution of the
37software without specific, written prior permission.
38
39DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
40ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
41DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
42ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
43WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
44ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
45SOFTWARE.
46
47******************************************************************/
48/* $XFree86: xc/programs/Xserver/include/windowstr.h,v 1.6 2001/12/14 19:59:57 dawes Exp $ */
49
50#ifndef WINDOWSTRUCT_H
51#define WINDOWSTRUCT_H
52
53#include "window.h"
54#include "pixmapstr.h"
55#include "regionstr.h"
56#include "cursor.h"
57#include "property.h"
58#include "resource.h" /* for ROOT_WINDOW_ID_BASE */
59#include "dix.h"
60#include "miscstruct.h"
61#include <X11/Xprotostr.h>
62#include "opaque.h"
63
64#define GuaranteeNothing 0
65#define GuaranteeVisBack 1
66
67#define SameBackground(as, a, bs, b) \
68 ((as) == (bs) && ((as) == None || \
69 (as) == ParentRelative || \
70 SamePixUnion(a,b,as == BackgroundPixel)))
71
72#define SameBorder(as, a, bs, b) \
73 EqualPixUnion(as, a, bs, b)
74
75typedef struct _WindowOpt {
76 VisualID visual; /* default: same as parent */
77 CursorPtr cursor; /* default: window.cursorNone */
78 Colormap colormap; /* default: same as parent */
79 Mask dontPropagateMask; /* default: window.dontPropagate */
80 Mask otherEventMasks; /* default: 0 */
81 struct _OtherClients *otherClients; /* default: NULL */
82 struct _GrabRec *passiveGrabs; /* default: NULL */
83 PropertyPtr userProps; /* default: NULL */
84 unsigned long backingBitPlanes; /* default: ~0L */
85 unsigned long backingPixel; /* default: 0 */
86#ifdef SHAPE
87 RegionPtr boundingShape; /* default: NULL */
88 RegionPtr clipShape; /* default: NULL */
89 RegionPtr inputShape; /* default: NULL */
90#endif
91#ifdef XINPUT
92 struct _OtherInputMasks *inputMasks; /* default: NULL */
93#endif
94} WindowOptRec, *WindowOptPtr;
95
96#define BackgroundPixel 2L
97#define BackgroundPixmap 3L
98
99typedef struct _Window {
100 DrawableRec drawable;
101 WindowPtr parent; /* ancestor chain */
102 WindowPtr nextSib; /* next lower sibling */
103 WindowPtr prevSib; /* next higher sibling */
104 WindowPtr firstChild; /* top-most child */
105 WindowPtr lastChild; /* bottom-most child */
106 RegionRec clipList; /* clipping rectangle for output */
107 RegionRec borderClip; /* NotClippedByChildren + border */
108 union _Validate *valdata;
109 RegionRec winSize;
110 RegionRec borderSize;
111 DDXPointRec origin; /* position relative to parent */
112 unsigned short borderWidth;
113 unsigned short deliverableEvents;
114 Mask eventMask;
115 PixUnion background;
116 PixUnion border;
117 pointer backStorage; /* null when BS disabled */
118 WindowOptPtr optional;
119 unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */
120 unsigned borderIsPixel:1;
121 unsigned cursorIsNone:1; /* else real cursor (might inherit) */
122 unsigned backingStore:2;
123 unsigned saveUnder:1;
124 unsigned DIXsaveUnder:1;
125 unsigned bitGravity:4;
126 unsigned winGravity:4;
127 unsigned overrideRedirect:1;
128 unsigned visibility:2;
129 unsigned mapped:1;
130 unsigned realized:1; /* ancestors are all mapped */
131 unsigned viewable:1; /* realized && InputOutput */
132 unsigned dontPropagate:3;/* index into DontPropagateMasks */
133 unsigned forcedBS:1; /* system-supplied backingStore */
134#ifdef NEED_DBE_BUF_BITS
135#define DBE_FRONT_BUFFER 1
136#define DBE_BACK_BUFFER 0
137 unsigned dstBuffer:1; /* destination buffer for rendering */
138 unsigned srcBuffer:1; /* source buffer for rendering */
139#endif
140#ifdef COMPOSITE
141 unsigned redirectDraw:1; /* rendering is redirected from here */
142#endif
143 DevUnion *devPrivates;
144} WindowRec;
145
146/*
147 * Ok, a bunch of macros for accessing the optional record
148 * fields (or filling the appropriate default value)
149 */
150
151extern Mask DontPropagateMasks[];
152
153#define wTrackParent(w,field) ((w)->optional ? \
154 (w)->optional->field \
155 : FindWindowWithOptional(w)->optional->field)
156#define wUseDefault(w,field,def) ((w)->optional ? \
157 (w)->optional->field \
158 : def)
159
160#define wVisual(w) wTrackParent(w, visual)
161#define wCursor(w) ((w)->cursorIsNone ? None : wTrackParent(w, cursor))
162#define wColormap(w) ((w)->drawable.class == InputOnly ? None : wTrackParent(w, colormap))
163#define wDontPropagateMask(w) wUseDefault(w, dontPropagateMask, DontPropagateMasks[(w)->dontPropagate])
164#define wOtherEventMasks(w) wUseDefault(w, otherEventMasks, 0)
165#define wOtherClients(w) wUseDefault(w, otherClients, NULL)
166#ifdef XINPUT
167#define wOtherInputMasks(w) wUseDefault(w, inputMasks, NULL)
168#else
169#define wOtherInputMasks(w) NULL
170#endif
171#define wPassiveGrabs(w) wUseDefault(w, passiveGrabs, NULL)
172#define wUserProps(w) wUseDefault(w, userProps, NULL)
173#define wBackingBitPlanes(w) wUseDefault(w, backingBitPlanes, ~0L)
174#define wBackingPixel(w) wUseDefault(w, backingPixel, 0)
175#ifdef SHAPE
176#define wBoundingShape(w) wUseDefault(w, boundingShape, NULL)
177#define wClipShape(w) wUseDefault(w, clipShape, NULL)
178#define wInputShape(w) wUseDefault(w, inputShape, NULL)
179#endif
180#define wClient(w) (clients[CLIENT_ID((w)->drawable.id)])
181#define wBorderWidth(w) ((int) (w)->borderWidth)
182
183/* true when w needs a border drawn. */
184
185#ifdef SHAPE
186#define HasBorder(w) ((w)->borderWidth || wClipShape(w))
187#else
188#define HasBorder(w) ((w)->borderWidth)
189#endif
190
191typedef struct _ScreenSaverStuff {
192 WindowPtr pWindow;
193 XID wid;
194 char blanked;
195 Bool (*ExternalScreenSaver)(
196 ScreenPtr /*pScreen*/,
197 int /*xstate*/,
198 Bool /*force*/);
199} ScreenSaverStuffRec, *ScreenSaverStuffPtr;
200
201#define SCREEN_IS_BLANKED 0
202#define SCREEN_ISNT_SAVED 1
203#define SCREEN_IS_TILED 2
204#define SCREEN_IS_BLACK 3
205
206#define HasSaverWindow(i) (savedScreenInfo[i].pWindow != NullWindow)
207
208extern int screenIsSaved;
209extern ScreenSaverStuffRec savedScreenInfo[MAXSCREENS];
210
211/*
212 * this is the configuration parameter "NO_BACK_SAVE"
213 * it means that any existant backing store should not
214 * be used to implement save unders.
215 */
216
217#ifndef NO_BACK_SAVE
218#define DO_SAVE_UNDERS(pWin) ((pWin)->drawable.pScreen->saveUnderSupport ==\
219 USE_DIX_SAVE_UNDERS)
220/*
221 * saveUnderSupport is set to this magic value when using DIXsaveUnders
222 */
223
224#define USE_DIX_SAVE_UNDERS 0x40
225#endif
226
227extern int numSaveUndersViewable;
228extern int deltaSaveUndersViewable;
229
230#ifdef XEVIE
231extern WindowPtr xeviewin;
232#endif
233
234#endif /* WINDOWSTRUCT_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette