What do I do with the typedef struct declarations? This is what I have but I
don't think it's right.
c code
typedef struct { char _dummy; } ID3Tag;
vala code
[CCode(cname = "typedef struct")]
public struct ID3Tag { private char _dummy; }
Date: Tue, 15 Sep 2009 18:14:24 -0300
Subject: Re: [Vala] using a non-glib C library in vala
From: [email protected]
To: [email protected]
CC: [email protected]
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 this case
ID3Tag_Delete), i think that in the CCode of the class you should add
free_funcion="ID3Tag_Delete", but it's just a guess.
Take a look in other non-glib bindings in vapi for example libusb.vapi,
libftdi.vapi, posix.vapi, gsl.vapi, zlib.vapi ....
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/171222984/direct/01/_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list