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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
//! 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 UITextSelectionDisplayInteractionDelegate:
        NSObjectProtocol + IsMainThreadOnly
    {
        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[optional]
        #[method_id(@__retain_semantics Other selectionContainerViewBelowTextForSelectionDisplayInteraction:)]
        unsafe fn selectionContainerViewBelowTextForSelectionDisplayInteraction(
            &self,
            interaction: &UITextSelectionDisplayInteraction,
        ) -> Option<Retained<UIView>>;
    }

    unsafe impl ProtocolType for dyn UITextSelectionDisplayInteractionDelegate {}
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UITextSelectionDisplayInteraction;

    unsafe impl ClassType for UITextSelectionDisplayInteraction {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSObjectProtocol for UITextSelectionDisplayInteraction {}

#[cfg(feature = "UIInteraction")]
unsafe impl UIInteraction for UITextSelectionDisplayInteraction {}

extern_methods!(
    unsafe impl UITextSelectionDisplayInteraction {
        #[method(isActivated)]
        pub unsafe fn isActivated(&self) -> bool;

        #[method(setActivated:)]
        pub unsafe fn setActivated(&self, activated: bool);

        #[cfg(all(feature = "UITextInput", feature = "UITextInputTraits"))]
        #[method_id(@__retain_semantics Other textInput)]
        pub unsafe fn textInput(&self) -> Option<Retained<ProtocolObject<dyn UITextInput>>>;

        #[method_id(@__retain_semantics Other delegate)]
        pub unsafe fn delegate(
            &self,
        ) -> Option<Retained<ProtocolObject<dyn UITextSelectionDisplayInteractionDelegate>>>;

        #[cfg(all(
            feature = "UIResponder",
            feature = "UITextCursorView",
            feature = "UIView"
        ))]
        #[method_id(@__retain_semantics Other cursorView)]
        pub unsafe fn cursorView(&self) -> Retained<UIView>;

        #[cfg(all(
            feature = "UIResponder",
            feature = "UITextCursorView",
            feature = "UIView"
        ))]
        #[method(setCursorView:)]
        pub unsafe fn setCursorView(&self, cursor_view: &UIView);

        #[cfg(all(
            feature = "UIResponder",
            feature = "UITextSelectionHighlightView",
            feature = "UIView"
        ))]
        #[method_id(@__retain_semantics Other highlightView)]
        pub unsafe fn highlightView(&self) -> Retained<UIView>;

        #[cfg(all(
            feature = "UIResponder",
            feature = "UITextSelectionHighlightView",
            feature = "UIView"
        ))]
        #[method(setHighlightView:)]
        pub unsafe fn setHighlightView(&self, highlight_view: &UIView);

        #[cfg(all(
            feature = "UIResponder",
            feature = "UITextSelectionHandleView",
            feature = "UIView"
        ))]
        #[method_id(@__retain_semantics Other handleViews)]
        pub unsafe fn handleViews(&self) -> Retained<NSArray<UIView>>;

        #[cfg(all(
            feature = "UIResponder",
            feature = "UITextSelectionHandleView",
            feature = "UIView"
        ))]
        #[method(setHandleViews:)]
        pub unsafe fn setHandleViews(&self, handle_views: &NSArray<UIView>);

        #[cfg(all(feature = "UITextInput", feature = "UITextInputTraits"))]
        #[method_id(@__retain_semantics Init initWithTextInput:delegate:)]
        pub unsafe fn initWithTextInput_delegate(
            this: Allocated<Self>,
            text_input: &ProtocolObject<dyn UITextInput>,
            delegate: &ProtocolObject<dyn UITextSelectionDisplayInteractionDelegate>,
        ) -> Retained<Self>;

        #[method(layoutManagedSubviews)]
        pub unsafe fn layoutManagedSubviews(&self);

        #[method(setNeedsSelectionUpdate)]
        pub unsafe fn setNeedsSelectionUpdate(&self);

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

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);