2 .\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
4 .\" Permission is hereby granted, free of charge, to any person obtaining
5 .\" a copy of this software and associated documentation files (the
6 .\" "Software"), to deal in the Software without restriction, including
7 .\" without limitation the rights to use, copy, modify, merge, publish,
8 .\" distribute, sublicense, and/or sell copies of the Software, and to
9 .\" permit persons to whom the Software is furnished to do so, subject to
10 .\" the following conditions:
12 .\" The above copyright notice and this permission notice shall be included
13 .\" in all copies or substantial portions of the Software.
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 .\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 .\" OTHER DEALINGS IN THE SOFTWARE.
23 .\" Except as contained in this notice, the name of the X Consortium shall
24 .\" not be used in advertising or otherwise to promote the sale, use or
25 .\" other dealings in this Software without prior written authorization
26 .\" from the X Consortium.
28 .\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
29 .\" Digital Equipment Corporation
31 .\" Portions Copyright \(co 1990, 1991 by
34 .\" Permission to use, copy, modify and distribute this documentation for
35 .\" any purpose and without fee is hereby granted, provided that the above
36 .\" copyright notice appears in all copies and that both that copyright notice
37 .\" and this permission notice appear in all copies, and that the names of
38 .\" Digital and Tektronix not be used in in advertising or publicity pertaining
39 .\" to this documentation without specific, written prior permission.
40 .\" Digital and Tektronix makes no representations about the suitability
41 .\" of this documentation for any purpose.
42 .\" It is provided ``as is'' without express or implied warranty.
45 .ds xT X Toolkit Intrinsics \- C Language Interface
46 .ds xW Athena X Widgets \- C Language X Toolkit Interface
47 .ds xL Xlib \- C Language X Interface
48 .ds xC Inter-Client Communication Conventions Manual
55 .\".if \\n(VS>=40 .vs \\n(VSu
56 .\".if \\n(VS<=39 .vs \\n(VSp
79 .de IN \" send an index entry to the stderr
86 .\" choose appropriate monospace font
87 .\" the imagen conditional, 480,
88 .\" may be changed to L if LB is too
89 .\" heavy for your eyes...
91 .ie "\\*(.T"480" .ft L
92 .el .ie "\\*(.T"300" .ft L
93 .el .ie "\\*(.T"202" .ft PO
94 .el .ie "\\*(.T"aps" .ft CW
97 .ie \\n(VS>40 .vs \\n(VSu
105 .ie t \\$1\fB\^\\$2\^\fR\\$3
106 .el \\$1\fI\^\\$2\^\fP\\$3
109 .ie t \fB\^\\$1\^\fR\\$2
110 .el \fI\^\\$1\^\fP\\$2
113 .ie t <\fB\\$1\fR>\\$2
119 .if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
120 .if \\n(.$ .if !'\\$1'C' .ds NO \\$1
134 . \" Note End -- doug kraft 3/85
144 .TH XGetWindowAttributes __libmansuffix__ __xorgversion__ "XLIB FUNCTIONS"
146 XGetWindowAttributes, XGetGeometry, XWindowAttributes \- get current window attribute or geometry and current window attributes structure
149 Status XGetWindowAttributes\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^,
150 XWindowAttributes *\fIwindow_attributes_return\fP\^);
152 Status XGetGeometry\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, Window
153 *\fIroot_return\fP\^, int *\fIx_return\fP\^, int *\fIy_return\fP\^, unsigned
154 int *\fIwidth_return\fP\^, unsigned int *\fIheight_return\fP\^, unsigned int
155 *\fIborder_width_return\fP\^, unsigned int *\fIdepth_return\fP\^);
157 .IP \fIborder_width_return\fP 1i
158 Returns the border width in pixels.
159 .ds Dr , which can be a window or a pixmap
161 Specifies the drawable\*(Dr.
162 .IP \fIdepth_return\fP 1i
163 Returns the depth of the drawable (bits per pixel for the object).
165 Specifies the connection to the X server.
166 .IP \fIroot_return\fP 1i
167 Returns the root window.
168 .ds Wi whose current attributes you want to obtain
170 Specifies the window \*(Wi.
171 .IP \fIwidth_return\fP 1i
174 .IP \fIheight_return\fP 1i
175 Return the drawable's dimensions (width and height).
176 .IP \fIwindow_attributes_return\fP 1i
177 Returns the specified window's attributes in the
178 .ZN XWindowAttributes
180 .IP \fIx_return\fP 1i
183 .IP \fIy_return\fP 1i
184 Return the x and y coordinates that define the location of the drawable.
186 these coordinates specify the upper-left outer corner relative to
188 For pixmaps, these coordinates are always zero.
191 .ZN XGetWindowAttributes
192 function returns the current attributes for the specified window to an
193 .ZN XWindowAttributes
194 structure. It returns a nonzero status on success; otherwise, it returns a
197 .ZN XGetWindowAttributes
206 function returns the root window and the current geometry of the drawable.
207 The geometry of the drawable includes the x and y coordinates, width and height,
208 border width, and depth.
209 These are described in the argument list.
210 It is legal to pass to this function a window whose class is
212 It returns a nonzero status on success; otherwise, it returns a
216 .ZN XWindowAttributes
223 int x, y; /\&* location of window */
224 int width, height; /\&* width and height of window */
225 int border_width; /\&* border width of window */
226 int depth; /\&* depth of window */
227 Visual *visual; /\&* the associated visual structure */
228 Window root; /\&* root of screen containing window */
229 int class; /\&* InputOutput, InputOnly*/
230 int bit_gravity; /\&* one of the bit gravity values */
231 int win_gravity; /\&* one of the window gravity values */
232 int backing_store; /\&* NotUseful, WhenMapped, Always */
233 unsigned long backing_planes; /\&* planes to be preserved if possible */
234 unsigned long backing_pixel; /\&* value to be used when restoring planes */
235 Bool save_under; /\&* boolean, should bits under be saved? */
236 Colormap colormap; /\&* color map to be associated with window */
237 Bool map_installed; /\&* boolean, is color map currently installed*/
238 int map_state; /\&* IsUnmapped, IsUnviewable, IsViewable */
239 long all_event_masks; /\&* set of events all people have interest in*/
240 long your_event_mask; /\&* my event mask */
241 long do_not_propagate_mask; /\&* set of events that should not propagate */
242 Bool override_redirect; /\&* boolean value for override-redirect */
243 Screen *screen; /\&* back pointer to correct screen */
247 The x and y members are set to the upper-left outer
248 corner relative to the parent window's origin.
249 The width and height members are set to the inside size of the window,
250 not including the border.
251 The border_width member is set to the window's border width in pixels.
252 The depth member is set to the depth of the window
253 (that is, bits per pixel for the object).
254 The visual member is a pointer to the screen's associated
257 The root member is set to the root window of the screen containing the window.
258 The class member is set to the window's class and can be either
263 The bit_gravity member is set to the window's bit gravity
264 and can be one of the following:
296 The win_gravity member is set to the window's window gravity
297 and can be one of the following:
329 For additional information on gravity,
332 The backing_store member is set to indicate how the X server should maintain
333 the contents of a window
339 The backing_planes member is set to indicate (with bits set to 1) which bit
340 planes of the window hold dynamic data that must be preserved in backing_stores
341 and during save_unders.
342 The backing_pixel member is set to indicate what values to use
343 for planes not set in backing_planes.
345 The save_under member is set to
349 The colormap member is set to the colormap for the specified window and can be
352 The map_installed member is set to indicate whether the colormap is
353 currently installed and can be
357 The map_state member is set to indicate the state of the window and can be
363 is used if the window is mapped but some ancestor is unmapped.
365 The all_event_masks member is set to the bitwise inclusive OR of all event
366 masks selected on the window by all clients.
367 The your_event_mask member is set to the bitwise inclusive OR of all event
368 masks selected by the querying client.
369 The do_not_propagate_mask member is set to the bitwise inclusive OR of the
370 set of events that should not propagate.
372 The override_redirect member is set to indicate whether this window overrides
373 structure control facilities and can be
377 Window manager clients should ignore the window if this member is
380 The screen member is set to a screen pointer that gives you a back pointer
381 to the correct screen.
382 This makes it easier to obtain the screen information without
383 having to loop over the root window fields to see which field matches.
387 A value for a Drawable argument does not name a defined Window or Pixmap.
390 A value for a Window argument does not name a defined Window.
392 XQueryPointer(__libmansuffix__),
393 XQueryTree(__libmansuffix__)