73 lines
3.0 KiB
Groff
73 lines
3.0 KiB
Groff
'\"
|
|
'\" Copyright (c) 1990 The Regents of the University of California.
|
|
'\" All rights reserved.
|
|
'\"
|
|
'\" Permission is hereby granted, without written agreement and without
|
|
'\" license or royalty fees, to use, copy, modify, and distribute this
|
|
'\" documentation for any purpose, provided that the above copyright
|
|
'\" notice and the following two paragraphs appear in all copies.
|
|
'\"
|
|
'\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
|
|
'\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
'\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
|
|
'\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
'\"
|
|
'\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
|
|
'\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
'\" AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
'\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
|
|
'\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
'\"
|
|
'\" $Header: /user6/ouster/wish/man/RCS/RegInterp.3,v 1.5 93/04/01 09:41:55 ouster Exp $ SPRITE (Berkeley)
|
|
'\"
|
|
.so man.macros
|
|
.HS Tk_RegisterInterp tkc
|
|
.BS
|
|
.SH NAME
|
|
Tk_RegisterInterp \- make an interpreter accessible with ``send'' command
|
|
.SH SYNOPSIS
|
|
.nf
|
|
\fB#include <tk.h>\fR
|
|
.sp
|
|
int
|
|
\fBTk_RegisterInterp\fR(\fIinterp, name, tkwin\fR)
|
|
.SH ARGUMENTS
|
|
.AS Tk_Window parent
|
|
.AP Tcl_Interp *interp in
|
|
Interpreter to register in display associated with \fItkwin\fR.
|
|
Also used to return errors if registration failed.
|
|
.AP char *name in
|
|
Name under which to register interpreter. Must be unique among
|
|
all registered interpreters for \fItkwin\fR's display. May not
|
|
contain the character ``|''.
|
|
.AP Tk_Window tkwin in
|
|
Token for window. Used only to find a display in which to
|
|
register \fIinterp\fR.
|
|
.BE
|
|
|
|
.SH DESCRIPTION
|
|
.PP
|
|
\fBTk_RegisterInterp\fR is invoked to associate a name (\fIname\fR) with a
|
|
Tcl interpreter (\fIinterp\fR) and record that association in a well-known
|
|
property of a particular display (the one containing \fItkwin\fR).
|
|
After this procedure has been invoked, other interpreters in the
|
|
display will be able to use the \fBsend\fR command to invoke operations
|
|
remotely in \fIinterp\fR. The procedure returns TCL_OK if the
|
|
registration completed successfully and TCL_ERROR if the interpreter
|
|
could not be registered (e.g. because \fIname\fR is already in use).
|
|
In the event of an error, \fIinterp->result\fR is modified to point
|
|
to a message describing the error.
|
|
.PP
|
|
This procedure also adds a \fBsend\fR command to \fIinterp\fR, so
|
|
that commands may be sent from \fIinterp\fR to other interpreters.
|
|
.PP
|
|
The registration persists until the interpreter is deleted or the
|
|
\fBsend\fR command is deleted from \fIinterp\fR, at which
|
|
point \fIinterp\fR is automatically unregistered.
|
|
.PP
|
|
\fBTk_RegisterInterp\fR is called automatically by \fBTk_CreateMainWindow\fR,
|
|
so applications don't normally need to call it explicitly.
|
|
|
|
.SH KEYWORDS
|
|
interpreter, name, register, send command
|