Trait objc2_ui_kit::UITextInput

source ·
pub unsafe trait UITextInput: UIKeyInput + IsMainThreadOnly {
Show 53 methods // Provided methods unsafe fn textInRange( &self, range: &UITextRange ) -> Option<Retained<NSString>> where Self: Sized + Message { ... } unsafe fn replaceRange_withText(&self, range: &UITextRange, text: &NSString) where Self: Sized + Message { ... } unsafe fn selectedTextRange(&self) -> Option<Retained<UITextRange>> where Self: Sized + Message { ... } unsafe fn setSelectedTextRange( &self, selected_text_range: Option<&UITextRange> ) where Self: Sized + Message { ... } unsafe fn markedTextRange(&self) -> Option<Retained<UITextRange>> where Self: Sized + Message { ... } unsafe fn markedTextStyle( &self ) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>> where Self: Sized + Message { ... } unsafe fn setMarkedTextStyle( &self, marked_text_style: Option<&NSDictionary<NSAttributedStringKey, AnyObject>> ) where Self: Sized + Message { ... } unsafe fn setMarkedText_selectedRange( &self, marked_text: Option<&NSString>, selected_range: NSRange ) where Self: Sized + Message { ... } unsafe fn unmarkText(&self) where Self: Sized + Message { ... } unsafe fn beginningOfDocument(&self) -> Retained<UITextPosition> where Self: Sized + Message { ... } unsafe fn endOfDocument(&self) -> Retained<UITextPosition> where Self: Sized + Message { ... } unsafe fn textRangeFromPosition_toPosition( &self, from_position: &UITextPosition, to_position: &UITextPosition ) -> Option<Retained<UITextRange>> where Self: Sized + Message { ... } unsafe fn positionFromPosition_offset( &self, position: &UITextPosition, offset: NSInteger ) -> Option<Retained<UITextPosition>> where Self: Sized + Message { ... } unsafe fn positionFromPosition_inDirection_offset( &self, position: &UITextPosition, direction: UITextLayoutDirection, offset: NSInteger ) -> Option<Retained<UITextPosition>> where Self: Sized + Message { ... } unsafe fn comparePosition_toPosition( &self, position: &UITextPosition, other: &UITextPosition ) -> NSComparisonResult where Self: Sized + Message { ... } unsafe fn offsetFromPosition_toPosition( &self, from: &UITextPosition, to_position: &UITextPosition ) -> NSInteger where Self: Sized + Message { ... } unsafe fn inputDelegate( &self ) -> Option<Retained<ProtocolObject<dyn UITextInputDelegate>>> where Self: Sized + Message { ... } unsafe fn setInputDelegate( &self, input_delegate: Option<&ProtocolObject<dyn UITextInputDelegate>> ) where Self: Sized + Message { ... } unsafe fn tokenizer( &self ) -> Retained<ProtocolObject<dyn UITextInputTokenizer>> where Self: Sized + Message { ... } unsafe fn positionWithinRange_farthestInDirection( &self, range: &UITextRange, direction: UITextLayoutDirection ) -> Option<Retained<UITextPosition>> where Self: Sized + Message { ... } unsafe fn characterRangeByExtendingPosition_inDirection( &self, position: &UITextPosition, direction: UITextLayoutDirection ) -> Option<Retained<UITextRange>> where Self: Sized + Message { ... } unsafe fn baseWritingDirectionForPosition_inDirection( &self, position: &UITextPosition, direction: UITextStorageDirection ) -> NSWritingDirection where Self: Sized + Message { ... } unsafe fn setBaseWritingDirection_forRange( &self, writing_direction: NSWritingDirection, range: &UITextRange ) where Self: Sized + Message { ... } unsafe fn firstRectForRange(&self, range: &UITextRange) -> CGRect where Self: Sized + Message { ... } unsafe fn caretRectForPosition(&self, position: &UITextPosition) -> CGRect where Self: Sized + Message { ... } unsafe fn selectionRectsForRange( &self, range: &UITextRange ) -> Retained<NSArray<UITextSelectionRect>> where Self: Sized + Message { ... } unsafe fn closestPositionToPoint( &self, point: CGPoint ) -> Option<Retained<UITextPosition>> where Self: Sized + Message { ... } unsafe fn closestPositionToPoint_withinRange( &self, point: CGPoint, range: &UITextRange ) -> Option<Retained<UITextPosition>> where Self: Sized + Message { ... } unsafe fn characterRangeAtPoint( &self, point: CGPoint ) -> Option<Retained<UITextRange>> where Self: Sized + Message { ... } unsafe fn shouldChangeTextInRange_replacementText( &self, range: &UITextRange, text: &NSString ) -> bool where Self: Sized + Message { ... } unsafe fn textStylingAtPosition_inDirection( &self, position: &UITextPosition, direction: UITextStorageDirection ) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>> where Self: Sized + Message { ... } unsafe fn positionWithinRange_atCharacterOffset( &self, range: &UITextRange, offset: NSInteger ) -> Option<Retained<UITextPosition>> where Self: Sized + Message { ... } unsafe fn characterOffsetOfPosition_withinRange( &self, position: &UITextPosition, range: &UITextRange ) -> NSInteger where Self: Sized + Message { ... } unsafe fn textInputView(&self) -> Retained<UIView> where Self: Sized + Message { ... } unsafe fn selectionAffinity(&self) -> UITextStorageDirection where Self: Sized + Message { ... } unsafe fn setSelectionAffinity( &self, selection_affinity: UITextStorageDirection ) where Self: Sized + Message { ... } unsafe fn insertDictationResult( &self, dictation_result: &NSArray<UIDictationPhrase> ) where Self: Sized + Message { ... } unsafe fn dictationRecordingDidEnd(&self) where Self: Sized + Message { ... } unsafe fn dictationRecognitionFailed(&self) where Self: Sized + Message { ... } unsafe fn insertDictationResultPlaceholder(&self) -> Retained<AnyObject> where Self: Sized + Message { ... } unsafe fn frameForDictationResultPlaceholder( &self, placeholder: &AnyObject ) -> CGRect where Self: Sized + Message { ... } unsafe fn removeDictationResultPlaceholder_willInsertResult( &self, placeholder: &AnyObject, will_insert_result: bool ) where Self: Sized + Message { ... } unsafe fn insertText_alternatives_style( &self, text: &NSString, alternatives: &NSArray<NSString>, style: UITextAlternativeStyle ) where Self: Sized + Message { ... } unsafe fn setAttributedMarkedText_selectedRange( &self, marked_text: Option<&NSAttributedString>, selected_range: NSRange ) where Self: Sized + Message { ... } unsafe fn insertTextPlaceholderWithSize( &self, size: CGSize ) -> Retained<UITextPlaceholder> where Self: Sized + Message { ... } unsafe fn removeTextPlaceholder(&self, text_placeholder: &UITextPlaceholder) where Self: Sized + Message { ... } unsafe fn beginFloatingCursorAtPoint(&self, point: CGPoint) where Self: Sized + Message { ... } unsafe fn updateFloatingCursorAtPoint(&self, point: CGPoint) where Self: Sized + Message { ... } unsafe fn endFloatingCursor(&self) where Self: Sized + Message { ... } unsafe fn caretTransformForPosition( &self, position: &UITextPosition ) -> CGAffineTransform where Self: Sized + Message { ... } unsafe fn editMenuForTextRange_suggestedActions( &self, text_range: &UITextRange, suggested_actions: &NSArray<UIMenuElement> ) -> Option<Retained<UIMenu>> where Self: Sized + Message { ... } unsafe fn willPresentEditMenuWithAnimator( &self, animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating> ) where Self: Sized + Message { ... } unsafe fn willDismissEditMenuWithAnimator( &self, animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating> ) where Self: Sized + Message { ... }
}
Available on crate features UITextInput and UITextInputTraits only.

