mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 21:41:03 +00:00
Require a get_type() function for boxed/object properties
Otherwise storing the properties in a static array is not possible
This commit is contained in:
parent
323bf3ea08
commit
656dc990f8
1 changed files with 6 additions and 6 deletions
|
@ -88,8 +88,8 @@ pub enum Property<'a> {
|
|||
Option<&'a str>,
|
||||
PropertyMutability,
|
||||
),
|
||||
Boxed(&'a str, &'a str, &'a str, glib::Type, PropertyMutability),
|
||||
Object(&'a str, &'a str, &'a str, glib::Type, PropertyMutability),
|
||||
Boxed(&'a str, &'a str, &'a str, fn() -> glib::Type, PropertyMutability),
|
||||
Object(&'a str, &'a str, &'a str, fn() -> glib::Type, PropertyMutability),
|
||||
}
|
||||
|
||||
impl<'a> Into<*mut gobject_ffi::GParamSpec> for &'a Property<'a> {
|
||||
|
@ -180,21 +180,21 @@ impl<'a> Into<*mut gobject_ffi::GParamSpec> for &'a Property<'a> {
|
|||
mutability.into(),
|
||||
)
|
||||
}
|
||||
Property::Boxed(name, nick, description, type_, mutability) => {
|
||||
Property::Boxed(name, nick, description, get_type, mutability) => {
|
||||
gobject_ffi::g_param_spec_boxed(
|
||||
name.to_glib_none().0,
|
||||
nick.to_glib_none().0,
|
||||
description.to_glib_none().0,
|
||||
type_.to_glib(),
|
||||
get_type().to_glib(),
|
||||
mutability.into(),
|
||||
)
|
||||
}
|
||||
Property::Object(name, nick, description, type_, mutability) => {
|
||||
Property::Object(name, nick, description, get_type, mutability) => {
|
||||
gobject_ffi::g_param_spec_object(
|
||||
name.to_glib_none().0,
|
||||
nick.to_glib_none().0,
|
||||
description.to_glib_none().0,
|
||||
type_.to_glib(),
|
||||
get_type().to_glib(),
|
||||
mutability.into(),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue