Re: reflection info in gtk?

Robert Nikander <nikander mindspring com> writes: 
But then I got to wondering... am I doing things the hard way? GObject
has some functions to get it's properties at runtime.  Maybe I could
use  this 'reflection' to get my information in a more reliable way
from the GTK runtime...  does GTK offer this ability?  Looking at the
GObject docs, it looks like I can get tons of info on 'properties' but
none on the 'methods' of an object.  Is this true?  Any advice?

If something like obj->list_methods() and obj->list_signals() isn't
possible, are there plans to offer this level of reflective info about
an object's interface, or is that only going to happen in the 'higher'
levels like Bonobo/Corba components, which I know nothing about.

Current GTK has no way to get the method info, no. We would like to
move in that direction long-term, but it probably involves rather
radical changes (moving to IDL as the master definition of
interfaces, and then autogenerating the object skeleton code).

However all language bindings are currently using the same ".defs"
file which contains the extracted/parsed metainfo like this, see the
language-bindings mailing list on


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