VirtualBox

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

最後變更 在這個檔案從25078是 25078,由 vboxsync 提交於 15 年 前

Additions/x11/x11include: exported and set eol-style on new headers

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

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