Attribute Macro glib_macros::derived_properties

source ·
#[derived_properties]
Expand description

When applied to ObjectImpl

#[glib::derived_properties]
impl ObjectImpl for CustomObject

this macro generates

impl ObjectImpl for CustomObject {
    fn properties() -> &'static [glib::ParamSpec] {
        Self::derived_properties()
    }
    fn set_property(&self, id: usize, value: &glib::Value, pspec: &glib::ParamSpec) {
        self.derived_set_property(id, value, pspec)
    }
    fn property(&self, id: usize, pspec: &glib::ParamSpec) -> glib::Value {
        self.derived_property(id, pspec)
    }
}