Hi,
I was wondering if anyone is working on gobject introspection for the geany api. I would like to write a geany plugin with vala and in order to do so I need language bindings for vala. Instead of writing them manually I would like to use gobject introspection to generate the bindings.
Has anybody worked on this already? Any feedback and thoughts welcome.
Cheers Felix
Hi,
Le 03/09/2010 16:46, Felix Kaser a écrit :
Hi,
I was wondering if anyone is working on gobject introspection for the geany api. I would like to write a geany plugin with vala and in order to do so I need language bindings for vala. Instead of writing them manually I would like to use gobject introspection to generate the bindings.
Has anybody worked on this already? Any feedback and thoughts welcome.
I'm not sure that GIR would work really well here, because of the non-library approach of the Geany plugin API. For Vala it'd probably work because Vala finally writes C code, but I don't think it would work for other languages such as JS, Python or others. Basically, that would be because the plugin API is no direct functions, but function pointers in exported structures, what the backend would need to know, and I doubt it's easy with GIR -- and the C API is basically macros that wraps that. So not sure GIR is the better choice -- that said, I would be wrong :)
Well, beside this, I worked a while ago on a little hand-crafted Vala VAPI file for Geany [1], and although it's probably buggy because not well-tested, it worked. I've not told anyone about it because it isn't production-ready, but I unfortunately haven't found the time to work on it since then... But since we got here, what would Geany developers think of supporting this kinda officially if it shows to work well? It would need to be maintained up-to-date (which means updating it when the C API changes and/or grows); but it would allow to write plugins in Vala :)
Regards, Colomban
On Sat, 04 Sep 2010 15:00:44 +0200 Colomban Wendling lists.ban@herbesfolles.org wrote:
Well, beside this, I worked a while ago on a little hand-crafted Vala VAPI file for Geany [1], and although it's probably buggy because not well-tested, it worked. I've not told anyone about it because it isn't production-ready, but I unfortunately haven't found the time to work on it since then... But since we got here, what would Geany developers think of supporting this kinda officially if it shows to work well? It would need to be maintained up-to-date (which means updating it when the C API changes and/or grows); but it would allow to write plugins in Vala :)
I haven't really used Vala but it looks good.
I think it would be OK to add a Vala API file to the distribution if it's not too big. If we did though, we can't guarantee it would always be up to date with the latest additions, but even so it may be worth doing.
Regards, Nick
Le 07/09/2010 17:34, Nick Treleaven a écrit :
On Sat, 04 Sep 2010 15:00:44 +0200 Colomban Wendling lists.ban@herbesfolles.org wrote:
Well, beside this, I worked a while ago on a little hand-crafted Vala VAPI file for Geany [1], and although it's probably buggy because not well-tested, it worked. I've not told anyone about it because it isn't production-ready, but I unfortunately haven't found the time to work on it since then... But since we got here, what would Geany developers think of supporting this kinda officially if it shows to work well? It would need to be maintained up-to-date (which means updating it when the C API changes and/or grows); but it would allow to write plugins in Vala :)
I haven't really used Vala but it looks good.
I think it would be OK to add a Vala API file to the distribution if it's not too big.
It looks basically like a header file: it lists exported symbols and their signature. So I think it's not too big.
If we did though, we can't guarantee it would always be up to date with the latest additions, but even so it may be worth doing.
You're right, in facts the file /must/ be update only when incompatible changes occurs, which isn't that common.
I'll try to work on this a little again the next days, and if/when it gets reasonably ready, I'll present it in more depth. That said, if anybody wants to work on it, please, go ahead. I set up a little Git repository on Gitorious [1], so feel free to use it, and even either propose merges or provide patches -- that'd be awesome!
Regards, Colomban