return false;
}
+ if (type_sym is Interface && prop.is_virtual) {
+ // GObject does not support virtual interface properties
+ return false;
+ }
+
if (type_sym is Interface && type_sym.get_attribute ("DBus") != null) {
// GObject properties not currently supported in D-Bus interfaces
return false;
}
}
+ foreach (Property prop in iface.get_properties ()) {
+ if (prop.is_virtual) {
+ if (prop.get_accessor != null) {
+ string cname = CCodeBaseModule.get_ccode_real_name (prop.get_accessor);
+ ccode.add_assignment (new CCodeMemberAccess.pointer (ciface, "get_%s".printf (prop.name)), new CCodeIdentifier (cname));
+ }
+ if (prop.set_accessor != null) {
+ string cname = CCodeBaseModule.get_ccode_real_name (prop.set_accessor);
+ ccode.add_assignment (new CCodeMemberAccess.pointer (ciface, "set_%s".printf (prop.name)), new CCodeIdentifier (cname));
+ }
+ }
+ }
+
ccode.close ();
pop_context ();
var sym = type.data_type.scope.lookup (name);
if (sym is Property) {
var base_property = (Property) sym;
- if (base_property.is_abstract) {
+ if (base_property.is_abstract || base_property.is_virtual) {
string invalid_match;
if (!compatible (base_property, out invalid_match)) {
error = true;