home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcl2-73c.zip / tcl7.3 / doc / CallDel.3 < prev    next >
Text File  |  1993-09-09  |  3KB  |  83 lines

  1. '\"
  2. '\" Copyright (c) 1993 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/tcl/man/RCS/CallDel.3,v 1.3 93/09/09 16:49:23 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS Tcl_CallWhenDeleted tclc 7.0
  25. .BS
  26. .SH NAME
  27. .na
  28. Tcl_CallWhenDeleted, Tcl_DontCallWhenDeleted \- Arrange for callback when interpreter is deleted
  29. .ad
  30. .SH SYNOPSIS
  31. .nf
  32. \fB#include <tcl.h>\fR
  33. .sp
  34. \fBTcl_CallWhenDeleted\fR(\fIinterp\fR, \fIproc\fR, \fIclientData\fR)
  35. .sp
  36. \fBTcl_DontCallWhenDeleted\fR(\fIinterp\fR, \fIproc\fR, \fIclientData\fR)
  37. .SH ARGUMENTS
  38. .AS Tcl_InterpDeleteProc clientData
  39. .AP Tcl_Interp *interp in
  40. Interpreter with which to associated callback.
  41. .AP Tcl_InterpDeleteProc *proc in
  42. Procedure to call when \fIinterp\fR is deleted.
  43. .AP ClientData clientData in
  44. Arbitrary one-word value to pass to \fIproc\fR.
  45. .BE
  46.  
  47. .SH DESCRIPTION
  48. .PP
  49. \fBTcl_CallWhenDeleted\fR arranges for \fIproc\fR to be called by
  50. \fBTcl_DeleteInterp\fR if/when \fIinterp\fR is deleted at some future
  51. time.  \fIProc\fR will be invoked just before the interpreter
  52. is deleted, but the interpreter will still be valid at the
  53. time of the call.
  54. \fIProc\fR should have arguments and result that match the
  55. type \fBTcl_InterpDeleteProc\fR:
  56. .nf
  57. .RS
  58. typedef int Tcl_InterpDeleteProc(
  59. .RS
  60. ClientData \fIclientData\fR,
  61. Tcl_Interp *\fIinterp\fR);
  62. .RE
  63. .RE
  64. .fi
  65. The \fIclientData\fP and \fIinterp\fR parameters are
  66. copies of the \fIclientData\fP and \fIinterp\fR arguments given
  67. to \fBTcl_CallWhenDeleted\fR.
  68. Typically, \fIclientData\fR points to an application-specific
  69. data structure that \fIproc\fR uses to perform cleanup when an
  70. interpreter is about to go away.
  71. \fIProc\fR does not return a value.
  72. .PP
  73. \fBTcl_DontCallWhenDeleted\fR cancels a previous call to
  74. \fBTcl_CallWhenDeleted\fR with the same arguments, so that
  75. \fIproc\fR won't be called after all when \fIinterp\fR is
  76. deleted.
  77. If there is no deletion callback that matches \fIinterp\fR,
  78. \fIproc\fR, and \fIclientData\fR then the call to
  79. \fBTcl_DontCallWhenDeleted\fR has no effect.
  80.  
  81. .SH KEYWORDS
  82. callback, delete, interpreter
  83.