Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tcl_deleteclosehandler(3tcl) [opensolaris man page]

Tcl_CreateCloseHandler(3TCL)				      Tcl Library Procedures				      Tcl_CreateCloseHandler(3TCL)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_CreateCloseHandler, Tcl_DeleteCloseHandler - arrange for callbacks when channels are closed SYNOPSIS
#include <tcl.h> void Tcl_CreateCloseHandler(channel, proc, clientData) void Tcl_DeleteCloseHandler(channel, proc, clientData) ARGUMENTS
Tcl_Channel channel (in) The channel for which to create or delete a close callback. Tcl_CloseProc *proc (in) The procedure to call as the callback. ClientData clientData (in) Arbitrary one-word value to pass to proc. _________________________________________________________________ DESCRIPTION
Tcl_CreateCloseHandler arranges for proc to be called when channel is closed with Tcl_Close or Tcl_UnregisterChannel, or using the Tcl close command. Proc should match the following prototype: typedef void Tcl_CloseProc( ClientData clientData); The clientData is the same as the value provided in the call to Tcl_CreateCloseHandler. Tcl_DeleteCloseHandler removes a close callback for channel. The proc and clientData identify which close callback to remove; Tcl_Delete- CloseHandler does nothing if its proc and clientData arguments do not match the proc and clientData for a close handler for channel. SEE ALSO
close(1T), Tcl_Close(3TCL), Tcl_UnregisterChannel(3TCL) KEYWORDS
callback, channel closing ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTcl | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for Tcl is available on http://opensolaris.org. Tcl 7.5 Tcl_CreateCloseHandler(3TCL)

Check Out this Related Man Page

Tcl_CreateTimerHandler(3TCL)				      Tcl Library Procedures				      Tcl_CreateTimerHandler(3TCL)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_CreateTimerHandler, Tcl_DeleteTimerHandler - call a procedure at a given time SYNOPSIS
#include <tcl.h> Tcl_TimerToken Tcl_CreateTimerHandler(milliseconds, proc, clientData) Tcl_DeleteTimerHandler(token) ARGUMENTS
int milliseconds (in) How many milliseconds to wait before invoking proc. Tcl_TimerProc *proc (in) Procedure to invoke after milliseconds have elapsed. ClientData clientData (in) Arbitrary one-word value to pass to proc. Tcl_TimerToken token (in) Token for previously-created timer handler (the return value from some previous call to Tcl_Cre- ateTimerHandler). _________________________________________________________________ DESCRIPTION
Tcl_CreateTimerHandler arranges for proc to be invoked at a time milliseconds milliseconds in the future. The callback to proc will be made by Tcl_DoOneEvent, so Tcl_CreateTimerHandler is only useful in programs that dispatch events through Tcl_DoOneEvent or through Tcl commands such as vwait. The call to proc may not be made at the exact time given by milliseconds: it will be made at the next opportunity after that time. For example, if Tcl_DoOneEvent isn't called until long after the time has elapsed, or if there are other pending events to process before the call to proc, then the call to proc will be delayed. Proc should have arguments and return value that match the type Tcl_TimerProc: typedef void Tcl_TimerProc(ClientData clientData); The clientData parameter to proc is a copy of the clientData argument given to Tcl_CreateTimerHandler when the callback was created. Typi- cally, clientData points to a data structure containing application-specific information about what to do in proc. Tcl_DeleteTimerHandler may be called to delete a previously-created timer handler. It deletes the handler indicated by token so that no call to proc will be made; if that handler no longer exists (e.g. because the time period has already elapsed and proc has been invoked then Tcl_DeleteTimerHandler does nothing. The tokens returned by Tcl_CreateTimerHandler never have a value of NULL, so if NULL is passed to Tcl_DeleteTimerHandler then the procedure does nothing. KEYWORDS
callback, clock, handler, timer ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTcl | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for Tcl is available on http://opensolaris.org. Tcl 7.5 Tcl_CreateTimerHandler(3TCL)
Man Page