[Geany-devel] GObject, new plugin interface ....

Colomban Wendling lists.ban at xxxxx
Sun Mar 13 02:36:26 UTC 2011


Le 13/03/2011 03:01, Lex Trotman a écrit :
> On 13 March 2011 05:39, Matthew Brush <matthewbrush at gmail.com> wrote:
>> [...]
>>
>> If there was someone with lots of GObject experience that would be willing
>> to review my code on a regular basis, I'm willing to volunteer my time and
>> do most of the coding (or at least my share, depending who else is
>> interested in working on this).
> 
> [...]
> 
> I would suggest that the GObject interface needs to be designed to
> work right for the plugin developer languages and then mapped over the
> current internal implementation.  I'm not totally convinced that the
> current implementation is the best way to present things to plugins,
> although after some discussion it may be the best way to go.  This
> might not be very efficient initially but it allows testing of the
> interface without disrupting core too much.  Then over time other
> changes could be made.

Agreed. Maybe the easiest way to go would be to write this wrapper
library in Vala, at least as a start point:
1) it's an OO language, and would save a significant part of the work
needed to write GObject code;
2) there is a raw wrapper I wrote, with good patches from Matthew [1][2]
3) the amount of work to translate the interface to plain GObject code
would be "relatively" small if needed (though Vala should be OK: it
outputs C code)

> This will also help to allay some of Franks fear of the size of the change.
> 
> I would suggest that the interface needs to support one static
> compiled language, Vala? and one interpreted dynamic language Python?

They are good targets IMO, but I also think it would be good to support
more languages if possible. GObject-Introspection, if done right, can
provide good-quality binding for a plenty of languages almost for free
(C++, Python, JavaScript and many more).
Normally the GI bindings for the target language takes care of
translating between conventions -- for example, a Python programer would
like to use obj.foo_bar() and a JavaScript one better obj.fooBar().


However, even though I like the idea of creating this new plugin API
supporting other languages, I will not tell I'll help a lot because I'm
really not sure of the amount of time I could spend on it. However, I'd
be happy to help from time to time, when I can :)


Just my 2¢,
Colomban

[1] http://gitorious.org/geany-vala-binding/
[2] though we started to try to make it a more Vala-style API, I doubt
we could succeed without a wrapper library. Maybe the work Matthew did
on GeanyDBus might be a start



More information about the Devel mailing list