Re: [Vala] Strange Map behaviour in Gee

2009-09-23 Thread Matías De la Puente
Take a look here http://live.gnome.org/Vala/Tutorial#head-7b3930bf3573a66028940bf6123b19e19a33f9a5 should be: var map = new HashMap (str_hash, str_equal); ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] using a non-glib C library in vala

2009-09-15 Thread Matías De la Puente
if the namespace will be called Id3 you can do this [Compact] [CCode (cname="ID3Tag")] public class Tag { [CCode (cname="ID3Tag_New")] public Tag (); [CCode (cname="ID3Tag_HasChanged")] public bool has_changed (); // add the others } I don't remeber well how to add the free function (in

Re: [Vala] Very basic question.. about strings and arrays...

2009-09-03 Thread Matías De la Puente
You should do this: public void on_btn_search_what_clicked (Button source) { > string [] argv = new string[3]; > argv[0] = app_path + "repST.beta"; > argv[1] = "-l"; > argv[2] = txt_search_what.text(); > > execProgram(app_path,argv); > } > > or var argv = new string[3]; ___

Re: [Vala] Need help with string

2009-09-02 Thread Matías De la Puente
2009/9/2 Nicolas > Hi, > > I try to make a little program who read in a file and take only some > informations (like an .ini file). > My text file is like this: > > [INFO] > blah > blah blah > blah blah blah > > Could someone tell me how to create this kind of function ? > > You should use KeyFil

Re: [Vala] multiple fields in a single declaration

2009-08-31 Thread Matías De la Puente
Hi Adam, That issue is already in bugzilla, take a look here http://bugzilla.gnome.org/show_bug.cgi?id=530030 2009/8/31 Adam Dingle > Vala lets me declare multiple local variables in a single declaration: > > void foo() { > int a, b;// OK > } > > But if I attempt to declare multiple field

Re: [Vala] Multidimensional arrays

2009-07-06 Thread Matías De la Puente
Hello Multidimensional arrays are created like in C#: double[,] arr = new double[3,2]; Matias ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

[Vala] [Patch] Fix gtk_source_language_manager

2009-06-26 Thread Matías De la Puente
Patch that fix gtk_source_language_manager 0001-gtksourceview-2.0-Fix-gtk_source_language_manager-bi.patch Description: Binary data ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] [Patch] Small improvements on gsl bindings

2009-06-25 Thread Matías De la Puente
2009/6/25 Yu Feng > Dear list, > > Here are a few small improvements on gsl bindings. > > Several places the pointers are properly replaced by arrays, and several > delegates are handled the native vala way. > > Thanks for the patch, hope juergbi can apply it Matias _

Re: [Vala] [Genie] Print Function

2009-06-22 Thread Matías De la Puente
Nicolas: That's great!! thanks i filed a bug with a patch (some days ago) that fix the cheader_filename of SourcePrintCompositor. http://bugzilla.gnome.org/show_bug.cgi?id=585894 Matias ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.o

Re: [Vala] Val(a)IDE 0.5 - IDE for Vala

2009-06-11 Thread Matías De la Puente
2009/6/11 Nicolas Joseph > Hello, > > I am pleased to announce version 0.5 of Val(a)IDE. > Congrats! > > The sources and the binary packages (archlinux, debian, fedora and MS > Windows) > are available for download at: > http://www.valaide.org/content/download > > Changes since 0.4 > ===

Re: [Vala] Inheritance and construct

2009-05-25 Thread Matías De la Puente
Hi Arley, 2009/5/25 Arley Consuegra Rosello > I'm have a problem with de inheritance and the constructors. > In c++ the inheritance loosks like > > class padre{ > protected: > int a,b,c; > public: > padre(int pa,int pb,int pc){ > a=pa; > b=pb; > c=pc; > } > }

Re: [Vala] Generating vapi file for a simple struct

2009-05-18 Thread Matías De la Puente
2009/5/18 Jan-Jaap van der Geer > Matías De la Puente wrote: > > > > Is there any need for the cprefix and clower_case_prefix in > > > this case? I get the impression that they are not used as long > > > as I specify the cname itself. > > > There'

Re: [Vala] Generating vapi file for a simple struct

