diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2016-12-21 22:56:39 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2016-12-21 22:56:39 (GMT) |
commit | 2bc8acacaa385fe4e607a99569b502032f98bc64 (patch) | |
tree | 7e70af1addc0d893b8daf4339f277cbf939998d8 /tk8.6/doc/SetAppName.3 | |
parent | d1a6de55efc90f190dee42ab8c4fa9070834e77d (diff) | |
parent | 1741f1b6324ead16eb1eeaa16e1f18cf0a2abb4f (diff) | |
download | blt-2bc8acacaa385fe4e607a99569b502032f98bc64.zip blt-2bc8acacaa385fe4e607a99569b502032f98bc64.tar.gz blt-2bc8acacaa385fe4e607a99569b502032f98bc64.tar.bz2 |
Merge commit '1741f1b6324ead16eb1eeaa16e1f18cf0a2abb4f' as 'tk8.6'
Diffstat (limited to 'tk8.6/doc/SetAppName.3')
-rw-r--r-- | tk8.6/doc/SetAppName.3 | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/tk8.6/doc/SetAppName.3 b/tk8.6/doc/SetAppName.3 new file mode 100644 index 0000000..3978850 --- /dev/null +++ b/tk8.6/doc/SetAppName.3 @@ -0,0 +1,62 @@ +'\" +'\" 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. +'\" +.TH Tk_SetAppName 3 4.0 Tk "Tk Library Procedures" +.so man.macros +.BS +.SH NAME +Tk_SetAppName \- Set the name of an application for 'send' commands +.SH SYNOPSIS +.nf +\fB#include <tk.h>\fR +.sp +const char * +\fBTk_SetAppName\fR(\fItkwin, name\fR) +.SH ARGUMENTS +.AS Tk_Window parent +.AP Tk_Window tkwin in +Token for window in application. Used only to select a particular +application. +.AP "const char" *name in +Name under which to register the application. +.BE +.SH DESCRIPTION +.PP +\fBTk_SetAppName\fR associates a name with a given application and +records that association on the display containing with the application's +main window. +After this procedure has been invoked, other applications on the +display will be able to use the \fBsend\fR command to invoke operations +in the application. +If \fIname\fR is already in use by some other application on the +display, then a new name will be generated by appending +.QW "\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 actually +used. +.PP +If the application already has a name when \fBTk_SetAppName\fR is +called, then the new name replaces the old name. +.PP +\fBTk_SetAppName\fR also adds a \fBsend\fR command to the application's +interpreter, which can be used to send commands from this application +to others on any of the displays where the application has windows. +.PP +The application's name registration persists until the interpreter is +deleted or the \fBsend\fR command is deleted from \fIinterp\fR, at which +point the name is automatically unregistered and the application +becomes 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 do not normally need to call it explicitly. +.PP +The command \fBtk appname\fR provides Tcl-level access to the +functionality of \fBTk_SetAppName\fR. +.SH KEYWORDS +application, name, register, send command |