Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XResizeWindow(3X) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XChangeWindowAttributes(3X)

XCreateWindow(3X)

XDestroyWindow(3X)

XMapWindow(3X)

XRaiseWindow(3X)

XUnmapWindow(3X)

XConfigureWindow(3X)




XConfigureWindow(3X) XConfigureWindow(3X)
NAME XConfigureWindow, XMoveWindow, XResizeWindow, XMoveResizeWindow, XSetWindowBorderWidth - configure windows and manipulate the XWindowChanges structure SYNOPSIS XConfigureWindow (display, w, value-mask, values) Display *display; Window w; unsigned int value-mask; XWindowChanges *values; XMoveWindow (display, w, x, y) Display *display; Window w; int x,y; XResizeWindow (display, w, width, height) Display *display; Window w; unsigned int width, height; XMoveResizeWindow (display, w, x, y, width, height) Display *display; Window w; int x,y; unsigned int width, height; XSetWindowBorderWidth (display, w, width) Display *display; Window w; unsigned int width; DESCRIPTION The XConfigureWindow function uses the values specified in the XWindowChanges structure to reconfigure a window's size, position, border, and stacking order. Values not specified are taken from the existing geometry of the window. If a sibling is specified without a stack_mode or if the window is not actually a sibling, a BadMatch error results. Note that the computations for BottomIf, TopIf, and Opposite are performed with respect to the window's final geometry (as controlled by the other arguments passed to XConfi- gureWindow), not its initial geometry. Any backing-store contents of the window, its inferiors, and other newly visi- ble windows are either discarded or changed to reflect the current screen contents (depending on the implementation). The XMoveWindow function moves the specified window to the specified x and y coordinates. This function does not change the window's size, raise the window, nor change the November, 1990 1



XConfigureWindow(3X) XConfigureWindow(3X)
mapping state of the window. Moving a mapped window may or may not lose the window's contents depending on if the win- dow is obscured by nonchildren and if no backing store ex- ists. If the contents of the window are lost, the X server generates Expose events. Moving a mapped window generates Expose events on any formerly obscured windows. If the override-redirect flag of the window is FALSE and some other client has selected SubstructureRedirectMask on the parent, the X server generates a ConfigureRequest event, and no further processing is performed. Otherwise, the win- dow is moved. The XResizeWindow function changes the inside dimensions of the specified window, not including its borders. This func- tion does not change the window's upper-left coordinate or the origin, nor does it raise the window. Changing the size of a mapped window may lose its contents and generate Expose events. If a mapped window is made smaller, changing its size generates Expose events on windows that the mapped window formerly ob- scured. If the override-redirect flag of the window is FALSE and some other client has selected SubstructureRedirectMask on the parent, the X server generates a ConfigureRequest event, and no further processing is performed. If either width or height is 0, a BadValue error results. The XMoveResizeWindow function changes the size and location of the specified window without raising it. Moving and resizing a mapped window may generate an Expose event on the window. Depending on the new size and location parameters, moving and resizing a window may generate Expose events on windows that the window formerly obscured. 2 November, 1990



XConfigureWindow(3X) XConfigureWindow(3X)
If the override-redirect flag of the window is FALSE and some other client has selected SubstructureRedirectMask on the parent, the X server generates a ConfigureRequest event, and no further processing is performed. Otherwise, the win- dow size and location are changed. The XSetWindowBorderWidth function sets the specified window's border width to the specified width. Arguments These functions accept the following arguments: display Specifies the connection to the X server. value-mask Specifies which values are to be set using informa- tion in the values structure. This mask is the bit- wise inclusive OR of the valid changed window values. values Specifies a pointer to the structure XWindowChanges. w Specifies the window ID. width, height Specify the width and height. x, y Specify the x and y coordinates. Structures The XWindowChanges structure is defined as follows. /* Configure window value mask bits */ #define CWX (1<<0) #define CWY (1<<1) #define CWWidth (1<<2) #define CWHeight (1<<3) #define CWBorderWidth(1<<4) #define CWSibling(1<<5) #define CWStackMode(1<<6) /* Values */ typedef struct { int x, y; int width, height; int border_width; Window sibling; int stack_mode; } XWindowChanges; The x and y members are used to set the window's x and y coordinates, which are relative to the parent's origin and November, 1990 3



XConfigureWindow(3X) XConfigureWindow(3X)
indicate the position of the upper-left outer corner of the window. The width and height members are used to set the inside size of the window, not including the border, and must be nonzero, or a BadValue error results. Attempts to configure a root window have no effect. The border_width member is used to set the width of the border in pixels. Note that setting just the border width leaves the outer-left corner of the window in a fixed posi- tion but moves the absolute position of the window's origin. If you attempt to set the border-width attribute of an Inpu- tOnly window nonzero, a BadMatch error results. The sibling member is used to set the sibling window for stacking operations. The stack_mode member is used to set how the window is to be restacked and can be set to Above, Below, TopIf, BottomIf, or Opposite. ERRORS BadMatch An InputOnly window is used as a drawable; or, an argument or pair of arguments has the correct type and range but fails to match in some other required way. BadValue A numeric value falls outside the range of values accepted by the request. Unless a range is speci- fied for an argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error. BadWindow A value for a Window argument does not name a de- fined window. The XConfigureWindow function can generate BadMatch, Bad- Value, and BadWindow errors. The XMoveWindow and XSetWindowBorderWidth functions can gen- erate a BadWindow error. The XResizeWindow function can generate BadValue and BadWin- dow errors. The XMoveResizeWindow function can generate BadMatch and BadWindow errors. SEE ALSO XChangeWindowAttributes(3X), XCreateWindow(3X), XDestroyWindow(3X), XMapWindow(3X), XRaiseWindow(3X), XUnmapWindow(3X) 4 November, 1990



XConfigureWindow(3X) XConfigureWindow(3X)
Xlib - C Language Interface November, 1990 5

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026