Re: signal_connect()
- From: Goran Thyni <goran kirra net>
- To: Dermot Musgrove <dermot glade perl connectfree co uk>
- Cc: gtk-perl-list gnome org
- Subject: Re: signal_connect()
- Date: Thu, 14 Nov 2002 23:16:56 +0100
On Thu, Nov 14, 2002 at 04:36:24AM +0000, Dermot Musgrove wrote:
Hi all,
GSignal->signal_connect() now returns a Gtk2::GClosure
rather than a a connection id (gulong) as gtk2 does.
We will need this id for use for a later signal_handler_block() calls
or similar.
Perhaps the plan is to intercept calls to all the signal methods
and pass a GClosure instead but I guess that it would be easier
to simply return the id.
The problem is that signal_disconnect should free up some resources
we should treat the returned value as a handler_id and never look
inside in application code.
{
my $id = $button->signal_connect('blabla' => $sub { ... });
[...]
$button->signal_block($id);
[...]
$button->signal_unblock($id);
[...]
$button->signal_disconnect($id);
}
No use looking inside and looks
consistent with C version.
/göran
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]