icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::Foundation::*;
use crate::SoundAnalysis::*;

ns_enum!(
    #[underlying(NSInteger)]
    pub enum SNTimeDurationConstraintType {
        SNTimeDurationConstraintTypeEnumerated = 1,
        SNTimeDurationConstraintTypeRange = 2,
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "SoundAnalysis_SNTimeDurationConstraint")]
    pub struct SNTimeDurationConstraint;

    #[cfg(feature = "SoundAnalysis_SNTimeDurationConstraint")]
    unsafe impl ClassType for SNTimeDurationConstraint {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "SoundAnalysis_SNTimeDurationConstraint")]
unsafe impl NSObjectProtocol for SNTimeDurationConstraint {}

extern_methods!(
    #[cfg(feature = "SoundAnalysis_SNTimeDurationConstraint")]
    unsafe impl SNTimeDurationConstraint {
        #[method(type)]
        pub unsafe fn r#type(&self) -> SNTimeDurationConstraintType;

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))]
        #[method_id(@__retain_semantics Other enumeratedDurations)]
        pub unsafe fn enumeratedDurations(&self) -> Id<NSArray<NSValue>>;

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSValue"))]
        #[method_id(@__retain_semantics Init initWithEnumeratedDurations:)]
        pub unsafe fn initWithEnumeratedDurations(
            this: Allocated<Self>,
            enumerated_durations: &NSArray<NSValue>,
        ) -> Id<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);