Re: GtkBuildable type resolver



On Tue, 2007-06-05 at 11:02 +0200, Andy Wingo wrote:
> Hi Tristan,
> 
> On Mon, 2007-06-04 at 15:32 -0400, Tristan Van Berkom wrote:
> > One thing that might or might not be a can of worms is
> > language bindings. I wonder if someone more experienced
> > than myself in this realm could point out how we plan
> > to load widgets written in other languages from the GtkBuilder
> > perspective, namely how will we obtain the runtime GType of
> > the object from its name in the xml/glade file.
> 
> I think that most language bindings do special things to register GTypes
> when classes are defined, instead of using get_type() functions. If,
> instead, a binding actually uses get_type() functions, they can register
> those functions with GTK+; otherwise, you would have to resort to
> libffi's callbacks. But in this case, I'd go ahead assuming that
> language bindings are fine. Also since Johan is in this, I'm sure he
> would speak up if there were a problem :)

GladeXml has a lookup_type() vfunc for this, which I added (I think) so
that we could instantiate gtkmm GTypes rather than GTK+ GTypes. This
allows GladeXml to delegate the decision to the language binding, which
can override that vfunc.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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