home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tk3.3b1 / doc / RegInterp.3 < prev    next >
Encoding:
Text File  |  1993-04-01  |  3.0 KB  |  73 lines

  1. '\"
  2. '\" Copyright (c) 1990 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/wish/man/RCS/RegInterp.3,v 1.5 93/04/01 09:41:55 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS Tk_RegisterInterp tkc
  25. .BS
  26. .SH NAME
  27. Tk_RegisterInterp \- make an interpreter accessible with ``send'' command
  28. .SH SYNOPSIS
  29. .nf
  30. \fB#include <tk.h>\fR
  31. .sp
  32. int
  33. \fBTk_RegisterInterp\fR(\fIinterp, name, tkwin\fR)
  34. .SH ARGUMENTS
  35. .AS Tk_Window parent
  36. .AP Tcl_Interp *interp in
  37. Interpreter to register in display associated with \fItkwin\fR.
  38. Also used to return errors if registration failed.
  39. .AP char *name in
  40. Name under which to register interpreter.  Must be unique among
  41. all registered interpreters for \fItkwin\fR's display.  May not
  42. contain the character ``|''.
  43. .AP Tk_Window tkwin in
  44. Token for window.  Used only to find a display in which to
  45. register \fIinterp\fR.
  46. .BE
  47.  
  48. .SH DESCRIPTION
  49. .PP
  50. \fBTk_RegisterInterp\fR is invoked to associate a name (\fIname\fR) with a
  51. Tcl interpreter (\fIinterp\fR) and record that association in a well-known
  52. property of a particular display (the one containing \fItkwin\fR).
  53. After this procedure has been invoked, other interpreters in the
  54. display will be able to use the \fBsend\fR command to invoke operations
  55. remotely in \fIinterp\fR.  The procedure returns TCL_OK if the
  56. registration completed successfully and TCL_ERROR if the interpreter
  57. could not be registered (e.g. because \fIname\fR is already in use).
  58. In the event of an error, \fIinterp->result\fR is modified to point
  59. to a message describing the error.
  60. .PP
  61. This procedure also adds a \fBsend\fR command to \fIinterp\fR, so
  62. that commands may be sent from \fIinterp\fR to other interpreters.
  63. .PP
  64. The registration persists until the interpreter is deleted or the
  65. \fBsend\fR command is deleted from \fIinterp\fR, at which
  66. point \fIinterp\fR is automatically unregistered.
  67. .PP
  68. \fBTk_RegisterInterp\fR is called automatically by \fBTk_CreateMainWindow\fR,
  69. so applications don't normally need to call it explicitly.
  70.  
  71. .SH KEYWORDS
  72. interpreter, name, register, send command
  73.