[Geany-devel] GObject, new plugin interface ....
Matthew Brush
matthewbrush at xxxxx
Sun Mar 13 06:10:49 UTC 2011
On 03/12/11 19:46, Lex Trotman wrote:
> On 13 March 2011 13:36, Colomban Wendling<lists.ban at herbesfolles.org> wrote:
>>
>> 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)
> I don't mind what language is used initially to implement, but I think
> in the long term it needs to go back to C so as to not increase
> Geany's dependencies.
Vala generates a robust C/GObject API from the Vala code, the only
dependency is for developers who want to recompile the C code from the
Vala code. I'm not saying it should be done in Vala over C (I'm
thinking it) but it's important to note that Vala compiles to pure
C/GObject. In any case, we could mix C and Vala quite easily, using
both at the same time, or one or the other for specific things, or
starting in Vala then changing to C in the end, without changing the
GObject C API.
> Reusing some initial work is great, but I would caution that we should
> think about how the interface should look first.
>
I agree, but just to be clear, that's what's been goin on with
Geany-DBus[1]/Geany-Vala-Binding (picturing how the interface *should*
look). That's not say we don't need to think about it A LOT more, but
at least we have some ideas started with those projects.
> Yes, but only if good *language specific* API documentation is
> generated. It really p@!#$ me off with some (unnamed) C++ wrappers
> that require you to guess how the underlying C maps to C++ because of
> lousy (lazy?) documentation.
>
If I'm not mistaken, with GObject-introspection, the GTK-DOC gets
wrapped up in the target bindings, so at a bare minimum, there would be
docs for things like methods, properties, signals, etc. Of course I'm
just assuming the GTK-DOC gets put into the target bindings, I've never
actually tried to do it, and as always, the C API needs good docs :)
[1] https://github.com/codebrainz/geany-dbus
Cheers,
Matthew Brush (codebrainz)
More information about the Devel
mailing list