Re: How to enable animation in GTK 2 application ?



Hey Dov,
Thanks for your reply. I am working on your advice and will get back to you soon.


On Sat, Jun 6, 2009 at 11:41 PM, Dov Grobgeld <dov grobgeld gmail com> wrote:
For most animations the function that you need is g_timeout_add() that makes the main loop of gtk/glib call a function of your choice after a certain interval (the animation step). By returning true from this function, the function will be called again after the same interval. Depending on what kind of animation you want to do, you can do several different things in the timeout callback function:
  • If your animation is built of a stack of images, then you can request to display the next image.
  • If your animation is a set of canvas items on one of the gtk canvases (e.g. goocanvas) then you can request to move the canvas item to a new position.
This might be enough for your needs, though in your question it sounds like e.g. you want to do user interface animations, which is a totally different story.

Regards,
Dov


2009/6/5 Rohit Jain <rohit jain net4uonline com>
Dear Friends,

Im working on a game application which needs a funky look and few animations in it. Im new to GTK and learning it from online tutorial posted on gtk.org site. There they haven't mentioned anything about animating windows or frames or even special effects just like the one in gnome desktop project.

How do i give special effects and animations to this game without requiring more processing speeds n huge memories?

--
Regards,
Rohit Jain

_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list





--
Regards,
Rohit Jain


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