Tk Library Procedures Tk_SetAppName(3TK)
_________________________________________________________________
NAME
Tk_SetAppName - Set the name of an application for ``send''
commandsSYNOPSIS
#include
CONST char *Tk_SetAppName(tkwin, name)
ARGUMENTSTk_Window tkwin (in) Token for window in applica-
tion. Used only to select a particular application. CONST char *name (in) Name under which to register the application._________________________________________________________________
DESCRIPTION
Tk_SetAppName 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 touse the send command to invoke operations in the applica-
tion. If name is already in use by some other applicationon the display, then a new name will be generated by append-
ing `` #2'' to name; 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.If the application already has a name when Tk_SetAppName is
called, then the new name replaces the old name.Tk_SetAppName also adds a send 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. The application's name registration persists until the interpreter is deleted or the send command is deleted frominterp, at which point the name is automatically unre-
gistered and the application becomes inaccessible via send. The application can be made accessible again by callingTk_SetAppName.
Tk_SetAppName is called automatically by Tk_Init, so appli-
cations don't normally need to call it explicitly. Tk Last change: 4.0 1Tk Library Procedures Tk_SetAppName(3TK)
The command tk appname provides Tcl-level access to the
functionality of Tk_SetAppName.
KEYWORDS application, name, register, send commandATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:_______________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE|
|____________________|__________________|_
| Availability | runtime/tk-8 |
|____________________|__________________|_
| Interface Stability| Uncommitted ||____________________|_________________|
NOTES Source for Tk is available on http://opensolaris.org. Tk Last change: 4.0 2