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
44unsafe impl NSObjectProtocol for UITextSelectionDisplayInteraction {}
45
46#[cfg(feature = "UIInteraction")]
47unsafe impl UIInteraction for UITextSelectionDisplayInteraction {}
48
49impl UITextSelectionDisplayInteraction {
50 extern_methods!(
51 #[unsafe(method(isActivated))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn isActivated(&self) -> bool;
55
56 #[unsafe(method(setActivated:))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn setActivated(&self, activated: bool);
60
61 #[cfg(all(feature = "UITextInput", feature = "UITextInputTraits"))]
62 #[unsafe(method(textInput))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn textInput(&self) -> Option<Retained<ProtocolObject<dyn UITextInput>>>;
66
67 #[unsafe(method(delegate))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn delegate(
72 &self,
73 ) -> Option<Retained<ProtocolObject<dyn UITextSelectionDisplayInteractionDelegate>>>;
74
75 #[cfg(all(
76 feature = "UIResponder",
77 feature = "UITextCursorView",
78 feature = "UIView"
79 ))]
80 #[unsafe(method(cursorView))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn cursorView(&self) -> Retained<UIView>;
84
85 #[cfg(all(
86 feature = "UIResponder",
87 feature = "UITextCursorView",
88 feature = "UIView"
89 ))]
90 #[unsafe(method(setCursorView:))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn setCursorView(&self, cursor_view: &UIView);
94
95 #[cfg(all(
96 feature = "UIResponder",
97 feature = "UITextSelectionHighlightView",
98 feature = "UIView"
99 ))]
100 #[unsafe(method(highlightView))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn highlightView(&self) -> Retained<UIView>;
104
105 #[cfg(all(
106 feature = "UIResponder",
107 feature = "UITextSelectionHighlightView",
108 feature = "UIView"
109 ))]
110 #[unsafe(method(setHighlightView:))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn setHighlightView(&self, highlight_view: &UIView);
114
115 #[cfg(all(
116 feature = "UIResponder",
117 feature = "UITextSelectionHandleView",
118 feature = "UIView"
119 ))]
120 #[unsafe(method(handleViews))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn handleViews(&self) -> Retained<NSArray<UIView>>;
128
129 #[cfg(all(
130 feature = "UIResponder",
131 feature = "UITextSelectionHandleView",
132 feature = "UIView"
133 ))]
134 #[unsafe(method(setHandleViews:))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn setHandleViews(&self, handle_views: &NSArray<UIView>);
138
139 #[cfg(all(feature = "UITextInput", feature = "UITextInputTraits"))]
140 #[unsafe(method(initWithTextInput:delegate:))]
143 #[unsafe(method_family = init)]
144 pub unsafe fn initWithTextInput_delegate(
145 this: Allocated<Self>,
146 text_input: &ProtocolObject<dyn UITextInput>,
147 delegate: &ProtocolObject<dyn UITextSelectionDisplayInteractionDelegate>,
148 ) -> Retained<Self>;
149
150 #[unsafe(method(layoutManagedSubviews))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn layoutManagedSubviews(&self);
154
155 #[unsafe(method(setNeedsSelectionUpdate))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn setNeedsSelectionUpdate(&self);
159
160 #[unsafe(method(init))]
161 #[unsafe(method_family = init)]
162 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
163
164 #[unsafe(method(new))]
165 #[unsafe(method_family = new)]
166 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
167 );
168}