Re: need help with events_pending()
| From: | Rich Payne | Date: | Wed, 17 Oct 2001 16:51:06 +0000 |
| Subject: | Re: need help with events_pending() | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-311@lists.php.net to get a copy of this message | ||
You can use this when you are doing something that's going to take a lot
of time. Something like:
while (something is true) {
while (gtk::events_pending())
gtk::main_iteration();
do something;
}
So, lets say were running this loop several million times, each time the
loop gets called we check to see if there are any Gtk+ evernts waiting to
be taken care of. That way if the user clicks on a button while we're
in the middle, we can respond to the user, take care of what they want,
then go back to the processing. Without this the UI would appear to freeze
to the user until your processing is done.
Does that help?
--rdp
On Wed, 17 Oct 2001, vishal khialani wrote:
> Hi,
> This is in ref to the substitute for threads I had asked I got some
> suggestion of using main_pending()
>
> // --------- something like this
>
>
> while (gtk::events_pending()) {
>
> gtk::main_iteration();
> }
> //
>
> but I could not use it can some pls pls show me a sample code which works
> Thanks
> Vishal
>
> p.s --- I have no clue as how its suppose to work
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at )|Ï�Ns\½š¨º„ó
> http://explorer.msn.com/intl.asp
>
>
>
--
Rich Payne
rpayne@alphalinux.org www.alphalinux.org