2008-01-08 Jürg Billeter <j@bitron.ch>
+ * vala/valainterfacewriter.vala, vala/valastruct.vala,
+ vapigen/valagidlparser.vala: support simple_type attribute in metadata
+
+ * vapi/packages/gdk-2.0/gdk-2.0.metadata: mark GdkAtom as simple type
+
+ * vapi/gdk-2.0.vapi: regenerated
+
+2008-01-08 Jürg Billeter <j@bitron.ch>
+
* vapi/packages/gtk+-2.0/: fix GtkTreeViewDropPosition out parameters
* vapi/gtk+-2.0.vapi: regenerated
/* valainterfacewriter.vala
*
- * Copyright (C) 2006-2007 Jürg Billeter, Raffaele Sandrini
+ * Copyright (C) 2006-2008 Jürg Billeter, Raffaele Sandrini
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
write_string ("[CCode (cheader_filename = \"%s\")]".printf (cheaders));
write_newline ();
+ if (st.is_simple_type ()) {
+ write_indent ();
+ write_string ("[SimpleType]");
+ write_newline ();
+ }
+
write_indent ();
write_accessibility (st);
write_string ("struct ");
/* valastruct.vala
*
- * Copyright (C) 2006-2007 Jürg Billeter
+ * Copyright (C) 2006-2008 Jürg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
return simple_type;
}
+ /**
+ * Marks this struct as simple type, i.e. instances will be passed by
+ * value.
+ */
+ public void set_simple_type (bool simple_type) {
+ this.simple_type = simple_type;
+ }
+
public override void replace_type (DataType! old_type, DataType! new_type) {
for (int i = 0; i < base_types.size; i++) {
if (base_types[i] == old_type) {
public void withdraw ();
}
[CCode (cheader_filename = "gdk/gdk.h")]
+ [SimpleType]
public struct Atom {
public static Gdk.Atom intern (string atom_name, bool only_if_exists);
public static Gdk.Atom intern_static_string (string atom_name);
Gdk cheader_filename="gdk/gdk.h"
-GdkAtom is_value_type="1"
+GdkAtom is_value_type="1" simple_type="1"
gdk_cairo_create transfer_ownership="1"
GdkColor is_value_type="1"
gdk_color_parse.color is_out="1"
if (eval (nv[1]) == "1") {
return;
}
+ } else if (nv[0] == "simple_type") {
+ if (eval (nv[1]) == "1") {
+ st.set_simple_type (true);
+ }
}
}
}