[Vala] How to wrap select(2)'s fd_set?

2009-01-29 Thread Michael 'Mickey' Lauer
Hi, I'd like to complete more of the posix wrapper, namely select(2) and the required datatypes. The respective man page excerpt is: NAME select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO - synchronous I/O multiplexing SYNOPSIS /* According to POSIX.1-2001 */ #include

Re: [Vala] How to wrap select(2)'s fd_set?

2009-01-29 Thread Michael 'Mickey' Lauer
Ok, here's what I have so far: [CCode (cname = fd_set, cheader_filename = sys/select.h, free_function = )] [Compact] public class FdSet { [CCode (cname = FD_CLR, instance_pos=1.1)] public void clear (int fd); [CCode (cname = FD_ISSET,

Re: [Vala] How to wrap select(2)'s fd_set?

2009-01-29 Thread Matías De la Puente
Hello Michael, Please refer to this bug http://bugzilla.gnome.org/show_bug.cgi?id=555250#c6 Juerg doesn't want to wrap into an object the posix functions... Yesterday I updated the posix.vapi with more constants, functions and structs... Matias ___

Re: [Vala] How to wrap select(2)'s fd_set?

2009-01-29 Thread Michael 'Mickey' Lauer
Hi Matías, Please refer to this bug http://bugzilla.gnome.org/show_bug.cgi?id=555250#c6 Ah, lots of good stuff. Juerg doesn't want to wrap into an object the posix functions... Yes, and I agree with him in general -- I think for select and the FD functions it feels natural and gives a

[Vala] Auto-generate C++ wrappers for vala-libs, how?

2009-01-29 Thread Hans Baier
Hello, since Vala is ideal for writing custom Gtk+ widgets, I wonder whether there already is a tool to autogenerate C++ wrappers a la/based on glibmm for a given vala library. Thanks, Hans ___ Vala-list mailing list Vala-list@gnome.org

[Vala] how vala types are mapped to C ones?

2009-01-29 Thread vasaka
when writing .vapi file how to handle correctly types like int64_t and char[32] in particular I need to wrap a structs from videodev.h public struct video_capability { public char name[32]; public int type; public int channels;/* Num channels */ public int audios;/* Num audio devices */

Re: [Vala] How to wrap select(2)'s fd_set?

2009-01-29 Thread Jürg Billeter
On Fri, 2009-01-30 at 02:01 +0100, Michael 'Mickey' Lauer wrote: Ok, here's what I have so far: [CCode (cname = fd_set, cheader_filename = sys/select.h, free_function = )] [Compact] public class FdSet { [CCode (cname = FD_CLR,

Re: [Vala] Auto-generate C++ wrappers for vala-libs, how?

2009-01-29 Thread Jürg Billeter
On Fri, 2009-01-30 at 10:02 +0700, Hans Baier wrote: Hello, since Vala is ideal for writing custom Gtk+ widgets, I wonder whether there already is a tool to autogenerate C++ wrappers a la/based on glibmm for a given vala library. I don't think anything like this exists already, however, I'd

Re: [Vala] how vala types are mapped to C ones?

2009-01-29 Thread Jürg Billeter
On Fri, 2009-01-30 at 07:43 +0200, vas...@gmail.com wrote: when writing .vapi file how to handle correctly types like int64_t and char[32] You can use the Vala type int64 for int64_t. If the name is a UTF-8 compatible NUL-terminated string (ASCII is fine as well), you can just use `string'.