2009-05-18 Thread Matías De la Puente
> > > Is there any need for the cprefix and clower_case_prefix in this > case? I get the impression that they are not used as long as I > specify the cname itself. > There's no need to add cprefix in this case. cprefix and lower_case_cprefix (this is the real name) is used to give to the members s

Re: [Vala] Generating vapi file for a simple struct

2009-05-17 Thread Matías De la Puente
Hi, you should make unowned the array, like this: > [CCode (cheader_filename = "oslib/os.h")] > namespace OSLib > { > //[SimpleType] > //[Compact] > [CCode (cname = "os_error", cprefix = "", clower_case_prefix = "")] > public struct OSError { >public int errnum; >public unowned char

Re: [Vala] Problem converting library

2009-05-15 Thread Matías De la Puente
2009/5/15 Nicolas > Hi, > > I'm trying to port a non Glib library, and i have some problems. > For example, when vala-gen-introspect try to convert this: > You have to use vala-gen-introspect only for Glib/GObject based libs. For non-Glib libraries you have to write the vapi file by hand. Take a

Re: [Vala] Q: release precompiled sources?

2009-04-14 Thread Matías De la Puente
Hi lode, 2009/4/14 lode leroy > I wonder if it's possible to pre-compile vala code to "C" > and make a release of the pre-compiled code, > so that it can be compiled on the target platform > without vala installed? > a bit like autotools that generates a "configure" > file that works without aut

Re: [Vala] Creating executables without glib/gobject

2009-03-11 Thread Matías De la Puente
Hi Barry: 2009/3/11 Barry Kauler > Matías De la Puente, > I am very interested in what you have done, with your "Multiboot" > code. I'm wondering how far this can be pushed. Is it feasible to code > in a subset of Vala/Genie such that Glib/Gobject is not required, o

Re: [Vala] GSL binding problem: OdeivEvolve::apply

2009-03-09 Thread Matías De la Puente
Hi Yu, You are right they should be ref doubles not arrays. Here's the patch diff --git a/vapi/gsl.vapi b/vapi/gsl.vapi index 3ad9979..883c861 100644 --- a/vapi/gsl.vapi +++ b/vapi/gsl.vapi @@ -3514,7 +3514,7 @@ namespace Gsl [CCode (cname="gsl_odeiv_evolve_alloc")] public Odei

Re: [Vala] GSL binding problem: OdeivEvolve::apply

2009-03-09 Thread Matías De la Puente
Hi, Yu I'm on it :) Matias ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Windows Low level with Vala

2009-03-09 Thread Matías De la Puente
Hi fsw: First of all, the only automated way to create vapi files form headers files is with glib based headers. For non-glib based headers you have to write your own. Creating a vapi file is simple, it has the same sintax as a vala file. I suggest to you that create a vapi file with the windows

Re: [Vala] v4l2sys vapi

2009-03-02 Thread Matías De la Puente
Hello vasaka, I also made a v4l2 binding, you can see it in http://bugzilla.gnome.org/show_bug.cgi?id=572692 If you see some errors, please mail me. Matias ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Binding questions

2009-02-15 Thread Matías De la Puente
Hello Michael, 2009/2/15 Michael B. Trausch > 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 have so > far come up with:

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

2009-02-11 Thread Matías De la Puente
Hi all, thanx for the replies! 2009/2/11 Sam Liddicott > * Yu Feng wrote, On 11/02/09 16:35: > >> Hi Matias, >> >> I am curious about how GLib was staticly linked to your kernel. I didn't >> see any flags on this in your makefile. >> > > Well, i didn't link the kernel to GLib. If you see the fil

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

2009-02-09 Thread Matías De la Puente
Hello all!, I was playing with vala to see if it's posible to write a minimal kernel using vala. Based in the multiboot sample ( http://www.gnu.org/software/grub/manual/multiboot/html_node/Example-OS-code.html), I was able to wrote a minimal multiboot kernel in vala. ;) I wrote a multiboot binding

Re: [Vala] Type of data in TreeView

2009-02-01 Thread Matías De la Puente
2009/1/31 Thomas Chust > Matías De la Puente wrote: > > [...] > > I want to add any type of data to a TreeView. > > What is the best option to do this ? > > [...] > > Hello, > > the GLib already provides a generic value container: GLib.Value. > It shoul

[Vala] Type of data in TreeView

2009-01-31 Thread Matías De la Puente
Hello all, I want to add any type of data to a TreeView. What is the best option to do this ? a) a void* type: var tree_store = new TreeStore (2, typeof (string), typeof (void*)); b) a generics type: public class Gen : GLib.Object { private G _data; public void set_data (G data) { _data = d

Re: [Vala] How to wrap select(2)'s fd_set?

2009-01-29 Thread Matías De la Puente
Hello Michael, Please refer to this bug http://bugzilla.gnome.org/show_bug.cgi?id=555250#c6 Juerg doesn't want to wrap into an object the posix functions... Yesterday I updated the posix.vapi with more constants, functions and structs... Matias ___ Vala

Re: [Vala] [Wikibooks] Section Introduction - Chapters "History" and "Getting Started"

2009-01-22 Thread Matías De la Puente
2009/1/22 Luca Dionisi > First of all, I propose the use of a "Subject" like this one on this > mailing list for messages about the Wikibook we're going to write. > That is, [Wikibooks] My real subject. > > Are you ok with the new structure of the wikibook? I mean, > book/section/chapter. > If ok

Re: [Vala] just a suggestion

2009-01-21 Thread Matías De la Puente
2009/1/21 Luca Dionisi > On Wed, Jan 21, 2009 at 10:28 AM, Karl Lattimer wrote: > > On Wed, 2009-01-21 at 10:24 +0100, Luca Dionisi wrote: > >> I suggest that, prior to copy-paste existing sources or however > >> inserting content, we decide on a summary. Subject to change, but as > >> final as

Re: [Vala] just a suggestion

2009-01-20 Thread Matías De la Puente
> > > :) My outline proposal: > >* GNOME Platform Overview >* The Vala Programming Language >* Quick Introduction to Vala for C# and Java Programmers >* A Simple Console Application >* Strings and Regular Expressions >* Collections, Lists, Maps and Sets >* Parsing Comman

Re: [Vala] [ANNOUNCE] Vala Toys for gEdit 0.3.0

2009-01-08 Thread Matías De la Puente
Hi Andreas, 2009/1/8 Andrea Del Signore > Another stable vala release and a new vtg 0.3.0 release: > >Vala Toys for gEdit - "Where is the snow?" Great!! Congratulations, great job. > * New "simple" and "version control system" based ChangeLog support. > Just press CTRL+SHIT+C and a

Re: [Vala] [ANNOUNCE] Vala Toys for gEdit 0.1.0

2008-12-17 Thread Matías De la Puente
2008/12/16 Andrea Del Signore > I'm proud to announce the first release of > >Vala Toys for gEdit a.k.a. "Who is Valdo?" > Congratulations!! I just installed in my system and it's working ok. I just submitted the PKGBUILD for building your packeg in the AUR repository of Archlinux. If a

[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 but i want this #include "my.xpm" Is there a way to specify a local header file? My ob

Re: [Vala] Vala on Windows

2008-11-07 Thread Matías De la Puente
2008/11/6 gege2061 <[EMAIL PROTECTED]> > 2008/11/6 Matías De la Puente <[EMAIL PROTECTED]> > >> >> Could be great to have this packege only with vala in a zip file, because >> mingw32, gtk for windows and others came in separate zip file. so when i >>

Re: [Vala] Vala on Windows

2008-11-07 Thread Matías De la Puente
2008/11/6 Alexei Vinidiktov <[EMAIL PROTECTED]> > 2008/11/6 Matías De la Puente <[EMAIL PROTECTED]>: > > Hi > > > > I have try this and it work without problems. > > Another think to add to valac is "-X -mwindows" because when i use gtk >

Re: [Vala] Vala on Windows

2008-11-06 Thread Matías De la Puente
Hi I have try this and it work without problems. Another think to add to valac is "-X -mwindows" because when i use gtk and execute my app opens a terminal and a window. Could be great to have this packege only with vala in a zip file, because mingw32, gtk for windows and others came in separate

Re: [Vala] GMarkup broken in Vala 0.4.0?

2008-10-22 Thread Matías De la Puente
Thanks for the clarifying! But I am still curious why my code didn't work. class MyClass { public static MarkupParser p; void somefunction() { p.start_element = start_element; } void start_element(MarkupParseContext context, string element_name, string[] attribute_names

Re: [Vala] GMarkup broken in Vala 0.4.0?

2008-10-22 Thread Matías De la Puente
Hi Yu I patch the glib.vapi changing Markup delegates http://bugzilla.gnome.org/show_bug.cgi?id=553282 I done that to use "this" inside the method of the class. With this you can access the members and function of the class that aren't static. here is a working example compiled with vala 0.4.0 p

Re: [Vala] Posix binding!!

2008-08-19 Thread Matías De la Puente
2008/8/19 Luca Dionisi <[EMAIL PROTECTED]> > Is this one a mispelling? :) > > public static void assert (string expresion); je je :-) In English, yes. In Spanish (my native language), no. I will correct this for english > > ___ > Vala-list mailing l

