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



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]