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