Re: Signal handlers: parameter names
- From: Sven Neumann <sven gimp org>
- To: John Margaglione <jmargaglione yahoo com>
- Cc: gtk-devel-list gnome org
- Subject: Re: Signal handlers: parameter names
- Date: 09 Mar 2001 08:28:44 +0100
Hi,
John Margaglione <jmargaglione yahoo com> writes:
> I was thinking about tools like glade, and specifically a tool I wrote a
> little while back called g2c, which converts glade XML files to C code.
> One of the problems I had then was that I could get the types of all of
> the parameters to a signal, but I couldn't get the names of the
> parameters. It seems this is still an issue, since gtk_signal_new still
> does not contain a place to name your signal's arguments. This would be
> enormously handy for tools like glade. Right now we have to maintain
> huge lists of signal handler names/parameters in our code, then do table
> lookups on the lists to write out the C code. If we could dynamically
> discover the types AND names of the parameters, it would reduce the
> amount of BS code we have to write a LOT. It would also allow GUI
> builders to handle new widget callbacks without recoding the builder.
I think gsignal from GObject has everything you ask for. Signal arguments
are GTypes which are registered (statically or dynamically) together with
their name. Have a look at the signal and type API of GObject.
Salut, Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]