📄 setvisual.3
字号:
'\"'\" 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.'\" '\" SCCS: @(#) SetVisual.3 1.10 96/03/26 18:18:39'\" .so man.macros.TH Tk_SetWindowVisual 3 4.0 Tk "Tk Library Procedures".BS.SH NAMETk_SetWindowVisual \- change visual characteristics of window.SH SYNOPSIS.nf\fB#include <tk.h>\fR.spint\fBTk_SetWindowVisual\fR(\fItkwin, visual, depth, colormap\fR).SH ARGUMENTS.AS "Tk_Window int" colormap.AP Tk_Window tkwin inToken for window..AP Visual *visual inNew visual type to use for \fItkwin\fR..AP "int" depth inNumber of bits per pixel desired for \fItkwin\fR..AP Colormap colormap inNew colormap for \fItkwin\fR, which must be compatible with\fIvisual\fR and \fIdepth\fR..BE.SH DESCRIPTION.PPWhen Tk creates a new window it assigns it the default visualcharacteristics (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 hasactually 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 immediatelyafter calling \fBTk_CreateWindow\fR.If \fItkwin\fR has already been created before \fBTk_SetWindowVisual\fRis called then it returns 0 and doesn't make any changes; otherwiseit returns 1 to signify that the operationcompleted successfully..PPNote: \fBTk_SetWindowVisual\fR should not be called if you just wantto change a window's colormap without changing its visual or depth;call \fBTk_SetWindowColormap\fR instead..SH KEYWORDScolormap, depth, visual
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -