<property name="float" writable="1" transfer-ownership="none">
<type name="gfloat"/>
</property>
+ <property name="gtype" writable="1" transfer-ownership="none">
+ <type name="GType"/>
+ </property>
<property name="hash-table" writable="1" transfer-ownership="container">
<type name="GLib.HashTable">
<type name="utf8"/>
<field name="string">
<type name="utf8" c:type="char*"/>
</field>
+ <field name="gtype">
+ <type name="GType" c:type="GType"/>
+ </field>
<glib:signal name="all"
when="first"
no-recurse="1"
PROP_TEST_OBJ_INT,
PROP_TEST_OBJ_FLOAT,
PROP_TEST_OBJ_DOUBLE,
- PROP_TEST_OBJ_STRING
+ PROP_TEST_OBJ_STRING,
+ PROP_TEST_OBJ_GTYPE
};
static void
self->string = g_value_dup_string (value);
break;
+ case PROP_TEST_OBJ_GTYPE:
+ self->gtype = g_value_get_gtype (value);
+ break;
+
default:
/* We don't have any other property... */
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
g_value_set_string (value, self->string);
break;
+ case PROP_TEST_OBJ_GTYPE:
+ g_value_set_gtype (value, self->gtype);
+ break;
+
default:
/* We don't have any other property... */
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
pspec);
+ /**
+ * TestObj:gtype:
+ */
+ pspec = g_param_spec_gtype ("gtype",
+ "GType property",
+ "A GType property",
+ G_TYPE_NONE,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (gobject_class,
+ PROP_TEST_OBJ_GTYPE,
+ pspec);
+
klass->matrix = regress_test_obj_default_matrix;
}
obj->bare = NULL;
obj->boxed = NULL;
obj->hash_table = NULL;
+ obj->gtype = G_TYPE_INVALID;
}
/**