+2008-02-09 Jürg Billeter <j@bitron.ch>
+
+ * gobject/valaccodegenerator.vala,
+ gobject/valaccodegeneratorinterface.vala: support GType
+ properties, patch by Ali Sabil
+
2008-02-09 Jürg Billeter <j@bitron.ch>
* vapi/glib-2.0.vapi: remove static modifier from GSourceFunc
public DataType string_type;
public DataType float_type;
public DataType double_type;
+ public Typesymbol gtype_type;
public Typesymbol gtypeinstance_type;
public Typesymbol gobject_type;
public Typesymbol gerror_type;
substring_method = (Method) string_type.data_type.scope.lookup ("substring");
var glib_ns = root_symbol.scope.lookup ("GLib");
-
+
+ gtype_type = (Typesymbol) glib_ns.scope.lookup ("Type");
gtypeinstance_type = (Typesymbol) glib_ns.scope.lookup ("TypeInstance");
gobject_type = (Typesymbol) glib_ns.scope.lookup ("Object");
gerror_type = (Typesymbol) glib_ns.scope.lookup ("Error");
} else {
cspec.add_argument (new CCodeConstant ("0.0"));
}
+ } else if (prop.type_reference.data_type == gtype_type) {
+ cspec.call = new CCodeIdentifier ("g_param_spec_gtype");
+ if (prop.default_expression != null) {
+ cspec.add_argument ((CCodeExpression) prop.default_expression.ccodenode);
+ } else {
+ cspec.add_argument (new CCodeConstant ("G_TYPE_NONE"));
+ }
} else {
cspec.call = new CCodeIdentifier ("g_param_spec_pointer");
}