Re: Displaying an image



On 7/1/06, Luis Federico Gómez Salazar <fedemico yahoo com> wrote:
Hi everybody!
I need that a sequence of frames be displayed when
ready... so in C with gtk this works:

g_timeout_add(10, refresh, NULL);

The gtk main loop calls the refresh function each 10
miliseconds. refresh()  puts the frame in a pixbuf,
then a set to a gtkimage is done and then it is
showed.

With gtkmm I did:

sigc::slot<bool> conexion =
sigc::bind(sigc::mem_fun(*this,&acceso::refresh),0);
sigc::connection llamada =
Glib::signal_timeout().connect(conexion, 10);

There is another way to do it with gtkmm? I mean, in
GTK looks easier with only one line of code...

well, you can certainly do it in one line.  e.g:
Glib::signal_timeout().connect(sigc::bind(sigc::mem_fun(*this,&acceso::refresh),0),
10);
But it amounts to the same thing, and there's not really any easier
way to do it

--
jonner



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