Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/doc/CrtCloseHdlr.3 @ 47

Last change on this file since 47 was 25, checked in by landauf, 16 years ago

added tcl to libs

File size: 1.8 KB
Line 
1'\"
2'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
3'\"
4'\" See the file "license.terms" for information on usage and redistribution
5'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6'\"
7'\" RCS: @(#) $Id: CrtCloseHdlr.3,v 1.3 2004/10/07 14:44:31 dkf Exp $
8.so man.macros
9.TH Tcl_CreateCloseHandler 3 7.5 Tcl "Tcl Library Procedures"
10.BS
11'\" Note:  do not modify the .SH NAME line immediately below!
12.SH NAME
13Tcl_CreateCloseHandler, Tcl_DeleteCloseHandler \- arrange for callbacks when channels are closed
14.SH SYNOPSIS
15.nf
16\fB#include <tcl.h>\fR
17.sp
18void
19\fBTcl_CreateCloseHandler\fR(\fIchannel, proc, clientData\fR)
20.sp
21void
22\fBTcl_DeleteCloseHandler\fR(\fIchannel, proc, clientData\fR)
23.sp
24.SH ARGUMENTS
25.AS Tcl_CloseProc clientData
26.AP Tcl_Channel channel in
27The channel for which to create or delete a close callback.
28.AP Tcl_CloseProc *proc in
29The procedure to call as the callback.
30.AP ClientData clientData in
31Arbitrary one-word value to pass to \fIproc\fR.
32.BE
33
34.SH DESCRIPTION
35.PP
36\fBTcl_CreateCloseHandler\fR arranges for \fIproc\fR to be called when
37\fIchannel\fR is closed with \fBTcl_Close\fR or
38\fBTcl_UnregisterChannel\fR, or using the Tcl \fBclose\fR command.
39\fIProc\fR should match the following prototype:
40.PP
41.CS
42typedef void Tcl_CloseProc(
43        ClientData \fIclientData\fR);
44.CE
45.PP
46The \fIclientData\fR is the same as the value provided in the call to
47\fBTcl_CreateCloseHandler\fR.
48.PP
49\fBTcl_DeleteCloseHandler\fR removes a close callback for \fIchannel\fR.
50The \fIproc\fR and \fIclientData\fR identify which close callback to
51remove; \fBTcl_DeleteCloseHandler\fR does nothing if its \fIproc\fR and
52\fIclientData\fR arguments do not match the \fIproc\fR and \fIclientData\fR
53for a  close handler for \fIchannel\fR.
54
55.SH "SEE ALSO"
56close(n), Tcl_Close(3), Tcl_UnregisterChannel(3)
57
58.SH KEYWORDS
59callback, channel closing
Note: See TracBrowser for help on using the repository browser.