Provided Methods§

source

unsafe fn textInRange(&self, range: &UITextRange) -> Option<Retained<NSString>>
where Self: Sized + Message,

source

unsafe fn replaceRange_withText(&self, range: &UITextRange, text: &NSString)
where Self: Sized + Message,

source

unsafe fn selectedTextRange(&self) -> Option<Retained<UITextRange>>
where Self: Sized + Message,

source

unsafe fn setSelectedTextRange(&self, selected_text_range: Option<&UITextRange>)
where Self: Sized + Message,

source

unsafe fn markedTextRange(&self) -> Option<Retained<UITextRange>>
where Self: Sized + Message,

source

unsafe fn markedTextStyle( &self ) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>
where Self: Sized + Message,

source

unsafe fn setMarkedTextStyle( &self, marked_text_style: Option<&NSDictionary<NSAttributedStringKey, AnyObject>> )
where Self: Sized + Message,

source

unsafe fn setMarkedText_selectedRange( &self, marked_text: Option<&NSString>, selected_range: NSRange )
where Self: Sized + Message,

source

unsafe fn unmarkText(&self)
where Self: Sized + Message,

source

unsafe fn beginningOfDocument(&self) -> Retained<UITextPosition>
where Self: Sized + Message,

source

unsafe fn endOfDocument(&self) -> Retained<UITextPosition>
where Self: Sized + Message,

