[Vala] Vala: JACK Audio Binding

2010-06-26 Thread Harry Van Haaren
Hey all, I'm learning Vala at the moment, primarily with the intention to develop apps which support JACK audio output. I'm gonna work towards GStreamer based audio routing, and JACK Transport to Start/Stop my app. For the while, I hope to have a play around with JACK using Vala. So I went

Re: [Vala] Vala: JACK Audio Binding

2010-06-26 Thread Harry Van Haaren
haven't used. It gives plenty of warning now (it should be updated for vala 0.9), but it should compile. Also, the binding are for version 0.116. If you need features from 0.118, they'll have to be added. Regards Alberto On Sat, 2010-06-26 at 16:04 +0100, Harry Van Haaren wrote: Hey all

Re: [Vala] Genie, subclassing and some help!

2010-06-29 Thread Harry Van Haaren
Hey! 2) Perhaps related, in the main.gs file, I have: init Gtk.init(ref args) create_indicator() Gtk.main() However, if I don;t put the Gtk.main() in the function above (rather than the init), it doesn't work. Why is this/is this on purpose? Maybe you understand this already,

[Vala] ValaIde Valac: Command line compilation

2010-06-29 Thread Harry Van Haaren
Hey all, I'm wondering how things work if I develop my program using ValaIde, and then I want to compile it on a different PC/Platform. Would I have to download the ValaIde for that platform? Or could I do some valac -vide main.vala kind of magic? Cheers, -Harry

[Vala] Manual VAPI writing

2010-06-29 Thread Harry Van Haaren
Hey all, I'm attempting to learn how to write .vapi files manually. I've looked trough the Jack binding, the GTK+ binding and the sfml bindings. Yet im stumped as to how to write a wrapper for the dead-simple function (declared in a file called bindMe.h): *int add (int a, int b) { return

Re: [Vala] Manual VAPI writing

2010-06-29 Thread Harry Van Haaren
Andrea wrote: if your intent is to bind ad use the add function your binding it's quite right, but can be simpler: [CCode (cheader_filename=bindMe.h)] namespace Math { [CCode (cname=add)] public static int add (int a, int b); } Thanks, that's what I needed to hear ;-)

Re: [Vala] Manual VAPI writing

2010-06-29 Thread Harry Van Haaren
Any pointers as to how to do this? Cheers, -Harry Use cprefix= - maybe you also need to set cname=int in order to have Vala know what to call the type of the values. Yes! Thanks, that worked a charm. Next stumbling block found: when opening a file, sf_open(...) is called. To close the

Re: [Vala] ValaIde Valac: Command line compilation

2010-06-30 Thread Harry Van Haaren
On Wed, Jun 30, 2010 at 10:41 AM, synkro syn...@gmx.net wrote: Hi! To cross compile for another target platform you need at least a C compiler for that. You then redirect valac to us that compiler. For example: You native platform is Windows and want to build a i386 Linux binary then you

Re: [Vala] Genie, subclassing and some help!

2010-06-30 Thread Harry Van Haaren
In the .vide project you have included a file in /home/andrew/Temp/appindicator-0.1.vapi Were going to need that file too. Put it in the vapi folder. The vapi is in the vapi/ dir, don't know why it has been set to another directory sorry about that. The appindicator-0.1.vapi is in the

[Vala] Void*, how to deal with it

2010-06-30 Thread Harry Van Haaren
Hey All, I've got a function in the JACK.vapi binding, that returns a buffer. Now it doesnt physically return the buffer, but returns a void* to the buffer. I checked the Vala tutorial for any references to void*, and didnt find anything... This is the function (to be called on a Port

Re: [Vala] Genie, subclassing and some help!

2010-06-30 Thread Harry Van Haaren
Aha, fully understand the problem now at least. Do you have one of these appIndicator dock things in your panel? The following document [1] seems to say that they might re-design/ change some things in how the docks work. I'm running LXDE, (no fancy AppIndicator dock I dont think...). What I

Re: [Vala] how to access the length attribute of multi dimensional arrays?

2010-07-01 Thread Harry Van Haaren
Hey, I've no experience with Multi-Dimensional arrays in Vala, but I can quote a tutorial: http://live.gnome.org/Vala/ValaForJavaProgrammers#Arrays It provides the basics of Vala for Java programmers (me.. in college ;-( but also has a piece that might be of intrest to you. HTH, -Harry On Fri,

Re: [Vala] Void*, how to deal with it

2010-07-02 Thread Harry Van Haaren
this (untested!): DefaultAudioSample* buffer = (DefaultAudioSample*)master_l.get_buffer(nframes); Let me know if it works. alb On Wed, 2010-06-30 at 14:26 +0100, Harry Van Haaren wrote: Hey All, I've got a function in the JACK.vapi binding, that returns a buffer. Now it doesnt physically

Re: [Vala] Genie, subclassing and some help!

