XCreateSimpleWindow()XCreateSimpleWindow()NameXCreateSimpleWindow – create an unmapped InputOutput window.
Synopsis
Window XCreateSimpleWindow(display, parent, x, y, width, height, bor‐
der_width, border, background)
Display *display;
Window parent;
int x, y;
unsigned int width, height, border_width;
unsigned long border;
unsigned long background;
Arguments
display Specifies a pointer to the Display structure; returned from
XOpenDisplay().
parent Specifies the parent window ID. Must be an InputOutput win‐
dow.
x Specify the x and y coordinates of the upper-left pixel of the
y new window's border relative to the origin of the parent
(inside the parent window's border).
width Specify the width and height, in pixels, of the new window.
height These are the inside dimensions, not including the new win‐
dow's borders, which are entirely outside of the window. Must
be non-zero. Any part of the window that extends outside its
parent window is clipped.
border_width
Specifies the width, in pixels, of the new window's border.
border Specifies the pixel value for the border of the window.
background
Specifies the pixel value for the background of the window.
Returns
The window.
DescriptionXCreateSimpleWindow() creates an unmapped InputOutput subwindow of the
specified parent window. Use XCreateWindow() if you want to set the
window attributes while creating a window. (After creation,
XChangeWindowAttributes() can be used.)
XCreateSimpleWindow() returns the ID of the created window. The new
window is placed on top of the stacking order relative to its siblings.
Note that the window is unmapped when it is created - use MapWindow to
display it. This function generates a CreateNotify event.
The initial conditions of the window are as follows:
· The window inherits its depth, class, and visual from its parent.
All other window attributes have their default values.
· All properties have undefined values.
· The new window will not have a cursor defined; the cursor will be
that of the window's parent until the cursor attribute is set with
XDefineCursor() or XChangeWindowAttributes().
· If no background or border is specified, CopyFromParent is implied.
For more information, see Volume One, Chapter 2, X Concepts, and Volume
One, Chapter 3, Basic Window Program.
Errors
BadAlloc
BadMatch
BadValue width or height is zero.
BadWindow Specified parent is an InputOnly window.
See AlsoXCreateWindow(), XDestroySubwindows(), XDestroyWindow().
Xlib - Window Existence XCreateSimpleWindow()