Glib::signal_timeout() and gdk_threads_enter()
- From: Konishchev Dmitry <konishchev gmail com>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: Glib::signal_timeout() and gdk_threads_enter()
- Date: Wed, 10 Jun 2009 20:06:27 +0400
Hello, everybody.
gtkmm-demo's "Pixbufs" example has the following code:
> m_TimeoutConnection = Glib::signal_timeout().connect(
> sigc::mem_fun(*this, &Example_Pixbufs::on_timeout), FRAME_DELAY);
> ...
> bool Example_Pixbufs::on_timeout()
> {
> ...
> }
As I understand, Glib::signal_timeout() is equivalent to the
g_timeout_add(), but in this case we need to surround
Example_Pixbufs::on_timeout() callback by the gdk_threads_enter() and
gdk_threads_leave() as in the following lines:
> bool Example_Pixbufs::on_timeout()
> {
> gdk_threads_enter();
> ...
> gdk_threads_leave();
> }
Is this example wrong, or my understanding of this is wrong?
Thanks for your answer,
Konishchev Dmitry.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]