Seg, 2004-12-13 �s 08:37 -0100, Tiago Cogumbreiro escreveu: > Fri, 2004-12-10 �s 09:56 +0100, Xavier Ordoquy escreveu: > > On Fri, 2004-12-10 at 01:13 -0100, Tiago Cogumbreiro wrote: > > > The problem I was having was that the headers I was using mixed with > > > h2defs.py weren't declaring the object itself, making the module kind of > > > useless.
I've noticed this too. But declaring the missing objects/boxed types is just 1% of the total defs file, very easy to add manually. Just copy-paste from somewhere else and change the names ;) Also keep in mind that, despite popular belief, h2def is just a helper tool to avoid generating the defs entirely by hand. The defs need some manual tuning after the initial generation, so don't expect to re-run h2def later and replace the original defs. Basically, h2def != codegen. > > > > h2defs expects the header to be somewhat similar to the gnome de facto > > standard headers. the script isn't really perfect, but there are so many > > possibilities that one has to put some restrictions. > I'm wrapping libnautilus-burn. At a first glance the headers seemed > quite standard. Hm.. this almost sounds like a good candidate for gnome-python- extras... >;-) > > > > > > The problem I'm facing now, due to not yet reading [2] is wrapping > > > simple structures into objects. Tried with swig but it has way too > > > vodoo, so I think I'll just look at python.org resources and try to > > > learn how to do it The Right Way (TM). It would be nice for the defs > > > parser to parse structures tough ;) > > > > What would the structures be translated to in python ?? > > If it becomes objects, you could made them gobject in C then ;) > I think it's easier creating a C python object directly :D (which I've > already did) If you're wrapping GObject's, _please_ use pygtk (PyGObject), otherwise you'll get in trouble sooner or later. For instance, it is not trivial to implement GObject.connect. > > Take care, > Tiago Cogumbreiro > > _______________________________________________ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ -- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> The universe is always one step beyond logic.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
