home *** CD-ROM | disk | FTP | other *** search
-
-
-
- TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee((((3333)))) TTTTkkkk (((( )))) TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee((((3333))))
-
-
-
- _________________________________________________________________
-
- NNNNAAAAMMMMEEEE
- Tk_DoWhenIdle, Tk_CancelIdleCall - invoke a procedure when
- there are no pending events
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
-
- TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee(_p_r_o_c, _c_l_i_e_n_t_D_a_t_a)
-
- TTTTkkkk____CCCCaaaannnncccceeeellllIIIIddddlllleeeeCCCCaaaallllllll(_p_r_o_c, _c_l_i_e_n_t_D_a_t_a) |
-
- AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
- Tk_IdleProc *_p_r_o_c (in) Procedure to invoke.
-
- ClientData _c_l_i_e_n_t_D_a_t_a (in) Arbitrary one-word
- value to pass to _p_r_o_c.
- _________________________________________________________________
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee arranges for _p_r_o_c to be invoked when the
- application becomes idle. The application is considered to
- be idle when TTTTkkkk____DDDDooooOOOOnnnneeeeEEEEvvvveeeennnntttt has been called, it couldn't find
- any events to handle, and it is about to go to sleep waiting
- for an event to occur. At this point all pending
- TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee handlers are invoked. For each call to
- TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee there will be a single call to _p_r_o_c; after
- _p_r_o_c is invoked the handler is automatically removed.
- TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee is only useable in programs that use
- TTTTkkkk____DDDDooooOOOOnnnneeeeEEEEvvvveeeennnntttt to dispatch events.
-
- _P_r_o_c should have arguments and result that match the type
- TTTTkkkk____IIIIddddlllleeeePPPPrrrroooocccc:
- typedef void Tk_IdleProc(ClientData _c_l_i_e_n_t_D_a_t_a);
- The _c_l_i_e_n_t_D_a_t_a parameter to _p_r_o_c is a copy of the _c_l_i_e_n_t_D_a_t_a
- argument given to TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee. Typically, _c_l_i_e_n_t_D_a_t_a
- points to a data structure containing application-specific
- information about what _p_r_o_c should do.
-
- TTTTkkkk____CCCCaaaannnncccceeeellllIIIIddddlllleeeeCCCCaaaallllllll may be used to cancel one or more previous |
- calls to TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee: if there is a TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee handler |
- registered for _p_r_o_c and _c_l_i_e_n_t_D_a_t_a, then it is removed |
- without invoking it. If there is more than one handler on |
- the idle list that refers to _p_r_o_c and _c_l_i_e_n_t_D_a_t_a, all of the |
- handlers are removed. If no existing handlers match _p_r_o_c |
- and _c_l_i_e_n_t_D_a_t_a then nothing happens.
-
- TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee is most useful in situations where (a) a piece
- of work will have to be done but (b) it's possible that
- something will happen in the near future that will change
-
-
-
- Page 1 (printed 7/23/95)
-
-
-
-
-
-
- TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee((((3333)))) TTTTkkkk (((( )))) TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee((((3333))))
-
-
-
- what has to be done, or require something different to be
- done. TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee allows the actual work to be deferred
- until all pending events have been processed. At this point
- the exact work to be done will presumably be known and it
- can be done exactly once.
-
- For example, TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee might be used by an editor to
- defer display updates until all pending commands have been
- processed. Without this feature, redundant redisplays might
- occur in some situations, such as the processing of a
- command file.
-
-
- KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
- callback, defer, handler, idle
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 2 (printed 7/23/95)
-
-
-
-