Re: [gtk-list] Re: Q: automatic function on program startup



csmall@scooter.o.i.net wrote:
> 
> Eduardo Perez wrote:
> > Many thanks for your interest, but I'm afraid this is not what I'm
> > looking for.
> >
> > I need to make some calculations after the first window is shown, second
> > window must be shown when calculations end; calculations show their
> > progress on the first window.
> >
> > It's something like a progress window when a program starts while
> > getting ready, then main window appears.
> 
> OK, so something like this pseudo code?
> 
> show_window_1();
> while(!finished) {
>   finished = do_my_special_calcs();
>   update_window_1();
> }
> show_window_2();
> 
> Now, you are going to have some problems here, if your calculations are
> *that* intense that it will be a while for them to complete, poor old
> gtk_main() won't get a lookin, which is a Bad Thing.  It means important
> stuff like window redrawing will not happen.  I am unsure if there is a
> like a release() command where you give up some cycles every now and then
> for gtk_main to do its thing.
> 
> I can see some troubles with these calculations.
> 
>   - Craig

My calculations are really intense; in fact I need as much CPU as
possible. Moreover, doing calculations a bit at a time inside
do_my_special_calcs will mess code too much.

Greetings.



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