4
* This file provides procedures that implement the "send"
5
* command, allowing commands to be passed from interpreter
8
* Copyright (c) 1997 by Sun Microsystems, Inc.
10
* See the file "license.terms" for information on usage and redistribution
11
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13
* RCS: @(#) $Id: tkWinSend.c,v 1.2 1998/09/14 18:24:01 stanton Exp $
21
*--------------------------------------------------------------
25
* This procedure is called to associate an ASCII name with a Tk
26
* application. If the application has already been named, the
27
* name replaces the old one.
30
* The return value is the name actually given to the application.
31
* This will normally be the same as name, but if name was already
32
* in use for an application then a name of the form "name #2" will
33
* be chosen, with a high enough number to make the name unique.
36
* Registration info is saved, thereby allowing the "send" command
37
* to be used later to invoke commands in the application. In
38
* addition, the "send" command is created in the application's
39
* interpreter. The registration will be removed automatically
40
* if the interpreter is deleted or the "send" command is removed.
42
*--------------------------------------------------------------
46
Tk_SetAppName(tkwin, name)
47
Tk_Window tkwin; /* Token for any window in the application
48
* to be named: it is just used to identify
49
* the application and the display. */
50
char *name; /* The name that will be used to
51
* refer to the interpreter in later
52
* "send" commands. Must be globally
59
*----------------------------------------------------------------------
63
* This procedure is invoked to fetch a list of all the
64
* interpreter names currently registered for the display
65
* of a particular window.
68
* A standard Tcl return value. Interp->result will be set
69
* to hold a list of all the interpreter names defined for
70
* tkwin's display. If an error occurs, then TCL_ERROR
71
* is returned and interp->result will hold an error message.
76
*----------------------------------------------------------------------
80
TkGetInterpNames(interp, tkwin)
81
Tcl_Interp *interp; /* Interpreter for returning a result. */
82
Tk_Window tkwin; /* Window whose display is to be used