Porting to libbonobo
- From: Michael Meeks <michael ximian com>
- To: Rodrigo Moya <rodrigo gnome-db org>
- Cc: <gnome-2-0-list gnome org>
- Subject: Porting to libbonobo
- Date: Fri, 3 Aug 2001 11:01:06 -0400 (EDT)
Hi Rodrigo,
On 3 Aug 2001, Rodrigo Moya wrote:
> well, for the moment, this won't really be a problem (the libgnome
> dependency).
libgnome is not released or API frozen - and Martin seems to have
vanished so ... use a CVS version and hope.
> About porting to libbonobo, what, apart from s/GtkObject/GOject, must
> be done? libgda is not using too complex Bonobo stuff for the moment,
> so I think not much must be done here. In fact, when I ported it to
> Bonobo from plain CORBA, I started that port compiling against
> libbonobo2
Ok - so several things really. There is a list of all changes to
libbonobo in libbonobo/changes.txt along with some help on porting.
You'll prolly want to junk BonoboXObject in favour of BonoboObject
- since these have been merged, although there is a compat layer of sorts.
Clearly converting all gtk_object calls to g_object ones.
One thing that is worth getting right is using GClosures wherever
you had callbacks in the original code. It's prolly worth leaving the
standard:
typedef void (*MyCallbackFn) (GObject *foo, int a);
void foo_add_callback (GObject *foo, MyCallbackFn fn, gpointer user_data);
But then implementing add_callback in terms of GClosures:
void foo_add_callback_closure (GObject *foo, GClosure *fn);
See how this is done in libbonobo eg. bonobo-generic-factory,
especialy with respect to the invocation, building the marshalers using
glib-genmarshal etc.
If you use GClosure it makes life very, much easier and more
efficient for scripting bindings - and so we should be using it everywhere
IMHO.
But you're right - it should be easy to port to libbonobo.
Regards,
Michael.
--
mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]