Re: [Vala] using a non-glib C library in vala
- From: "Mr. Maxwell ." <mr_maxwell live com>
- To: <vala-list gnome org>
- Subject: Re: [Vala] using a non-glib C library in vala
- Date: Tue, 15 Sep 2009 17:14:38 -0500
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: mfpuente ar gmail com
To: mr_maxwell live com
CC: vala-list gnome org
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/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]