GNOME Bugzilla – Bug 627338
Allow PeasExtension instances to be used with interface methods.
Last modified: 2010-08-31 22:28:12 UTC
This would - require less changes in new applications wishing to use libpeas - make the overall usage of libpeas nicer and more type safe. - look like if we were actually using the underlying extension instead of a proxy.
Created attachment 168264 [details] [review] Make the various loaders define static types. The main reason for this change is that g_type_query() doesn't return correct values for dynamic types, and the next commit is going to introduce a requirement for it.
Created attachment 168265 [details] [review] WIP proxys with interfaces
Review of attachment 168265 [details] [review]: I really don't know if this change is compatible with the way libpeas used to work before but it looks really good for the use in anjuta. ::: peas-demo/peas-demo-window.c @@ +48,3 @@ DemoWindow *dw) { + peas_activatable_activate (PEAS_ACTIVATABLE (exten)); Yeah, this looks much much better! It would be really nice to get this API in before 3.0 as it will allow to use libpeas for C plugins with interfaces without too much pain. Thanks a lot!
This is a 100% backward-compatible change to libpeas: new api (as there are new runtime types with interfaces implemented) but no change in behaviour. I sure hope to get this in before 3.0!
Created attachment 168653 [details] [review] Allow PeasExtension instances to be used with interface methods
Created attachment 169188 [details] [review] Make PeasExtension implement extension interfaces. This version changes the way the ginterface struct is initialized: we now use g_interface_info_get_vfuncs() like bindings do. Also I didn't implement the class finalization as we don't support it right now (static types) and I'd rather not have unused code. It will come back if/when we use a gtypemodule for the runtime implementations.
Attachment 168264 [details] pushed as f4b3f98 - Make the various loaders define static types. Attachment 169188 [details] pushed as 4f24c6c - Make PeasExtension implement extension interfaces.