int XChangeWindowAttributes\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, unsigned long \fIvaluemask\fP\^, XSetWindowAttributes *\fIattributes\fP\^);
.HP
int XSetWindowBackground\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, unsigned long \fIbackground_pixel\fP\^);
.HP
int XSetWindowBackgroundPixmap\^(\^Display *\fIdisplay\fP\^, Window
\fIw\fP\^, Pixmap \fIbackground_pixmap\fP\^);
.HP
int XSetWindowBorder\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, unsigned long \fIborder_pixel\fP\^);
.HP
int XSetWindowBorderPixmap\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Pixmap \fIborder_pixmap\fP\^);
.HP
int XSetWindowColormap\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Colormap \fIcolormap\fP\^);
.SHARGUMENTS
.IP\fIattributes\fP1i
Specifies the structure from which the values (as specified by the value mask)
are to be taken.
The value mask should have the appropriate bits
set to indicate which attributes have been set in the structure.
.IP\fIbackground_pixel\fP1i
Specifies the pixel that is to be used for the background.
.IP\fIbackground_pixmap\fP1i
Specifies the background pixmap,
.ZNParentRelative,
or
.ZNNone.
.IP\fIborder_pixel\fP1i
Specifies the entry in the colormap.
.IP\fIborder_pixmap\fP1i
Specifies the border pixmap or
.ZNCopyFromParent.
.IP\fIdisplay\fP1i
Specifies the connection to the X server.
.IP\fIvaluemask\fP1i
Specifies which window attributes are defined in the attributes
argument.
This mask is the bitwise inclusive OR of the valid attribute mask bits.
If valuemask is zero,
the attributes are ignored and are not referenced.
.IP\fIw\fP1i
Specifies the window.
.IP\fIcolormap\fP1i
Specifies the colormap.
.SHDESCRIPTION
Depending on the valuemask,
the
.ZNXChangeWindowAttributes
function uses the window attributes in the
.ZNXSetWindowAttributes
structure to change the specified window attributes.
Changing the background does not cause the window contents to be
changed.
To repaint the window and its background, use
.ZNXClearWindow.
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
.ZNNone
or
.ZNParentRelative
restores the default background pixmap.
Changing the border of a root window to
.ZNCopyFromParent
restores the default border pixmap.
Changing the win-gravity does not affect the current position of the
window.
Changing the backing-store of an obscured window to
.ZNWhenMapped
or
.ZNAlways,
or changing the backing-planes, backing-pixel, or
save-under of a mapped window may have no immediate effect.
Changing the colormap of a window (that is, defining a new map, not
changing the contents of the existing map) generates a
.ZNColormapNotify
event.
Changing the colormap of a visible window may have no
immediate effect on the screen because the map may not be installed
(see
.ZNXInstallColormap).
Changing the cursor of a root window to
.ZNNone
restores the default
cursor.
Whenever possible, you are encouraged to share colormaps.
.LP
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.
However, only one client at a time can select for
.ZNSubstructureRedirectMask,
.ZNResizeRedirectMask,
and
.ZNButtonPressMask.
If a client attempts to select any of these event masks
and some other client has already selected one,
a
.ZNBadAccess
error results.
There is only one do-not-propagate-mask for a window,
not one per client.
.LP
.ZNXChangeWindowAttributes
can generate
.ZNBadAccess,
.ZNBadColor,
.ZNBadCursor,
.ZNBadMatch,
.ZNBadPixmap,
.ZNBadValue,
and
.ZNBadWindow
errors.
.LP
The
.ZNXSetWindowBackground
function sets the background of the window to the specified pixel value.
Changing the background does not cause the window contents to be changed.
.ZNXSetWindowBackground
uses a pixmap of undefined size filled with the pixel value you passed.
If you try to change the background of an
.ZNInputOnly
window, a
.ZNBadMatch
error results.
.LP
.ZNXSetWindowBackground
can generate
.ZNBadMatch
and
.ZNBadWindow
errors.
.LP
The
.ZNXSetWindowBackgroundPixmap
function sets the background pixmap of the window to the specified pixmap.
The background pixmap can immediately be freed if no further explicit
references to it are to be made.
If
.ZNParentRelative
is specified,
the background pixmap of the window's parent is used,
or on the root window, the default background is restored.
If you try to change the background of an
.ZNInputOnly
window, a
.ZNBadMatch
error results.
If the background is set to
.ZNNone,
the window has no defined background.
.LP
.ZNXSetWindowBackgroundPixmap
can generate
.ZNBadMatch,
.ZNBadPixmap,
and
.ZNBadWindow
errors.
.LP
The
.ZNXSetWindowBorder
function sets the border of the window to the pixel value you specify.
If you attempt to perform this on an
.ZNInputOnly
window, a
.ZNBadMatch
error results.
.LP
.ZNXSetWindowBorder
can generate
.ZNBadMatch
and
.ZNBadWindow
errors.
.LP
The
.ZNXSetWindowBorderPixmap
function sets the border pixmap of the window to the pixmap you specify.
The border pixmap can be freed immediately if no further explicit
references to it are to be made.
If you specify
.ZNCopyFromParent,
a copy of the parent window's border pixmap is used.
If you attempt to perform this on an
.ZNInputOnly
window, a
.ZNBadMatch
error results.
.LP
.ZNXSetWindowBorderPixmap
can generate
.ZNBadMatch,
.ZNBadPixmap,
and
.ZNBadWindow
errors.
.LP
The
.ZNXSetWindowColormap
function sets the specified colormap of the specified window.
The colormap must have the same visual type as the window,
or a
.ZNBadMatch
error results.
.LP
.ZNXSetWindowColormap
can generate
.ZNBadColor,
.ZNBadMatch,
and
.ZNBadWindow
errors.
.SHDIAGNOSTICS
.TP1i
.ZNBadAccess
A client attempted
to free a color map entry that it did not already allocate.
.TP1i
.ZNBadAccess
A client attempted
to store into a read-only color map entry.
.TP1i
.ZNBadColor
A value for a Colormap argument does not name a defined Colormap.
.TP1i
.ZNBadCursor
A value for a Cursor argument does not name a defined Cursor.
.TP1i
.ZNBadMatch
Some argument or pair of arguments has the correct type and range but fails
to match in some other way required by the request.
.TP1i
.ZNBadMatch
An
.ZNInputOnly
window locks this attribute.
.TP1i
.ZNBadPixmap
A value for a Pixmap argument does not name a defined Pixmap.
.TP1i
.ZNBadValue
Some numeric value falls outside the range of values accepted by the request.
Unless a specific range is specified 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.
.TP1i
.ZNBadWindow
A value for a Window argument does not name a defined Window.