gdk-pixbuf-animation



this may be the incorrect place to post this, but i'm hoping to get a little 
help with the gdk_pixbuf_animation functions in gdk-pixbuf.  basically my 
problem is that i cannot seem to get a good logic structure to implement 
this in my program.

my best guess so far is to create a big struct that has the animation, the 
drawable, and the drawing area in it, al la:

struct gif {
GdkPixbufAnimation *foo;
GdkDrawable *drawable;
GtkWidget *drawing_area;
};

then in main(), i pass the struct to a function called animate(struct gif 
*ptr), which calls render(struct gif *ptr) on a gtk timeout.  the timeout 
length varies depending on the length of the frame, accessed with 
gdk_pixbuf_frame_get_delay_time( gdk_pixbuf_animation_get_frames(ptr)->data 
)

this gives me trouble because i end up rendering the pixbuf before the 
drawing area exists (seg), or i create an expose event on a drawing area 
with NULL data (seg).

please, if anyone could spare a minute do help drag this through my brain, 
i'd truly appreciate it.
-bennyk
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com






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