Re: [Vala] Vala and Cairo 1.12



On 18/05/2013 16:57, Jonas Kulla wrote:
It's basically the same as declaring foreign functions in C.
Let's say you want to use the function 'int cairo_do_foo()' from Vala,
you would write something like:

namespace Cairo {
     [CCode (cname="cairo_do_foo")]
     extern int do_foo();
}

The 'CCode' part is a directive to valac for how it should
output the C code. We tell it the actual C function name
to use.

Noted. Thanks for the help.

\d


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