objc2_ui_kit/generated/
UITextSelectionDisplayInteraction.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 pub unsafe trait UITextSelectionDisplayInteractionDelegate:
13 NSObjectProtocol + MainThreadOnly
14 {
15 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
16 #[optional]
20 #[unsafe(method(selectionContainerViewBelowTextForSelectionDisplayInteraction:))]
21 #[unsafe(method_family = none)]
22 unsafe fn selectionContainerViewBelowTextForSelectionDisplayInteraction(
23 &self,
24 interaction: &UITextSelectionDisplayInteraction,
25 ) -> Option<Retained<UIView>>;
26 }
27);
28
29extern_class!(
30 #[unsafe(super(NSObject))]
39 #[thread_kind = MainThreadOnly]
40 #[derive(Debug, PartialEq, Eq, Hash)]
41 pub struct UITextSelectionDisplayInteraction;
42);
43
44extern_conformance!(
45 unsafe impl NSObjectProtocol for UITextSelectionDisplayInteraction {}
46);
47
48#[cfg(feature = "UIInteraction")]
49extern_conformance!(
50 unsafe impl UIInteraction for UITextSelectionDisplayInteraction {}
51);
52
53impl UITextSelectionDisplayInteraction {
54 extern_methods!(
55 #[unsafe(method(isActivated))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn isActivated(&self) -> bool;
59
60 #[unsafe(method(setActivated:))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn setActivated(&self, activated: bool);
64
65 #[cfg(all(feature = "UITextInput", feature = "UITextInputTraits"))]
66 #[unsafe(method(textInput))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn textInput(&self) -> Option<Retained<ProtocolObject<dyn UITextInput>>>;
70
71 #[unsafe(method(delegate))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn delegate(
76 &self,
77 ) -> Option<Retained<ProtocolObject<dyn UITextSelectionDisplayInteractionDelegate>>>;
78
79 #[cfg(all(
80 feature = "UIResponder",
81 feature = "UITextCursorView",
82 feature = "UIView"
83 ))]
84 #[unsafe(method(cursorView))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn cursorView(&self) -> Retained<UIView>;
88
89 #[cfg(all(
90 feature = "UIResponder",
91 feature = "UITextCursorView",
92 feature = "UIView"
93 ))]
94 #[unsafe(method(setCursorView:))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn setCursorView(&self, cursor_view: &UIView);
98
99 #[cfg(all(
100 feature = "UIResponder",
101 feature = "UITextSelectionHighlightView",
102 feature = "UIView"
103 ))]
104 #[unsafe(method(highlightView))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn highlightView(&self) -> Retained<UIView>;
108
109 #[cfg(all(
110 feature = "UIResponder",
111 feature = "UITextSelectionHighlightView",
112 feature = "UIView"
113 ))]
114 #[unsafe(method(setHighlightView:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn setHighlightView(&self, highlight_view: &UIView);
118
119 #[cfg(all(
120 feature = "UIResponder",
121 feature = "UITextSelectionHandleView",
122 feature = "UIView"
123 ))]
124 #[unsafe(method(handleViews))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn handleViews(&self) -> Retained<NSArray<UIView>>;
132
133 #[cfg(all(
134 feature = "UIResponder",
135 feature = "UITextSelectionHandleView",
136 feature = "UIView"
137 ))]
138 #[unsafe(method(setHandleViews:))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn setHandleViews(&self, handle_views: &NSArray<UIView>);
142
143 #[cfg(all(feature = "UITextInput", feature = "UITextInputTraits"))]
144 #[unsafe(method(initWithTextInput:delegate:))]
147 #[unsafe(method_family = init)]
148 pub unsafe fn initWithTextInput_delegate(
149 this: Allocated<Self>,
150 text_input: &ProtocolObject<dyn UITextInput>,
151 delegate: &ProtocolObject<dyn UITextSelectionDisplayInteractionDelegate>,
152 ) -> Retained<Self>;
153
154 #[unsafe(method(layoutManagedSubviews))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn layoutManagedSubviews(&self);
158
159 #[unsafe(method(setNeedsSelectionUpdate))]
161 #[unsafe(method_family = none)]
162 pub unsafe fn setNeedsSelectionUpdate(&self);
163
164 #[unsafe(method(init))]
165 #[unsafe(method_family = init)]
166 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
167
168 #[unsafe(method(new))]
169 #[unsafe(method_family = new)]
170 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
171 );
172}