[Vala] Fwd: Questions about vapi files writing
- From: Daniel Espinosa <esodan gmail com>
- To: Vala-list <vala-list gnome org>
- Subject: [Vala] Fwd: Questions about vapi files writing
- Date: Thu, 17 Nov 2011 07:54:48 -0600
2011/11/16 Giulio Paci <giuliopaci interfree it>:
Hi to all,
I am trying to (re)write Vala bindings for libcurl.
I started following the instruction in this page
and using information from this page
Add to your list of useful information:
There are lot of annotations you must add to your code in order to do
what you want to.
At last I got a libcurl.gi that was close to what I expected and I tried
to write a metadata file to get an usable vapi file. Unfortunately I
have some problems completing the task.
I have attached an example containing some of the problem I am currently
facing. The libcurl.vapi.target is the desired vapi file, while the
libcurl.vapi is obtained from libcurl.gi and libcurl.metadata using
Are there GLib bindings of libcurl?
This is because Vala is moving to GIR and is easy to make glibcurl
could generate GObject-Introspection information, using annotations
inside the GLib/C code, then generate the Vala bindigs: Advantage: you
will help lot others languages (not just Vala) to use libcurl like
The main issues are:
1) How can I specify that a method (curl_easy_init) is the constructor
of a class (EasyHandle)?
2) How can I instruct vapigen that a function is a method of a class and
not a static function?
3) How can I instruct vapigen to put a cname attibute where needed (e.g.
for the EasyHandle class or the Code enumeration)?
4) How can I handle an enumeration value with a different prefix from
all the other values (e.g.: the last value in the Code enumeration)?
5) Is there any way I can put a static function in a nested namespace
Most of this questions can be solved by see at Attributes is 
above. I'm not realy sure how to add that annotations using metadata,
but you can add custom code instead.
Thank you for your help.
vala-list mailing list
vala-list gnome org
] [Thread Prev