[Vala] Help about write vapi file with c libray



Hi:

I'm try using Vala to write a GUI serialport tool with libserialport.

I have already have a demo with pure c implenmention.

I'm still working with write vapi file to this lib follow the tutorial at https://wiki.gnome.org/Projects/Vala/LegacyBindings

but the c struct is init by this form:

enum sp_return sp_get_port_by_name(const char *portname, struct sp_port **port_ptr);

not:

Foo *foo_new()

nor:

void foo_init(foo_t*)

how do i to write for such form ?

i can only think to change the original code...

thx for your help!




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