Skip to content

Instantly share code, notes, and snippets.

@saivert
Created December 23, 2023 13:50
Show Gist options
  • Save saivert/3cf54869cb82b85931d3af3397a32a39 to your computer and use it in GitHub Desktop.
Save saivert/3cf54869cb82b85931d3af3397a32a39 to your computer and use it in GitHub Desktop.
combine props with derived props.rs
fn properties() -> &'static [ParamSpec] {
static PROPERTIES: Lazy<Vec<ParamSpec>> =
Lazy::new(|| {
let props = vec![
glib::ParamSpecEnum::builder::<crate::NodeType>("nodetype")
.default_value(NodeType::Undefined)
.build(),
];
let derived_props = PwNodeObject::derived_properties();
[props, derived_props.to_vec()].concat()
}
);
PROPERTIES.as_ref()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment