1Tcl_CreateCloseHandler(3)   Tcl Library Procedures   Tcl_CreateCloseHandler(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tcl_CreateCloseHandler,  Tcl_DeleteCloseHandler - arrange for callbacks
9       when channels are closed
10

SYNOPSIS

12       #include <tcl.h>
13
14       void
15       Tcl_CreateCloseHandler(channel, proc, clientData)
16
17       void
18       Tcl_DeleteCloseHandler(channel, proc, clientData)
19
20

ARGUMENTS

22       Tcl_Channel channel (in)               The channel for which to  create
23                                              or delete a close callback.
24
25       Tcl_CloseProc *proc (in)               The  procedure  to  call  as the
26                                              callback.
27
28       ClientData clientData (in)             Arbitrary one-word value to pass
29                                              to proc.
30_________________________________________________________________
31
32

DESCRIPTION

34       Tcl_CreateCloseHandler  arranges  for proc to be called when channel is
35       closed with Tcl_Close or Tcl_UnregisterChannel, or using the Tcl  close
36       command.  Proc should match the following prototype:
37
38              typedef void Tcl_CloseProc(
39                      ClientData clientData);
40
41       The  clientData  is  the  same  as  the  value  provided in the call to
42       Tcl_CreateCloseHandler.
43
44       Tcl_DeleteCloseHandler removes a close callback for channel.  The  proc
45       and  clientData  identify  which  close callback to remove; Tcl_Deleteā€
46       CloseHandler does nothing if its proc and clientData arguments  do  not
47       match the proc and clientData for a  close handler for channel.
48
49

SEE ALSO

51       close(n), Tcl_Close(3), Tcl_UnregisterChannel(3)
52
53

KEYWORDS

55       callback, channel closing
56
57
58
59Tcl                                   7.5            Tcl_CreateCloseHandler(3)
Impressum