| 1 |
# Copyright (c) 1992 The Regents of the University of California. |
| 2 |
# Copyright (c) 1994-1996 Sun Microsystems, Inc. |
| 3 |
# See the file "license.terms" for information on usage and redistribution |
| 4 |
# of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
| 5 |
# |
| 6 |
# |
| 7 |
|
| 8 |
=head1 NAME |
| 9 |
|
| 10 |
Tk_SetWindowVisual - change visual characteristics of window |
| 11 |
|
| 12 |
=for category C Programming |
| 13 |
|
| 14 |
=head1 SYNOPSIS |
| 15 |
|
| 16 |
B<#include E<lt>tk.hE<gt>> |
| 17 |
|
| 18 |
int |
| 19 |
B<Tk_SetWindowVisual>(I<tkwin, visual, depth, colormap>) |
| 20 |
|
| 21 |
=head1 ARGUMENTS |
| 22 |
|
| 23 |
=over 4 |
| 24 |
|
| 25 |
=item Tk_Window tkwin (in) |
| 26 |
|
| 27 |
Token for window. |
| 28 |
|
| 29 |
=item Visual *visual (in) |
| 30 |
|
| 31 |
New visual type to use for I<tkwin>. |
| 32 |
|
| 33 |
=item "int" depth (in) |
| 34 |
|
| 35 |
Number of bits per pixel desired for I<tkwin>. |
| 36 |
|
| 37 |
=item Colormap colormap (in) |
| 38 |
|
| 39 |
New colormap for I<tkwin>, which must be compatible with |
| 40 |
I<visual> and I<depth>. |
| 41 |
|
| 42 |
=back |
| 43 |
|
| 44 |
=head1 DESCRIPTION |
| 45 |
|
| 46 |
When Tk creates a new window it assigns it the default visual |
| 47 |
characteristics (visual, depth, and colormap) for its screen. |
| 48 |
B<Tk_SetWindowVisual> may be called to change them. |
| 49 |
B<Tk_SetWindowVisual> must be called before the window has |
| 50 |
actually been created in X (e.g. before B<Tk_MapWindow> or |
| 51 |
B<Tk_MakeWindowExist> has been invoked for the window). |
| 52 |
The safest thing is to call B<Tk_SetWindowVisual> immediately |
| 53 |
after calling B<Tk_CreateWindow>. |
| 54 |
If I<tkwin> has already been created before B<Tk_SetWindowVisual> |
| 55 |
is called then it returns 0 and doesn't make any changes; otherwise |
| 56 |
it returns 1 to signify that the operation |
| 57 |
completed successfully. |
| 58 |
|
| 59 |
Note: B<Tk_SetWindowVisual> should not be called if you just want |
| 60 |
to change a window's colormap without changing its visual or depth; |
| 61 |
call B<Tk_SetWindowColormap> instead. |
| 62 |
|
| 63 |
=head1 KEYWORDS |
| 64 |
|
| 65 |
colormap, depth, visual |