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  cre‐
23                                                ate  or  delete  a close call‐
24                                                back.
25
26       Tcl_CloseProc   *proc          (in)      The procedure to call  as  the
27                                                callback.
28
29       ClientData      clientData     (in)      Arbitrary  one-word  value  to
30                                                pass to proc.
31_________________________________________________________________
32
33

DESCRIPTION

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

SEE ALSO

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

KEYWORDS

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