SetVisual.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
- '"
- '" Copyright (c) 1992 The Regents of the University of California.
- '" Copyright (c) 1994-1996 Sun Microsystems, Inc.
- '"
- '" See the file "license.terms" for information on usage and redistribution
- '" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- '"
- '" RCS: @(#) $Id: SetVisual.3,v 1.2 1998/09/14 18:22:53 stanton Exp $
- '"
- .so man.macros
- .TH Tk_SetWindowVisual 3 4.0 Tk "Tk Library Procedures"
- .BS
- .SH NAME
- Tk_SetWindowVisual - change visual characteristics of window
- .SH SYNOPSIS
- .nf
- fB#include <tk.h>fR
- .sp
- int
- fBTk_SetWindowVisualfR(fItkwin, visual, depth, colormapfR)
- .SH ARGUMENTS
- .AS "Tk_Window int" colormap
- .AP Tk_Window tkwin in
- Token for window.
- .AP Visual *visual in
- New visual type to use for fItkwinfR.
- .AP "int" depth in
- Number of bits per pixel desired for fItkwinfR.
- .AP Colormap colormap in
- New colormap for fItkwinfR, which must be compatible with
- fIvisualfR and fIdepthfR.
- .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_SetWindowVisualfR may be called to change them.
- fBTk_SetWindowVisualfR must be called before the window has
- actually been created in X (e.g. before fBTk_MapWindowfR or
- fBTk_MakeWindowExistfR has been invoked for the window).
- The safest thing is to call fBTk_SetWindowVisualfR immediately
- after calling fBTk_CreateWindowfR.
- If fItkwinfR has already been created before fBTk_SetWindowVisualfR
- 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_SetWindowVisualfR should not be called if you just want
- to change a window's colormap without changing its visual or depth;
- call fBTk_SetWindowColormapfR instead.
- .SH KEYWORDS
- colormap, depth, visual