Re: regarding animated mng support in gtk for directfb

2009-03-15 Thread Monil Parmar
Hi,

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.

Monil


On Fri, Mar 6, 2009 at 5:51 PM, Sven Neumann  wrote:

> Hi,
>
> On Wed, 2009-03-04 at 21:12 +0530, Monil Parmar wrote:
>
>
> > Iam trying to give support for animated mng on gtk-directfb.
> >
> > Animated mng file is working fine with gtk-x11 background
> > but with gtk-directfb background it loads only one frame of mng file.
> >
> > Can you help me regarding this. or Do you have any more information
> > which you can share.
>
> If you could provide the code together with a test case, I might find
> time to check if I can reproduce your problem and perhaps find out
> what's going wrong.
>
> What version of GTK+ are you using?
>
>
> Sven
>
>
>
>
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Fwd: regarding animated mng support in gtk for directfb

2009-03-10 Thread Matthias Clasen
On Tue, Mar 10, 2009 at 12:56 PM, Dominic Lachowicz
 wrote:
> Also, you could write a GdkPixbufLoader plugin, so that all GTK+ apps
> can view MNGs. It shouldn't be too difficult.

It actually is difficult, because libmng doesn't expose its
functionality in a way that easily maps to
GdkPixbufAnimation/GdkPixbufAnimationIter.
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Fwd: regarding animated mng support in gtk for directfb

2009-03-10 Thread Dominic Lachowicz
Also, you could write a GdkPixbufLoader plugin, so that all GTK+ apps
can view MNGs. It shouldn't be too difficult.

On Tue, Mar 10, 2009 at 11:52 AM, Sven Neumann  wrote:
> 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
>
>
>
> ___
> gtk-devel-list mailing list
> gtk-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>



-- 
Mediocrity knows nothing higher than itself; but talent instantly
recognizes genius.
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Fwd: regarding animated mng support in gtk for directfb

2009-03-10 Thread Sven Neumann
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



___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: regarding animated mng support in gtk for directfb

2009-03-06 Thread Sven Neumann
Hi,

On Wed, 2009-03-04 at 21:12 +0530, Monil Parmar wrote:


> Iam trying to give support for animated mng on gtk-directfb.
> 
> Animated mng file is working fine with gtk-x11 background
> but with gtk-directfb background it loads only one frame of mng file.
> 
> Can you help me regarding this. or Do you have any more information
> which you can share.

If you could provide the code together with a test case, I might find
time to check if I can reproduce your problem and perhaps find out
what's going wrong.

What version of GTK+ are you using?


Sven



___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


regarding animated mng support in gtk for directfb

2009-03-06 Thread Monil Parmar
Hi,

Iam trying to give support for animated mng on gtk-directfb.

Animated mng file is working fine with gtk-x11 background
but with gtk-directfb background it loads only one frame of mng file.

Can you help me regarding this. or Do you have any more information which
you can share.

Thanks
Monil parmar
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list