[GObject] Extending properties



For some reason I have to 'extend' the property. I.e. the parent had
G_READABLE and the child has to have G_READABLE | G_CONSTRUCT_ONLY.

Is such construction correct:

GParamSpec *spec;

g_object_class_override_property (gobject_class, PROP_FOO, "foo");
spec = g_object_class_find_property (gobject_class, "foo");
spec->flags |= G_PARAM_CONSTRUCT;

Is (for GParamSpecObject) this correct:
spec->value_type = BAR_TYPE_CHILD

Assuming BarChild is child of the original class?

Regards
-- 
I've probably left my head... somewhere. Please wait untill I find it.
Homepage (pl_PL): http://uzytkownik.jogger.pl/
(GNU/)Linux User: #425935 (see http://counter.li.org/)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]