source

unsafe fn textRangeFromPosition_toPosition( &self, from_position: &UITextPosition, to_position: &UITextPosition ) -> Option<Retained<UITextRange>>
where Self: Sized + Message,

source

unsafe fn positionFromPosition_offset( &self, position: &UITextPosition, offset: NSInteger ) -> Option<Retained<UITextPosition>>
where Self: Sized + Message,

source

unsafe fn positionFromPosition_inDirection_offset( &self, position: &UITextPosition, direction: UITextLayoutDirection, offset: NSInteger ) -> Option<Retained<UITextPosition>>
where Self: Sized + Message,

source

unsafe fn comparePosition_toPosition( &self, position: &UITextPosition, other: &UITextPosition ) -> NSComparisonResult
where Self: Sized + Message,

source

unsafe fn offsetFromPosition_toPosition( &self, from: &UITextPosition, to_position: &UITextPosition ) -> NSInteger
where Self: Sized + Message,

source

unsafe fn inputDelegate( &self ) -> Option<Retained<ProtocolObject<dyn UITextInputDelegate>>>
where Self: Sized + Message,

source

unsafe fn setInputDelegate( &self, input_delegate: Option<&ProtocolObject<dyn UITextInputDelegate>> )
where Self: Sized + Message,

source

unsafe fn tokenizer(&self) -> Retained<ProtocolObject<dyn UITextInputTokenizer>>
where Self: Sized + Message,

source

unsafe fn positionWithinRange_farthestInDirection( &self, range: &UITextRange, direction: UITextLayoutDirection ) -> Option<Retained<UITextPosition>>
where Self: Sized + Message,

source

unsafe fn characterRangeByExtendingPosition_inDirection( &self, position: &UITextPosition, direction: UITextLayoutDirection ) -> Option<Retained<UITextRange>>
where Self: Sized + Message,

source

unsafe fn baseWritingDirectionForPosition_inDirection( &self, position: &UITextPosition, direction: UITextStorageDirection ) -> NSWritingDirection
where Self: Sized + Message,

Available on crate feature NSText only.
source

unsafe fn setBaseWritingDirection_forRange( &self, writing_direction: NSWritingDirection, range: &UITextRange )
where Self: Sized + Message,

Available on crate feature NSText only.
source

unsafe fn firstRectForRange(&self, range: &UITextRange) -> CGRect
where Self: Sized + Message,

source

unsafe fn caretRectForPosition(&self, position: &UITextPosition) -> CGRect
where Self: Sized + Message,

source

unsafe fn selectionRectsForRange( &self, range: &UITextRange ) -> Retained<NSArray<UITextSelectionRect>>
where Self: Sized + Message,

source

unsafe fn closestPositionToPoint( &self, point: CGPoint ) -> Option<Retained<UITextPosition>>
where Self: Sized + Message,

source

unsafe fn closestPositionToPoint_withinRange( &self, point: CGPoint, range: &UITextRange ) -> Option<Retained<UITextPosition>>
where Self: Sized + Message,

source

unsafe fn characterRangeAtPoint( &self, point: CGPoint ) -> Option<Retained<UITextRange>>
where Self: Sized + Message,

source

unsafe fn shouldChangeTextInRange_replacementText( &self, range: &UITextRange, text: &NSString ) -> bool
where Self: Sized + Message,

source

