[Vala] How to include C headers into Vala code?
- From: Андрей Игоревич Кучеров <zox xakep ru>
- To: vala-list gnome org
- Subject: [Vala] How to include C headers into Vala code?
- Date: Sun, 19 Apr 2009 15:07:47 +0700
Hello,
I have the simple question. Imagine That we have a vala CLI
application... for example like this:
//----- Main.vala -------
using GLib;
class cli_hello : Glib.Object {
void print_default_hello () {
stdout.printf("Hello world!\n");
}
static int main (string[] args)
{
var hello = new cli_hello();
hello.print_default_hello();
return 0;
}
}
And I wand to add new method to my cli_hello class. And this method
needs the C header file... for example <sys/socket.h>, and use C
function in my Vala application.
Is it possible, how could i do that? How the code will be changed?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]