1use 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
13#[repr(C)]
15#[derive(Clone, Copy, Debug, PartialEq)]
16pub struct BEDirectionalTextRange {
17 pub offset: NSInteger,
18 pub length: NSInteger,
19}
20
21unsafe impl Encode for BEDirectionalTextRange {
22 const ENCODING: Encoding =
23 Encoding::Struct("?", &[<NSInteger>::ENCODING, <NSInteger>::ENCODING]);
24}
25
26unsafe impl RefEncode for BEDirectionalTextRange {
27 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
28}
29
30#[repr(transparent)]
33#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
34pub struct BETextReplacementOptions(pub NSUInteger);
35bitflags::bitflags! {
36 impl BETextReplacementOptions: NSUInteger {
37 #[doc(alias = "BETextReplacementOptionsNone")]
38 const None = 0;
39 #[doc(alias = "BETextReplacementOptionsAddUnderline")]
40 const AddUnderline = 1<<0;
41 }
42}
43
44unsafe impl Encode for BETextReplacementOptions {
45 const ENCODING: Encoding = NSUInteger::ENCODING;
46}
47
48unsafe impl RefEncode for BETextReplacementOptions {
49 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
50}
51
52#[repr(transparent)]
55#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
56pub struct BEKeyModifierFlags(pub NSInteger);
57impl BEKeyModifierFlags {
58 #[doc(alias = "BEKeyModifierFlagNone")]
59 pub const None: Self = Self(0);
60 #[doc(alias = "BEKeyModifierFlagShift")]
61 pub const Shift: Self = Self(1);
62 #[doc(alias = "BEKeyModifierFlagCapsLock")]
63 pub const CapsLock: Self = Self(2);
64}
65
66unsafe impl Encode for BEKeyModifierFlags {
67 const ENCODING: Encoding = NSInteger::ENCODING;
68}
69
70unsafe impl RefEncode for BEKeyModifierFlags {
71 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
72}
73
74extern_protocol!(
75 pub unsafe trait BEResponderEditActions: UIResponderStandardEditActions {
77 #[optional]
84 #[unsafe(method(share:))]
85 #[unsafe(method_family = none)]
86 unsafe fn share(&self, sender: Option<&AnyObject>);
87
88 #[optional]
95 #[unsafe(method(addShortcut:))]
96 #[unsafe(method_family = none)]
97 unsafe fn addShortcut(&self, sender: Option<&AnyObject>);
98
99 #[optional]
106 #[unsafe(method(lookup:))]
107 #[unsafe(method_family = none)]
108 unsafe fn lookup(&self, sender: Option<&AnyObject>);
109
110 #[optional]
117 #[unsafe(method(findSelected:))]
118 #[unsafe(method_family = none)]
119 unsafe fn findSelected(&self, sender: Option<&AnyObject>);
120
121 #[optional]
128 #[unsafe(method(promptForReplace:))]
129 #[unsafe(method_family = none)]
130 unsafe fn promptForReplace(&self, sender: Option<&AnyObject>);
131
132 #[optional]
139 #[unsafe(method(replace:))]
140 #[unsafe(method_family = none)]
141 unsafe fn replace(&self, sender: Option<&AnyObject>);
142
143 #[optional]
150 #[unsafe(method(translate:))]
151 #[unsafe(method_family = none)]
152 unsafe fn translate(&self, sender: Option<&AnyObject>);
153
154 #[optional]
161 #[unsafe(method(transliterateChinese:))]
162 #[unsafe(method_family = none)]
163 unsafe fn transliterateChinese(&self, sender: Option<&AnyObject>);
164 }
165);
166
167extern_protocol!(
168 pub unsafe trait BETextSelectionDirectionNavigation {
170 #[unsafe(method(moveInLayoutDirection:))]
172 #[unsafe(method_family = none)]
173 unsafe fn moveInLayoutDirection(&self, direction: UITextLayoutDirection);
174
175 #[unsafe(method(extendInLayoutDirection:))]
177 #[unsafe(method_family = none)]
178 unsafe fn extendInLayoutDirection(&self, direction: UITextLayoutDirection);
179
180 #[unsafe(method(moveInStorageDirection:byGranularity:))]
187 #[unsafe(method_family = none)]
188 unsafe fn moveInStorageDirection_byGranularity(
189 &self,
190 direction: UITextStorageDirection,
191 granularity: UITextGranularity,
192 );
193
194 #[unsafe(method(extendInStorageDirection:byGranularity:))]
201 #[unsafe(method_family = none)]
202 unsafe fn extendInStorageDirection_byGranularity(
203 &self,
204 direction: UITextStorageDirection,
205 granularity: UITextGranularity,
206 );
207 }
208);
209
210extern_protocol!(
211 pub unsafe trait BEExtendedTextInputTraits: UITextInputTraits {
213 #[optional]
215 #[unsafe(method(isSingleLineDocument))]
216 #[unsafe(method_family = none)]
217 unsafe fn isSingleLineDocument(&self) -> bool;
218
219 #[optional]
221 #[unsafe(method(isTypingAdaptationEnabled))]
222 #[unsafe(method_family = none)]
223 unsafe fn isTypingAdaptationEnabled(&self) -> bool;
224
225 #[optional]
227 #[unsafe(method(insertionPointColor))]
228 #[unsafe(method_family = none)]
229 unsafe fn insertionPointColor(&self) -> Option<Retained<UIColor>>;
230
231 #[optional]
233 #[unsafe(method(selectionHandleColor))]
234 #[unsafe(method_family = none)]
235 unsafe fn selectionHandleColor(&self) -> Option<Retained<UIColor>>;
236
237 #[optional]
239 #[unsafe(method(selectionHighlightColor))]
240 #[unsafe(method_family = none)]
241 unsafe fn selectionHighlightColor(&self) -> Option<Retained<UIColor>>;
242 }
243);
244
245extern_protocol!(
246 pub unsafe trait BETextInput:
248 UIKeyInput + BETextSelectionDirectionNavigation + BEResponderEditActions
249 {
250 #[cfg(feature = "BETextInputDelegate")]
251 #[unsafe(method(asyncInputDelegate))]
253 #[unsafe(method_family = none)]
254 unsafe fn asyncInputDelegate(
255 &self,
256 ) -> Option<Retained<ProtocolObject<dyn BETextInputDelegate>>>;
257
258 #[cfg(feature = "BETextInputDelegate")]
259 #[unsafe(method(setAsyncInputDelegate:))]
263 #[unsafe(method_family = none)]
264 unsafe fn setAsyncInputDelegate(
265 &self,
266 async_input_delegate: Option<&ProtocolObject<dyn BETextInputDelegate>>,
267 );
268
269 #[unsafe(method(canPerformAction:withSender:))]
276 #[unsafe(method_family = none)]
277 unsafe fn canPerformAction_withSender(
278 &self,
279 action: Sel,
280 sender: Option<&AnyObject>,
281 ) -> bool;
282
283 #[unsafe(method(isEditable))]
285 #[unsafe(method_family = none)]
286 unsafe fn isEditable(&self) -> bool;
287
288 #[cfg(all(feature = "BEKeyEntry", feature = "block2"))]
289 #[unsafe(method(handleKeyEntry:withCompletionHandler:))]
291 #[unsafe(method_family = none)]
292 unsafe fn handleKeyEntry_withCompletionHandler(
293 &self,
294 entry: &BEKeyEntry,
295 completion_handler: &block2::DynBlock<dyn Fn(NonNull<BEKeyEntry>, Bool)>,
296 );
297
298 #[unsafe(method(shiftKeyStateChangedFromState:toState:))]
300 #[unsafe(method_family = none)]
301 unsafe fn shiftKeyStateChangedFromState_toState(
302 &self,
303 old_state: BEKeyModifierFlags,
304 new_state: BEKeyModifierFlags,
305 );
306
307 #[unsafe(method(textInRange:))]
309 #[unsafe(method_family = none)]
310 unsafe fn textInRange(&self, range: &UITextRange) -> Option<Retained<NSString>>;
311
312 #[unsafe(method(offsetFromPosition:toPosition:))]
314 #[unsafe(method_family = none)]
315 unsafe fn offsetFromPosition_toPosition(
316 &self,
317 from: &UITextPosition,
318 to_position: &UITextPosition,
319 ) -> NSInteger;
320
321 #[unsafe(method(setBaseWritingDirection:forRange:))]
323 #[unsafe(method_family = none)]
324 unsafe fn setBaseWritingDirection_forRange(
325 &self,
326 writing_direction: NSWritingDirection,
327 range: &UITextRange,
328 );
329
330 #[unsafe(method(deleteInDirection:toGranularity:))]
343 #[unsafe(method_family = none)]
344 unsafe fn deleteInDirection_toGranularity(
345 &self,
346 direction: UITextStorageDirection,
347 granularity: UITextGranularity,
348 );
349
350 #[unsafe(method(transposeCharactersAroundSelection))]
352 #[unsafe(method_family = none)]
353 unsafe fn transposeCharactersAroundSelection(&self);
354
355 #[cfg(feature = "block2")]
356 #[unsafe(method(replaceText:withText:options:completionHandler:))]
362 #[unsafe(method_family = none)]
363 unsafe fn replaceText_withText_options_completionHandler(
364 &self,
365 original_text: &NSString,
366 replacement_text: &NSString,
367 options: BETextReplacementOptions,
368 completion_handler: &block2::DynBlock<dyn Fn(NonNull<NSArray<UITextSelectionRect>>)>,
369 );
370
371 #[cfg(all(feature = "BETextDocumentContext", feature = "block2"))]
372 #[unsafe(method(requestTextContextForAutocorrectionWithCompletionHandler:))]
375 #[unsafe(method_family = none)]
376 unsafe fn requestTextContextForAutocorrectionWithCompletionHandler(
377 &self,
378 completion_handler: &block2::DynBlock<dyn Fn(NonNull<BETextDocumentContext>)>,
379 );
380
381 #[cfg(feature = "block2")]
382 #[unsafe(method(requestTextRectsForString:withCompletionHandler:))]
386 #[unsafe(method_family = none)]
387 unsafe fn requestTextRectsForString_withCompletionHandler(
388 &self,
389 input: &NSString,
390 completion_handler: &block2::DynBlock<dyn Fn(NonNull<NSArray<UITextSelectionRect>>)>,
391 );
392
393 #[unsafe(method(automaticallyPresentEditMenu))]
395 #[unsafe(method_family = none)]
396 unsafe fn automaticallyPresentEditMenu(&self) -> bool;
397
398 #[cfg(feature = "block2")]
399 #[unsafe(method(requestPreferredArrowDirectionForEditMenuWithCompletionHandler:))]
402 #[unsafe(method_family = none)]
403 unsafe fn requestPreferredArrowDirectionForEditMenuWithCompletionHandler(
404 &self,
405 completion_handler: &block2::DynBlock<dyn Fn(UIEditMenuArrowDirection)>,
406 );
407
408 #[unsafe(method(systemWillPresentEditMenuWithAnimator:))]
410 #[unsafe(method_family = none)]
411 unsafe fn systemWillPresentEditMenuWithAnimator(
412 &self,
413 animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>,
414 );
415
416 #[unsafe(method(systemWillDismissEditMenuWithAnimator:))]
418 #[unsafe(method_family = none)]
419 unsafe fn systemWillDismissEditMenuWithAnimator(
420 &self,
421 animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>,
422 );
423
424 #[unsafe(method(extendedTextInputTraits))]
426 #[unsafe(method_family = none)]
427 unsafe fn extendedTextInputTraits(
428 &self,
429 ) -> Option<Retained<ProtocolObject<dyn BEExtendedTextInputTraits>>>;
430
431 #[unsafe(method(textStylingAtPosition:inDirection:))]
435 #[unsafe(method_family = none)]
436 unsafe fn textStylingAtPosition_inDirection(
437 &self,
438 position: &UITextPosition,
439 direction: UITextStorageDirection,
440 ) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>;
441
442 #[unsafe(method(isReplaceAllowed))]
447 #[unsafe(method_family = none)]
448 unsafe fn isReplaceAllowed(&self) -> bool;
449
450 #[unsafe(method(replaceSelectedText:withText:))]
456 #[unsafe(method_family = none)]
457 unsafe fn replaceSelectedText_withText(&self, text: &NSString, replacement_text: &NSString);
458
459 #[cfg(all(feature = "BETextSelectionTypes", feature = "objc2-core-foundation"))]
460 #[unsafe(method(updateCurrentSelectionTo:fromGesture:inState:))]
465 #[unsafe(method_family = none)]
466 unsafe fn updateCurrentSelectionTo_fromGesture_inState(
467 &self,
468 point: CGPoint,
469 gesture_type: BEGestureType,
470 state: UIGestureRecognizerState,
471 );
472
473 #[cfg(all(feature = "BETextSelectionTypes", feature = "objc2-core-foundation"))]
474 #[unsafe(method(setSelectionFromPoint:toPoint:gesture:state:))]
480 #[unsafe(method_family = none)]
481 unsafe fn setSelectionFromPoint_toPoint_gesture_state(
482 &self,
483 from: CGPoint,
484 to: CGPoint,
485 gesture: BEGestureType,
486 state: UIGestureRecognizerState,
487 );
488
489 #[cfg(all(feature = "BETextSelectionTypes", feature = "objc2-core-foundation"))]
490 #[unsafe(method(adjustSelectionBoundaryToPoint:touchPhase:baseIsStart:flags:))]
497 #[unsafe(method_family = none)]
498 unsafe fn adjustSelectionBoundaryToPoint_touchPhase_baseIsStart_flags(
499 &self,
500 point: CGPoint,
501 touch: BESelectionTouchPhase,
502 boundary_is_start: bool,
503 flags: BESelectionFlags,
504 );
505
506 #[cfg(all(feature = "BETextSelectionTypes", feature = "objc2-core-foundation"))]
507 #[unsafe(method(textInteractionGesture:shouldBeginAtPoint:))]
509 #[unsafe(method_family = none)]
510 unsafe fn textInteractionGesture_shouldBeginAtPoint(
511 &self,
512 gesture_type: BEGestureType,
513 point: CGPoint,
514 ) -> bool;
515
516 #[optional]
520 #[unsafe(method(selectionContainerViewBelowText))]
521 #[unsafe(method_family = none)]
522 unsafe fn selectionContainerViewBelowText(&self) -> Option<Retained<UIView>>;
523
524 #[optional]
528 #[unsafe(method(selectionContainerViewAboveText))]
529 #[unsafe(method_family = none)]
530 unsafe fn selectionContainerViewAboveText(&self) -> Option<Retained<UIView>>;
531
532 #[unsafe(method(selectedText))]
534 #[unsafe(method_family = none)]
535 unsafe fn selectedText(&self) -> Option<Retained<NSString>>;
536
537 #[unsafe(method(selectedTextRange))]
542 #[unsafe(method_family = none)]
543 unsafe fn selectedTextRange(&self) -> Option<Retained<UITextRange>>;
544
545 #[unsafe(method(setSelectedTextRange:))]
549 #[unsafe(method_family = none)]
550 unsafe fn setSelectedTextRange(&self, selected_text_range: Option<&UITextRange>);
551
552 #[unsafe(method(isSelectionAtDocumentStart))]
554 #[unsafe(method_family = none)]
555 unsafe fn isSelectionAtDocumentStart(&self) -> bool;
556
557 #[cfg(feature = "objc2-core-foundation")]
558 #[unsafe(method(caretRectForPosition:))]
560 #[unsafe(method_family = none)]
561 unsafe fn caretRectForPosition(&self, position: &UITextPosition) -> CGRect;
562
563 #[unsafe(method(selectionRectsForRange:))]
565 #[unsafe(method_family = none)]
566 unsafe fn selectionRectsForRange(
567 &self,
568 range: &UITextRange,
569 ) -> Retained<NSArray<UITextSelectionRect>>;
570
571 #[unsafe(method(selectWordForReplacement))]
573 #[unsafe(method_family = none)]
574 unsafe fn selectWordForReplacement(&self);
575
576 #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
577 #[unsafe(method(updateSelectionWithExtentPoint:boundary:completionHandler:))]
582 #[unsafe(method_family = none)]
583 unsafe fn updateSelectionWithExtentPoint_boundary_completionHandler(
584 &self,
585 point: CGPoint,
586 granularity: UITextGranularity,
587 completion_handler: &block2::DynBlock<dyn Fn(Bool)>,
588 );
589
590 #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
591 #[unsafe(method(selectTextInGranularity:atPoint:completionHandler:))]
593 #[unsafe(method_family = none)]
594 unsafe fn selectTextInGranularity_atPoint_completionHandler(
595 &self,
596 granularity: UITextGranularity,
597 point: CGPoint,
598 completion_handler: &block2::DynBlock<dyn Fn()>,
599 );
600
601 #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
602 #[unsafe(method(selectPositionAtPoint:completionHandler:))]
604 #[unsafe(method_family = none)]
605 unsafe fn selectPositionAtPoint_completionHandler(
606 &self,
607 point: CGPoint,
608 completion_handler: &block2::DynBlock<dyn Fn()>,
609 );
610
611 #[cfg(all(
612 feature = "BETextDocumentContext",
613 feature = "BETextDocumentRequest",
614 feature = "block2",
615 feature = "objc2-core-foundation"
616 ))]
617 #[unsafe(method(selectPositionAtPoint:withContextRequest:completionHandler:))]
619 #[unsafe(method_family = none)]
620 unsafe fn selectPositionAtPoint_withContextRequest_completionHandler(
621 &self,
622 point: CGPoint,
623 request: &BETextDocumentRequest,
624 completion_handler: &block2::DynBlock<dyn Fn(NonNull<BETextDocumentContext>)>,
625 );
626
627 #[cfg(feature = "block2")]
628 #[unsafe(method(adjustSelectionByRange:completionHandler:))]
634 #[unsafe(method_family = none)]
635 unsafe fn adjustSelectionByRange_completionHandler(
636 &self,
637 range: BEDirectionalTextRange,
638 completion_handler: &block2::DynBlock<dyn Fn()>,
639 );
640
641 #[unsafe(method(moveByOffset:))]
643 #[unsafe(method_family = none)]
644 unsafe fn moveByOffset(&self, offset: NSInteger);
645
646 #[cfg(feature = "block2")]
647 #[unsafe(method(moveSelectionAtBoundary:inStorageDirection:completionHandler:))]
652 #[unsafe(method_family = none)]
653 unsafe fn moveSelectionAtBoundary_inStorageDirection_completionHandler(
654 &self,
655 granularity: UITextGranularity,
656 direction: UITextStorageDirection,
657 completion_handler: &block2::DynBlock<dyn Fn()>,
658 );
659
660 #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
661 #[unsafe(method(selectTextForEditMenuWithLocationInView:completionHandler:))]
669 #[unsafe(method_family = none)]
670 unsafe fn selectTextForEditMenuWithLocationInView_completionHandler(
671 &self,
672 location_in_view: CGPoint,
673 completion_handler: &block2::DynBlock<dyn Fn(Bool, *mut NSString, NSRange)>,
674 );
675
676 #[unsafe(method(markedText))]
678 #[unsafe(method_family = none)]
679 unsafe fn markedText(&self) -> Option<Retained<NSString>>;
680
681 #[unsafe(method(attributedMarkedText))]
683 #[unsafe(method_family = none)]
684 unsafe fn attributedMarkedText(&self) -> Option<Retained<NSAttributedString>>;
685
686 #[unsafe(method(markedTextRange))]
698 #[unsafe(method_family = none)]
699 unsafe fn markedTextRange(&self) -> Option<Retained<UITextRange>>;
700
701 #[unsafe(method(hasMarkedText))]
703 #[unsafe(method_family = none)]
704 unsafe fn hasMarkedText(&self) -> bool;
705
706 #[unsafe(method(setMarkedText:selectedRange:))]
708 #[unsafe(method_family = none)]
709 unsafe fn setMarkedText_selectedRange(
710 &self,
711 marked_text: Option<&NSString>,
712 selected_range: NSRange,
713 );
714
715 #[unsafe(method(setAttributedMarkedText:selectedRange:))]
717 #[unsafe(method_family = none)]
718 unsafe fn setAttributedMarkedText_selectedRange(
719 &self,
720 marked_text: Option<&NSAttributedString>,
721 selected_range: NSRange,
722 );
723
724 #[unsafe(method(unmarkText))]
726 #[unsafe(method_family = none)]
727 unsafe fn unmarkText(&self);
728
729 #[cfg(feature = "objc2-core-foundation")]
730 #[unsafe(method(isPointNearMarkedText:))]
735 #[unsafe(method_family = none)]
736 unsafe fn isPointNearMarkedText(&self, point: CGPoint) -> bool;
737
738 #[cfg(all(
739 feature = "BETextDocumentContext",
740 feature = "BETextDocumentRequest",
741 feature = "block2"
742 ))]
743 #[unsafe(method(requestDocumentContext:completionHandler:))]
745 #[unsafe(method_family = none)]
746 unsafe fn requestDocumentContext_completionHandler(
747 &self,
748 request: &BETextDocumentRequest,
749 completion_handler: &block2::DynBlock<dyn Fn(NonNull<BETextDocumentContext>)>,
750 );
751
752 #[unsafe(method(willInsertFinalDictationResult))]
754 #[unsafe(method_family = none)]
755 unsafe fn willInsertFinalDictationResult(&self);
756
757 #[unsafe(method(replaceDictatedText:withText:))]
759 #[unsafe(method_family = none)]
760 unsafe fn replaceDictatedText_withText(&self, old_text: &NSString, new_text: &NSString);
761
762 #[unsafe(method(didInsertFinalDictationResult))]
764 #[unsafe(method_family = none)]
765 unsafe fn didInsertFinalDictationResult(&self);
766
767 #[cfg(feature = "BETextAlternatives")]
768 #[unsafe(method(alternativesForSelectedText))]
770 #[unsafe(method_family = none)]
771 unsafe fn alternativesForSelectedText(
772 &self,
773 ) -> Option<Retained<NSArray<BETextAlternatives>>>;
774
775 #[cfg(feature = "BETextAlternatives")]
776 #[unsafe(method(addTextAlternatives:))]
778 #[unsafe(method_family = none)]
779 unsafe fn addTextAlternatives(&self, alternatives: &BETextAlternatives);
780
781 #[cfg(feature = "BETextAlternatives")]
782 #[unsafe(method(insertTextAlternatives:))]
784 #[unsafe(method_family = none)]
785 unsafe fn insertTextAlternatives(&self, alternatives: &BETextAlternatives);
786
787 #[optional]
789 #[unsafe(method(removeTextAlternatives))]
790 #[unsafe(method_family = none)]
791 unsafe fn removeTextAlternatives(&self);
792
793 #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
794 #[unsafe(method(insertTextPlaceholderWithSize:completionHandler:))]
798 #[unsafe(method_family = none)]
799 unsafe fn insertTextPlaceholderWithSize_completionHandler(
800 &self,
801 size: CGSize,
802 completion_handler: &block2::DynBlock<dyn Fn(NonNull<UITextPlaceholder>)>,
803 );
804
805 #[cfg(feature = "block2")]
806 #[unsafe(method(removeTextPlaceholder:willInsertText:completionHandler:))]
808 #[unsafe(method_family = none)]
809 unsafe fn removeTextPlaceholder_willInsertText_completionHandler(
810 &self,
811 placeholder: &UITextPlaceholder,
812 will_insert_text: bool,
813 completion_handler: &block2::DynBlock<dyn Fn()>,
814 );
815
816 #[cfg(feature = "BETextSuggestion")]
817 #[unsafe(method(insertTextSuggestion:))]
819 #[unsafe(method_family = none)]
820 unsafe fn insertTextSuggestion(&self, text_suggestion: &BETextSuggestion);
821
822 #[unsafe(method(textInputView))]
824 #[unsafe(method_family = none)]
825 unsafe fn textInputView(&self) -> Retained<UIView>;
826
827 #[cfg(feature = "objc2-core-foundation")]
828 #[unsafe(method(textFirstRect))]
832 #[unsafe(method_family = none)]
833 unsafe fn textFirstRect(&self) -> CGRect;
834
835 #[cfg(feature = "objc2-core-foundation")]
836 #[unsafe(method(textLastRect))]
841 #[unsafe(method_family = none)]
842 unsafe fn textLastRect(&self) -> CGRect;
843
844 #[cfg(feature = "objc2-core-foundation")]
845 #[unsafe(method(unobscuredContentRect))]
849 #[unsafe(method_family = none)]
850 unsafe fn unobscuredContentRect(&self) -> CGRect;
851
852 #[unsafe(method(unscaledView))]
855 #[unsafe(method_family = none)]
856 unsafe fn unscaledView(&self) -> Retained<UIView>;
857
858 #[cfg(feature = "objc2-core-foundation")]
859 #[unsafe(method(selectionClipRect))]
861 #[unsafe(method_family = none)]
862 unsafe fn selectionClipRect(&self) -> CGRect;
863
864 #[cfg(feature = "objc2-core-foundation")]
865 #[unsafe(method(autoscrollToPoint:))]
871 #[unsafe(method_family = none)]
872 unsafe fn autoscrollToPoint(&self, point: CGPoint);
873
874 #[unsafe(method(cancelAutoscroll))]
878 #[unsafe(method_family = none)]
879 unsafe fn cancelAutoscroll(&self);
880
881 #[optional]
883 #[unsafe(method(keyboardWillDismiss))]
884 #[unsafe(method_family = none)]
885 unsafe fn keyboardWillDismiss(&self);
886 }
887);