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
// 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

Re: [Vala] Manual VAPI writing

2010-07-01 Thread Abderrahim Kitouni
oops, forgot to reply to all. 2010/7/1, Abderrahim Kitouni a.kito...@gmail.com: Hi, 2010/6/30, Harry Van Haaren harryhaa...@gmail.com: 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

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)] public static int

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