[Vala] D-Bus server testing

2008-12-13 Thread Jürg Billeter
Hi all, due to various issues and limitations with type marshalling of dbus-glib, I've rewritten D-Bus server support to directly use libdbus to read and write D-Bus messages. The rewrite is not yet in trunk as it hasn't been tested extensively yet. I've attached a patch to bug 560034[1]. The

Re: [Vala] D-Bus server testing

2008-12-13 Thread Michael 'Mickey' Lauer
Awesome, glad to hear this. As a consequence of this, both async. and sync. operation both client and server side will be supported then? Do we have any other showstoppers left in dbus support then or would you consider it feature complete? Thanks a lot! -- :M:

Re: [Vala] D-Bus server testing

2008-12-13 Thread Jürg Billeter
On Sat, 2008-12-13 at 11:36 +0100, Michael 'Mickey' Lauer wrote: Awesome, glad to hear this. As a consequence of this, both async. and sync. operation both client and server side will be supported then? Do we have any other showstoppers left in dbus support then or would you consider

[Vala] VAPI bindings: omit function target argument

2008-12-13 Thread Frederik
I want to write vapi bindings for a C function that gets passed another function as argument: public delegate void HookFunc (); public void set_hook (HookFunc f); But the original C function doesn't want a target argument (which Vala passes implicitly). I can move its position with public

Re: [Vala] [ModuleInit] and __attribute__ ((constructor)) ?

2008-12-13 Thread Ildar Mulyukov
Hi, Jürg! thanks for your answers. On 12.12.2008 14:04:51, Jürg Billeter wrote: Hi Ildar, On Wed, 2008-10-15 at 03:03 +0600, Ildar Mulyukov wrote: I am very new to Vala. Great thanks to Jürg and participants. I've a question (or it's really two separate questions?) 1. What does

Re: [Vala] [ModuleInit] and __attribute__ ((constructor)) ?

2008-12-13 Thread Jürg Billeter
On Sat, 2008-12-13 at 20:34 +0600, Ildar Mulyukov wrote: On 12.12.2008 14:04:51, Jürg Billeter wrote: Hi Ildar, On Wed, 2008-10-15 at 03:03 +0600, Ildar Mulyukov wrote: I am very new to Vala. Great thanks to Jürg and participants. I've a question (or it's really two separate

Re: [Vala] VAPI bindings: omit function target argument

2008-12-13 Thread Frederik
Frederik wrote: I want to write vapi bindings for a C function that gets passed another function as argument: public delegate void HookFunc (); public void set_hook (HookFunc f); But the original C function doesn't want a target argument (which Vala passes implicitly). I can move its

[Vala] inline C

2008-12-13 Thread Ildar Mulyukov
Hi, Take a look: int main (void) { int Cvariable; __asm__ (movl Cvariable, %eax); // Cvariable contents eax __asm__ (movl $Cvariable, %ebx); // ebx --- Cvariable } These are Assembler inline instructions, which you can use in C. What do you

Re: [Vala] inline C

2008-12-13 Thread Karl Lattimer
On Sat, 2008-12-13 at 23:44 +0600, Ildar Mulyukov wrote: Hi, Take a look: int main (void) { int Cvariable; __asm__ (movl Cvariable, %eax); // Cvariable contents eax __asm__ (movl $Cvariable, %ebx); // ebx --- Cvariable }

Re: [Vala] inline C

2008-12-13 Thread Jamie McCracken
On Sat, 2008-12-13 at 17:46 +, Karl Lattimer wrote: On Sat, 2008-12-13 at 23:44 +0600, Ildar Mulyukov wrote: Hi, Take a look: int main (void) { int Cvariable; __asm__ (movl Cvariable, %eax); // Cvariable contents eax __asm__

[Vala] xpm file in vala

2008-12-13 Thread Matías De la Puente
Hello all!! I want to access a xpm file from vala, i created this vapi file: namespace MyXpms { [CCode (cname=my_xpm, cheader_filename=my.xpm)] public string[] my_xpm; } vala generates this #include my.xpm but i want this #include my.xpm Is there a way to specify a local header file? My

Re: [Vala] inline C

2008-12-13 Thread Ildar Mulyukov
On 14.12.2008 00:00:31, Jamie McCracken wrote: On Sat, 2008-12-13 at 17:46 +, Karl Lattimer wrote: On Sat, 2008-12-13 at 23:44 +0600, Ildar Mulyukov wrote: What do you think about having C inline in Vala? This looks quite natural for Vala. Especially while Vala is quite unperfect (having

Re: [Vala] inline C

2008-12-13 Thread Ildar Mulyukov
On 13.12.2008 23:46:50, Karl Lattimer wrote: There would have to be some sanity wrapping though to make sure that the C stuff would work properly with the vala stuff... At the moment it seems almost impossible to implement and not necessary as gcc anyway checks this staff. Or you meant

Re: [Vala] inline C

2008-12-13 Thread Hans Vercammen
On Sun, 2008-12-14 at 00:51 +0600, Ildar Mulyukov wrote: On 14.12.2008 00:00:31, Jamie McCracken wrote: On Sat, 2008-12-13 at 17:46 +, Karl Lattimer wrote: On Sat, 2008-12-13 at 23:44 +0600, Ildar Mulyukov wrote: What do you think about having C inline in Vala? This looks quite

Re: [Vala] inline C

2008-12-13 Thread Yu Feng
On Sun, 2008-12-14 at 00:55 +0100, Hans Vercammen wrote: On Sun, 2008-12-14 at 00:51 +0600, Ildar Mulyukov wrote: On 14.12.2008 00:00:31, Jamie McCracken wrote: On Sat, 2008-12-13 at 17:46 +, Karl Lattimer wrote: On Sat, 2008-12-13 at 23:44 +0600, Ildar Mulyukov wrote: What do you

Re: [Vala] inline C

2008-12-13 Thread Hans Vercammen
On Sat, 2008-12-13 at 22:05 -0500, Yu Feng wrote: On Sun, 2008-12-14 at 00:55 +0100, Hans Vercammen wrote: On Sat, 2008-12-13 at 23:44 +0600, Ildar Mulyukov wrote: [...] 1. inlining asm is most unportable. But this did not prevent from adding it to GCC. Surely it should be

Re: [Vala] converting from float to double?

2008-12-13 Thread Martin Olsson
To describe a float literal use a trailing f like this: float x = 12.34f; Martin Yu Feng wrote: Greetings, I am receiving compiler errors for this: float a = 0.0; Shouldn't this be converted automatically? I use float a = (float)0.0 as a correction. But doesn't it look

Re: [Vala] inline C

2008-12-13 Thread Hans Vercammen
On Sun, 2008-12-14 at 05:23 +0100, Hans Vercammen wrote: On Sat, 2008-12-13 at 22:05 -0500, Yu Feng wrote: Machines can be happy if the ccode are written carefully, but a bilingual text is usually difficult for human beings to understand; to me this is more convincable than any other