Re: [Vala] Posix binding!!

2008-08-18 Thread Matías De la Puente
2008/8/18 Martin (OPENGeoMap) <[EMAIL PROTECTED]> > Hi. You are the bindings man!!!. Thank you very much! > Several week ago i created this wiki page: > http://live.gnome.org/Vala/ExternalBindings > > Parehaps is time to change to some svn server to manage this files and > bugs??? > I think t

[Vala] Posix binding!!

2008-08-18 Thread Matías De la Puente
Hello all, Lastnight I made the first Posix binding!! The vapi file have implementation of: * fcntl.h * unistd.h * errno.h * termios.h * signal.h * and some others There's a lot of function, constants and structures in the vapi file but maybe are missing, Please feel free to post patches, sugge

Re: [Vala] GLX (OpenGL Extension to the X Window System) binding!!

2008-08-15 Thread Matías De la Puente
> > > I understand, but it looks a bit out-of-place in Vala, where each common > prefix has disappeared into the namespaces (except for gl functions > apparently). > I would be happy to have a binding with constants grouping like this : namespace GLX { public enum ConfigMode { RGB

Re: [Vala] GLX (OpenGL Extension to the X Window System) binding!!

2008-08-15 Thread Matías De la Puente
Hi Xavier I have two ways to put the constants and the functions in the binding: The first one is put the constants and the functions as they appear in the header file, GLX_SOMETHING for constants and glXSomenthing for functions. This can be done if I put this attibute in the namespace: [CCode (

Re: [Vala] RE : RE : array of function pointer

2008-08-14 Thread Matías De la Puente
2008/8/14 PICCA Frédéric-Emmanuel < [EMAIL PROTECTED]> > > Yes, could be. We need to test it more. I see the link to the external > vapi > > bindings in http://www.gnu.org/software/gsl/ (section > > extensions/applications). For me it's just fine... > > Yes but do you have a repository for the gsl

Re: [Vala] RE : array of function pointer

2008-08-14 Thread Matías De la Puente
2008/8/14 PICCA Frédéric-Emmanuel < [EMAIL PROTECTED]> > > Great!! I think i was the only one.. > > Thanks for the work you have done with GSL. > > I found 2 errors in the current .vapi. I will send you a patch in a next > email, > Great, I will update! > > don't you think that this vapi file

Re: [Vala] array of function pointer

2008-08-14 Thread Matías De la Puente
2008/8/14 picca <[EMAIL PROTECTED]> > Hello > > I am playing with the Gsl.vapi file. > Great!! I think i was the only one.. > here the definition of a delegate type in this vapi file (no CCode for now) > > static delegate int MultirootF (Vector x, void* params, Vector f); > > PS: The real c t

[Vala] GLX (OpenGL Extension to the X Window System) binding!!

2008-08-13 Thread Matías De la Puente
Hello all, I made a glx binding for vala (glx.vapi). An example is also attach to this mail. For compile the example you need also the gl.vapi file ( http://live.gnome.org/Vala/ExternalBindings). Compile the example with: valac glxtest.vala --pkg gtk+-2.0 --pkg glx --pkg gl --pkg gdk-x11-2.0 Any

[Vala] OpenGL definitive binding and samples

2008-08-09 Thread Matías De la Puente
Hi, all I finally update the OpenGL bindings (gl.vapi and glu.vapi). The bindings were made in a traditional way (glBegin(GL_TRIANGLES)) because the all the avaible documentation describes the functions like this.. And will be more easy to port opengl source code to vala. Samples can be found her

[Vala] OpenGL Binding: Grouping the constants in gl.vapi and glu.vapi

2008-08-09 Thread Matías De la Puente
Hello all, There's someone with experience in opengl?. Because I'd like to modify gl.vapi and glu.vapi files for grouping, in the best way, the constants... For now i can group the data types but for the rest is dificult because I can't find a proper documentation that explain some kind of consta

Re: [Vala] OpenGL and gtkglext Bindings!!!

2008-08-06 Thread Matías De la Puente
Hi Everyone: I updated the opengl vapi files, they have some writing errors but they work fine... I made a glx binding but still testing ... Zeeshan: I make the parameter nullable but the other think I can't make it work. I think it is a vala bug... here is an example to test: using GLib; usin

Re: [Vala] GObject Extensions

2008-07-18 Thread Matías De la Puente
> > > > > 2. I think once the class definition is closed, you can't > > extend it, but > > > > I agree with you that once the class definition is closed we can't > > extend it. But in this case the gtkglext functions extend the > > GdkWindow object to bring OpenGL capabilities to s

Re: [Vala] GObject Extensions

2008-07-18 Thread Matías De la Puente
2008/7/17 Yu Feng <[EMAIL PROTECTED]>: > Hi Matias, > > 1. Gdk.Window isn't a GObject. Gdk.Window IS a GObject, you can see this in http://library.gnome.org/devel/gdk/stable/gdk-Windows.html#GdkWindow Object Hierarchy GObject +GdkDrawable

[Vala] GObject Extensions

2008-07-17 Thread Matías De la Puente
Hi, all. It is possible to add extension functions to some GObjects in the vapi files? Here is a concrete sample. In gtkglext-1.0 there's some functions that extend a Gdk.Window object. I create a vapi file with this: [CCode (lower_case_cprefix="gdk_window_")] namespace GdkWindow

Re: [Vala] Problem with get_table and free_table in sqlite binding

2008-07-15 Thread Matías De la Puente
Ok, I Fix the bug!! Change get_table and free_table of sqlite3.vapi with this: [NoArrayLength] public int get_table (string sql, out weak string[] resultp, out int nrow, out int ncolumn, out weak string errmsg); [NoArrayLength] public static void free_table (string[] result); Remember to use nro

[Vala] Problem with get_table and free_table in sqlite binding

2008-07-09 Thread Matías De la Puente
Hi all, Someone was able to use the get_table and free_table functions in the sqlite binding? See this bug for more information: http://bugzilla.gnome.org/show_bug.cgi?id=542235 Matias ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.or

Re: [Vala] Using Vala under syscall

2008-07-08 Thread Matías De la Puente
Kamel: You can write vapi files with the structures, functions and constants of every header file. Here is a little example: io.vapi: [[CCode (lower_case_cprefix ="", cheader_filename="sys/io.h") namespace Io { public static int ioperm (ulong from, ulong num, bool turn_on); public stati

[Vala] Support for exporting a callback function in windows!!

2008-07-03 Thread Matías De la Puente
Hello all, It is posible to add an attibute (like '[Export]') for export a callback function in windows? In linux work fine the callback functions but in window must add this to a callback method: G_MODULE_EXPORT void callback_example (); When compiling on Linux, this will have absolutely no eff

[Vala] OpenGL and gtkglext Bindings!!!

2008-06-21 Thread Matías De la Puente
Hello everyone, I add the OpenGL (gl.vapi and glu.vapi) and gtkglext (gtkglext-1.0.vapi) bindings!!! There are all the consts, functions, enums, objects, etc.. But I need testers for this bindings because maybe there is typing errors. Compile the sample code in this mail with: valac prueba.vala

[Vala] GSL and OpenGL Binding

2008-06-18 Thread Matías De la Puente
Hello everyone, I update again the GSL binding, the only change was the replacement of 'setv', 'getv' and other methods of some object with @set and @get. See samples (http://live.gnome.org/Vala/GSLSample) About the OpenGL binding, I need to know the header files used by OpenGL. So far I have see

Re: [Vala] GSL Binding updated!!!

2008-06-13 Thread Matías De la Puente
2008/6/13 Martin (OPENGeoMap) <[EMAIL PROTECTED]>: > hello matias: > > > + implementation of the 'new' operator in all the objects (see samples: > http://live.gnome.org/Vala/GSLSample) > > great. We don´t need free pointers now hehe. > > + use of [Compact] attibute in all the objects > > ??? > I

[Vala] GSL Binding updated!!!

2008-06-13 Thread Matías De la Puente
Hello everyone, I updated the GSL binding for vala, the modifications are: + use of 'namespace' insted of 'public static class' for general functions + implementation of the 'new' operator in all the objects (see samples: http://live.gnome.org/Vala/GSLSample) + use of [Compact] attibute in all th

[Vala] Initialization Error!!!

2008-05-28 Thread Matías De la Puente
Hello The following code do not work because the value in 'x' and 'y' in 'd' are not 24 and 3. The structure is not initialized in an appropriate manner. using GLib; public class Sample : Object { struct Data { public int x; public int y; } public static void mai

[Vala] GSL Binding completed

2008-05-28 Thread Matías De la Puente
Hi, all I finish the binding for GSL. I will add more examples soon!!! Matias ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] compiling problems

2008-05-17 Thread Matías De la Puente
Hi, You have to compile VALA like this: > ./configure --prefix=/usr > make > sudo make install Matias ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] wiki and bindings added

2008-05-17 Thread Matías De la Puente
ok, i created and added the partial binding in the vala page. Matias ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

[Vala] Partial GSL Binding (Complex and statistics)

2008-05-17 Thread Matías De la Puente
hello to everyone, here is a partial binding of GSL. I will add the rest as soon as I write it. attachments should be copied to the vala/vapi folder Here's an example: // test.vala // compile with: valac test.vala --pkg gsl using GLib; using Gsl; public class Test : GLib.Object { public sta

Re: [Vala] wiki and bindings added

2008-05-17 Thread Matías De la Puente
i don't have an account so i will post the binding here.. Matias ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] wiki and bindings added

2008-05-17 Thread Matías De la Puente
hola, Cual es la dirección de la wiki para subir los bindings? Matias ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] binding help

2008-05-17 Thread Matías De la Puente
Tanks a lot, i was waiting this answer Ja! it was simple after all :-) Matias ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] c and c++

2008-05-17 Thread Matías De la Puente
2008/5/17 Martin (OpenGeoMap) <[EMAIL PROTECTED]>: > > Hello martin, >> >> i was trying to make a binding for GSL but the problem I had was that I >> could not give a structure as a parameter to a function. For example with >> the "gsl_complex_arg" you need a structure "gsl_complex"; VALA only de

Re: [Vala] c and c++

2008-05-17 Thread Matías De la Puente
Hello martin, i was trying to make a binding for GSL but the problem I had was that I could not give a structure as a parameter to a function. For example with the "gsl_complex_arg" you need a structure "gsl_complex"; VALA only deliver structure to function using reference. Already post my doubts

[Vala] operators overload

2008-05-14 Thread Matías De la Puente
hi again, vala, will include operators overload like in c#? example: static public Vector operator+ (Vector v1, Vector v2) { return new Vector (v1.x+v2.x, v1.y+v2.y); } ... ... Vector a = new Vector(3, 2); Vector b = new Vector(4, 6); Vector c; c = a +b; Matias __

[Vala] How to initialize a Matrix

2008-05-14 Thread Matías De la Puente
hello all, i try to initialize a simple matrix: int[,] matrix = new int[,] { {1, 3}, {4, 8} }; like in c# but, valac returns: /home/matias/vala/test.vala:7.36-7.36: error: too many expressions in initializer list for `int' ... ... .. and other stuf... For vector initialization i use: int[] ve

[Vala] binding help

2008-05-07 Thread Matías De la Puente
Hello, I need to make a binding for a library for the next hypotetical function: int library_function (Data x); Data is an structure, for example: typedef struct Data { int value1; int value2; }; In a vapi file i put this lines (the structure is also in the vapi): namespace Library {

Re: [Vala] Serial port help + posix + signals

2008-05-04 Thread Matías De la Puente
Hi, Thanks Ed this binding is very helpful, i'm going to test it. About the POSIX namespace, I agree with you to be present at the upcoming versions of VALA. I help where necessary. Regarding SIGNALS, I would like to know how to implement POSIX signals, especially SIGIO, to be used as delegates.

[Vala] Serial port help

2008-05-01 Thread Matías De la Puente
Hi, I need to use the serial port and I want to do with Vala. My question is whether I should create a special class to manipulate the structure termios to configure the port or is there another way using GIO / GVFS Any help will be welcome Matias ___