Re: Signal handlers: parameter names



On Thu, 8 Mar 2001, John Margaglione wrote:

> 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.  

This could also be useful for language bindings for languages which
support keyword arguments (such as python and perl).  It would allow the
g_signal_emit wrapper and handler marshaller to handle argument names
properly.

I don't know how much use it would be outside of these instances though.

James.

-- 
Email: james daa com au
WWW:   http://www.daa.com.au/~james/






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]