Re: language bindings & Gnome



On Thu, 2 Jul 1998, Jaka Mocnik wrote:

> An alternative to subclassing GnomeMDIChild would be to
> gtk_object_set_data() your own data to instances of GnomeMDIChild
> objects instead of subclassing the object. This would result in a bit
> more code when creating new children (you'd have to create a
> GnomeMDIChild, set its values (name), allocate the structure with your
> data and then make a gtk_object_set_data() call so that this data could
> be accessed via the GnomeMDIChild (in callbacks etc.). I haven't tried
> it out, but I don't see no reason why it shouldn't work - it just seems
> a bit awkward to me.
It is done automatically in tomgtk ;)
tomgtk basically provides a proxy TOM object for everything used in Gtk.
And it stores the TOM object with set_data. So for example, if
I somewhere receive an GtkWidget* as an object the signal relaying
function will either return the correct proxy object, or create a new one
;)

I see two problems perhaps with this TOM-only subclassing:
-) gtk code sees the wrong class. Not really pleasing to me personally.
-) Don't know if I can override signal slots that some super class has
   overriden by a C function (as in gnome-hello-7-mdi).

Andreas



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