Created
June 26, 2023 20:32
-
-
Save saivert/4b2c98e2aef4fd3e285d28afde97427d to your computer and use it in GitHub Desktop.
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
// Is this currently the only way to set enums without type information in the rust bindings (e.g from foreign code) | |
let t = glib::Type::from_name("WpMixerApiVolumeScale").unwrap(); | |
let v = glib::Value::from_type(t); | |
unsafe { | |
glib::gobject_ffi::g_value_set_enum(v.as_ptr(), 1); | |
} | |
mixerapi.set_property("scale", v); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment