Created
December 23, 2023 13:50
-
-
Save saivert/3cf54869cb82b85931d3af3397a32a39 to your computer and use it in GitHub Desktop.
combine props with derived props.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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