1 | /***********************************************************
|
---|
2 |
|
---|
3 | Copyright 1987, 1998 The Open Group
|
---|
4 |
|
---|
5 | Permission to use, copy, modify, distribute, and sell this software and its
|
---|
6 | documentation for any purpose is hereby granted without fee, provided that
|
---|
7 | the above copyright notice appear in all copies and that both that
|
---|
8 | copyright notice and this permission notice appear in supporting
|
---|
9 | documentation.
|
---|
10 |
|
---|
11 | The above copyright notice and this permission notice shall be included in
|
---|
12 | all copies or substantial portions of the Software.
|
---|
13 |
|
---|
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
17 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
---|
18 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
20 |
|
---|
21 | Except as contained in this notice, the name of The Open Group shall not be
|
---|
22 | used in advertising or otherwise to promote the sale, use or other dealings
|
---|
23 | in this Software without prior written authorization from The Open Group.
|
---|
24 |
|
---|
25 |
|
---|
26 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
---|
27 |
|
---|
28 | All Rights Reserved
|
---|
29 |
|
---|
30 | Permission to use, copy, modify, and distribute this software and its
|
---|
31 | documentation for any purpose and without fee is hereby granted,
|
---|
32 | provided that the above copyright notice appear in all copies and that
|
---|
33 | both that copyright notice and this permission notice appear in
|
---|
34 | supporting documentation, and that the name of Digital not be
|
---|
35 | used in advertising or publicity pertaining to distribution of the
|
---|
36 | software without specific, written prior permission.
|
---|
37 |
|
---|
38 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
---|
39 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
---|
40 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
---|
41 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
---|
42 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
---|
43 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
---|
44 | SOFTWARE.
|
---|
45 |
|
---|
46 | ******************************************************************/
|
---|
47 |
|
---|
48 | #ifndef WINDOW_H
|
---|
49 | #define WINDOW_H
|
---|
50 |
|
---|
51 | #include "misc.h"
|
---|
52 | #include "region.h"
|
---|
53 | #include "screenint.h"
|
---|
54 | #include <X11/Xproto.h>
|
---|
55 |
|
---|
56 | #define TOTALLY_OBSCURED 0
|
---|
57 | #define UNOBSCURED 1
|
---|
58 | #define OBSCURED 2
|
---|
59 |
|
---|
60 | #define VisibilityNotViewable 3
|
---|
61 |
|
---|
62 | /* return values for tree-walking callback procedures */
|
---|
63 | #define WT_STOPWALKING 0
|
---|
64 | #define WT_WALKCHILDREN 1
|
---|
65 | #define WT_DONTWALKCHILDREN 2
|
---|
66 | #define WT_NOMATCH 3
|
---|
67 | #define NullWindow ((WindowPtr) 0)
|
---|
68 |
|
---|
69 | /* Forward declaration, we can't include input.h here */
|
---|
70 | struct _DeviceIntRec;
|
---|
71 | struct _Cursor;
|
---|
72 |
|
---|
73 | typedef struct _BackingStore *BackingStorePtr;
|
---|
74 | typedef struct _Window *WindowPtr;
|
---|
75 |
|
---|
76 | typedef int (*VisitWindowProcPtr)(
|
---|
77 | WindowPtr /*pWin*/,
|
---|
78 | pointer /*data*/);
|
---|
79 |
|
---|
80 | extern _X_EXPORT int TraverseTree(
|
---|
81 | WindowPtr /*pWin*/,
|
---|
82 | VisitWindowProcPtr /*func*/,
|
---|
83 | pointer /*data*/);
|
---|
84 |
|
---|
85 | extern _X_EXPORT int WalkTree(
|
---|
86 | ScreenPtr /*pScreen*/,
|
---|
87 | VisitWindowProcPtr /*func*/,
|
---|
88 | pointer /*data*/);
|
---|
89 |
|
---|
90 | extern _X_EXPORT Bool CreateRootWindow(
|
---|
91 | ScreenPtr /*pScreen*/);
|
---|
92 |
|
---|
93 | extern _X_EXPORT void InitRootWindow(
|
---|
94 | WindowPtr /*pWin*/);
|
---|
95 |
|
---|
96 | typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin);
|
---|
97 |
|
---|
98 | extern _X_EXPORT void RegisterRealChildHeadProc (RealChildHeadProc proc);
|
---|
99 |
|
---|
100 | extern _X_EXPORT WindowPtr RealChildHead(
|
---|
101 | WindowPtr /*pWin*/);
|
---|
102 |
|
---|
103 | extern _X_EXPORT WindowPtr CreateWindow(
|
---|
104 | Window /*wid*/,
|
---|
105 | WindowPtr /*pParent*/,
|
---|
106 | int /*x*/,
|
---|
107 | int /*y*/,
|
---|
108 | unsigned int /*w*/,
|
---|
109 | unsigned int /*h*/,
|
---|
110 | unsigned int /*bw*/,
|
---|
111 | unsigned int /*class*/,
|
---|
112 | Mask /*vmask*/,
|
---|
113 | XID* /*vlist*/,
|
---|
114 | int /*depth*/,
|
---|
115 | ClientPtr /*client*/,
|
---|
116 | VisualID /*visual*/,
|
---|
117 | int* /*error*/);
|
---|
118 |
|
---|
119 | extern _X_EXPORT int DeleteWindow(
|
---|
120 | pointer /*pWin*/,
|
---|
121 | XID /*wid*/);
|
---|
122 |
|
---|
123 | extern _X_EXPORT int DestroySubwindows(
|
---|
124 | WindowPtr /*pWin*/,
|
---|
125 | ClientPtr /*client*/);
|
---|
126 |
|
---|
127 | /* Quartz support on Mac OS X uses the HIToolbox
|
---|
128 | framework whose ChangeWindowAttributes function conflicts here. */
|
---|
129 | #ifdef __APPLE__
|
---|
130 | #define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
|
---|
131 | #endif
|
---|
132 | extern _X_EXPORT int ChangeWindowAttributes(
|
---|
133 | WindowPtr /*pWin*/,
|
---|
134 | Mask /*vmask*/,
|
---|
135 | XID* /*vlist*/,
|
---|
136 | ClientPtr /*client*/);
|
---|
137 |
|
---|
138 | extern _X_EXPORT int ChangeWindowDeviceCursor(
|
---|
139 | WindowPtr /*pWin*/,
|
---|
140 | struct _DeviceIntRec* /*pDev*/,
|
---|
141 | struct _Cursor* /*pCursor*/);
|
---|
142 |
|
---|
143 | extern _X_EXPORT struct _Cursor* WindowGetDeviceCursor(
|
---|
144 | WindowPtr /*pWin*/,
|
---|
145 | struct _DeviceIntRec* /*pDev*/);
|
---|
146 |
|
---|
147 | /* Quartz support on Mac OS X uses the HIToolbox
|
---|
148 | framework whose GetWindowAttributes function conflicts here. */
|
---|
149 | #ifdef __APPLE__
|
---|
150 | #define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x)
|
---|
151 | extern void Darwin_X_GetWindowAttributes(
|
---|
152 | #else
|
---|
153 | extern _X_EXPORT void GetWindowAttributes(
|
---|
154 | #endif
|
---|
155 | WindowPtr /*pWin*/,
|
---|
156 | ClientPtr /*client*/,
|
---|
157 | xGetWindowAttributesReply* /* wa */);
|
---|
158 |
|
---|
159 | extern _X_EXPORT void GravityTranslate(
|
---|
160 | int /*x*/,
|
---|
161 | int /*y*/,
|
---|
162 | int /*oldx*/,
|
---|
163 | int /*oldy*/,
|
---|
164 | int /*dw*/,
|
---|
165 | int /*dh*/,
|
---|
166 | unsigned /*gravity*/,
|
---|
167 | int* /*destx*/,
|
---|
168 | int* /*desty*/);
|
---|
169 |
|
---|
170 | extern _X_EXPORT int ConfigureWindow(
|
---|
171 | WindowPtr /*pWin*/,
|
---|
172 | Mask /*mask*/,
|
---|
173 | XID* /*vlist*/,
|
---|
174 | ClientPtr /*client*/);
|
---|
175 |
|
---|
176 | extern _X_EXPORT int CirculateWindow(
|
---|
177 | WindowPtr /*pParent*/,
|
---|
178 | int /*direction*/,
|
---|
179 | ClientPtr /*client*/);
|
---|
180 |
|
---|
181 | extern _X_EXPORT int ReparentWindow(
|
---|
182 | WindowPtr /*pWin*/,
|
---|
183 | WindowPtr /*pParent*/,
|
---|
184 | int /*x*/,
|
---|
185 | int /*y*/,
|
---|
186 | ClientPtr /*client*/);
|
---|
187 |
|
---|
188 | extern _X_EXPORT int MapWindow(
|
---|
189 | WindowPtr /*pWin*/,
|
---|
190 | ClientPtr /*client*/);
|
---|
191 |
|
---|
192 | extern _X_EXPORT void MapSubwindows(
|
---|
193 | WindowPtr /*pParent*/,
|
---|
194 | ClientPtr /*client*/);
|
---|
195 |
|
---|
196 | extern _X_EXPORT int UnmapWindow(
|
---|
197 | WindowPtr /*pWin*/,
|
---|
198 | Bool /*fromConfigure*/);
|
---|
199 |
|
---|
200 | extern _X_EXPORT void UnmapSubwindows(
|
---|
201 | WindowPtr /*pWin*/);
|
---|
202 |
|
---|
203 | extern _X_EXPORT void HandleSaveSet(
|
---|
204 | ClientPtr /*client*/);
|
---|
205 |
|
---|
206 | extern _X_EXPORT Bool PointInWindowIsVisible(
|
---|
207 | WindowPtr /*pWin*/,
|
---|
208 | int /*x*/,
|
---|
209 | int /*y*/);
|
---|
210 |
|
---|
211 | extern _X_EXPORT RegionPtr NotClippedByChildren(
|
---|
212 | WindowPtr /*pWin*/);
|
---|
213 |
|
---|
214 | extern _X_EXPORT void SendVisibilityNotify(
|
---|
215 | WindowPtr /*pWin*/);
|
---|
216 |
|
---|
217 | extern _X_EXPORT int dixSaveScreens(
|
---|
218 | ClientPtr client,
|
---|
219 | int on,
|
---|
220 | int mode);
|
---|
221 |
|
---|
222 | extern _X_EXPORT int SaveScreens(
|
---|
223 | int on,
|
---|
224 | int mode);
|
---|
225 |
|
---|
226 | extern _X_EXPORT WindowPtr FindWindowWithOptional(
|
---|
227 | WindowPtr /*w*/);
|
---|
228 |
|
---|
229 | extern _X_EXPORT void CheckWindowOptionalNeed(
|
---|
230 | WindowPtr /*w*/);
|
---|
231 |
|
---|
232 | extern _X_EXPORT Bool MakeWindowOptional(
|
---|
233 | WindowPtr /*pWin*/);
|
---|
234 |
|
---|
235 | extern _X_EXPORT WindowPtr MoveWindowInStack(
|
---|
236 | WindowPtr /*pWin*/,
|
---|
237 | WindowPtr /*pNextSib*/);
|
---|
238 |
|
---|
239 | extern _X_EXPORT void SetWinSize(
|
---|
240 | WindowPtr /*pWin*/);
|
---|
241 |
|
---|
242 | extern _X_EXPORT void SetBorderSize(
|
---|
243 | WindowPtr /*pWin*/);
|
---|
244 |
|
---|
245 | extern _X_EXPORT void ResizeChildrenWinSize(
|
---|
246 | WindowPtr /*pWin*/,
|
---|
247 | int /*dx*/,
|
---|
248 | int /*dy*/,
|
---|
249 | int /*dw*/,
|
---|
250 | int /*dh*/);
|
---|
251 |
|
---|
252 | extern _X_EXPORT void ShapeExtensionInit(void);
|
---|
253 |
|
---|
254 | extern _X_EXPORT void SendShapeNotify(
|
---|
255 | WindowPtr /* pWin */,
|
---|
256 | int /* which */ );
|
---|
257 |
|
---|
258 | extern _X_EXPORT RegionPtr CreateBoundingShape(
|
---|
259 | WindowPtr /* pWin */ );
|
---|
260 |
|
---|
261 | extern _X_EXPORT RegionPtr CreateClipShape(
|
---|
262 | WindowPtr /* pWin */ );
|
---|
263 |
|
---|
264 | extern _X_EXPORT void DisableMapUnmapEvents(
|
---|
265 | WindowPtr /* pWin */ );
|
---|
266 | extern _X_EXPORT void EnableMapUnmapEvents(
|
---|
267 | WindowPtr /* pWin */ );
|
---|
268 |
|
---|
269 | #endif /* WINDOW_H */
|
---|