📄 setappname.3
字号:
'\"'\" Copyright (c) 1994 The Regents of the University of California.'\" Copyright (c) 1994-1997 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: @(#) SetAppName.3 1.13 97/06/10 17:33:48'\" .so man.macros.TH Tk_SetAppName 3 4.0 Tk "Tk Library Procedures".BS.SH NAMETk_SetAppName \- Set the name of an application for ``send'' commands.SH SYNOPSIS.nf\fB#include <tk.h>\fR.spchar *\fBTk_SetAppName\fR(\fItkwin, name\fR).SH ARGUMENTS.AS Tk_Window parent.AP Tk_Window tkwin inToken for window in application. Used only to select a particularapplication..AP char *name inName under which to register the application..BE.SH DESCRIPTION.PP\fBTk_SetAppName\fR associates a name with a given application andrecords that association on the display containing with the application'smain window.After this procedure has been invoked, other applications on thedisplay will be able to use the \fBsend\fR command to invoke operationsin the application.If \fIname\fR is already in use by some other application on thedisplay, then a new name will be generated by appending``\fB #2\fR'' to \fIname\fR; if this name is also in use,the number will be incremented until an unused name is found.The return value from the procedure is a pointer to the name actuallyused..PPIf the application already has a name when \fBTk_SetAppName\fR iscalled, then the new name replaces the old name..PP\fBTk_SetAppName\fR also adds a \fBsend\fR command to the application'sinterpreter, which can be used to send commands from this applicationto others on any of the displays where the application has windows..PPThe application's name registration persists until the interpreter isdeleted or the \fBsend\fR command is deleted from \fIinterp\fR, at whichpoint the name is automatically unregistered and the applicationbecomes inaccessible via \fBsend\fR.The application can be made accessible again by calling \fBTk_SetAppName\fR..PP\fBTk_SetAppName\fR is called automatically by \fBTk_Init\fR,so applications don't normally need to call it explicitly..PPThe command \fBtk appname\fR provides Tcl-level access to thefunctionality of \fBTk_SetAppName\fR..SH KEYWORDSapplication, name, register, send command
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -