Re: [Vala] How to define inline callback functions in vapi



Use delegates:

public static delegate int HelloFunction (int a);

public void set_hello_function (HelloFunction function);

Uwe Strempel wrote:
Hello,
How can I define inline declared callback functions in vapi files?
I have for example follwing native c-code functions:

class_new( void* (list_append)(void*,void*));

or

class_new( void* (list_foreach)(void*, void *(fnc)(void*,void*,void*) ,void*));



Thanks for help!

Best regards
Uwe Strempel
------------------------------------------------------------------------

_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list



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