XtCreateWindow(3) XT FUNCTIONS XtCreateWindow(3)NAME
XtCreateWindow - window creation convenience function
SYNTAX
void XtCreateWindow(Widget w, unsigned int window_class, Visual *visual, XtValueMask value_mask, XSetWindowAttributes *attributes);
ARGUMENTS
attributes
Specifies the window attributes to use in the XCreateWindow call.
value_mask
Specifies which attribute fields to use.
visual Specifies the visual type (usually CopyFromParent).
w Specifies the widget that is used to set the x,y coordinates and so on.
window_class
Specifies the Xlib window class (for example, InputOutput, InputOnly, or CopyFromParent).
DESCRIPTION
The XtCreateWindow function calls the Xlib XCreateWindow function with values from the widget structure and the passed parameters. Then,
it assigns the created window to the widget's window field.
XtCreateWindow evaluates the following fields of the Core widget structure:
o depth
o screen
o parent -> core.window
o x
o y
o width
o height
o border_width
SEE ALSO
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
X Version 11 libXt 1.1.4 XtCreateWindow(3)
Check Out this Related Man Page
XCreateSimpleWindow() XCreateSimpleWindow()
Name
XCreateSimpleWindow - create an unmapped InputOutput window.
Synopsis
Window XCreateSimpleWindow(display, parent, x, y, width, height, border_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 window.
x Specify the x and y coordinates of the upper-left pixel of the new window's border relative to the origin of the parent (inside
y the parent window's border).
width Specify the width and height, in pixels, of the new window. These are the inside dimensions, not including the new window's bor-
height ders, 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.
Description
XCreateSimpleWindow() 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 sib-
lings. 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:
o The window inherits its depth, class, and visual from its parent. All other window attributes have their default values.
o All properties have undefined values.
o 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().
o 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 Also
XCreateWindow(), XDestroySubwindows(), XDestroyWindow().
Xlib - Window Existence XCreateSimpleWindow()