2 '\" Copyright (c) 1992 The Regents of the University of California.
3 '\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
5 '\" See the file "license.terms" for information on usage and redistribution
6 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 .TH Tk_SetWindowVisual 3 4.0 Tk "Tk Library Procedures"
14 Tk_SetWindowVisual \- change visual characteristics of window
20 \fBTk_SetWindowVisual\fR(\fItkwin, visual, depth, colormap\fR)
22 .AS "Tk_Window int" colormap
23 .AP Tk_Window tkwin in
26 New visual type to use for \fItkwin\fR.
28 Number of bits per pixel desired for \fItkwin\fR.
29 .AP Colormap colormap in
30 New colormap for \fItkwin\fR, which must be compatible with
31 \fIvisual\fR and \fIdepth\fR.
36 When Tk creates a new window it assigns it the default visual
37 characteristics (visual, depth, and colormap) for its screen.
38 \fBTk_SetWindowVisual\fR may be called to change them.
39 \fBTk_SetWindowVisual\fR must be called before the window has
40 actually been created in X (e.g. before \fBTk_MapWindow\fR or
41 \fBTk_MakeWindowExist\fR has been invoked for the window).
42 The safest thing is to call \fBTk_SetWindowVisual\fR immediately
43 after calling \fBTk_CreateWindow\fR.
44 If \fItkwin\fR has already been created before \fBTk_SetWindowVisual\fR
45 is called then it returns 0 and doesn't make any changes; otherwise
46 it returns 1 to signify that the operation
47 completed successfully.
49 Note: \fBTk_SetWindowVisual\fR should not be called if you just want
50 to change a window's colormap without changing its visual or depth;
51 call \fBTk_SetWindowColormap\fR instead.
54 colormap, depth, visual