Re: Adding custom GDK events
- From: Daniel Elstner <daniel kitta googlemail com>
- To: Chris Vine <chris cvine freeserve co uk>
- Cc: gtkmm-list gnome org, Doron Singer <antrax gmail com>
- Subject: Re: Adding custom GDK events
- Date: Fri, 12 Jan 2007 02:20:52 +0100
Am Freitag, den 12.01.2007, 00:23 +0000 schrieb Chris Vine:
> With Glib::signal_idle() you have to reconnect the slot every time you want it
> to fire (and make sure you return false). With Glib::Dispatcher you just
> call emit on it (it is in effect a thread safe version of
> sigc::signal0<void>). Glib::signal_idle() is more convenient if you want to
> pass different data on each invocation, because you can do that by binding to
> the slot. You should only emit Glib::Dispatcher from a different thread from
> the main GUI thread. Glib::signal_idle() is thread safe and can be called
> from the main GUI thread or any other thread.
Oh sh*t. If I had only known that Glib::signal_idle() was thread-safe,
I might never have started working on Glib::Dispatcher :-)
It does have the advantage though that it's memory allocation-free once
set up.
--Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]