objc2_browser_engine_kit/generated/
BETextInteraction.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9use objc2_ui_kit::*;
10
11use crate::*;
12
13extern_class!(
14 #[unsafe(super(NSObject))]
16 #[thread_kind = MainThreadOnly]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct BETextInteraction;
19);
20
21extern_conformance!(
22 unsafe impl NSObjectProtocol for BETextInteraction {}
23);
24
25extern_conformance!(
26 unsafe impl UIInteraction for BETextInteraction {}
27);
28
29impl BETextInteraction {
30 extern_methods!(
31 #[cfg(feature = "BETextInteractionDelegate")]
32 #[unsafe(method(delegate))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn delegate(
36 &self,
37 ) -> Option<Retained<ProtocolObject<dyn BETextInteractionDelegate>>>;
38
39 #[cfg(feature = "BETextInteractionDelegate")]
40 #[unsafe(method(setDelegate:))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn setDelegate(
46 &self,
47 delegate: Option<&ProtocolObject<dyn BETextInteractionDelegate>>,
48 );
49
50 #[cfg(feature = "objc2-core-foundation")]
51 #[unsafe(method(addShortcutForText:fromRect:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn addShortcutForText_fromRect(
57 &self,
58 text: &NSString,
59 presentation_rect: CGRect,
60 );
61
62 #[cfg(feature = "objc2-core-foundation")]
63 #[unsafe(method(shareText:fromRect:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn shareText_fromRect(&self, text: &NSString, presentation_rect: CGRect);
67
68 #[cfg(feature = "objc2-core-foundation")]
69 #[unsafe(method(showDictionaryForTextInContext:definingTextInRange:fromRect:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn showDictionaryForTextInContext_definingTextInRange_fromRect(
73 &self,
74 text_with_context: &NSString,
75 range: NSRange,
76 presentation_rect: CGRect,
77 );
78
79 #[cfg(feature = "objc2-core-foundation")]
80 #[unsafe(method(translateText:fromRect:))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn translateText_fromRect(&self, text: &NSString, presentation_rect: CGRect);
84
85 #[unsafe(method(showReplacementsForText:))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn showReplacementsForText(&self, text: &NSString);
92
93 #[unsafe(method(transliterateChineseForText:))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn transliterateChineseForText(&self, text: &NSString);
99
100 #[unsafe(method(presentEditMenuForSelection))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn presentEditMenuForSelection(&self);
104
105 #[unsafe(method(dismissEditMenuForSelection))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn dismissEditMenuForSelection(&self);
109
110 #[unsafe(method(editabilityChanged))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn editabilityChanged(&self);
116
117 #[unsafe(method(refreshKeyboardUI))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn refreshKeyboardUI(&self);
124
125 #[cfg(all(feature = "BETextSelectionTypes", feature = "objc2-core-foundation"))]
126 #[unsafe(method(selectionChangedWithGestureAtPoint:gesture:state:flags:))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn selectionChangedWithGestureAtPoint_gesture_state_flags(
133 &self,
134 point: CGPoint,
135 gesture_type: BEGestureType,
136 gesture_state: UIGestureRecognizerState,
137 flags: BESelectionFlags,
138 );
139
140 #[cfg(all(feature = "BETextSelectionTypes", feature = "objc2-core-foundation"))]
141 #[unsafe(method(selectionBoundaryAdjustedToPoint:touchPhase:flags:))]
146 #[unsafe(method_family = none)]
147 pub unsafe fn selectionBoundaryAdjustedToPoint_touchPhase_flags(
148 &self,
149 point: CGPoint,
150 touch: BESelectionTouchPhase,
151 flags: BESelectionFlags,
152 );
153
154 #[unsafe(method(textSelectionDisplayInteraction))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn textSelectionDisplayInteraction(
158 &self,
159 ) -> Retained<UITextSelectionDisplayInteraction>;
160
161 #[unsafe(method(contextMenuInteractionDelegate))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn contextMenuInteractionDelegate(
165 &self,
166 ) -> Option<Retained<ProtocolObject<dyn UIContextMenuInteractionDelegate>>>;
167
168 #[unsafe(method(setContextMenuInteractionDelegate:))]
172 #[unsafe(method_family = none)]
173 pub unsafe fn setContextMenuInteractionDelegate(
174 &self,
175 context_menu_interaction_delegate: Option<
176 &ProtocolObject<dyn UIContextMenuInteractionDelegate>,
177 >,
178 );
179
180 #[unsafe(method(contextMenuInteraction))]
183 #[unsafe(method_family = none)]
184 pub unsafe fn contextMenuInteraction(&self) -> Retained<UIContextMenuInteraction>;
185 );
186}
187
188impl BETextInteraction {
190 extern_methods!(
191 #[unsafe(method(init))]
192 #[unsafe(method_family = init)]
193 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
194
195 #[unsafe(method(new))]
196 #[unsafe(method_family = new)]
197 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
198 );
199}