2 '\" Copyright (c) 1994 The Regents of the University of California.
3 '\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
5 '\" See the file "license.terms" for information on usage and redistribution
6 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8 .TH Tk_SetAppName 3 4.0 Tk "Tk Library Procedures"
12 Tk_SetAppName \- Set the name of an application for 'send' commands
18 \fBTk_SetAppName\fR(\fItkwin, name\fR)
21 .AP Tk_Window tkwin in
22 Token for window in application. Used only to select a particular
24 .AP "const char" *name in
25 Name under which to register the application.
29 \fBTk_SetAppName\fR associates a name with a given application and
30 records that association on the display containing with the application's
32 After this procedure has been invoked, other applications on the
33 display will be able to use the \fBsend\fR command to invoke operations
35 If \fIname\fR is already in use by some other application on the
36 display, then a new name will be generated by appending
38 to \fIname\fR; if this name is also in use,
39 the number will be incremented until an unused name is found.
40 The return value from the procedure is a pointer to the name actually
43 If the application already has a name when \fBTk_SetAppName\fR is
44 called, then the new name replaces the old name.
46 \fBTk_SetAppName\fR also adds a \fBsend\fR command to the application's
47 interpreter, which can be used to send commands from this application
48 to others on any of the displays where the application has windows.
50 The application's name registration persists until the interpreter is
51 deleted or the \fBsend\fR command is deleted from \fIinterp\fR, at which
52 point the name is automatically unregistered and the application
53 becomes inaccessible via \fBsend\fR.
54 The application can be made accessible again by calling \fBTk_SetAppName\fR.
56 \fBTk_SetAppName\fR is called automatically by \fBTk_Init\fR,
57 so applications do not normally need to call it explicitly.
59 The command \fBtk appname\fR provides Tcl-level access to the
60 functionality of \fBTk_SetAppName\fR.
62 application, name, register, send command