Hi, I'm binding a C library I wrote and right now I was only using the metadata files to avoid vapigen from skipping some methods with varargs and rename things. As I was testing the library from Vala using the generated vapi files I noticed that a boxed type I used was not being translated as expected to Vala, as this boxed type is very similar to the Gtk.TreeIter and I also noticed that this one was working exactly as I expected mine to work, I looked at how it was binded to Vala and it was not a [Compact] annotated class like mine, it was a struct and also, from Vala, it could be declared using "var iter = Gtk.TreeIter ();", so I looked at the metadata file used to generate it in the vala repository and I just found this:
GtkTreeIter is_value_type="1" gtk_tree_iter_copy hidden="1" gtk_tree_iter_free hidden="1" Then, when I tried to apply these lines in my metadata, vapigen gave me an error: Db-1.0.metadata:6.6-6.18: error: unknown argument Also, I use a slightly different notation for everything: Db cheader_filename="db/db.h" Model.get skip=false Model.set skip=false Being db_model_get and db_model_set the C headers for the methods skipped by GObject Introspection. I've read in the list that 'skip' and 'hidden' offer the same results, so this problem is solved, but using the is_value_type is not possible in my metadata files. I've tried more of the metadata parameters listed in [1] and i've got the same error, or in some cases (like the hidden parameter) just a warning telling that the argument is never used. My doubts are: are there two different metadata languages? And, is the Gtk.TreeIter created binded using just these three lines of metadata or is there something more? Regards, Alex 1: https://live.gnome.org/Vala/Manual/GIDL%20metadata%20format
_______________________________________________ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list