Re: GSignal convenience functions
- From: Havoc Pennington <hp redhat com>
- To: James Henstridge <james daa com au>
- Cc: gtk-devel-list gnome org
- Subject: Re: GSignal convenience functions
- Date: 07 Dec 2000 09:29:09 -0500
James Henstridge <james daa com au> writes:
> It seems that one of the things that is holding up use of GObject is that
> it is more difficult to use the GSignal functions than the old GtkSignal
> ones. To try and get things moving a bit, I put together a patch that
> adds g_signal_new, g_signal_emit, g_signal_emitv and
> g_signal_connect_cclosure functions that make signals more convenient to
> use from C.
>
Crap, I did this yesterday too. ;-)
> I have done a little testing of these functions, and they seem to work
> well. One bit of ugly code is putting the instance variable in the GValue
> array. At the moment, I misuse the collect_value function for the type
> (if it is available) to set the value, or just set it as a G_TYPE_POINTER
> value. This could probably be cleaned up a bit more.
I handled this by giving up on g_signal_emit() and doing
g_object_emit_signal().
Not before I was sitting their wondering why we support emitting a
signal on an unclassed object though. ;-)
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]