Macro libspa::pod::property

source ·
macro_rules! property {
    ($key:expr, $value:expr) => { ... };
    ($key:expr, Id, $value:expr) => { ... };
    ($key:expr, $type_:ident, $value:expr) => { ... };
    ($key:expr, Choice, Enum, Id, $default:expr, $($alternative:expr),+ $(,)?) => { ... };
    ($key:expr, Choice, Enum, $type_:ident, $default:expr, $($alternative:expr),+ $(,)?) => { ... };
    ($key:expr, Choice, Flags, $type_:ident, $default:expr, $($alternative:expr),+ $(,)?) => { ... };
    ($key:expr, Choice, Step, $type_:ident, $default:expr, $min:expr, $max:expr, $step:expr) => { ... };
    ($key:expr, Choice, Range, $type_:ident, $default:expr, $min:expr, $max:expr) => { ... };
}
Expand description

A macro for creating a new Object Property.

The macro accepts the following:

  • properties!(libspa::format::FormatProperties::<key>, Id, <value>)
  • properties!(libspa::format::FormatProperties::<key>, <type>, libspa::utils::<type>(<value>))
  • properties!(libspa::format::FormatProperties::<key>, Choice, Enum, Id, <default>, <value>, …)
  • properties!(libspa::format::FormatProperties::<key>, Choice, Enum, <type>, libspa::utils::<type>(<default>), libspa::utils::<type>(<value>), …)
  • properties!(libspa::format::FormatProperties::<key>, Choice, Flags, <type>, libspa::utils::<type>(<default>), libspa::utils::<type>(<value>), …)
  • properties!(libspa::format::FormatProperties::<key>, Choice, Step, <type>, libspa::utils::<type>(default), libspa::utils::<type>(min), libspa::utils::<type>(max), libspa::utils::<type>(step))
  • properties!(libspa::format::FormatProperties::<key>, Choice, Range, <type>, libspa::utils::<type>(default), libspa::utils::<type>(min), libspa::utils::<type>(max))