Debian Codegraph @

pod/pTk/SetAppName.pod

raw
1 # Copyright (c) 1994 The Regents of the University of California.
2 # Copyright (c) 1994-1997 Sun Microsystems, Inc.
3 # See the file "license.terms" for information on usage and redistribution
4 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
5 #
6 #
7
8 =head1 NAME
9
10 Tk_SetAppName - Set the name of an application for ``send'' commands
11
12 =for category C Programming
13
14 =head1 SYNOPSIS
15
16 B<#include E<lt>tk.hE<gt>>
17
18 char *
19 B<Tk_SetAppName>(I<tkwin, name>)
20
21 =head1 ARGUMENTS
22
23 =over 4
24
25 =item Tk_Window tkwin (in)
26
27 Token for window in application. Used only to select a particular
28 application.
29
30 =item char *name (in)
31
32 Name under which to register the application.
33
34 =back
35
36 =head1 DESCRIPTION
37
38 B<Tk_SetAppName> associates a name with a given application and
39 records that association on the display containing with the application's
40 main window.
41 After this procedure has been invoked, other applications on the
42 display will be able to use the B<send> command to invoke operations
43 in the application.
44 If I<name> is already in use by some other application on the
45 display, then a new name will be generated by appending
46 ``B< #2>'' to I<name>; if this name is also in use,
47 the number will be incremented until an unused name is found.
48 The return value from the procedure is a pointer to the name actually
49 used.
50
51 If the application already has a name when B<Tk_SetAppName> is
52 called, then the new name replaces the old name.
53
54 B<Tk_SetAppName> also adds a B<send> command to the application's
55 interpreter, which can be used to send commands from this application
56 to others on any of the displays where the application has windows.
57
58 The application's name registration persists until the interpreter is
59 deleted or the B<send> command is deleted from I<interp>, at which
60 point the name is automatically unregistered and the application
61 becomes inaccessible via B<send>.
62 The application can be made accessible again by calling B<Tk_SetAppName>.
63
64 B<Tk_SetAppName> is called automatically by B<Tk_Init>,
65 so applications don't normally need to call it explicitly.
66
67 The command B<tk appname> provides Tcl-level access to the
68 functionality of B<Tk_SetAppName>.
69
70 =head1 KEYWORDS
71
72 application, name, register, send command