Re: gdk-pixbuf-animation
- From: Vlad Harchev <hvv hippo ru>
- To: Ben K <kynneb hotmail com>
- Cc: gtk-list gnome org
- Subject: Re: gdk-pixbuf-animation
- Date: Wed, 16 Aug 2000 10:25:48 +0500 (SAMST)
On Wed, 16 Aug 2000, Ben K wrote:
> 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).
I think you should connect your timeout function in the signal handler for
"map" event on DrawingArea (i.e. when its GdkWindow is created on X server).
This IMO will solve both of your problems.
> please, if anyone could spare a minute do help drag this through my brain,
> i'd truly appreciate it.
> -bennyk
>
Best regards,
-Vlad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]