[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: stop a procedure execution in GTK



--- 447158@celes.unizar.es wrote:
> Hi,
> 
> if a
> callback procedure is
> executed it cannot stop and of course it would not
> allow the application to
> catch new events till it's finished, or yes?

You can use the following statements to allow
execution of the main loop for any pending events and
signals and can resume your loop again..

while( your_loop_is_required )
{
   while( gtk_events_pending() )
      gtk_main_iteration();

   your_custom_statements ;
}

For the sroping of the loop you can pass address of a
variable to both the callbacks and monitor the
variable in the loop.  Execute the loop until the
variable is TRUE and exit from the loop if it is
FALSE.

Now your job to stop the loop from another callback is
as simple as making the value of the variable FALSE.

Hope this Helps.

Tushar

=====
Tushar Vijay Joshi
42/3 Ujjwal Nagar, Wardha Road, Nagpur 440 025
(0) 235940 (R) 260565 (M) 98222-20365
Email: tusharvjoshi@yahoo.com
<<No one can laugh at a person who can laugh at himself.
Smile anyway.  Success is never ending Failure is never Final.>>

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]