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, \fRO'Reilly and Associates,
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 XAllocSizeHints __libmansuffix__ __xorgversion__ "XLIB FUNCTIONS"
146 XAllocSizeHints, XSetWMNormalHints, XGetWMNormalHints, XSetWMSizeHints, XGetWMSizeHints, XSizeHints \- allocate size hints structure and set or read a window's WM_NORMAL_HINTS property
149 XSizeHints *XAllocSizeHints\^(void\^);
151 void XSetWMNormalHints\^(\^Display *\fIdisplay\fP, Window \fIw\fP, XSizeHints *\fIhints\fP\^);
153 Status XGetWMNormalHints\^(\^Display *\fIdisplay\fP, Window \fIw\fP,
154 XSizeHints *\fIhints_return\fP, long *\fIsupplied_return\fP\^);
156 void XSetWMSizeHints\^(\^Display *\fIdisplay\fP, Window \fIw\fP, XSizeHints
157 *\fIhints\fP, Atom \fIproperty\fP\^);
159 Status XGetWMSizeHints\^(\^Display *\fIdisplay\fP, Window \fIw\fP, XSizeHints
160 *\fIhints_return\fP, long *\fIsupplied_return\fP, Atom \fIproperty\fP\^);
163 Specifies the connection to the X server.
165 Specifies the size hints for the window in its normal state.
169 structure to be used.
170 .IP \fIhints_return\fP 1i
171 Returns the size hints for the window in its normal state.
172 .IP \fIproperty\fP 1i
173 Specifies the property name.
174 .IP \fIsupplied_return\fP 1i
175 Returns the hints that were supplied by the user.
177 Specifies the window.
181 function allocates and returns a pointer to a
184 Note that all fields in the
186 structure are initially set to zero.
187 If insufficient memory is available,
190 To free the memory allocated to this structure,
195 .ZN XSetWMNormalHints
196 function replaces the size hints for the WM_NORMAL_HINTS property
197 on the specified window.
198 If the property does not already exist,
199 .ZN XSetWMNormalHints
200 sets the size hints for the WM_NORMAL_HINTS property on the specified window.
201 The property is stored with a type of WM_SIZE_HINTS and a format of 32.
203 .ZN XSetWMNormalHints
211 .ZN XGetWMNormalHints
212 function returns the size hints stored in the WM_NORMAL_HINTS property
213 on the specified window.
214 If the property is of type WM_SIZE_HINTS, is of format 32,
215 and is long enough to contain either an old (pre-ICCCM)
216 or new size hints structure,
217 .ZN XGetWMNormalHints
218 sets the various fields of the
220 structure, sets the supplied_return argument to the list of fields
221 that were supplied by the user (whether or not they contained defined values),
222 and returns a nonzero status.
223 Otherwise, it returns a zero status.
226 .ZN XGetWMNormalHints
227 returns successfully and a pre-ICCCM size hints property is read,
228 the supplied_return argument will contain the following bits:
231 (USPosition|USSize|PPosition|PSize|PMinSize|
232 PMaxSize|PResizeInc|PAspect)
235 If the property is large enough to contain the base size
236 and window gravity fields as well,
237 the supplied_return argument will also contain the following bits:
240 PBaseSize|PWinGravity
243 .ZN XGetWMNormalHints
250 function replaces the size hints for the specified property
252 If the specified property does not already exist,
254 sets the size hints for the specified property
256 The property is stored with a type of WM_SIZE_HINTS and a format of 32.
257 To set a window's normal size hints,
259 .ZN XSetWMNormalHints
272 function returns the size hints stored in the specified property
274 If the property is of type WM_SIZE_HINTS, is of format 32,
275 and is long enough to contain either an old (pre-ICCCM)
276 or new size hints structure,
278 sets the various fields of the
280 structure, sets the supplied_return argument to the
281 list of fields that were supplied by the user
282 (whether or not they contained defined values),
283 and returns a nonzero status.
284 Otherwise, it returns a zero status.
285 To get a window's normal size hints,
287 .ZN XGetWMNormalHints
292 returns successfully and a pre-ICCCM size hints property is read,
293 the supplied_return argument will contain the following bits:
296 (USPosition|USSize|PPosition|PSize|PMinSize|
297 PMaxSize|PResizeInc|PAspect)
300 If the property is large enough to contain the base size
301 and window gravity fields as well,
302 the supplied_return argument will also contain the following bits:
305 PBaseSize|PWinGravity
316 \s-1WM_NORMAL_HINTS\s+1
317 Size hints for a window in its normal state.
318 The C type of this property is
325 /\&* Size hints mask bits */
327 lw(.5i) lw(1.1i) lw(1.5i) lw(3.1i).
335 /\&* user specified x, y */
344 /\&* user specified width, height */
353 /\&* program specified position */
362 /\&* program specified size */
371 /\&* program specified minimum size */
380 /\&* program specified maximum size */
389 /\&* program specified resize increments */
398 /\&* program specified min and max aspect ratios */
427 .IN "XSizeHints" "" "@DEF@"
434 long flags; /\&* marks which fields in this structure are defined */
435 int x, y; /\&* Obsolete */
436 int width, height; /\&* Obsolete */
437 int min_width, min_height;
438 int max_width, max_height;
439 int width_inc, height_inc;
441 int x; /\&* numerator */
442 int y; /\&* denominator */
443 } min_aspect, max_aspect;
444 int base_width, base_height;
446 /\&* this structure may be extended in the future */
450 The x, y, width, and height members are now obsolete
451 and are left solely for compatibility reasons.
452 The min_width and min_height members specify the
453 minimum window size that still allows the application to be useful.
454 The max_width and max_height members specify the maximum window size.
455 The width_inc and height_inc members define an arithmetic progression of
456 sizes (minimum to maximum) into which the window prefers to be resized.
457 The min_aspect and max_aspect members are expressed
458 as ratios of x and y,
459 and they allow an application to specify the range of aspect
461 The base_width and base_height members define the desired size of the window.
462 The window manager will interpret the position of the window
463 and its border width to position the point of the outer rectangle
464 of the overall window specified by the win_gravity member.
465 The outer rectangle of the window includes any borders or decorations
466 supplied by the window manager.
468 if the window manager decides to place the window where the client asked,
469 the position on the parent window's border named by the win_gravity
470 will be placed where the client window would have been placed
471 in the absence of a window manager.
475 macro is highly discouraged.
479 The server failed to allocate the requested resource or server memory.
482 A value for an Atom argument does not name a defined Atom.
485 A value for a Window argument does not name a defined Window.
487 XAllocClassHint(__libmansuffix__),
488 XAllocIconSize(__libmansuffix__),
489 XAllocWMHints(__libmansuffix__),
490 XFree(__libmansuffix__),
491 XSetCommand(__libmansuffix__),
492 XSetTransientForHint(__libmansuffix__),
493 XSetTextProperty(__libmansuffix__),
494 XSetWMClientMachine(__libmansuffix__),
495 XSetWMColormapWindows(__libmansuffix__),
496 XSetWMIconName(__libmansuffix__),
497 XSetWMName(__libmansuffix__),
498 XSetWMProperties(__libmansuffix__),
499 XSetWMProtocols(__libmansuffix__),
500 XStringListToTextProperty(__libmansuffix__)