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 wo

Re: [Vala] Manual VAPI writing

2010-07-19 Thread Jiří Zárevúcky
Harry Van Haaren píše v Po 19. 07. 2010 v 21:45 +0100: > Hey All, > > I had this working before, but due to Hard disk issues I lost the .vapi. > Currently I have a vapi that will create the right types, initialize the > object (and destroy it), > but I cant figure the "read" function out anymore:

Re: [Vala] Manual VAPI writing

2010-07-19 Thread Harry Van Haaren
Hey All, I had this working before, but due to Hard disk issues I lost the .vapi. Currently I have a vapi that will create the right types, initialize the object (and destroy it), but I cant figure the "read" function out anymore: // sf_count_tsf_read_float(SNDFILE *sndfile, floa

Re: [Vala] Manual VAPI writing

2010-07-01 Thread Abderrahim Kitouni
oops, forgot to reply to all. 2010/7/1, Abderrahim Kitouni : > Hi, > > 2010/6/30, 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.

Re: [Vala] Manual VAPI writing

2010-06-30 Thread Julian Andres Klode
On Di, 2010-06-29 at 22:15 +0100, Harry Van Haaren wrote: > 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")] > >

Re: [Vala] Manual VAPI writing

2010-06-29 Thread Andrea Del Signore
On Tue, 2010-06-29 at 22:15 +0100, Harry Van Haaren wrote: > > > enum > {/* True and false */ > SF_FALSE= 0, > SF_TRUE= 1, > /* Modes for opening files. */ > SFM_READ= 0x10, > SFM_WRITE= 0x20, > SFM_RDWR= 0x30, > SF_AMBISONIC_NONE=

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 clos

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

Re: [Vala] Manual VAPI writing

2010-06-29 Thread Andrea Del Signore
On Tue, 2010-06-29 at 19:17 +0100, Harry Van Haaren wrote: > Hey all, > Hi Harry, > 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 fu