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]
80 #[unsafe(method(share:))]
81 #[unsafe(method_family = none)]
82 unsafe fn share(&self, sender: Option<&AnyObject>);
83
84 #[optional]
87 #[unsafe(method(addShortcut:))]
88 #[unsafe(method_family = none)]
89 unsafe fn addShortcut(&self, sender: Option<&AnyObject>);
90
91 #[optional]
94 #[unsafe(method(lookup:))]
95 #[unsafe(method_family = none)]
96 unsafe fn lookup(&self, sender: Option<&AnyObject>);
97
98 #[optional]
101 #[unsafe(method(findSelected:))]
102 #[unsafe(method_family = none)]
103 unsafe fn findSelected(&self, sender: Option<&AnyObject>);
104
105 #[optional]
108 #[unsafe(method(promptForReplace:))]
109 #[unsafe(method_family = none)]
110 unsafe fn promptForReplace(&self, sender: Option<&AnyObject>);
111
112 #[optional]
115 #[unsafe(method(replace:))]
116 #[unsafe(method_family = none)]
117 unsafe fn replace(&self, sender: Option<&AnyObject>);
118
119 #[optional]
122 #[unsafe(method(translate:))]
123 #[unsafe(method_family = none)]
124 unsafe fn translate(&self, sender: Option<&AnyObject>);
125
126 #[optional]
129 #[unsafe(method(transliterateChinese:))]
130 #[unsafe(method_family = none)]
131 unsafe fn transliterateChinese(&self, sender: Option<&AnyObject>);
132 }
133);
134
135extern_protocol!(
136 pub unsafe trait BETextSelectionDirectionNavigation {
138 #[unsafe(method(moveInLayoutDirection:))]
140 #[unsafe(method_family = none)]
141 unsafe fn moveInLayoutDirection(&self, direction: UITextLayoutDirection);
142
143 #[unsafe(method(extendInLayoutDirection:))]
145 #[unsafe(method_family = none)]
146 unsafe fn extendInLayoutDirection(&self, direction: UITextLayoutDirection);
147
148 #[unsafe(method(moveInStorageDirection:byGranularity:))]
155 #[unsafe(method_family = none)]
156 unsafe fn moveInStorageDirection_byGranularity(
157 &self,
158 direction: UITextStorageDirection,
159 granularity: UITextGranularity,
160 );
161
162 #[unsafe(method(extendInStorageDirection:byGranularity:))]
169 #[unsafe(method_family = none)]
170 unsafe fn extendInStorageDirection_byGranularity(
171 &self,
172 direction: UITextStorageDirection,
173 granularity: UITextGranularity,
174 );
175 }
176);
177
178extern_protocol!(
179 pub unsafe trait BEExtendedTextInputTraits: UITextInputTraits {
181 #[optional]
183 #[unsafe(method(isSingleLineDocument))]
184 #[unsafe(method_family = none)]
185 unsafe fn isSingleLineDocument(&self) -> bool;
186
187 #[optional]
189 #[unsafe(method(isTypingAdaptationEnabled))]
190 #[unsafe(method_family = none)]
191 unsafe fn isTypingAdaptationEnabled(&self) -> bool;
192
193 #[optional]
195 #[unsafe(method(insertionPointColor))]
196 #[unsafe(method_family = none)]
197 unsafe fn insertionPointColor(&self) -> Option<Retained<UIColor>>;
198
199 #[optional]
201 #[unsafe(method(selectionHandleColor))]
202 #[unsafe(method_family = none)]
203 unsafe fn selectionHandleColor(&self) -> Option<Retained<UIColor>>;
204
205 #[optional]
207 #[unsafe(method(selectionHighlightColor))]
208 #[unsafe(method_family = none)]
209 unsafe fn selectionHighlightColor(&self) -> Option<Retained<UIColor>>;
210 }
211);
212
213extern_protocol!(
214 pub unsafe trait BETextInput:
216 UIKeyInput + BETextSelectionDirectionNavigation + BEResponderEditActions
217 {
218 #[cfg(feature = "BETextInputDelegate")]
219 #[unsafe(method(asyncInputDelegate))]
221 #[unsafe(method_family = none)]
222 unsafe fn asyncInputDelegate(
223 &self,
224 ) -> Option<Retained<ProtocolObject<dyn BETextInputDelegate>>>;
225
226 #[cfg(feature = "BETextInputDelegate")]
227 #[unsafe(method(setAsyncInputDelegate:))]
230 #[unsafe(method_family = none)]
231 unsafe fn setAsyncInputDelegate(
232 &self,
233 async_input_delegate: Option<&ProtocolObject<dyn BETextInputDelegate>>,
234 );
235
236 #[unsafe(method(canPerformAction:withSender:))]
238 #[unsafe(method_family = none)]
239 unsafe fn canPerformAction_withSender(
240 &self,
241 action: Sel,
242 sender: Option<&AnyObject>,
243 ) -> bool;
244
245 #[unsafe(method(isEditable))]
247 #[unsafe(method_family = none)]
248 unsafe fn isEditable(&self) -> bool;
249
250 #[cfg(all(feature = "BEKeyEntry", feature = "block2"))]
251 #[unsafe(method(handleKeyEntry:withCompletionHandler:))]
253 #[unsafe(method_family = none)]
254 unsafe fn handleKeyEntry_withCompletionHandler(
255 &self,
256 entry: &BEKeyEntry,
257 completion_handler: &block2::DynBlock<dyn Fn(NonNull<BEKeyEntry>, Bool)>,
258 );
259
260 #[unsafe(method(shiftKeyStateChangedFromState:toState:))]
262 #[unsafe(method_family = none)]
263 unsafe fn shiftKeyStateChangedFromState_toState(
264 &self,
265 old_state: BEKeyModifierFlags,
266 new_state: BEKeyModifierFlags,
267 );
268
269 #[unsafe(method(textInRange:))]
271 #[unsafe(method_family = none)]
272 unsafe fn textInRange(&self, range: &UITextRange) -> Option<Retained<NSString>>;
273
274 #[unsafe(method(offsetFromPosition:toPosition:))]
276 #[unsafe(method_family = none)]
277 unsafe fn offsetFromPosition_toPosition(
278 &self,
279 from: &UITextPosition,
280 to_position: &UITextPosition,
281 ) -> NSInteger;
282
283 #[unsafe(method(setBaseWritingDirection:forRange:))]
285 #[unsafe(method_family = none)]
286 unsafe fn setBaseWritingDirection_forRange(
287 &self,
288 writing_direction: NSWritingDirection,
289 range: &UITextRange,
290 );
291
292 #[unsafe(method(deleteInDirection:toGranularity:))]
305 #[unsafe(method_family = none)]
306 unsafe fn deleteInDirection_toGranularity(
307 &self,
308 direction: UITextStorageDirection,
309 granularity: UITextGranularity,
310 );
311
312 #[unsafe(method(transposeCharactersAroundSelection))]
314 #[unsafe(method_family = none)]
315 unsafe fn transposeCharactersAroundSelection(&self);
316
317 #[cfg(feature = "block2")]
318 #[unsafe(method(replaceText:withText:options:completionHandler:))]
324 #[unsafe(method_family = none)]
325 unsafe fn replaceText_withText_options_completionHandler(
326 &self,
327 original_text: &NSString,
328 replacement_text: &NSString,
329 options: BETextReplacementOptions,
330 completion_handler: &block2::DynBlock<dyn Fn(NonNull<NSArray<UITextSelectionRect>>)>,
331 );
332
333 #[cfg(all(feature = "BETextDocumentContext", feature = "block2"))]
334 #[unsafe(method(requestTextContextForAutocorrectionWithCompletionHandler:))]
337 #[unsafe(method_family = none)]
338 unsafe fn requestTextContextForAutocorrectionWithCompletionHandler(
339 &self,
340 completion_handler: &block2::DynBlock<dyn Fn(NonNull<BETextDocumentContext>)>,
341 );
342
343 #[cfg(feature = "block2")]
344 #[unsafe(method(requestTextRectsForString:withCompletionHandler:))]
348 #[unsafe(method_family = none)]
349 unsafe fn requestTextRectsForString_withCompletionHandler(
350 &self,
351 input: &NSString,
352 completion_handler: &block2::DynBlock<dyn Fn(NonNull<NSArray<UITextSelectionRect>>)>,
353 );
354
355 #[unsafe(method(automaticallyPresentEditMenu))]
357 #[unsafe(method_family = none)]
358 unsafe fn automaticallyPresentEditMenu(&self) -> bool;
359
360 #[cfg(feature = "block2")]
361 #[unsafe(method(requestPreferredArrowDirectionForEditMenuWithCompletionHandler:))]
364 #[unsafe(method_family = none)]
365 unsafe fn requestPreferredArrowDirectionForEditMenuWithCompletionHandler(
366 &self,
367 completion_handler: &block2::DynBlock<dyn Fn(UIEditMenuArrowDirection)>,
368 );
369
370 #[unsafe(method(systemWillPresentEditMenuWithAnimator:))]
372 #[unsafe(method_family = none)]
373 unsafe fn systemWillPresentEditMenuWithAnimator(
374 &self,
375 animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>,
376 );
377
378 #[unsafe(method(systemWillDismissEditMenuWithAnimator:))]
380 #[unsafe(method_family = none)]
381 unsafe fn systemWillDismissEditMenuWithAnimator(
382 &self,
383 animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>,
384 );
385
386 #[unsafe(method(extendedTextInputTraits))]
388 #[unsafe(method_family = none)]
389 unsafe fn extendedTextInputTraits(
390 &self,
391 ) -> Option<Retained<ProtocolObject<dyn BEExtendedTextInputTraits>>>;
392
393 #[unsafe(method(textStylingAtPosition:inDirection:))]
397 #[unsafe(method_family = none)]
398 unsafe fn textStylingAtPosition_inDirection(
399 &self,
400 position: &UITextPosition,
401 direction: UITextStorageDirection,
402 ) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>;
403
404 #[unsafe(method(isReplaceAllowed))]
409 #[unsafe(method_family = none)]
410 unsafe fn isReplaceAllowed(&self) -> bool;
411
412 #[unsafe(method(replaceSelectedText:withText:))]
418 #[unsafe(method_family = none)]
419 unsafe fn replaceSelectedText_withText(&self, text: &NSString, replacement_text: &NSString);
420
421 #[cfg(all(feature = "BETextSelectionTypes", feature = "objc2-core-foundation"))]
422 #[unsafe(method(updateCurrentSelectionTo:fromGesture:inState:))]
427 #[unsafe(method_family = none)]
428 unsafe fn updateCurrentSelectionTo_fromGesture_inState(
429 &self,
430 point: CGPoint,
431 gesture_type: BEGestureType,
432 state: UIGestureRecognizerState,
433 );
434
435 #[cfg(all(feature = "BETextSelectionTypes", feature = "objc2-core-foundation"))]
436 #[unsafe(method(setSelectionFromPoint:toPoint:gesture:state:))]
442 #[unsafe(method_family = none)]
443 unsafe fn setSelectionFromPoint_toPoint_gesture_state(
444 &self,
445 from: CGPoint,
446 to: CGPoint,
447 gesture: BEGestureType,
448 state: UIGestureRecognizerState,
449 );
450
451 #[cfg(all(feature = "BETextSelectionTypes", feature = "objc2-core-foundation"))]
452 #[unsafe(method(adjustSelectionBoundaryToPoint:touchPhase:baseIsStart:flags:))]
459 #[unsafe(method_family = none)]
460 unsafe fn adjustSelectionBoundaryToPoint_touchPhase_baseIsStart_flags(
461 &self,
462 point: CGPoint,
463 touch: BESelectionTouchPhase,
464 boundary_is_start: bool,
465 flags: BESelectionFlags,
466 );
467
468 #[cfg(all(feature = "BETextSelectionTypes", feature = "objc2-core-foundation"))]
469 #[unsafe(method(textInteractionGesture:shouldBeginAtPoint:))]
471 #[unsafe(method_family = none)]
472 unsafe fn textInteractionGesture_shouldBeginAtPoint(
473 &self,
474 gesture_type: BEGestureType,
475 point: CGPoint,
476 ) -> bool;
477
478 #[unsafe(method(selectedText))]
480 #[unsafe(method_family = none)]
481 unsafe fn selectedText(&self) -> Option<Retained<NSString>>;
482
483 #[unsafe(method(selectedTextRange))]
488 #[unsafe(method_family = none)]
489 unsafe fn selectedTextRange(&self) -> Option<Retained<UITextRange>>;
490
491 #[unsafe(method(setSelectedTextRange:))]
493 #[unsafe(method_family = none)]
494 unsafe fn setSelectedTextRange(&self, selected_text_range: Option<&UITextRange>);
495
496 #[unsafe(method(isSelectionAtDocumentStart))]
498 #[unsafe(method_family = none)]
499 unsafe fn isSelectionAtDocumentStart(&self) -> bool;
500
501 #[cfg(feature = "objc2-core-foundation")]
502 #[unsafe(method(caretRectForPosition:))]
504 #[unsafe(method_family = none)]
505 unsafe fn caretRectForPosition(&self, position: &UITextPosition) -> CGRect;
506
507 #[unsafe(method(selectionRectsForRange:))]
509 #[unsafe(method_family = none)]
510 unsafe fn selectionRectsForRange(
511 &self,
512 range: &UITextRange,
513 ) -> Retained<NSArray<UITextSelectionRect>>;
514
515 #[unsafe(method(selectWordForReplacement))]
517 #[unsafe(method_family = none)]
518 unsafe fn selectWordForReplacement(&self);
519
520 #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
521 #[unsafe(method(updateSelectionWithExtentPoint:boundary:completionHandler:))]
526 #[unsafe(method_family = none)]
527 unsafe fn updateSelectionWithExtentPoint_boundary_completionHandler(
528 &self,
529 point: CGPoint,
530 granularity: UITextGranularity,
531 completion_handler: &block2::DynBlock<dyn Fn(Bool)>,
532 );
533
534 #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
535 #[unsafe(method(selectTextInGranularity:atPoint:completionHandler:))]
537 #[unsafe(method_family = none)]
538 unsafe fn selectTextInGranularity_atPoint_completionHandler(
539 &self,
540 granularity: UITextGranularity,
541 point: CGPoint,
542 completion_handler: &block2::DynBlock<dyn Fn()>,
543 );
544
545 #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
546 #[unsafe(method(selectPositionAtPoint:completionHandler:))]
548 #[unsafe(method_family = none)]
549 unsafe fn selectPositionAtPoint_completionHandler(
550 &self,
551 point: CGPoint,
552 completion_handler: &block2::DynBlock<dyn Fn()>,
553 );
554
555 #[cfg(all(
556 feature = "BETextDocumentContext",
557 feature = "BETextDocumentRequest",
558 feature = "block2",
559 feature = "objc2-core-foundation"
560 ))]
561 #[unsafe(method(selectPositionAtPoint:withContextRequest:completionHandler:))]
563 #[unsafe(method_family = none)]
564 unsafe fn selectPositionAtPoint_withContextRequest_completionHandler(
565 &self,
566 point: CGPoint,
567 request: &BETextDocumentRequest,
568 completion_handler: &block2::DynBlock<dyn Fn(NonNull<BETextDocumentContext>)>,
569 );
570
571 #[cfg(feature = "block2")]
572 #[unsafe(method(adjustSelectionByRange:completionHandler:))]
578 #[unsafe(method_family = none)]
579 unsafe fn adjustSelectionByRange_completionHandler(
580 &self,
581 range: BEDirectionalTextRange,
582 completion_handler: &block2::DynBlock<dyn Fn()>,
583 );
584
585 #[unsafe(method(moveByOffset:))]
587 #[unsafe(method_family = none)]
588 unsafe fn moveByOffset(&self, offset: NSInteger);
589
590 #[cfg(feature = "block2")]
591 #[unsafe(method(moveSelectionAtBoundary:inStorageDirection:completionHandler:))]
596 #[unsafe(method_family = none)]
597 unsafe fn moveSelectionAtBoundary_inStorageDirection_completionHandler(
598 &self,
599 granularity: UITextGranularity,
600 direction: UITextStorageDirection,
601 completion_handler: &block2::DynBlock<dyn Fn()>,
602 );
603
604 #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
605 #[unsafe(method(selectTextForEditMenuWithLocationInView:completionHandler:))]
613 #[unsafe(method_family = none)]
614 unsafe fn selectTextForEditMenuWithLocationInView_completionHandler(
615 &self,
616 location_in_view: CGPoint,
617 completion_handler: &block2::DynBlock<dyn Fn(Bool, *mut NSString, NSRange)>,
618 );
619
620 #[unsafe(method(markedText))]
622 #[unsafe(method_family = none)]
623 unsafe fn markedText(&self) -> Option<Retained<NSString>>;
624
625 #[unsafe(method(attributedMarkedText))]
627 #[unsafe(method_family = none)]
628 unsafe fn attributedMarkedText(&self) -> Option<Retained<NSAttributedString>>;
629
630 #[unsafe(method(markedTextRange))]
642 #[unsafe(method_family = none)]
643 unsafe fn markedTextRange(&self) -> Option<Retained<UITextRange>>;
644
645 #[unsafe(method(hasMarkedText))]
647 #[unsafe(method_family = none)]
648 unsafe fn hasMarkedText(&self) -> bool;
649
650 #[unsafe(method(setMarkedText:selectedRange:))]
652 #[unsafe(method_family = none)]
653 unsafe fn setMarkedText_selectedRange(
654 &self,
655 marked_text: Option<&NSString>,
656 selected_range: NSRange,
657 );
658
659 #[unsafe(method(setAttributedMarkedText:selectedRange:))]
661 #[unsafe(method_family = none)]
662 unsafe fn setAttributedMarkedText_selectedRange(
663 &self,
664 marked_text: Option<&NSAttributedString>,
665 selected_range: NSRange,
666 );
667
668 #[unsafe(method(unmarkText))]
670 #[unsafe(method_family = none)]
671 unsafe fn unmarkText(&self);
672
673 #[cfg(feature = "objc2-core-foundation")]
674 #[unsafe(method(isPointNearMarkedText:))]
679 #[unsafe(method_family = none)]
680 unsafe fn isPointNearMarkedText(&self, point: CGPoint) -> bool;
681
682 #[cfg(all(
683 feature = "BETextDocumentContext",
684 feature = "BETextDocumentRequest",
685 feature = "block2"
686 ))]
687 #[unsafe(method(requestDocumentContext:completionHandler:))]
689 #[unsafe(method_family = none)]
690 unsafe fn requestDocumentContext_completionHandler(
691 &self,
692 request: &BETextDocumentRequest,
693 completion_handler: &block2::DynBlock<dyn Fn(NonNull<BETextDocumentContext>)>,
694 );
695
696 #[unsafe(method(willInsertFinalDictationResult))]
698 #[unsafe(method_family = none)]
699 unsafe fn willInsertFinalDictationResult(&self);
700
701 #[unsafe(method(replaceDictatedText:withText:))]
703 #[unsafe(method_family = none)]
704 unsafe fn replaceDictatedText_withText(&self, old_text: &NSString, new_text: &NSString);
705
706 #[unsafe(method(didInsertFinalDictationResult))]
708 #[unsafe(method_family = none)]
709 unsafe fn didInsertFinalDictationResult(&self);
710
711 #[cfg(feature = "BETextAlternatives")]
712 #[unsafe(method(alternativesForSelectedText))]
714 #[unsafe(method_family = none)]
715 unsafe fn alternativesForSelectedText(
716 &self,
717 ) -> Option<Retained<NSArray<BETextAlternatives>>>;
718
719 #[cfg(feature = "BETextAlternatives")]
720 #[unsafe(method(addTextAlternatives:))]
722 #[unsafe(method_family = none)]
723 unsafe fn addTextAlternatives(&self, alternatives: &BETextAlternatives);
724
725 #[cfg(feature = "BETextAlternatives")]
726 #[unsafe(method(insertTextAlternatives:))]
728 #[unsafe(method_family = none)]
729 unsafe fn insertTextAlternatives(&self, alternatives: &BETextAlternatives);
730
731 #[optional]
733 #[unsafe(method(removeTextAlternatives))]
734 #[unsafe(method_family = none)]
735 unsafe fn removeTextAlternatives(&self);
736
737 #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
738 #[unsafe(method(insertTextPlaceholderWithSize:completionHandler:))]
742 #[unsafe(method_family = none)]
743 unsafe fn insertTextPlaceholderWithSize_completionHandler(
744 &self,
745 size: CGSize,
746 completion_handler: &block2::DynBlock<dyn Fn(NonNull<UITextPlaceholder>)>,
747 );
748
749 #[cfg(feature = "block2")]
750 #[unsafe(method(removeTextPlaceholder:willInsertText:completionHandler:))]
752 #[unsafe(method_family = none)]
753 unsafe fn removeTextPlaceholder_willInsertText_completionHandler(
754 &self,
755 placeholder: &UITextPlaceholder,
756 will_insert_text: bool,
757 completion_handler: &block2::DynBlock<dyn Fn()>,
758 );
759
760 #[cfg(feature = "BETextSuggestion")]
761 #[unsafe(method(insertTextSuggestion:))]
763 #[unsafe(method_family = none)]
764 unsafe fn insertTextSuggestion(&self, text_suggestion: &BETextSuggestion);
765
766 #[unsafe(method(textInputView))]
768 #[unsafe(method_family = none)]
769 unsafe fn textInputView(&self) -> Retained<UIView>;
770
771 #[cfg(feature = "objc2-core-foundation")]
772 #[unsafe(method(textFirstRect))]
776 #[unsafe(method_family = none)]
777 unsafe fn textFirstRect(&self) -> CGRect;
778
779 #[cfg(feature = "objc2-core-foundation")]
780 #[unsafe(method(textLastRect))]
785 #[unsafe(method_family = none)]
786 unsafe fn textLastRect(&self) -> CGRect;
787
788 #[cfg(feature = "objc2-core-foundation")]
789 #[unsafe(method(unobscuredContentRect))]
793 #[unsafe(method_family = none)]
794 unsafe fn unobscuredContentRect(&self) -> CGRect;
795
796 #[unsafe(method(unscaledView))]
799 #[unsafe(method_family = none)]
800 unsafe fn unscaledView(&self) -> Retained<UIView>;
801
802 #[cfg(feature = "objc2-core-foundation")]
803 #[unsafe(method(selectionClipRect))]
805 #[unsafe(method_family = none)]
806 unsafe fn selectionClipRect(&self) -> CGRect;
807
808 #[cfg(feature = "objc2-core-foundation")]
809 #[unsafe(method(autoscrollToPoint:))]
815 #[unsafe(method_family = none)]
816 unsafe fn autoscrollToPoint(&self, point: CGPoint);
817
818 #[unsafe(method(cancelAutoscroll))]
822 #[unsafe(method_family = none)]
823 unsafe fn cancelAutoscroll(&self);
824
825 #[optional]
827 #[unsafe(method(keyboardWillDismiss))]
828 #[unsafe(method_family = none)]
829 unsafe fn keyboardWillDismiss(&self);
830 }
831);