Hi,

On Fri, 2008-10-10 at 17:32 +0000, Tonatiuh Morales wrote:
[...]
>       [Compact]
>       [CCode (cheader_filename = "shapefil.h")]
>       public class DBFHandle {
>       }
>       [Compact]
>       [CCode (cheader_filename = "shapefil.h")]
>       public class DBFInfo {

I'm not familiar with shapefil, but a quick look tells me DBFHandle is
typedef for DBFInfo*. I would maybe consider writing something manual
like bellow and see how far you get with that.

[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename =
"shapefil.h")]
namespace ShapeFil {
        [Compact]
        public class DBFInfo {
                [CCode (cname = "DBFAddField")]
                public int AddField (string pszFieldName, ShapeFil.DBFFieldType
eType, int nWidth, int nDecimals);

        }
}

Namespaces in vala are commonly used to prefix the generated C structs
and functions, so when there is no common prefix make sure to clear it
in the cprefix attributes.
Also take a look at some of the other manual written vapi files in the
repository, they have proven to be useful source of information for me.

Regards,
Hans

_______________________________________________
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to