Re: [Vala] Xlib bindings?

2009-02-15 Thread Frederik
Michael B. Trausch wrote: Also, a question regarding bindings: Do they *have* to be in .vapi files, or is it possible to create a class that does something like C#/Mono/.NET's P/Invoke? Hi, you can define extern methods this way: [CCode (cheader_filename = xy.h, lowercase_prefix = )]

[Vala] DBus an static methods

2009-02-15 Thread Frederik Sdun
Hi, I figured out that vala generates wrong code on static methods. It tries to add a user_data pointer, but then the C function has no void* user_data. I appended a diff which fixes the problem for me. Regards, Frederik Index: gobject/valadbusclientmodule.vala

Re: [Vala] Xlib bindings?

2009-02-15 Thread Michael B. Trausch
On Sun, 15 Feb 2009 11:09:52 +0100 Martin Olsson mn...@minimum.se wrote: I've not seen any XLib VAPI yet either. You might want to look into XCB as well though. Note, however, that there is still some things that are hard to do using XCB (like direct rendering Mesa isn't fully ported yet for

Re: [Vala] Xlib bindings?

2009-02-15 Thread Michael B. Trausch
On Sun, 15 Feb 2009 12:03:31 +0100 Frederik scumm_fr...@gmx.net wrote: But I'd recommend writing a vapi file. You can already do a lot of tricks with vapi files to make the bindings convenient to use in Vala, like specifying the constructor and free methods or renaming methods. For example:

Re: [Vala] Binding questions

2009-02-15 Thread Yu Feng
[SimpleType] ? On Sun, 2009-02-15 at 20:41 -0500, Michael B. Trausch wrote: I am trying to create a small Xlib binding for Vala, with a little bit of difficulty. I think I just don't understand what it is that I am doing fully. Starting with what Frederik gave as an initial set of code, I

Re: [Vala] Binding questions

2009-02-15 Thread Michael B. Trausch
On Mon, 16 Feb 2009 00:58:16 -0200 Matías De la Puente mfpuente...@gmail.com wrote: if is a typedef of XID-CARD32-unsigned long you can also do this: [CCode (cname=CARD32)] public struct CARD32 : ulong {} [CCode (cname=XID)] public struct XID : CARD32 {} [CCode (cname=ColorMap)]

Re: [Vala] [Having fun with Vala] Multiboot kernel using Vala!

2009-02-15 Thread Sam Liddicott
I wouldn't want to use glib, which was the point of my post. Sam -Original Message- From: Michael Torrie torr...@gmail.com Sent: 14 February 2009 21:31 Cc: vala-list vala-list@gnome.org Subject: Re: [Vala] [Having fun with Vala] Multiboot kernel using Vala! Sam Liddicott wrote: I