1Tk_SetAppName(3)             Tk Library Procedures            Tk_SetAppName(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tk_SetAppName - Set the name of an application for 'send' commands
9

SYNOPSIS

11       #include <tk.h>
12
13       const char *
14       Tk_SetAppName(tkwin, name)
15

ARGUMENTS

17       Tk_Window tkwin (in)           Token  for  window in application.  Used
18                                      only to select a particular application.
19
20       const char *name (in)          Name under which to register the  appli‐
21                                      cation.
22_________________________________________________________________
23
24

DESCRIPTION

26       Tk_SetAppName  associates  a  name with a given application and records
27       that association on the display containing with the application's  main
28       window.   After  this procedure has been invoked, other applications on
29       the display will be able to use the send command to  invoke  operations
30       in  the  application.  If name is already in use by some other applica‐
31       tion on the display, then a new name will be generated by  appending  “
32       #2”  to  name;   if this name is also in use, the number will be incre‐
33       mented until an unused name is found.  The return value from the proce‐
34       dure is a pointer to the name actually used.
35
36       If  the  application  already  has a name when Tk_SetAppName is called,
37       then the new name replaces the old name.
38
39       Tk_SetAppName also adds a send  command  to  the  application's  inter‐
40       preter,  which  can  be  used to send commands from this application to
41       others on any of the displays where the application has windows.
42
43       The application's name registration persists until the  interpreter  is
44       deleted  or the send command is deleted from interp, at which point the
45       name is automatically unregistered and the application becomes inacces‐
46       sible  via send.  The application can be made accessible again by call‐
47       ing Tk_SetAppName.
48
49       Tk_SetAppName is called automatically by Tk_Init,  so  applications  do
50       not normally need to call it explicitly.
51
52       The  command  tk appname provides Tcl-level access to the functionality
53       of Tk_SetAppName.
54
55

KEYWORDS

57       application, name, register, send command
58
59
60
61Tk                                    4.0                     Tk_SetAppName(3)
Impressum