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 XCreateWindow __libmansuffix__ __xorgversion__ "XLIB FUNCTIONS"
146 XCreateWindow, XCreateSimpleWindow, XSetWindowAttributes \- create windows and window attributes structure
149 Window XCreateWindow\^(\^Display *\fIdisplay\fP\^, Window \fIparent\fP\^, int \fIx\fP\^, int \fIy\fP\^, unsigned int \fIwidth\fP\^, unsigned int \fIheight\fP\^, unsigned int \fIborder_width\fP\^, int \fIdepth\fP\^, unsigned int \fIclass\fP\^, Visual *\fIvisual\fP\^, unsigned long \fIvaluemask\fP\^, XSetWindowAttributes *\fIattributes\fP\^);
151 Window XCreateSimpleWindow\^(\^Display *\fIdisplay\fP\^, Window \fIparent\fP\^, int \fIx\fP\^, int \fIy\fP\^, unsigned int \fIwidth\fP\^, unsigned int \fIheight\fP\^, unsigned int \fIborder_width\fP\^, unsigned long \fIborder\fP\^, unsigned long \fIbackground\fP\^);
153 .IP \fIattributes\fP 1i
154 Specifies the structure from which the values (as specified by the value mask)
156 The value mask should have the appropriate bits
157 set to indicate which attributes have been set in the structure.
158 .IP \fIbackground\fP 1i
159 Specifies the background pixel value of the window.
162 Specifies the border pixel value of the window.
163 .IP \fIborder_width\fP 1i
164 Specifies the width of the created window's border in pixels.
166 Specifies the created window's class.
175 is taken from the parent.
177 Specifies the window's depth.
180 means the depth is taken from the parent.
182 Specifies the connection to the X server.
184 Specifies the parent window.
185 .IP \fIvaluemask\fP 1i
186 Specifies which window attributes are defined in the attributes
188 This mask is the bitwise inclusive OR of the valid attribute mask bits.
189 If valuemask is zero,
190 the attributes are ignored and are not referenced.
192 Specifies the visual type.
195 means the visual type is taken from the
197 .ds Wh , which are the created window's inside dimensions \
198 and do not include the created window's borders
203 Specify the width and height\*(Wh.
204 .ds Xy , which are the top-left outside corner of the window's \
205 borders and are relative to the inside of the parent window's borders
210 Specify the x and y coordinates\*(Xy.
214 function creates an unmapped subwindow for a specified parent window,
215 returns the window ID of the created window,
216 and causes the X server to generate a
219 The created window is placed on top in the stacking order
220 with respect to siblings.
222 The coordinate system has the X axis horizontal and the Y axis vertical
223 with the origin [0, 0] at the upper-left corner.
224 Coordinates are integral,
226 and coincide with pixel centers.
227 Each window and pixmap has its own coordinate system.
229 the origin is inside the border at the inside, upper-left corner.
231 The border_width for an
233 window must be zero, or a
238 the visual type and depth must be a combination supported for the screen,
242 The depth need not be the same as the parent,
243 but the parent must not be a window of class
251 the depth must be zero, and the visual must be one supported by the screen.
252 If either condition is not met,
256 The parent window, however, may have any depth and class.
257 If you specify any invalid window attribute for a window, a
261 The created window is not yet displayed (mapped) on the user's display.
262 To display the window, call
264 The new window initially uses the same cursor as
266 A new cursor can be defined for the new window by calling
268 .IN "Cursor" "Initial State"
270 The window will not be visible on the screen unless it and all of its
271 ancestors are mapped and it is not obscured by any of its ancestors.
286 .ZN XCreateSimpleWindow
287 function creates an unmapped
289 subwindow for a specified parent window, returns the
290 window ID of the created window, and causes the X server to generate a
293 The created window is placed on top in the stacking order with respect to
295 Any part of the window that extends outside its parent window is clipped.
296 The border_width for an
298 window must be zero, or a
301 .ZN XCreateSimpleWindow
302 inherits its depth, class, and visual from its parent.
303 All other window attributes, except background and border,
304 have their default values.
306 .ZN XCreateSimpleWindow
316 .ZN XSetWindow Attributes
320 /\&* Window attribute value mask bits */
322 lw(.5i) lw(2.5i) lw(.8i).
389 .ZN CWOverrideRedirect
429 .IN "XSetWindowAttributes" "" "@DEF@"
436 Pixmap background_pixmap; /\&* background, None, or ParentRelative */
437 unsigned long background_pixel; /\&* background pixel */
438 Pixmap border_pixmap; /\&* border of the window or CopyFromParent */
439 unsigned long border_pixel; /\&* border pixel value */
440 int bit_gravity; /\&* one of bit gravity values */
441 int win_gravity; /\&* one of the window gravity values */
442 int backing_store; /\&* NotUseful, WhenMapped, Always */
443 unsigned long backing_planes; /\&* planes to be preserved if possible */
444 unsigned long backing_pixel; /\&* value to use in restoring planes */
445 Bool save_under; /\&* should bits under be saved? (popups) */
446 long event_mask; /\&* set of events that should be saved */
447 long do_not_propagate_mask; /\&* set of events that should not propagate */
448 Bool override_redirect; /\&* boolean value for override_redirect */
449 Colormap colormap; /\&* color map to be associated with window */
450 Cursor cursor; /\&* cursor to be displayed (or None) */
451 } XSetWindowAttributes;
454 For a detailed explanation of the members of this structure,
459 The server failed to allocate the requested resource or server memory.
462 A value for a Colormap argument does not name a defined Colormap.
465 A value for a Cursor argument does not name a defined Cursor.
468 The values do not exist for an
473 Some argument or pair of arguments has the correct type and range but fails
474 to match in some other way required by the request.
477 A value for a Pixmap argument does not name a defined Pixmap.
480 Some numeric value falls outside the range of values accepted by the request.
481 Unless a specific range is specified for an argument, the full range defined
482 by the argument's type is accepted. Any argument defined as a set of
483 alternatives can generate this error.
486 A value for a Window argument does not name a defined Window.
488 XChangeWindowAttributes(__libmansuffix__),
489 XConfigureWindow(__libmansuffix__),
490 XDefineCursor(__libmansuffix__),
491 XDestroyWindow(__libmansuffix__),
492 XMapWindow(__libmansuffix__),
493 XRaiseWindow(__libmansuffix__),
494 XUnmapWindow(__libmansuffix__)