unsafe fn textStylingAtPosition_inDirection( &self, position: &UITextPosition, direction: UITextStorageDirection ) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>
where Self: Sized + Message,

source

unsafe fn positionWithinRange_atCharacterOffset( &self, range: &UITextRange, offset: NSInteger ) -> Option<Retained<UITextPosition>>
where Self: Sized + Message,

source

unsafe fn characterOffsetOfPosition_withinRange( &self, position: &UITextPosition, range: &UITextRange ) -> NSInteger
where Self: Sized + Message,

source

unsafe fn textInputView(&self) -> Retained<UIView>
where Self: Sized + Message,

Available on crate features UIResponder and UIView only.
source

unsafe fn selectionAffinity(&self) -> UITextStorageDirection
where Self: Sized + Message,

source

unsafe fn setSelectionAffinity( &self, selection_affinity: UITextStorageDirection )
where Self: Sized + Message,

source

unsafe fn insertDictationResult( &self, dictation_result: &NSArray<UIDictationPhrase> )
where Self: Sized + Message,

source

unsafe fn dictationRecordingDidEnd(&self)
where Self: Sized + Message,

source

unsafe fn dictationRecognitionFailed(&self)
where Self: Sized + Message,

source

unsafe fn insertDictationResultPlaceholder(&self) -> Retained<AnyObject>
where Self: Sized + Message,

source

unsafe fn frameForDictationResultPlaceholder( &self, placeholder: &AnyObject ) -> CGRect
where Self: Sized + Message,

source

unsafe fn removeDictationResultPlaceholder_willInsertResult( &self, placeholder: &AnyObject, will_insert_result: bool )
where Self: Sized + Message,

source

unsafe fn insertText_alternatives_style( &self, text: &NSString, alternatives: &NSArray<NSString>, style: UITextAlternativeStyle )
where Self: Sized + Message,

source

unsafe fn setAttributedMarkedText_selectedRange( &self, marked_text: Option<&NSAttributedString>, selected_range: NSRange )
where Self: Sized + Message,

source

unsafe fn insertTextPlaceholderWithSize( &self, size: CGSize ) -> Retained<UITextPlaceholder>
where Self: Sized + Message,

source

unsafe fn removeTextPlaceholder(&self, text_placeholder: &UITextPlaceholder)
where Self: Sized + Message,

source

unsafe fn beginFloatingCursorAtPoint(&self, point: CGPoint)
where Self: Sized + Message,

source

unsafe fn updateFloatingCursorAtPoint(&self, point: CGPoint)
where Self: Sized + Message,

source

unsafe fn endFloatingCursor(&self)
where Self: Sized + Message,

source

unsafe fn caretTransformForPosition( &self, position: &UITextPosition ) -> CGAffineTransform
where Self: Sized + Message,

source

unsafe fn editMenuForTextRange_suggestedActions( &self, text_range: &UITextRange, suggested_actions: &NSArray<UIMenuElement> ) -> Option<Retained<UIMenu>>
where Self: Sized + Message,

Available on crate features UIMenu and UIMenuElement only.
source

unsafe fn willPresentEditMenuWithAnimator( &self, animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating> )
where Self: Sized + Message,

Available on crate feature UIEditMenuInteraction only.
source

unsafe fn willDismissEditMenuWithAnimator( &self, animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating> )
where Self: Sized + Message,

Available on crate feature UIEditMenuInteraction only.

Trait Implementations§

source§

impl ProtocolType for dyn UITextInput

source§

const NAME: &'static str = "UITextInput"

The name of the Objective-C protocol that this type represents.
source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
source§

impl<T> ImplementedBy<T> for dyn UITextInput
where T: ?Sized + Message + UITextInput,

Implementations on Foreign Types§

source§

impl<T> UITextInput for ProtocolObject<T>
where T: ?Sized + UITextInput,

Implementors§

source§

impl UITextInput for UISearchTextField

Available on crate features UIControl and UIResponder and UITextField and UIView and UISearchTextField only.
source§

impl UITextInput for UITextField

Available on crate features UIControl and UIResponder and UIView and UITextField only.
source§

impl UITextInput for UITextView

Available on crate features UIResponder and UIScrollView and UIView and UITextView only.