CrtCloseHdlr.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
- '"
- '" Copyright (c) 1994-1996 Sun Microsystems, Inc.
- '"
- '" See the file "license.terms" for information on usage and redistribution
- '" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- '"
- '" RCS: @(#) $Id: CrtCloseHdlr.3,v 1.2 1998/09/14 18:39:47 stanton Exp $
- .so man.macros
- .TH Tcl_CreateCloseHandler 3 7.5 Tcl "Tcl Library Procedures"
- .BS
- '" Note: do not modify the .SH NAME line immediately below!
- .SH NAME
- Tcl_CreateCloseHandler, Tcl_DeleteCloseHandler - arrange for callbacks when channels are closed
- .SH SYNOPSIS
- .nf
- fB#include <tcl.h>fR
- .sp
- void
- fBTcl_CreateCloseHandlerfR(fIchannel, proc, clientDatafR)
- .sp
- void
- fBTcl_DeleteCloseHandlerfR(fIchannel, proc, clientDatafR)
- .sp
- .SH ARGUMENTS
- .AS Tcl_CloseProc callbackData in
- .AP Tcl_Channel channel in
- The channel for which to create or delete a close callback.
- .AP Tcl_CloseProc *proc in
- The procedure to call as the callback.
- .AP ClientData clientData in
- Arbitrary one-word value to pass to fIprocfR.
- .BE
- .SH DESCRIPTION
- .PP
- fBTcl_CreateCloseHandlerfR arranges for fIprocfR to be called when
- fIchannelfR is closed with fBTcl_ClosefR or
- fBTcl_UnregisterChannelfR, or using the Tcl fBclosefR command.
- fIProcfR should match the following prototype:
- .PP
- .CS
- typedef void Tcl_CloseProc(
- ClientData fIclientDatafR);
- .CE
- .PP
- The fIclientDatafR is the same as the value provided in the call to
- fBTcl_CreateCloseHandlerfR.
- .PP
- fBTcl_DeleteCloseHandlerfR removes a close callback for fIchannelfR.
- The fIprocfR and fIclientDatafR identify which close callback to
- remove; fBTcl_DeleteCloseHandlerfR does nothing if its fIprocfR and
- fIclientDatafR arguments do not match the fIprocfR and fIclientDatafR
- for a close handler for fIchannelfR.
- .SH "SEE ALSO"
- close(n), Tcl_Close(3), Tcl_UnregisterChannel(3)
- .SH KEYWORDS
- callback, channel closing