~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/doc/man/X11/XGetWAttr.man

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
 
3
.\"
 
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:
 
11
.\"
 
12
.\" The above copyright notice and this permission notice shall be included
 
13
.\" in all copies or substantial portions of the Software.
 
14
.\"
 
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.
 
22
.\"
 
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.
 
27
.\"
 
28
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
 
29
.\" Digital Equipment Corporation
 
30
.\"
 
31
.\" Portions Copyright \(co 1990, 1991 by
 
32
.\" Tektronix, Inc.
 
33
.\"
 
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.
 
43
.\" 
 
44
.\" $XFree86: xc/doc/man/X11/XGetWAttr.man,v 1.2 2001/01/27 18:19:59 dawes Exp $
 
45
.\"
 
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
 
50
.na
 
51
.de Ds
 
52
.nf
 
53
.\\$1D \\$2 \\$1
 
54
.ft 1
 
55
.\".ps \\n(PS
 
56
.\".if \\n(VS>=40 .vs \\n(VSu
 
57
.\".if \\n(VS<=39 .vs \\n(VSp
 
58
..
 
59
.de De
 
60
.ce 0
 
61
.if \\n(BD .DF
 
62
.nr BD 0
 
63
.in \\n(OIu
 
64
.if \\n(TM .ls 2
 
65
.sp \\n(DDu
 
66
.fi
 
67
..
 
68
.de FD
 
69
.LP
 
70
.KS
 
71
.TA .5i 3i
 
72
.ta .5i 3i
 
73
.nf
 
74
..
 
75
.de FN
 
76
.fi
 
77
.KE
 
78
.LP
 
79
..
 
80
.de IN          \" send an index entry to the stderr
 
81
..
 
82
.de C{
 
83
.KS
 
84
.nf
 
85
.D
 
86
.\"
 
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...
 
91
.\"
 
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
 
96
.el .ft R
 
97
.ps \\n(PS
 
98
.ie \\n(VS>40 .vs \\n(VSu
 
99
.el .vs \\n(VSp
 
100
..
 
101
.de C}
 
102
.DE
 
103
.R
 
104
..
 
105
.de Pn
 
106
.ie t \\$1\fB\^\\$2\^\fR\\$3
 
107
.el \\$1\fI\^\\$2\^\fP\\$3
 
108
..
 
109
.de ZN
 
110
.ie t \fB\^\\$1\^\fR\\$2
 
111
.el \fI\^\\$1\^\fP\\$2
 
112
..
 
113
.de hN
 
114
.ie t <\fB\\$1\fR>\\$2
 
115
.el <\fI\\$1\fP>\\$2
 
116
..
 
117
.de NT
 
118
.ne 7
 
119
.ds NO Note
 
120
.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
 
121
.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
 
122
.ie n .sp
 
123
.el .sp 10p
 
124
.TB
 
125
.ce
 
126
\\*(NO
 
127
.ie n .sp
 
128
.el .sp 5p
 
129
.if '\\$1'C' .ce 99
 
130
.if '\\$2'C' .ce 99
 
131
.in +5n
 
132
.ll -5n
 
133
.R
 
134
..
 
135
.               \" Note End -- doug kraft 3/85
 
136
.de NE
 
137
.ce 0
 
138
.in -5n
 
139
.ll +5n
 
140
.ie n .sp
 
141
.el .sp 10p
 
142
..
 
143
.ny0
 
144
'\" t
 
145
.TH XGetWindowAttributes 3X11 __xorgversion__ "XLIB FUNCTIONS"
 
146
.SH NAME
 
147
XGetWindowAttributes, XGetGeometry, XWindowAttributes \- get current window attribute or geometry and current window attributes structure
 
148
.SH SYNTAX
 
149
Status XGetWindowAttributes\^(\^\fIdisplay\fP, \fIw\fP\^, \fIwindow_attributes_return\fP\^)
 
150
.br
 
151
      Display *\fIdisplay\fP\^;
 
152
.br
 
153
      Window \fIw\fP\^;
 
154
.br
 
155
      XWindowAttributes *\fIwindow_attributes_return\fP\^;
 
156
.LP
 
157
Status XGetGeometry\^(\^\fIdisplay\fP, \fId\fP\^, \^\fIroot_return\fP\^, \fIx_return\fP\^, \fIy_return\fP\^, \fIwidth_return\fP\^, 
 
158
.br
 
159
                      \fIheight_return\fP\^, \fIborder_width_return\fP\^, \fIdepth_return\fP\^)
 
160
.br
 
161
        Display *\fIdisplay\fP\^;
 
162
.br
 
163
        Drawable \fId\fP\^;
 
164
.br
 
165
        Window *\fIroot_return\fP\^;
 
166
.br
 
167
        int *\fIx_return\fP\^, *\fIy_return\fP\^;
 
168
.br
 
169
        unsigned int *\fIwidth_return\fP\^, *\fIheight_return\fP\^;
 
170
.br
 
171
        unsigned int *\fIborder_width_return\fP\^;
 
172
.br
 
173
        unsigned int *\fIdepth_return\fP\^;
 
174
.SH ARGUMENTS
 
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
 
178
.IP \fId\fP 1i
 
179
Specifies the drawable\*(Dr. 
 
180
.IP \fIdepth_return\fP 1i
 
181
Returns the depth of the drawable (bits per pixel for the object).
 
182
.IP \fIdisplay\fP 1i
 
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
 
187
.IP \fIw\fP 1i
 
188
Specifies the window \*(Wi.
 
189
.IP \fIwidth_return\fP 1i
 
190
.br
 
191
.ns
 
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
 
197
structure.
 
198
.IP \fIx_return\fP 1i
 
199
.br
 
200
.ns
 
201
.IP \fIy_return\fP 1i
 
202
Return the x and y coordinates that define the location of the drawable.
 
203
For a window, 
 
204
these coordinates specify the upper-left outer corner relative to
 
205
its parent's origin.
 
206
For pixmaps, these coordinates are always zero.
 
207
.SH DESCRIPTION
 
208
The
 
209
.ZN XGetWindowAttributes
 
210
function returns the current attributes for the specified window to an
 
211
.ZN XWindowAttributes
 
212
structure.
 
213
.LP
 
214
.ZN XGetWindowAttributes
 
215
can generate
 
216
.ZN BadDrawable
 
217
and
 
218
.ZN BadWindow
 
219
errors.
 
220
.LP
 
221
The
 
222
.ZN XGetGeometry
 
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
 
228
.ZN InputOnly .
 
229
.SH STRUCTURES
 
230
The
 
231
.ZN XWindowAttributes
 
232
structure contains:
 
233
.LP
 
234
.Ds 0
 
235
.TA .5i 3i
 
236
.ta .5i 3i
 
237
typedef struct {
 
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 */
 
259
} XWindowAttributes;
 
260
.De
 
261
.LP
 
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
 
270
.ZN Visual
 
271
structure.
 
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
 
274
.ZN InputOutput
 
275
or
 
276
.ZN InputOnly .
 
277
.LP
 
278
The bit_gravity member is set to the window's bit gravity
 
279
and can be one of the following:
 
280
.LP
 
281
.TS
 
282
lw(1.5i) lw(1.5i).
 
283
T{
 
284
.ZN ForgetGravity
 
285
T}      T{
 
286
.ZN EastGravity
 
287
T}
 
288
T{
 
289
.ZN NorthWestGravity
 
290
T}      T{
 
291
.ZN SouthWestGravity
 
292
T}
 
293
T{
 
294
.ZN NorthGravity
 
295
T}      T{
 
296
.ZN SouthGravity
 
297
T}
 
298
T{
 
299
.ZN NorthEastGravity
 
300
T}      T{
 
301
.ZN SouthEastGravity
 
302
T}
 
303
T{
 
304
.ZN WestGravity
 
305
T}      T{
 
306
.ZN StaticGravity
 
307
T}
 
308
.ZN CenterGravity
 
309
.TE
 
310
.LP
 
311
The win_gravity member is set to the window's window gravity
 
312
and can be one of the following:
 
313
.LP
 
314
.TS
 
315
lw(1.5i) lw(1.5i).
 
316
T{
 
317
.ZN UnmapGravity
 
318
T}      T{
 
319
.ZN EastGravity
 
320
T}
 
321
T{
 
322
.ZN NorthWestGravity
 
323
T}      T{
 
324
.ZN SouthWestGravity
 
325
T}
 
326
T{
 
327
.ZN NorthGravity
 
328
T}      T{
 
329
.ZN SouthGravity
 
330
T}
 
331
T{
 
332
.ZN NorthEastGravity
 
333
T}      T{
 
334
.ZN SouthEastGravity
 
335
T}
 
336
T{
 
337
.ZN WestGravity
 
338
T}      T{
 
339
.ZN StaticGravity
 
340
T}
 
341
.ZN CenterGravity
 
342
.TE
 
343
.LP
 
344
For additional information on gravity,
 
345
see section 3.3.
 
346
.LP
 
347
The backing_store member is set to indicate how the X server should maintain
 
348
the contents of a window 
 
349
and can be 
 
350
.ZN WhenMapped ,
 
351
.ZN Always ,
 
352
or
 
353
.ZN NotUseful .
 
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.
 
359
.LP
 
360
The save_under member is set to 
 
361
.ZN True
 
362
or
 
363
.ZN False .
 
364
The colormap member is set to the colormap for the specified window and can be
 
365
a colormap ID or 
 
366
.ZN None .
 
367
The map_installed member is set to indicate whether the colormap is 
 
368
currently installed and can be 
 
369
.ZN True
 
370
or
 
371
.ZN False .
 
372
The map_state member is set to indicate the state of the window and can be
 
373
.ZN IsUnmapped ,
 
374
.ZN IsUnviewable ,
 
375
or
 
376
.ZN IsViewable .
 
377
.ZN IsUnviewable
 
378
is used if the window is mapped but some ancestor is unmapped.
 
379
.LP
 
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.
 
386
.LP
 
387
The override_redirect member is set to indicate whether this window overrides
 
388
structure control facilities and can be 
 
389
.ZN True
 
390
or
 
391
.ZN False .
 
392
Window manager clients should ignore the window if this member is
 
393
.ZN True .
 
394
.LP
 
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.
 
399
.SH DIAGNOSTICS
 
400
.TP 1i
 
401
.ZN BadDrawable
 
402
A value for a Drawable argument does not name a defined Window or Pixmap.
 
403
.TP 1i
 
404
.ZN BadWindow
 
405
A value for a Window argument does not name a defined Window.
 
406
.SH "SEE ALSO"
 
407
XQueryPointer(3X11),
 
408
XQueryTree(3X11)
 
409
.br
 
410
\fI\*(xL\fP