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.
44
.\" $XFree86: xc/doc/man/X11/XGetWAttr.man,v 1.2 2001/01/27 18:19:59 dawes Exp $
46
.ds xT X Toolkit Intrinsics \- C Language Interface
47
.ds xW Athena X Widgets \- C Language X Toolkit Interface
48
.ds xL Xlib \- C Language X Interface
49
.ds xC Inter-Client Communication Conventions Manual
56
.\".if \\n(VS>=40 .vs \\n(VSu
57
.\".if \\n(VS<=39 .vs \\n(VSp
80
.de IN \" send an index entry to the stderr
87
.\" choose appropriate monospace font
88
.\" the imagen conditional, 480,
89
.\" may be changed to L if LB is too
90
.\" heavy for your eyes...
92
.ie "\\*(.T"480" .ft L
93
.el .ie "\\*(.T"300" .ft L
94
.el .ie "\\*(.T"202" .ft PO
95
.el .ie "\\*(.T"aps" .ft CW
98
.ie \\n(VS>40 .vs \\n(VSu
106
.ie t \\$1\fB\^\\$2\^\fR\\$3
107
.el \\$1\fI\^\\$2\^\fP\\$3
110
.ie t \fB\^\\$1\^\fR\\$2
111
.el \fI\^\\$1\^\fP\\$2
114
.ie t <\fB\\$1\fR>\\$2
120
.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
121
.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
135
. \" Note End -- doug kraft 3/85
145
.TH XGetWindowAttributes 3X11 __xorgversion__ "XLIB FUNCTIONS"
147
XGetWindowAttributes, XGetGeometry, XWindowAttributes \- get current window attribute or geometry and current window attributes structure
149
Status XGetWindowAttributes\^(\^\fIdisplay\fP, \fIw\fP\^, \fIwindow_attributes_return\fP\^)
151
Display *\fIdisplay\fP\^;
155
XWindowAttributes *\fIwindow_attributes_return\fP\^;
157
Status XGetGeometry\^(\^\fIdisplay\fP, \fId\fP\^, \^\fIroot_return\fP\^, \fIx_return\fP\^, \fIy_return\fP\^, \fIwidth_return\fP\^,
159
\fIheight_return\fP\^, \fIborder_width_return\fP\^, \fIdepth_return\fP\^)
161
Display *\fIdisplay\fP\^;
165
Window *\fIroot_return\fP\^;
167
int *\fIx_return\fP\^, *\fIy_return\fP\^;
169
unsigned int *\fIwidth_return\fP\^, *\fIheight_return\fP\^;
171
unsigned int *\fIborder_width_return\fP\^;
173
unsigned int *\fIdepth_return\fP\^;
175
.IP \fIborder_width_return\fP 1i
176
Returns the border width in pixels.
177
.ds Dr , which can be a window or a pixmap
179
Specifies the drawable\*(Dr.
180
.IP \fIdepth_return\fP 1i
181
Returns the depth of the drawable (bits per pixel for the object).
183
Specifies the connection to the X server.
184
.IP \fIroot_return\fP 1i
185
Returns the root window.
186
.ds Wi whose current attributes you want to obtain
188
Specifies the window \*(Wi.
189
.IP \fIwidth_return\fP 1i
192
.IP \fIheight_return\fP 1i
193
Return the drawable's dimensions (width and height).
194
.IP \fIwindow_attributes_return\fP 1i
195
Returns the specified window's attributes in the
196
.ZN XWindowAttributes
198
.IP \fIx_return\fP 1i
201
.IP \fIy_return\fP 1i
202
Return the x and y coordinates that define the location of the drawable.
204
these coordinates specify the upper-left outer corner relative to
206
For pixmaps, these coordinates are always zero.
209
.ZN XGetWindowAttributes
210
function returns the current attributes for the specified window to an
211
.ZN XWindowAttributes
214
.ZN XGetWindowAttributes
223
function returns the root window and the current geometry of the drawable.
224
The geometry of the drawable includes the x and y coordinates, width and height,
225
border width, and depth.
226
These are described in the argument list.
227
It is legal to pass to this function a window whose class is
231
.ZN XWindowAttributes
238
int x, y; /* location of window */
239
int width, height; /* width and height of window */
240
int border_width; /* border width of window */
241
int depth; /* depth of window */
242
Visual *visual; /* the associated visual structure */
243
Window root; /* root of screen containing window */
244
int class; /* InputOutput, InputOnly*/
245
int bit_gravity; /* one of the bit gravity values */
246
int win_gravity; /* one of the window gravity values */
247
int backing_store; /* NotUseful, WhenMapped, Always */
248
unsigned long backing_planes; /* planes to be preserved if possible */
249
unsigned long backing_pixel; /* value to be used when restoring planes */
250
Bool save_under; /* boolean, should bits under be saved? */
251
Colormap colormap; /* color map to be associated with window */
252
Bool map_installed; /* boolean, is color map currently installed*/
253
int map_state; /* IsUnmapped, IsUnviewable, IsViewable */
254
long all_event_masks; /* set of events all people have interest in*/
255
long your_event_mask; /* my event mask */
256
long do_not_propagate_mask; /* set of events that should not propagate */
257
Bool override_redirect; /* boolean value for override-redirect */
258
Screen *screen; /* back pointer to correct screen */
262
The x and y members are set to the upper-left outer
263
corner relative to the parent window's origin.
264
The width and height members are set to the inside size of the window,
265
not including the border.
266
The border_width member is set to the window's border width in pixels.
267
The depth member is set to the depth of the window
268
(that is, bits per pixel for the object).
269
The visual member is a pointer to the screen's associated
272
The root member is set to the root window of the screen containing the window.
273
The class member is set to the window's class and can be either
278
The bit_gravity member is set to the window's bit gravity
279
and can be one of the following:
311
The win_gravity member is set to the window's window gravity
312
and can be one of the following:
344
For additional information on gravity,
347
The backing_store member is set to indicate how the X server should maintain
348
the contents of a window
354
The backing_planes member is set to indicate (with bits set to 1) which bit
355
planes of the window hold dynamic data that must be preserved in backing_stores
356
and during save_unders.
357
The backing_pixel member is set to indicate what values to use
358
for planes not set in backing_planes.
360
The save_under member is set to
364
The colormap member is set to the colormap for the specified window and can be
367
The map_installed member is set to indicate whether the colormap is
368
currently installed and can be
372
The map_state member is set to indicate the state of the window and can be
378
is used if the window is mapped but some ancestor is unmapped.
380
The all_event_masks member is set to the bitwise inclusive OR of all event
381
masks selected on the window by all clients.
382
The your_event_mask member is set to the bitwise inclusive OR of all event
383
masks selected by the querying client.
384
The do_not_propagate_mask member is set to the bitwise inclusive OR of the
385
set of events that should not propagate.
387
The override_redirect member is set to indicate whether this window overrides
388
structure control facilities and can be
392
Window manager clients should ignore the window if this member is
395
The screen member is set to a screen pointer that gives you a back pointer
396
to the correct screen.
397
This makes it easier to obtain the screen information without
398
having to loop over the root window fields to see which field matches.
402
A value for a Drawable argument does not name a defined Window or Pixmap.
405
A value for a Window argument does not name a defined Window.