1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_protocol!(
    pub unsafe trait UIInteraction: NSObjectProtocol + IsMainThreadOnly {
        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[method_id(@__retain_semantics Other view)]
        unsafe fn view(&self) -> Option<Retained<UIView>>;

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[method(willMoveToView:)]
        unsafe fn willMoveToView(&self, view: Option<&UIView>);

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[method(didMoveToView:)]
        unsafe fn didMoveToView(&self, view: Option<&UIView>);
    }

    unsafe impl ProtocolType for dyn UIInteraction {}
);

extern_methods!(
    /// Interactions
    #[cfg(all(feature = "UIResponder", feature = "UIView"))]
    unsafe impl UIView {
        #[method(addInteraction:)]
        pub unsafe fn addInteraction(&self, interaction: &ProtocolObject<dyn UIInteraction>);

        #[method(removeInteraction:)]
        pub unsafe fn removeInteraction(&self, interaction: &ProtocolObject<dyn UIInteraction>);

        #[method_id(@__retain_semantics Other interactions)]
        pub unsafe fn interactions(&self) -> Retained<NSArray<ProtocolObject<dyn UIInteraction>>>;

        #[method(setInteractions:)]
        pub unsafe fn setInteractions(
            &self,
            interactions: &NSArray<ProtocolObject<dyn UIInteraction>>,
        );
    }
);