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:
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*));


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

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