Re: runtime version symbols (was Re: gdkpixbuf-animation: how to play without looping)



tomas tuxteam de ha scritto:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Sep 28, 2006 at 12:13:03PM +0200, Francesco Montorsi wrote:
tomas tuxteam de ha scritto:
[...]
yes, right. However GdkPixbufAnimation and its iter_advance() function will automatically restart the animation when the delay of the last frame has elapsed... that is, there's no way to avoid looping it currently.

On the
other hand, some query functions into the structure of the animation
would be nice here.
right. I submitted a patch which adds _get_frame_count and _get_current_frame functions to GdkPixbufAnimation.

Maybe there are animations where the concept of "frame count" doesn't
make sense?
currently there's none (gdk-pixbuf currently supports GIF and ANI animated formats only); in future some formats, e.g animated SVG, may give some problem to the "frame concept". However the frame concept is already implied by gdkpixbuf API and in particular by gdk_pixbuf_animation_iter_advance().

In fact this function returns TRUE if the animation needs update, i.e. if a new frame must be displayed.



However, I've now another small conceptual problem now: consider the following code:

         printf("compiled against gdk-pixbuf %s\n", GDK_PIXBUF_VERSION);
         printf("linked against gdk-pixbuf %s\n\n", gdk_pixbuf_version);

if I dynamically link my program on my linux which has e.g. gdk-pixbuf version 2.10.3 installed, and then run that binary on another linux which has gdk-pixbuf 2.8 installed, will I get

compiled against gdk-pixbuf 2.10.3
linked against gdk-pixbuf 2.8.0

or rather:

compiled against gdk-pixbuf 2.10.3
linked against gdk-pixbuf 2.10.3

?

I think the first: i.e. gdk_pixbuf_version contains the version of the dynamically loaded library, but I just want to be sure...

According to the docs it should be the first: gdk_pixbuf_version is an
external variable which lives in the lib (so it should reflect the lib's
version) while GDK_PIXBUF_VERSION is a C preprocessor macro which gets
"burnt into" your code at compile time.
Ok, thanks for the confirmation.

Thanks,
Francesco

Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com

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