Re: GtkBuildable type resolver
- From: Murray Cumming <murrayc murrayc com>
- To: Johan Dahlin <johan gnome org>
- Cc: gtk-devel-list gnome org, Andrew Cowie <andrew operationaldynamics com>
- Subject: Re: GtkBuildable type resolver
- Date: Thu, 07 Jun 2007 16:36:18 +0200
On Thu, 2007-06-07 at 10:45 -0300, Johan Dahlin wrote:
> > Runtime registration of unknown types isn't really a major interest for
> > us at the moment, but I did keep it in mind as one of those things that
> > would inevitably pop up sooner or later.
>
> You're likely to run into this "interesting" problem when wrapping
> GStreamer which has plenty of types which are not known when you initialize
> your program.
>
> Of course it's possible to workaround by having a huge list of all possible
> GTypes, but that list will grow quite large if you take all gstreamer
> plugins into mind.
The gtkmm Glib::wrap() system examines the base class and falls back to
that. For instance, if
cobject is an instance of GtkWindowFunkyDerivedThing,
then I can do
Gtk::Window *widget = Glib::wrap(cobject);
and I can then call Gtk::Window methods, and get the functionality from
vfunc and default signal handler implementatoins in
GtkWindowFunkyDerivedThing, but I can't call
GtkWindowFunkyDerivedThing-specific functions. You'll be able to do even
that in Python when we have GObject introspection, I guess.
This doesn't work so well if it's a base _interface_ that I'm interested
in.
--
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]