Skip to main content

NSTextCheckingClient

Trait NSTextCheckingClient 

Source
pub unsafe trait NSTextCheckingClient: NSTextInputClient + NSTextInputTraits {
    // Provided methods
    unsafe fn annotatedSubstringForProposedRange_actualRange(
        &self,
        range: NSRange,
        actual_range: NSRangePointer,
    ) -> Option<Retained<NSAttributedString>>
       where Self: Sized + Message { ... }
    fn setAnnotations_range(
        &self,
        annotations: &NSDictionary<NSAttributedStringKey, NSString>,
        range: NSRange,
    )
       where Self: Sized + Message { ... }
    fn addAnnotations_range(
        &self,
        annotations: &NSDictionary<NSAttributedStringKey, NSString>,
        range: NSRange,
    )
       where Self: Sized + Message { ... }
    fn removeAnnotation_range(
        &self,
        annotation_name: &NSAttributedStringKey,
        range: NSRange,
    )
       where Self: Sized + Message { ... }
    fn replaceCharactersInRange_withAnnotatedString(
        &self,
        range: NSRange,
        annotated_string: &NSAttributedString,
    )
       where Self: Sized + Message { ... }
    fn selectAndShowRange(&self, range: NSRange)
       where Self: Sized + Message { ... }
    unsafe fn viewForRange_firstRect_actualRange(
        &self,
        range: NSRange,
        first_rect: NSRectPointer,
        actual_range: NSRangePointer,
        mtm: MainThreadMarker,
    ) -> Option<Retained<NSView>>
       where Self: Sized + Message { ... }
    fn candidateListTouchBarItem(
        &self,
        mtm: MainThreadMarker,
    ) -> Option<Retained<NSCandidateListTouchBarItem>>
       where Self: Sized + Message { ... }
}
Available on crate features NSTextCheckingClient and NSTextInputClient only.
Expand description

Provided Methods§

Source

unsafe fn annotatedSubstringForProposedRange_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 setAnnotations_range( &self, annotations: &NSDictionary<NSAttributedStringKey, NSString>, range: NSRange, )
where Self: Sized + Message,

Source

fn addAnnotations_range( &self, annotations: &NSDictionary<NSAttributedStringKey, NSString>, range: NSRange, )
where Self: Sized + Message,

Source

fn removeAnnotation_range( &self, annotation_name: &NSAttributedStringKey, range: NSRange, )
where Self: Sized + Message,

Source

fn replaceCharactersInRange_withAnnotatedString( &self, range: NSRange, annotated_string: &NSAttributedString, )
where Self: Sized + Message,

Source

fn selectAndShowRange(&self, range: NSRange)
where Self: Sized + Message,

Source

unsafe fn viewForRange_firstRect_actualRange( &self, range: NSRange, first_rect: NSRectPointer, actual_range: NSRangePointer, mtm: MainThreadMarker, ) -> Option<Retained<NSView>>
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
§Safety
  • first_rect must be a valid pointer or null.
  • actual_range must be a valid pointer or null.
Source

fn candidateListTouchBarItem( &self, mtm: MainThreadMarker, ) -> Option<Retained<NSCandidateListTouchBarItem>>
where Self: Sized + Message,

Available on crate features NSCandidateListTouchBarItem and NSTouchBarItem only.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn NSTextCheckingClient

Source§

impl ProtocolType for dyn NSTextCheckingClient

Source§

const NAME: &'static str = "NSTextCheckingClient"

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> NSTextCheckingClient for ProtocolObject<T>

Implementors§