Blame man/XChangeWindowAttributes.man

Packit 5bd3a9
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Permission is hereby granted, free of charge, to any person obtaining
Packit 5bd3a9
.\" a copy of this software and associated documentation files (the
Packit 5bd3a9
.\" "Software"), to deal in the Software without restriction, including
Packit 5bd3a9
.\" without limitation the rights to use, copy, modify, merge, publish,
Packit 5bd3a9
.\" distribute, sublicense, and/or sell copies of the Software, and to
Packit 5bd3a9
.\" permit persons to whom the Software is furnished to do so, subject to
Packit 5bd3a9
.\" the following conditions:
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" The above copyright notice and this permission notice shall be included
Packit 5bd3a9
.\" in all copies or substantial portions of the Software.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Packit 5bd3a9
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Packit 5bd3a9
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Packit 5bd3a9
.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
Packit 5bd3a9
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
Packit 5bd3a9
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
Packit 5bd3a9
.\" OTHER DEALINGS IN THE SOFTWARE.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Except as contained in this notice, the name of the X Consortium shall
Packit 5bd3a9
.\" not be used in advertising or otherwise to promote the sale, use or
Packit 5bd3a9
.\" other dealings in this Software without prior written authorization
Packit 5bd3a9
.\" from the X Consortium.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
Packit 5bd3a9
.\" Digital Equipment Corporation
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Portions Copyright \(co 1990, 1991 by
Packit 5bd3a9
.\" Tektronix, Inc.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Permission to use, copy, modify and distribute this documentation for
Packit 5bd3a9
.\" any purpose and without fee is hereby granted, provided that the above
Packit 5bd3a9
.\" copyright notice appears in all copies and that both that copyright notice
Packit 5bd3a9
.\" and this permission notice appear in all copies, and that the names of
Packit 5bd3a9
.\" Digital and Tektronix not be used in in advertising or publicity pertaining
Packit 5bd3a9
.\" to this documentation without specific, written prior permission.
Packit 5bd3a9
.\" Digital and Tektronix makes no representations about the suitability
Packit 5bd3a9
.\" of this documentation for any purpose.
Packit 5bd3a9
.\" It is provided ``as is'' without express or implied warranty.
Packit 5bd3a9
.\" 
Packit 5bd3a9
.\"
Packit 5bd3a9
.ds xT X Toolkit Intrinsics \- C Language Interface
Packit 5bd3a9
.ds xW Athena X Widgets \- C Language X Toolkit Interface
Packit 5bd3a9
.ds xL Xlib \- C Language X Interface
Packit 5bd3a9
.ds xC Inter-Client Communication Conventions Manual
Packit 5bd3a9
.na
Packit 5bd3a9
.de Ds
Packit 5bd3a9
.nf
Packit 5bd3a9
.\\$1D \\$2 \\$1
Packit 5bd3a9
.ft CW
Packit 5bd3a9
.\".ps \\n(PS
Packit 5bd3a9
.\".if \\n(VS>=40 .vs \\n(VSu
Packit 5bd3a9
.\".if \\n(VS<=39 .vs \\n(VSp
Packit 5bd3a9
..
Packit 5bd3a9
.de De
Packit 5bd3a9
.ce 0
Packit 5bd3a9
.if \\n(BD .DF
Packit 5bd3a9
.nr BD 0
Packit 5bd3a9
.in \\n(OIu
Packit 5bd3a9
.if \\n(TM .ls 2
Packit 5bd3a9
.sp \\n(DDu
Packit 5bd3a9
.fi
Packit 5bd3a9
..
Packit 5bd3a9
.de IN		\" send an index entry to the stderr
Packit 5bd3a9
..
Packit 5bd3a9
.de Pn
Packit 5bd3a9
.ie t \\$1\fB\^\\$2\^\fR\\$3
Packit 5bd3a9
.el \\$1\fI\^\\$2\^\fP\\$3
Packit 5bd3a9
..
Packit 5bd3a9
.de ZN
Packit 5bd3a9
.ie t \fB\^\\$1\^\fR\\$2
Packit 5bd3a9
.el \fI\^\\$1\^\fP\\$2
Packit 5bd3a9
..
Packit 5bd3a9
.de hN
Packit 5bd3a9
.ie t <\fB\\$1\fR>\\$2
Packit 5bd3a9
.el <\fI\\$1\fP>\\$2
Packit 5bd3a9
..
Packit 5bd3a9
.ny0
Packit 5bd3a9
.TH XChangeWindowAttributes __libmansuffix__ __xorgversion__ "XLIB FUNCTIONS"
Packit 5bd3a9
.SH NAME
Packit 5bd3a9
XChangeWindowAttributes, XSetWindowBackground, XSetWindowBackgroundPixmap, XSetWindowBorder, XSetWindowBorderPixmap, XSetWindowColormap \- change window attributes
Packit 5bd3a9
.SH SYNTAX
Packit 5bd3a9
.HP
Packit 5bd3a9
int XChangeWindowAttributes\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, unsigned long \fIvaluemask\fP\^, XSetWindowAttributes *\fIattributes\fP\^);
Packit 5bd3a9
.HP
Packit 5bd3a9
int XSetWindowBackground\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, unsigned long \fIbackground_pixel\fP\^);
Packit 5bd3a9
.HP
Packit 5bd3a9
int XSetWindowBackgroundPixmap\^(\^Display *\fIdisplay\fP\^, Window
Packit 5bd3a9
\fIw\fP\^, Pixmap \fIbackground_pixmap\fP\^);
Packit 5bd3a9
.HP 
Packit 5bd3a9
int XSetWindowBorder\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, unsigned long \fIborder_pixel\fP\^);
Packit 5bd3a9
.HP
Packit 5bd3a9
int XSetWindowBorderPixmap\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Pixmap \fIborder_pixmap\fP\^);
Packit 5bd3a9
.HP
Packit 5bd3a9
int XSetWindowColormap\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Colormap \fIcolormap\fP\^);
Packit 5bd3a9
.SH ARGUMENTS
Packit 5bd3a9
.IP \fIattributes\fP 1i
Packit 5bd3a9
Specifies the structure from which the values (as specified by the value mask)
Packit 5bd3a9
are to be taken.
Packit 5bd3a9
The value mask should have the appropriate bits
Packit 5bd3a9
set to indicate which attributes have been set in the structure.
Packit 5bd3a9
.IP \fIbackground_pixel\fP 1i
Packit 5bd3a9
Specifies the pixel that is to be used for the background.
Packit 5bd3a9
.IP \fIbackground_pixmap\fP 1i
Packit 5bd3a9
Specifies the background pixmap,
Packit 5bd3a9
.ZN ParentRelative ,
Packit 5bd3a9
or
Packit 5bd3a9
.ZN None .
Packit 5bd3a9
.IP \fIborder_pixel\fP 1i
Packit 5bd3a9
Specifies the entry in the colormap. 
Packit 5bd3a9
.IP \fIborder_pixmap\fP 1i
Packit 5bd3a9
Specifies the border pixmap or
Packit 5bd3a9
.ZN CopyFromParent .
Packit 5bd3a9
.IP \fIdisplay\fP 1i
Packit 5bd3a9
Specifies the connection to the X server.
Packit 5bd3a9
.IP \fIvaluemask\fP 1i
Packit 5bd3a9
Specifies which window attributes are defined in the attributes
Packit 5bd3a9
argument.
Packit 5bd3a9
This mask is the bitwise inclusive OR of the valid attribute mask bits.
Packit 5bd3a9
If valuemask is zero,
Packit 5bd3a9
the attributes are ignored and are not referenced.
Packit 5bd3a9
.IP \fIw\fP 1i
Packit 5bd3a9
Specifies the window.
Packit 5bd3a9
.IP \fIcolormap\fP 1i
Packit 5bd3a9
Specifies the colormap.
Packit 5bd3a9
.SH DESCRIPTION
Packit 5bd3a9
Depending on the valuemask,
Packit 5bd3a9
the
Packit 5bd3a9
.ZN XChangeWindowAttributes
Packit 5bd3a9
function uses the window attributes in the
Packit 5bd3a9
.ZN XSetWindowAttributes
Packit 5bd3a9
structure to change the specified window attributes.
Packit 5bd3a9
Changing the background does not cause the window contents to be
Packit 5bd3a9
changed.
Packit 5bd3a9
To repaint the window and its background, use 
Packit 5bd3a9
.ZN XClearWindow .
Packit 5bd3a9
Setting the border or changing the background such that the
Packit 5bd3a9
border tile origin changes causes the border to be repainted.
Packit 5bd3a9
Changing the background of a root window to 
Packit 5bd3a9
.ZN None 
Packit 5bd3a9
or 
Packit 5bd3a9
.ZN ParentRelative
Packit 5bd3a9
restores the default background pixmap.
Packit 5bd3a9
Changing the border of a root window to
Packit 5bd3a9
.ZN CopyFromParent
Packit 5bd3a9
restores the default border pixmap.
Packit 5bd3a9
Changing the win-gravity does not affect the current position of the
Packit 5bd3a9
window.
Packit 5bd3a9
Changing the backing-store of an obscured window to 
Packit 5bd3a9
.ZN WhenMapped 
Packit 5bd3a9
or
Packit 5bd3a9
.ZN Always , 
Packit 5bd3a9
or changing the backing-planes, backing-pixel, or
Packit 5bd3a9
save-under of a mapped window may have no immediate effect.
Packit 5bd3a9
Changing the colormap of a window (that is, defining a new map, not
Packit 5bd3a9
changing the contents of the existing map) generates a 
Packit 5bd3a9
.ZN ColormapNotify
Packit 5bd3a9
event.
Packit 5bd3a9
Changing the colormap of a visible window may have no
Packit 5bd3a9
immediate effect on the screen because the map may not be installed
Packit 5bd3a9
(see
Packit 5bd3a9
.ZN XInstallColormap ).
Packit 5bd3a9
Changing the cursor of a root window to 
Packit 5bd3a9
.ZN None 
Packit 5bd3a9
restores the default
Packit 5bd3a9
cursor.
Packit 5bd3a9
Whenever possible, you are encouraged to share colormaps.
Packit 5bd3a9
.LP
Packit 5bd3a9
Multiple clients can select input on the same window. 
Packit 5bd3a9
Their event masks are maintained separately.
Packit 5bd3a9
When an event is generated, 
Packit 5bd3a9
it is reported to all interested clients. 
Packit 5bd3a9
However, only one client at a time can select for 
Packit 5bd3a9
.ZN SubstructureRedirectMask , 
Packit 5bd3a9
.ZN ResizeRedirectMask , 
Packit 5bd3a9
and
Packit 5bd3a9
.ZN ButtonPressMask .
Packit 5bd3a9
If a client attempts to select any of these event masks 
Packit 5bd3a9
and some other client has already selected one, 
Packit 5bd3a9
a
Packit 5bd3a9
.ZN BadAccess
Packit 5bd3a9
error results.
Packit 5bd3a9
There is only one do-not-propagate-mask for a window, 
Packit 5bd3a9
not one per client.
Packit 5bd3a9
.LP
Packit 5bd3a9
.ZN XChangeWindowAttributes
Packit 5bd3a9
can generate
Packit 5bd3a9
.ZN BadAccess ,
Packit 5bd3a9
.ZN BadColor ,
Packit 5bd3a9
.ZN BadCursor ,
Packit 5bd3a9
.ZN BadMatch ,
Packit 5bd3a9
.ZN BadPixmap ,
Packit 5bd3a9
.ZN BadValue ,
Packit 5bd3a9
and
Packit 5bd3a9
.ZN BadWindow 
Packit 5bd3a9
errors.
Packit 5bd3a9
.LP
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XSetWindowBackground
Packit 5bd3a9
function sets the background of the window to the specified pixel value.
Packit 5bd3a9
Changing the background does not cause the window contents to be changed.
Packit 5bd3a9
.ZN XSetWindowBackground
Packit 5bd3a9
uses a pixmap of undefined size filled with the pixel value you passed.
Packit 5bd3a9
If you try to change the background of an 
Packit 5bd3a9
.ZN InputOnly
Packit 5bd3a9
window, a
Packit 5bd3a9
.ZN BadMatch
Packit 5bd3a9
error results.
Packit 5bd3a9
.LP
Packit 5bd3a9
.ZN XSetWindowBackground
Packit 5bd3a9
can generate
Packit 5bd3a9
.ZN BadMatch
Packit 5bd3a9
and
Packit 5bd3a9
.ZN BadWindow 
Packit 5bd3a9
errors.
Packit 5bd3a9
.LP
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XSetWindowBackgroundPixmap
Packit 5bd3a9
function sets the background pixmap of the window to the specified pixmap.
Packit 5bd3a9
The background pixmap can immediately be freed if no further explicit
Packit 5bd3a9
references to it are to be made.
Packit 5bd3a9
If 
Packit 5bd3a9
.ZN ParentRelative
Packit 5bd3a9
is specified, 
Packit 5bd3a9
the background pixmap of the window's parent is used,
Packit 5bd3a9
or on the root window, the default background is restored.
Packit 5bd3a9
If you try to change the background of an 
Packit 5bd3a9
.ZN InputOnly
Packit 5bd3a9
window, a
Packit 5bd3a9
.ZN BadMatch
Packit 5bd3a9
error results.
Packit 5bd3a9
If the background is set to
Packit 5bd3a9
.ZN None ,
Packit 5bd3a9
the window has no defined background.
Packit 5bd3a9
.LP
Packit 5bd3a9
.ZN XSetWindowBackgroundPixmap
Packit 5bd3a9
can generate
Packit 5bd3a9
.ZN BadMatch ,
Packit 5bd3a9
.ZN BadPixmap ,
Packit 5bd3a9
and
Packit 5bd3a9
.ZN BadWindow 
Packit 5bd3a9
errors.
Packit 5bd3a9
.LP 
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XSetWindowBorder
Packit 5bd3a9
function sets the border of the window to the pixel value you specify.
Packit 5bd3a9
If you attempt to perform this on an
Packit 5bd3a9
.ZN InputOnly
Packit 5bd3a9
window, a
Packit 5bd3a9
.ZN BadMatch
Packit 5bd3a9
error results.
Packit 5bd3a9
.LP
Packit 5bd3a9
.ZN XSetWindowBorder
Packit 5bd3a9
can generate
Packit 5bd3a9
.ZN BadMatch
Packit 5bd3a9
and
Packit 5bd3a9
.ZN BadWindow 
Packit 5bd3a9
errors.
Packit 5bd3a9
.LP
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XSetWindowBorderPixmap
Packit 5bd3a9
function sets the border pixmap of the window to the pixmap you specify.
Packit 5bd3a9
The border pixmap can be freed immediately if no further explicit
Packit 5bd3a9
references to it are to be made.
Packit 5bd3a9
If you specify
Packit 5bd3a9
.ZN CopyFromParent ,
Packit 5bd3a9
a copy of the parent window's border pixmap is used.
Packit 5bd3a9
If you attempt to perform this on an
Packit 5bd3a9
.ZN InputOnly
Packit 5bd3a9
window, a
Packit 5bd3a9
.ZN BadMatch
Packit 5bd3a9
error results.
Packit 5bd3a9
.LP
Packit 5bd3a9
.ZN XSetWindowBorderPixmap
Packit 5bd3a9
can generate
Packit 5bd3a9
.ZN BadMatch ,
Packit 5bd3a9
.ZN BadPixmap ,
Packit 5bd3a9
and
Packit 5bd3a9
.ZN BadWindow 
Packit 5bd3a9
errors.
Packit 5bd3a9
.LP
Packit 5bd3a9
The
Packit 5bd3a9
.ZN XSetWindowColormap
Packit 5bd3a9
function sets the specified colormap of the specified window.
Packit 5bd3a9
The colormap must have the same visual type as the window,
Packit 5bd3a9
or a
Packit 5bd3a9
.ZN BadMatch
Packit 5bd3a9
error results.
Packit 5bd3a9
.LP
Packit 5bd3a9
.ZN XSetWindowColormap
Packit 5bd3a9
can generate
Packit 5bd3a9
.ZN BadColor ,
Packit 5bd3a9
.ZN BadMatch ,
Packit 5bd3a9
and
Packit 5bd3a9
.ZN BadWindow 
Packit 5bd3a9
errors.
Packit 5bd3a9
.SH DIAGNOSTICS
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
.ZN BadAccess
Packit 5bd3a9
A client attempted
Packit 5bd3a9
to free a color map entry that it did not already allocate.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
.ZN BadAccess
Packit 5bd3a9
A client attempted
Packit 5bd3a9
to store into a read-only color map entry.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
.ZN BadColor
Packit 5bd3a9
A value for a Colormap argument does not name a defined Colormap.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
.ZN BadCursor
Packit 5bd3a9
A value for a Cursor argument does not name a defined Cursor.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
.ZN BadMatch
Packit 5bd3a9
Some argument or pair of arguments has the correct type and range but fails
Packit 5bd3a9
to match in some other way required by the request.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
.ZN BadMatch
Packit 5bd3a9
An
Packit 5bd3a9
.ZN InputOnly
Packit 5bd3a9
window locks this attribute.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
.ZN BadPixmap
Packit 5bd3a9
A value for a Pixmap argument does not name a defined Pixmap.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
.ZN BadValue
Packit 5bd3a9
Some numeric value falls outside the range of values accepted by the request.
Packit 5bd3a9
Unless a specific range is specified for an argument, the full range defined
Packit 5bd3a9
by the argument's type is accepted.  Any argument defined as a set of
Packit 5bd3a9
alternatives can generate this error.
Packit 5bd3a9
.TP 1i
Packit 5bd3a9
.ZN BadWindow
Packit 5bd3a9
A value for a Window argument does not name a defined Window.
Packit 5bd3a9
.SH "SEE ALSO"
Packit 5bd3a9
XConfigureWindow(__libmansuffix__),
Packit 5bd3a9
XCreateWindow(__libmansuffix__),
Packit 5bd3a9
XDestroyWindow(__libmansuffix__),
Packit 5bd3a9
XInstallColormap(__libmansuffix__),
Packit 5bd3a9
XMapWindow(__libmansuffix__),
Packit 5bd3a9
XRaiseWindow(__libmansuffix__),
Packit 5bd3a9
XUnmapWindow(__libmansuffix__)
Packit 5bd3a9
.br
Packit 5bd3a9
\fI\*(xL\fP