Re: defs spec



James Henstridge <james daa com au> writes:

> methods defined with (define-method ...) are just C functions that take a
> particular structure as their first argument.  If there is any
> virtualisation for a particular function, it is done within gtk, so not
> relevant to the definitions. (remember that this is a spec for describing
> C interfaces that resemble gtk's API).

A language binding could for each GSomeObject automatically generate a
subclass GSomeObjectWrapped where all the virtual functions were
mapped to virtual functions in the language.  Then it would be
possible to subclass and override virtual functions with classes
defined in the language.

Ok, this is probably stretching the spec too far.

> Non abstract classes without constructors would correspond to objects that
> can only be instantiated with g_object_new().  Is there any objects that
> fall into this category in gtk+?  How about gnome?

I think I saw such objects in BSE a long time ago.  But perhaps this
should simply be considered evil with respect to wrappable API.




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