diff options
Diffstat (limited to 'doc/DoWhenIdle.3')
| -rw-r--r-- | doc/DoWhenIdle.3 | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/doc/DoWhenIdle.3 b/doc/DoWhenIdle.3 index 90a6aa7..cfdbff9 100644 --- a/doc/DoWhenIdle.3 +++ b/doc/DoWhenIdle.3 @@ -4,11 +4,9 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" -'\" RCS: @(#) $Id: DoWhenIdle.3,v 1.2 1998/09/14 18:39:48 stanton Exp $ -'\" -.so man.macros +'\" .TH Tcl_DoWhenIdle 3 7.5 Tcl "Tcl Library Procedures" +.so man.macros .BS .SH NAME Tcl_DoWhenIdle, Tcl_CancelIdleCall \- invoke a procedure when there are no pending events @@ -26,13 +24,12 @@ Procedure to invoke. .AP ClientData clientData in Arbitrary one-word value to pass to \fIproc\fR. .BE - .SH DESCRIPTION .PP \fBTcl_DoWhenIdle\fR arranges for \fIproc\fR to be invoked when the application becomes idle. The application is considered to be idle when \fBTcl_DoOneEvent\fR has been -called, couldn't find any events to handle, and is about +called, could not find any events to handle, and is about to go to sleep waiting for an event to occur. At this point all pending \fBTcl_DoWhenIdle\fR handlers are invoked. For each call to \fBTcl_DoWhenIdle\fR there will @@ -43,9 +40,12 @@ use \fBTcl_DoOneEvent\fR to dispatch events. .PP \fIProc\fR should have arguments and result that match the type \fBTcl_IdleProc\fR: +.PP .CS -typedef void Tcl_IdleProc(ClientData \fIclientData\fR); +typedef void \fBTcl_IdleProc\fR( + ClientData \fIclientData\fR); .CE +.PP The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR argument given to \fBTcl_DoWhenIdle\fR. Typically, \fIclientData\fR points to a data structure containing application-specific information about @@ -61,7 +61,7 @@ all of the handlers are removed. If no existing handlers match \fIproc\fR and \fIclientData\fR then nothing happens. .PP \fBTcl_DoWhenIdle\fR is most useful in situations where -(a) a piece of work will have to be done but (b) it's +(a) a piece of work will have to be done but (b) it is possible that something will happen in the near future that will change what has to be done or require something different to be done. \fBTcl_DoWhenIdle\fR allows the @@ -81,6 +81,7 @@ continuously. This will interact badly with certain features of Tk that attempt to wait for all idle callbacks to complete. If you would like for an idle callback to reschedule itself continuously, it is better to use a timer handler with a zero timeout period. - +.SH "SEE ALSO" +after(n), Tcl_CreateFileHandler(3), Tcl_CreateTimerHandler(3) .SH KEYWORDS callback, defer, idle callback |
