Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XSetWindowBackground(3X) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XConfigureWindow(3X)

XCreateWindow(3X)

XDestroyWindow(3X)

XMapWindow(3X)

XRaiseWindow(3X)

XUnmapWindow(3X)




XChangeWindowAttributes(3X) XChangeWindowAttributes(3X)
NAME XChangeWindowAttributes, XSetWindowBackground, XSetWindowBackgroundPixmap, XSetWindowBorder, XSetWindowBorderPixmap - change window attributes SYNOPSIS XChangeWindowAttributes (display, w, valuemask, attributes) Display *display; Window w; unsigned long valuemask; XSetWindowAttributes *attributes; XSetWindowBackground (display, w, background-pixel) Display *display; Window w; unsigned long background-pixel; XSetWindowBackgroundPixmap (display, w, background-pixmap) Display *display; Window w; Pixmap background-pixmap; XSetWindowBorder (display, w, border-pixel) Display *display; Window w; unsigned long border-pixel; XSetWindowBorderPixmap (display, w, border-pixmap) Display *display; Window w; Pixmap border-pixmap; DESCRIPTION Depending on the value of valuemask, XChangeWindowAttributes uses the window attributes in the XSetWindowAttributes structure to change the specified win- dow attributes. Changing the background does not cause the window contents to be changed. To repaint the window and its background, use XClearWindow. Setting the border or changing the background such that the border tile origin changes causes the border to be repainted. Changing the background of a root window to None or ParentRelative re- stores the default background pixel map. Changing the bord- er of a root window to CopyFromParent restores the default border pixel map. Changing the window gravity does not af- fect the current position of the window. Changing the backing-store of an obscured window to WhenMapped or Always, or changing the backing-planes, backing-pixel, or save-under of a mapped window may have no immediate effect. Changing November, 1990 1



XChangeWindowAttributes(3X) XChangeWindowAttributes(3X)
the colormap of a window (that is, defining a new map, not changing the contents of the existing map) generates a ColormapNotify event. Changing the colormap of a visible window may have no immediate effect on the screen because the map may not be installed (see XInstallColormap). Changing the cursor of a root window to None restores the default cursor. Whenever possible, you are encouraged to share colormaps. Multiple clients can select input on the same window. Their event masks are maintained separately. When an event is generated, it is reported to all interested clients. Howev- er, only one client at a time can select for Substruc- tureRedirectMask, ResizeRedirectMask, and ButtonPressMask. If a client at- tempts to select any of these event masks and some other client has already selected one, a BadAccess error results. There is only one do_not_propagate_mask for a window, not one per client. The XSetWindowBackground function sets the background pixel of the window to the pixel value you specify. Changing the background does not cause the window contents to be changed. XSetWindowBackground uses a pixel map of undefined size filled with the pixel value you passed. If you try to change the background of an InputOnly window, a BadMatch er- ror results. The XSetWindowBackgroundPixmap function sets the background pixel map of the window to the pixel map you specify. The background pixel map can immediately be freed if no further explicit references to it are to be made. If ParentRelative is specified, the background pixel map of the window's parent is used, or on the root window, the default back- ground is restored. If you try to change the background of an InputOnly window, a BadMatch error results. If the back- ground is set to None, the window has no defined background. The XSetWindowBorder function sets the border pixel of the window to your specified pixel value. This function uses the specified value as an entry into the colormap to deter- mine the color to be used to paint the border. If you at- tempt to perform this on an InputOnly window, a BadMatch er- ror results. The XSetWindowBorderPixmap function sets the border pixel map of the window to your specified pixel map. It uses this entry for the border. The border pixel map can be freed im- mediately if not further explicit references to it are to be made. If you specify CopyFromParent, a copy of the parent window's border pixel map is used. If you attempt to per- form this on an 2 November, 1990



XChangeWindowAttributes(3X) XChangeWindowAttributes(3X)
InputOnly window, a BadMatch error results. Arguments These functions accept the following arguments: attributes Specifies the structure from which the values (as specified by valuemask) are to be taken The valuemask argument should have the appropriate bits set to indicate which attributes have been set in the structure. background-pixel Specifies the pixel of the background. This pixel value determines which entry into the colormap is used. background-pixmap Specifies the pixel map of the background. If a pixel map ID is specified, the background is painted with this pixel map. If None, no background is painted. If ParentRelative, the parent's pixel map is used. border-pixel Specifies the entry in the colormap. border-pixmap Specifies the border pixel map. If you specify a pixel map ID, the associated pixel map is used for the border. If CopyFromParent is specified, a copy of the parent window's border pixel map is used. display Specifies the connection to the X server. valuemask Specifies which window attributes are defined in the attributes argument. This mask is the bitwise in- clusive OR of the valid attribute mask bits. If valuemask is 0, the attributes are ignored and are not referenced. w Specifies the window ID. ERRORS BadAccess A client attempted to free a colormap entry that it did not already allocate, or a client attempted to store into a read-only colormap entry. BadColor A value for a Colormap argument does not name a de- November, 1990 3



XChangeWindowAttributes(3X) XChangeWindowAttributes(3X)
fined colormap. BadCursor A value for a Cursor argument does not name a de- fined pointer. BadMatch An argument or pair of arguments has the correct type and range but fails to match in some other re- quired way. An InputOnly window locks this attri- bute. BadPixmap A value for a Pixmap argument does not name a de- fined pixel map. 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 XChangeWindowAttributes function can generate BadAccess, BadColor, BadCursor, BadMatch, BadPixmap, BadValue, and BadWindow errors. The XSetWindowBackground and XSetWindowBorder functions can generate BadMatch and BadWindow errors. The XSetWindowBackgroundPixmap and XSetWindowBorderPixmap functions can generate BadMatch, BadPixmap, and BadWindow errors. SEE ALSO XConfigureWindow(3X), XCreateWindow(3X), XDestroyWindow(3X), XMapWindow(3X), XRaiseWindow(3X), XUnmapWindow(3X)
Xlib - C Language Interface.
4 November, 1990

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