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

Re: Driving an animation in a widget




 Do you know when the widget is no longer needed ? Or can you find that out?

  If so, you can keep a reference to the widget and destroy it yourself later
at the point which you no longer need it.

Harring Figueiredo


--- Braden McDaniel <braden endoframe com> wrote:
> I'm writing a Mozilla plug-in which includes a GTK widget. The widget is
> an OpenGL visualization using GtkGLExt. The animation is driven using
> the following sequence:
> 
>      1. one-shot timeout callback (added with g_timeout_add) initiates
>         update of widget state
>      2. gtk_widget_queue_draw(my_widget);
>      3. while (gtk_events_pending()) { gtk_main_iteration(); }
>      4. goto 1
> 
> This is interacting badly with Mozilla. I get a crash on exit because
> the widget may be destroyed in the middle of processing the timeout
> callback.
> 
> What I need is the ability to have a user-defined event that can simply
> fall on the floor if the widget has been destroyed. Does GTK provide
> something like this?
> 
> -- 
> Braden McDaniel                           e-mail: <braden endoframe com>
> <http://endoframe.com>                    Jabber: <braden jabber org>
> 
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 


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