[Vala] Generating bindings for non-GLib/GObject based API
- From: Michael Wild <themiwi users sourceforge net>
- To: vala-list gnome org
- Subject: [Vala] Generating bindings for non-GLib/GObject based API
- Date: Thu, 22 Apr 2010 11:47:21 +0200
Hi all
I am currently trying to generate bindings for a API which has some peculiarities which I can't seem to find
any solution for.
1) Constructor function: Say I would like to use a C function as the constructor for a class (as e.g. newwin
is used in curses.vapi). However, that C function does not return the allocated and initialized object in the
return value, but as the first argument. The return value is an error code instead. How would I handle this?
2) Delegates: The C API defines a number of callback functions, most of which take some user-defined data as
an argument one registers along with the callback function. However, the user data is often neither the first
nor the last argument. How can I wrap this?
3) Is there any comprehensive attributes reference somewhere? The Vala reference (draft version) doesn't
really say much, and actually seems to be quite a bit stale.
Thanks for your help
Michael
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]