Re: Adding full introspection information (#139486)



On Sat, 2004-11-06 at 08:34 -0500, muppet wrote:
> On Nov 6, 2004, at 5:05 AM, Maciej Katafiasz wrote:
> 
> > > I think the right goal for the introspection mechanism is that you
> >> *could* write reasonable APIs doing the same thing as pango/gtk that
> >> would be 100% introspectable and auto-bindable. Not that the 
> >> *existing*
> >> pango/gtk API be 100% introspectable.
> >
> > Hmm, not entirely true. That is, existing APIs are not introspectable
> > because they, ugh, lack full introspection. However, that's matter of
> > adding that info. Once its there, existing APIs are bindable, as is
> > shown by existing bindings. Then, the resulting APIs will be
> > introspectable + autobindable
> 
> answer this, then:  how will this introspection info help to bind 
> GBoxed types (generic structures)

If they are simple structures like GdkRectangle, that's reasonable to
include within 

>  G_TYPE_POINTER object properties, 

Shouldn't be any in properly bindable APIS.

> variadic C functions, 

These are only convenience functionality in properly bindable APIs. The
language binding might need similar convenience glue that is hand-
written. 

> C function pointers (hooks and other things that 
> don't go through the GSignal/GClosure mechanisms), 

This is reasonable to include within full introspection as long as they
take introspectable types. Yes, it requires something like 'libffi' to
use, but that exists.

> and 
> GList/GSList/GHashTable values (which don't specify the types of the 
> things inside)?

This definitely is within the realm of full introspection; the C
function signature doesn't tell everything we want to report in the
introspectable information.

But there are certainly bits of the GTK+ APIs, especially the low level
parts of Pango, that may not be presentable in the introspection API. We
should only go as far as reasonable and definitely keep the goal to 
"can we automate language bindings to GTK+ and similar libraries", not
"can we automate lanugage bindings for any old C library out there".

Regards,
						Owen

Attachment: signature.asc
Description: This is a digitally signed message part



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