[maemo-developers] [pymaemo] How to add PyModule_AddObject to the override file?
From: Anderson Lizardo anderson.lizardo at openbossa.orgDate: Wed Jul 29 16:29:38 EEST 2009
- Previous message: [pymaemo] How to add PyModule_AddObject to the override file?
- Next message: [pymaemo] How to add PyModule_AddObject to the override file?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Jul 29, 2009 at 9:04 AM, Andrea Grandi<a.grandi at gmail.com> wrote: > Hi, > > 2009/7/29 Anderson Lizardo <anderson.lizardo at openbossa.org>: >> When using codegen, you will almost create new types by yourself. You >> need to either (a) fix codegen to parse correctly some missing type >> that was in a public header or (b) write custom defs entries in >> mafw-extras.defs. > > I'll try to use option (b) of course, but.... I cannot find any > existing example in defs/ folder about structure: I can find > define-function, define-method, define-object but not "define-struct". It seems that MafwPluginDescriptorPublic is not a gobject subclass :(, so I think only (b) is possible actually. > > Do you know where I can find an existing structure defined? So I can > take it as example... define-object is the most similar to structs. They create Python types (which, as you might now, are just classes as anything in Python). One thing I noticed is that (again) MAFW is taking a different path from most gobject based libraries: _MafwPluginDescriptor and _MafwPluginDescriptorPublic are not GObjects :(. In that case, I think you will have to pretend they are so, making something like: (define-object PluginDescriptorPublic (in-module "Mafw") (parent "GObject") (c-name "MafwPluginDescriptorPublic") (gtype-id "MAFW_TYPE_PLUGIN_DESCRIPTOR_PUBLIC") ) (I didn't test any of it; probably some compilation errors will occur, try to play with it a little and see if you can figure out why the errors occur, this way you will have a better understanding of things) Regards, -- Anderson Lizardo OpenBossa Labs - INdT Manaus - Brazil
- Previous message: [pymaemo] How to add PyModule_AddObject to the override file?
- Next message: [pymaemo] How to add PyModule_AddObject to the override file?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]