Window XCreateSimpleWindow(display, parent, x, y, width, height, border_width,
border, background)
Display *display;
Window parent;
int x, y;
unsigned int width, height;
unsigned int border_width;
unsigned long border;
unsigned long background;
The coordinate system has the X axis horizontal and the Y axis vertical with the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms of pixels, and coincide with pixel centers. Each window and pixmap has its own coordinate system. For a window, the origin is inside the border at the inside, upper-left corner.
The border_width for an InputOnly window must be zero, or a BadMatch error results. For class InputOutput, the visual type and depth must be a combination supported for the screen, or a BadMatch error results. The depth need not be the same as the parent, but the parent must not be a window of class InputOnly, or a BadMatch error results. For an InputOnly window, the depth must be zero, and the visual must be one supported by the screen. If either condition is not met, a BadMatch error results. The parent window, however, may have any depth and class. If you specify any invalid window attribute for a window, a BadMatch error results.
The created window is not yet displayed (mapped) on the user's display. To display the window, call XMapWindow. The new window initially uses the same cursor as its parent. A new cursor can be defined for the new window by calling XDefineCursor. The window will not be visible on the screen unless it and all of its ancestors are mapped and it is not obscured by any of its ancestors.
XCreateWindow can generate BadAlloc BadColor, BadCursor, BadMatch, BadPixmap, BadValue, and BadWindow errors.
The XCreateSimpleWindow function creates an unmapped InputOutput subwindow for a specified parent window, returns the window ID of the created window, and causes the X server to generate a CreateNotify event. The created window is placed on top in the stacking order with respect to siblings. Any part of the window that extends outside its parent window is clipped. The border_width for an InputOnly window must be zero, or a BadMatch error results. XCreateSimpleWindow inherits its depth, class, and visual from its parent. All other window attributes, except background and border, have their default values.
XCreateSimpleWindow can generate BadAlloc, BadMatch, BadValue, and BadWindow errors.
#define |
T} T{ |
(1L<<0) |
T} |
#define |
T} T{ |
(1L<<1) |
T} |
#define |
T} T{ |
(1L<<2) |
T} |
#define |
T} T{ |
(1L<<3) |
T} |
#define |
T} T{ |
(1L<<4) |
T} |
#define |
T} T{ |
(1L<<5) |
T} |
#define |
T} T{ |
(1L<<6) |
T} |
#define |
T} T{ |
(1L<<7) |
T} |
#define |
T} T{ |
(1L<<8) |
T} |
#define |
T} T{ |
(1L<<9) |
T} |
#define |
T} T{ |
(1L<<10) |
T} |
#define |
T} T{ |
(1L<<11) |
T} |
#define |
T} T{ |
(1L<<12) |
T} |
#define |
T} T{ |
(1L<<13) |
T} |
#define |
T} T{ |
(1L<<14) |
T} |
0 0>=40 .vs 0u 0<=39 .vs 0p typedef struct { Pixmap background_pixmap; unsigned long background_pixel; Pixmap border_pixmap; unsigned long border_pixel; int bit_gravity; int win_gravity; int backing_store; unsigned long backing_planes; unsigned long backing_pixel; Bool save_under; long event_mask; long do_not_propagate_mask; Bool override_redirect; Colormap colormap; Cursor cursor; } XSetWindowAttributes;
For a detailed explanation of the members of this structure, see Xlib - C Language X Interface.