Skip to main content

NSTextInputClient

Trait NSTextInputClient 

Source
pub unsafe trait NSTextInputClient {
Show 21 methods // Provided methods unsafe fn insertText_replacementRange( &self, string: &AnyObject, replacement_range: NSRange, ) where Self: Sized + Message { ... } unsafe fn doCommandBySelector(&self, selector: Sel) where Self: Sized + Message { ... } unsafe fn setMarkedText_selectedRange_replacementRange( &self, string: &AnyObject, selected_range: NSRange, replacement_range: NSRange, ) where Self: Sized + Message { ... } fn unmarkText(&self) where Self: Sized + Message { ... } fn selectedRange(&self) -> NSRange where Self: Sized + Message { ... } fn markedRange(&self) -> NSRange where Self: Sized + Message { ... } fn hasMarkedText(&self) -> bool where Self: Sized + Message { ... } unsafe fn attributedSubstringForProposedRange_actualRange( &self, range: NSRange, actual_range: NSRangePointer, ) -> Option<Retained<NSAttributedString>> where Self: Sized + Message { ... } fn validAttributesForMarkedText( &self, ) -> Retained<NSArray<NSAttributedStringKey>> where Self: Sized + Message { ... } unsafe fn firstRectForCharacterRange_actualRange( &self, range: NSRange, actual_range: NSRangePointer, ) -> NSRect where Self: Sized + Message { ... } fn characterIndexForPoint(&self, point: NSPoint) -> NSUInteger where Self: Sized + Message { ... } fn attributedString(&self) -> Retained<NSAttributedString> where Self: Sized + Message { ... } fn fractionOfDistanceThroughGlyphForPoint(&self, point: NSPoint) -> CGFloat where Self: Sized + Message { ... } fn baselineDeltaForCharacterAtIndex(&self, an_index: NSUInteger) -> CGFloat where Self: Sized + Message { ... } fn windowLevel(&self) -> NSInteger where Self: Sized + Message { ... } fn drawsVerticallyForCharacterAtIndex(&self, char_index: NSUInteger) -> bool where Self: Sized + Message { ... } fn preferredTextAccessoryPlacement(&self) -> NSTextCursorAccessoryPlacement where Self: Sized + Message { ... } fn unionRectInVisibleSelectedRange(&self) -> NSRect where Self: Sized + Message { ... } fn documentVisibleRect(&self) -> NSRect where Self: Sized + Message { ... } fn supportsAdaptiveImageGlyph(&self) -> bool where Self: Sized + Message { ... } fn insertAdaptiveImageGlyph_replacementRange( &self, adaptive_image_glyph: &NSAdaptiveImageGlyph, replacement_range: NSRange, ) where Self: Sized + Message { ... }
}
Available on crate feature NSTextInputClient only.
Expand description

Provided Methods§

Source

unsafe fn insertText_replacementRange( &self, string: &AnyObject, replacement_range: NSRange, )
where Self: Sized + Message,

§Safety

string should be of the correct type.

Source

unsafe fn doCommandBySelector(&self, selector: Sel)
where Self: Sized + Message,

§Safety

selector must be a valid selector.

Source

unsafe fn setMarkedText_selectedRange_replacementRange( &self, string: &AnyObject, selected_range: NSRange, replacement_range: NSRange, )
where Self: Sized + Message,

§Safety

string should be of the correct type.

Source

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

Source

fn selectedRange(&self) -> NSRange
where Self: Sized + Message,

Source

fn markedRange(&self) -> NSRange
where Self: Sized + Message,

Source

fn hasMarkedText(&self) -> bool
where Self: Sized + Message,

Source

unsafe fn attributedSubstringForProposedRange_actualRange( &self, range: NSRange, actual_range: NSRangePointer, ) -> Option<Retained<NSAttributedString>>
where Self: Sized + Message,

§Safety

actual_range must be a valid pointer or null.

Source

fn validAttributesForMarkedText( &self, ) -> Retained<NSArray<NSAttributedStringKey>>
where Self: Sized + Message,

Source

unsafe fn firstRectForCharacterRange_actualRange( &self, range: NSRange, actual_range: NSRangePointer, ) -> NSRect
where Self: Sized + Message,

§Safety

actual_range must be a valid pointer or null.

Source

fn characterIndexForPoint(&self, point: NSPoint) -> NSUInteger
where Self: Sized + Message,

Source

fn attributedString(&self) -> Retained<NSAttributedString>
where Self: Sized + Message,

Source

fn fractionOfDistanceThroughGlyphForPoint(&self, point: NSPoint) -> CGFloat
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.
Source

fn baselineDeltaForCharacterAtIndex(&self, an_index: NSUInteger) -> CGFloat
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.
Source

fn windowLevel(&self) -> NSInteger
where Self: Sized + Message,

Source

fn drawsVerticallyForCharacterAtIndex(&self, char_index: NSUInteger) -> bool
where Self: Sized + Message,

Source

fn preferredTextAccessoryPlacement(&self) -> NSTextCursorAccessoryPlacement
where Self: Sized + Message,

Source

fn unionRectInVisibleSelectedRange(&self) -> NSRect
where Self: Sized + Message,

Source

fn documentVisibleRect(&self) -> NSRect
where Self: Sized + Message,

Source

fn supportsAdaptiveImageGlyph(&self) -> bool
where Self: Sized + Message,

Source

fn insertAdaptiveImageGlyph_replacementRange( &self, adaptive_image_glyph: &NSAdaptiveImageGlyph, replacement_range: NSRange, )
where Self: Sized + Message,

Available on crate feature NSAdaptiveImageGlyph only.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn NSTextInputClient

Source§

impl ProtocolType for dyn NSTextInputClient

Source§

const NAME: &'static str = "NSTextInputClient"

The name of the Objective-C protocol that this type represents. Read more
Source§

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

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> NSTextInputClient for ProtocolObject<T>

Implementors§

Source§

impl NSTextInputClient for NSTextView

Available on crate feature NSTextView only.