'\" '\" Copyright (c) 1992 The Regents of the University of California. '\" All rights reserved. '\" '\" Permission is hereby granted, without written agreement and without '\" license or royalty fees, to use, copy, modify, and distribute this '\" documentation for any purpose, provided that the above copyright '\" notice and the following two paragraphs appear in all copies. '\" '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. '\" '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY '\" AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. '\" '\" $Header: /user6/ouster/wish/man/RCS/SetVisual.3,v 1.4 93/04/01 09:41:58 ouster Exp $ SPRITE (Berkeley) '\" .so man.macros .HS Tk_SetWindowVisual tkc .BS .SH NAME .na Tk_SetWindowVisual \- change visual characteristics of window .ad .SH SYNOPSIS .nf \fB#include \fR .sp int \fBTk_SetWindowVisual\fR(\fItkwin, visual, depth, colormap\fR) .SH ARGUMENTS .AS "unsigned int" colormap .AP Tk_Window tkwin in Token for window. .AP Visual *visual in New visual type to use for \fItkwin\fR. .AP "unsigned int" depth in Number of bits per pixel desired for \fItkwin\fR. .AP Colormap colormap in New colormap for \fItkwin\fR, which must be compatible with \fIvisual\fR and \fIdepth\fR. .BE .SH DESCRIPTION .PP When Tk creates a new window it assigns it the default visual characteristics (visual, depth, and colormap) for its screen. \fBTk_SetWindowVisual\fR may be called to change them. \fBTk_SetWindowVisual\fR must be called before the window has actually been created in X (e.g. before \fBTk_MapWindow\fR or \fBTk_MakeWindowExist\fR has been invoked for the window). The safest thing is to call \fBTk_SetWindowVisual\fR immediately after calling \fBTk_CreateWindow\fR. If \fItkwin\fR has already been created before \fBTk_SetWindowVisual\fR is called then it returns 0 and doesn't make any changes; otherwise it returns 1 to signify that the operation completed successfully. .PP Note: \fBTk_SetWindowVisual\fR should not be called if you just want to change a window's colormap without changing its visual or depth; call \fBTk_SetWindowColormap\fR instead. .SH KEYWORDS colormap, depth, visual