Re: Fwd: regarding animated mng support in gtk for directfb
- From: Sven Neumann <sven gimp org>
- To: Monil Parmar <monil parmar gmail com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: Fwd: regarding animated mng support in gtk for directfb
- Date: Tue, 10 Mar 2009 17:52:43 +0100
Hi,
On Sat, 2009-03-07 at 10:37 +0530, Monil Parmar wrote:
> I am using GTK-2.12.12.
> I have compiled mng lib from http://sourceforge.net/projects/libmng/ .
> The test application, I have used for X11 with linux.mng is at
> libmng-1.0.10/contrib/gcc/gtm-mng-view .
> gtk-mng-view is a sample gtk based application to view mng.
> I could able to see linux.mng with animation effect.
>
> But when I try to run the same source code(gtk-mng-view) for
> GTK/DirectFB only 1st frame it shows.
I've had a look at this and the problem is clearly in the gtk-mng-view
code. The example code there draws outside the expose handler. This is
something that you should never do. It may work for GTK-X11 if you are
lucky, but it's not supported and it definitely does not work if you
using the DirectFB backend. Simply replace the function
mng_refresh_callback() in gtk-mng-view.c with the following code and it
will work just fine:
static mng_bool
mng_refresh_callback (mng_handle mng_h,
mng_uint32 x,
mng_uint32 y,
mng_uint32 width,
mng_uint32 height)
{
gtk_widget_queue_draw_area (GTK_WIDGET (mng_get_userdata (mng_h)),
x, y, width, height);
return MNG_TRUE;
}
Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]