summaryrefslogtreecommitdiff
path: root/lib/libX11/man/XConfigureWindow.man
blob: 156cbec37847efc9794b7d5a869ab69ff9e6df93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
'\" t
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
.\" "Software"), to deal in the Software without restriction, including
.\" without limitation the rights to use, copy, modify, merge, publish,
.\" distribute, sublicense, and/or sell copies of the Software, and to
.\" permit persons to whom the Software is furnished to do so, subject to
.\" the following conditions:
.\"
.\" The above copyright notice and this permission notice shall be included
.\" in all copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
.\" OTHER DEALINGS IN THE SOFTWARE.
.\"
.\" Except as contained in this notice, the name of the X Consortium shall
.\" not be used in advertising or otherwise to promote the sale, use or
.\" other dealings in this Software without prior written authorization
.\" from the X Consortium.
.\"
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
.\" Digital Equipment Corporation
.\"
.\" Portions Copyright \(co 1990, 1991 by
.\" Tektronix, Inc.
.\"
.\" Permission to use, copy, modify and distribute this documentation for
.\" any purpose and without fee is hereby granted, provided that the above
.\" copyright notice appears in all copies and that both that copyright notice
.\" and this permission notice appear in all copies, and that the names of
.\" Digital and Tektronix not be used in in advertising or publicity pertaining
.\" to this documentation without specific, written prior permission.
.\" Digital and Tektronix makes no representations about the suitability
.\" of this documentation for any purpose.
.\" It is provided ``as is'' without express or implied warranty.
.\" 
.\"
.ds xT X Toolkit Intrinsics \- C Language Interface
.ds xW Athena X Widgets \- C Language X Toolkit Interface
.ds xL Xlib \- C Language X Interface
.ds xC Inter-Client Communication Conventions Manual
.na
.de Ds
.nf
.\\$1D \\$2 \\$1
.ft CW
.\".ps \\n(PS
.\".if \\n(VS>=40 .vs \\n(VSu
.\".if \\n(VS<=39 .vs \\n(VSp
..
.de De
.ce 0
.if \\n(BD .DF
.nr BD 0
.in \\n(OIu
.if \\n(TM .ls 2
.sp \\n(DDu
.fi
..
.de IN		\" send an index entry to the stderr
..
.de Pn
.ie t \\$1\fB\^\\$2\^\fR\\$3
.el \\$1\fI\^\\$2\^\fP\\$3
..
.de ZN
.ie t \fB\^\\$1\^\fR\\$2
.el \fI\^\\$1\^\fP\\$2
..
.de hN
.ie t <\fB\\$1\fR>\\$2
.el <\fI\\$1\fP>\\$2
..
.ny0
'\" t
.TH XConfigureWindow __libmansuffix__ __xorgversion__ "XLIB FUNCTIONS"
.SH NAME
XConfigureWindow, XMoveWindow, XResizeWindow, XMoveResizeWindow, XSetWindowBorderWidth, XWindowChanges \- configure windows and window changes structure
.SH SYNTAX
.HP
int XConfigureWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, unsigned \fIvalue_mask\fP\^, \^XWindowChanges *\fIchanges\fP\^);
.HP
int XMoveWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, int \fIx\fP\^, \fIy\fP\^);
.HP
int XResizeWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, unsigned
\fIwidth\fP\^, unsigned \fIheight\fP\^);
.HP
int XMoveResizeWindow\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, int
\fIx\fP\^, int \fIy\fP\^, unsigned \fIwidth\fP\^, unsigned \fIheight\fP\^); 
.HP
int XSetWindowBorderWidth\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^,
unsigned \fIwidth\fP\^); 
.SH ARGUMENTS
.IP \fIdisplay\fP 1i
Specifies the connection to the X server.
.IP \fIvalue_mask\fP 1i
Specifies which values are to be set using information in
the values structure.
This mask is the bitwise inclusive OR of the valid configure window values bits.
.IP \fIvalues\fP 1i
Specifies the 
.ZN XWindowChanges 
structure.
.ds Wi to be reconfigured, moved, or resized.
.IP \fIw\fP 1i
Specifies the window \*(Wi.
.IP \fIwidth\fP 1i
Specifies the width of the window border.
.ds Wh , which are the interior dimensions of the window
.IP \fIwidth\fP 1i
.br
.ns
.IP \fIheight\fP 1i
Specify the width and height\*(Wh.
.ds Xy , which define the new location of the top-left pixel \
of the window's border or the window itself if it has no border \
or define the new position of the window relative to its parent
.IP \fIx\fP 1i
.br
.ns
.IP \fIy\fP 1i
Specify the x and y coordinates\*(Xy.
.SH DESCRIPTION
The
.ZN XConfigureWindow
function uses the values specified in the
.ZN XWindowChanges
structure to reconfigure a window's size, position, border, and stacking order.
Values not specified are taken from the existing geometry of the window.
.LP
If a sibling is specified without a stack_mode or if the window
is not actually a sibling,
a
.ZN BadMatch
error results. 
Note that the computations for
.ZN BottomIf ,
.ZN TopIf ,
and
.ZN Opposite
are performed with respect to the window's final geometry (as controlled by the
other arguments passed to
.ZN XConfigureWindow ),
not its initial geometry.
Any backing store contents of the window, its
inferiors, and other newly visible windows are either discarded or
changed to reflect the current screen contents 
(depending on the implementation).
.LP
.ZN XConfigureWindow
can generate
.ZN BadMatch ,
.ZN BadValue ,
and
.ZN BadWindow 
errors.
.LP
The
.ZN XMoveWindow
function moves the specified window to the specified x and y coordinates,
but it does not change the window's size, raise the window, or
change the mapping state of the window.
Moving a mapped window may or may not lose the window's contents 
depending on if the window is obscured by nonchildren 
and if no backing store exists.
If the contents of the window are lost, 
the X server generates
.ZN Expose 
events.
Moving a mapped window generates
.ZN Expose 
events on any formerly obscured windows. 
.LP
If the override-redirect flag of the window is 
.ZN False 
and some
other client has selected 
.ZN SubstructureRedirectMask 
on the parent, the X server generates a
.ZN ConfigureRequest 
event, and no further processing is
performed.  
Otherwise, the window is moved.
.LP
.ZN XMoveWindow
can generate a
.ZN BadWindow 
error.
.LP
The
.ZN XResizeWindow
function changes the inside dimensions of the specified window, not including
its borders.
This function does not change the window's upper-left coordinate or
the origin and does not restack the window.
Changing the size of a mapped window may lose its contents and generate
.ZN Expose 
events.
If a mapped window is made smaller, 
changing its size generates
.ZN Expose 
events on windows that the mapped window formerly obscured.
.LP
If the override-redirect flag of the window is 
.ZN False 
and some
other client has selected 
.ZN SubstructureRedirectMask 
on the parent, the X server generates a
.ZN ConfigureRequest 
event, and no further processing is performed.  
If either width or height is zero,
a
.ZN BadValue
error results.
.LP
.ZN XResizeWindow
can generate
.ZN BadValue
and
.ZN BadWindow 
errors.
.LP
The
.ZN XMoveResizeWindow
function changes the size and location of the specified window 
without raising it.
Moving and resizing a mapped window may generate an
.ZN Expose 
event on the window.
Depending on the new size and location parameters,
moving and resizing a window may generate 
.ZN Expose 
events on windows that the window formerly obscured. 
.LP
If the override-redirect flag of the window is 
.ZN False 
and some
other client has selected 
.ZN SubstructureRedirectMask 
on the parent, the X server generates a
.ZN ConfigureRequest 
event, and no further processing is performed.  
Otherwise, the window size and location are changed.
.LP
.ZN XMoveResizeWindow
can generate
.ZN BadValue
and
.ZN BadWindow 
errors.
.LP
The
.ZN XSetWindowBorderWidth
function sets the specified window's border width to the specified width.
.LP
.ZN XSetWindowBorderWidth
can generate a
.ZN BadWindow 
error.
.SH STRUCTURES
The
.ZN XWindowChanges
structure contains:
.LP
.LP
/\&* Configure window value mask bits */
.TS
lw(.5i) lw(2.5i) lw(.8i).
T{
\&#define
T}	T{
.ZN CWX
T}	T{
(1<<0)
T}
T{
\&#define
T}	T{
.ZN CWY
T}	T{
(1<<1)
T}
T{
\&#define
T}	T{
.ZN CWWidth
T}	T{
(1<<2)
T}
T{
\&#define
T}	T{
.ZN CWHeight
T}	T{
(1<<3)
T}
T{
\&#define
T}	T{
.ZN CWBorderWidth
T}	T{
(1<<4)
T}
T{
\&#define
T}	T{
.ZN CWSibling
T}	T{
(1<<5)
T}
T{
\&#define
T}	T{
.ZN CWStackMode
T}	T{
(1<<6)
T}
.TE
.IN "XWindowChanges" "" "@DEF@"
.Ds 0
/\&* Values */

typedef struct {
        int x, y;
        int width, height;
        int border_width;
        Window sibling;
        int stack_mode;
} XWindowChanges;
.De
.LP
The x and y members are used to set the window's x and y coordinates,
which are relative to the parent's origin
and indicate the position of the upper-left outer corner of the window.
The width and height members are used to set the inside size of the window,
not including the border, and must be nonzero, or a
.ZN BadValue
error results.
Attempts to configure a root window have no effect.
.LP
The border_width member is used to set the width of the border in pixels.
Note that setting just the border width leaves the outer-left corner of the window
in a fixed position but moves the absolute position of the window's origin.
If you attempt to set the border-width attribute of an
.ZN InputOnly
window nonzero, a
.ZN BadMatch
error results. 
.LP
The sibling member is used to set the sibling window for stacking operations.
The stack_mode member is used to set how the window is to be restacked 
and can be set to
.ZN Above , 
.ZN Below , 
.ZN TopIf , 
.ZN BottomIf ,
or 
.ZN Opposite .
.SH DIAGNOSTICS
.TP 1i
.ZN BadMatch
An
.ZN InputOnly
window is used as a Drawable.
.TP 1i
.ZN BadMatch
Some argument or pair of arguments has the correct type and range but fails
to match in some other way required by the request.
.TP 1i
.ZN BadValue
Some numeric value falls outside the range of values accepted by the request.
Unless a specific range is specified for an argument, the full range defined
by the argument's type is accepted.  Any argument defined as a set of
alternatives can generate this error.
.TP 1i
.ZN BadWindow
A value for a Window argument does not name a defined Window.
.SH "SEE ALSO"
XChangeWindowAttributes(__libmansuffix__),
XCreateWindow(__libmansuffix__),
XDestroyWindow(__libmansuffix__),
XMapWindow(__libmansuffix__),
XRaiseWindow(__libmansuffix__),
XUnmapWindow(__libmansuffix__)
.br
\fI\*(xL\fP