2010-07-03 Thread Harry Van Haaren
Don't worry got it solved, indicator was being lost (a local variable) and so I had to bind it as a property of the class and now even subclassing works! Hey, Glad you got it working... any chance you'd post a .zip of the files as you had before with the working example..? To test on my LXDE

Re: [Vala] Genie, subclassing and some help!

2010-07-06 Thread Harry Van Haaren
Hey, Got this compiled after a little hassle, for people that want the command: valac --vapidir=./ --pkg gtk+-2.0 --pkg appindicator-0.1 --pkg webkit-1.0 indicator.gs webkit_view.gs main_window.gs main.gs with the appindicator.vapi in the same dir as the files. It should compile, assuming you

Re: [Vala] Global int variable.. Problems?

2010-07-07 Thread Harry Van Haaren
Probably 'index' is already defined as a function or variable in some header. In fact if you put all the code in a namespace, it compiles with no errors. Wauw, that simple.. Nice one. :-) Happy coding for me now, -Harry ___ vala-list mailing list

Re: [Vala] array declaration

2010-07-07 Thread Harry Van Haaren
Hey, Coming from a C++ background I first tried typeHere nameHere[]; too. I noticed that newer languages seemed to have type[] name; configuration (Java, C# etc). I'm not part of the Vala team though, so I dont know the official status! -Harry On Wed, Jul 7, 2010 at 5:15 PM, pancake

Re: [Vala] Delegate on struct

2010-07-07 Thread Harry Van Haaren
Hey Nicolas, Any chance you'd compile with valac --save-temps your files etc here? And then maybe post line 113 from your test.c file so we can see what's really going on there? Cheers, -Harry On Thu, Jul 8, 2010 at 12:14 AM, Nicolas HENRY ice...@gmail.com wrote: Hello, I don't

Re: [Vala] clutter-gst and gst

2010-07-17 Thread Harry Van Haaren
Hey, The link you posted seems dead, I got a page not found after clicking it..? OTOH: Have you tried rebuilding your pipeline using the gst-launch command line tool? This should show if its a GStreamer error, or your code... I'm not familiar with GSt much, so I'll only be of limited use.

Re: [Vala] gstreamer-controller bindings

2010-07-19 Thread Harry Van Haaren
On Mon, Jul 19, 2010 at 2:54 PM, Shawn Ferris shawn.fer...@gmail.comwrote: So how to get this fixed without the fixes being overwritten by vapigen in the future You can use metadata to knudge vapigen to generate correct bindings. True. That will only work if you know what the correct

Re: [Vala] Manual VAPI writing

2010-07-19 Thread Harry Van Haaren
// sf_count_tsf_read_float(SNDFILE *sndfile, float *ptr, sf_count_t items) ; [CCode (cname=sf_read_float)] public static count_t read_float(float *array,count_t numSamples); You don't want that to be a static method. Static means it doesn't work with an

[Vala] Gtk Custom widget: drawing with gtk theme colours

2010-07-21 Thread Harry Van Haaren
Hey All, I've designed a couple of widgets now, (in various languanges: python C++ Vala) and googled for many tutorials regarding how to draw custom widgets in the GTK theme colours. I havent found any example code, or tutorial yet... I hope somebody has a pointer on how I can extract the

Re: [Vala] exit() ? quit() ?

2010-07-21 Thread Harry Van Haaren
, -Harry On Wed, Jul 21, 2010 at 11:42 PM, Robert Powell r...@yorba.org wrote: On Wed, Jul 21, 2010 at 3:32 PM, Harry Van Haaren harryhaa...@gmail.comwrote: Hey all, Very simple question: Im looking for a quit() function, or exit(). Gtk.main_quit may do what you want. Hope that helps

Re: [Vala] Gtk Custom widget: drawing with gtk theme colours

2010-07-22 Thread Harry Van Haaren
On Thu, Jul 22, 2010 at 7:20 PM, Mike Massonnet mmasson...@gmail.comwrote: Hi, 2010/7/21 Harry Van Haaren harryhaa...@gmail.com: Hey All, I've designed a couple of widgets now, (in various languanges: python C++ Vala) and googled for many tutorials regarding how to draw custom

Re: [Vala] Where does monodevelop-vala hide C code?

2010-07-28 Thread Harry Van Haaren
Hey Nigel, Indeed if not told to keep the temporary files, valac will by default remove them after a compile. if compiling from the command line (which I highly recommend [1]), do the following: valac --save-temps other stuff file.vala I presume you have checked the MonoDevelop project settings

Re: [Vala] vala autocomplete with monodevelop

2010-07-28 Thread Harry Van Haaren
On Wed, Jul 28, 2010 at 11:31 PM, Nigel Griffin ngrif...@vuze.com wrote: I'm wondering if anyone knows how to enable autocomplete with monodevelop-vala. If my random google searches are to be believed, it seems as though this can be accomplished somehow withe a afrodite library in vtg, but I