Re: signal_connect()



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]