1 |
578 |
markom |
'\"
|
2 |
|
|
'\" Copyright (c) 1992 The Regents of the University of California.
|
3 |
|
|
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
|
4 |
|
|
'\"
|
5 |
|
|
'\" See the file "license.terms" for information on usage and redistribution
|
6 |
|
|
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
7 |
|
|
'\"
|
8 |
|
|
'\" RCS: @(#) $Id: SetVisual.3,v 1.1.1.1 2002-01-16 10:25:48 markom Exp $
|
9 |
|
|
'\"
|
10 |
|
|
.so man.macros
|
11 |
|
|
.TH Tk_SetWindowVisual 3 4.0 Tk "Tk Library Procedures"
|
12 |
|
|
.BS
|
13 |
|
|
.SH NAME
|
14 |
|
|
Tk_SetWindowVisual \- change visual characteristics of window
|
15 |
|
|
.SH SYNOPSIS
|
16 |
|
|
.nf
|
17 |
|
|
\fB#include \fR
|
18 |
|
|
.sp
|
19 |
|
|
int
|
20 |
|
|
\fBTk_SetWindowVisual\fR(\fItkwin, visual, depth, colormap\fR)
|
21 |
|
|
.SH ARGUMENTS
|
22 |
|
|
.AS "Tk_Window int" colormap
|
23 |
|
|
.AP Tk_Window tkwin in
|
24 |
|
|
Token for window.
|
25 |
|
|
.AP Visual *visual in
|
26 |
|
|
New visual type to use for \fItkwin\fR.
|
27 |
|
|
.AP "int" depth in
|
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.
|
32 |
|
|
.BE
|
33 |
|
|
|
34 |
|
|
.SH DESCRIPTION
|
35 |
|
|
.PP
|
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.
|
48 |
|
|
.PP
|
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.
|
52 |
|
|
|
53 |
|
|
.SH KEYWORDS
|
54 |
|
|
colormap, depth, visual
|