Re: libchamplain vala binding, libchamplainAPI and other things



On Wed, Oct 14, 2009 at 12:41 AM, Pierre-Luc Beaudoin
<pierre-luc pierlux com> wrote:
> On Mon, 2009-10-12 at 20:41 +0200, Quikee wrote:
>> I have created libchamplain and libchamplain-gtk binding for vala
>> which are posted on vala mailing list. Now that I have actually seen
>> and tried to use the API I have some questions and observations:
> Thanks, I though this was automaticly done with GObject instrospection
> (which is in libchamplain).

As far as I know you can't use gir directly in vala but you still have
to generate a vapi file from gir. Even with this you have to fine-tune
the bindings in some cases. I didn't know that gir for libchamplain is
available (I didn't compile libchamplain from source), and have used
the vala-gen-introspect to create gi out of header files. Today I will
try to see what are the differences between my vapi and vapi created
from gir.


>> Why the separation between a Layer and Polygon? I regard the Layer as
>> a invisible sheet over the actual map to which I can mark my own this
>> whatever they are - including a polygons. Actually I think a Polygon
>> can be seen as a special kind of Layer, which holds special kind of
>> interconnected points.
> Right, it was more an implementation detail that prevented the polygons
> to be added on layers.  I'd prefer Layers to be able to contain multiple
> polygons rather than having one layer per set of points.

Yes, this was also my first guess, but then I thought the API might be
simpler this way. I am OK with both.

>> This brings me to my next question. Why is a  (Base)Marker not a
>> Point? In my opinion a Marker is just a special kind of a Point with a
>> custom presentation on a map, but not much different than a plain
>> Point in a Polygon. In gpx a point can have name and description for
>> example which would come in handy in such a case.
> Right, there should be an interface for markers rather than Base marker.
> This interface could be implemented by markers and ChamplainPoints.

Yes, this sound good. I must also say that I prefer "latitude" and
"longitude" over "lat" and "lon" that is currently in ChamplainPoint.
Additionally it would be interesting if moving of point would be
supported. In such a case a "moved" signal would make sense on a point
(or maybe polygon) to which one could react (for example change the
coorinates in gpx structure). Is such a feature planed to be added?

>> Currently I am also working on a parser for GPX files (and also KML
>> and other formats in future) in vala. I want to make the parser into a
>> library once but first i want to try and use it in an emerillion
>> gpx-viewer plugin. My question is it possible to add support to
>> generate a vapi from the sources which can then used in the vala
>> written plugin. I am currently struggling with compilation of plugin
>> which has part written in vala and part written in C but with no
>> success.
> Got it in your other email, I'll comment on it.

Please do, but keep in mind that this was done in a few hours by
someone that is not used to work with autotools, C or vala. ;)

> There are many changes in list for libchamplain 0.6 :) wanna help a bit?
> some of them include reviewing the API like you just did.

Yes, I gladly help wherever I can.

> Pierre-Luc
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]