gdk-pixbuf: API compatibility & gdk_pixbuf_animation_(un)load_frame



Hi,


I am implementing the functions gdk_pixbuf_animation_(un)load_frame functions
and related framework in gdk-pixbuf. I am facing a dilemma about
compatibility with previous versions.

- gdk_pixbuf_animation_load_frame has to take the animation as the first
  argument since no informations with regard to the type of image are
  available from the gdk-pixbuf itself. The problem is that this
  breaks coherence with the rest of the API (which I consider to be a
  minor inconvenience).
- If, someday, we want to manage automatic loading and unloading from
  the library itself, gdk_pixbuf_frame_get_pixbuf will also need to
  have the animation as an argument in order to pass it to
  gdk_pixbuf_animation_load_frame. This brakes compatibilty, which is
  not a minor inconvenience.
- Speaking of gdk_pixbuf_[module]_image_load_frame, in the loader API,
  unless if the loader keeps internal data about which animations were
  loaded, there is now way to retrace the frame (which would be
  time consuming) passed as argument.

A solution would be to add a pointer of type gdata in struct
_GdkPixbufFrame (private version) which would belong to the loader, in
which the loader would store internal data.

Therefore, I seek advice, comments, suggestions from you guys about
those issues (others might come later).


Wolfgang




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