Trait objc2_ui_kit::NSTextElementProvider

source ·
pub unsafe trait NSTextElementProvider: NSObjectProtocol {
    // Provided methods
    unsafe fn documentRange(&self) -> Retained<NSTextRange>
       where Self: Sized + Message { ... }
    unsafe fn enumerateTextElementsFromLocation_options_usingBlock(
        &self,
        text_location: Option<&ProtocolObject<dyn NSTextLocation>>,
        options: NSTextContentManagerEnumerationOptions,
        block: &Block<dyn Fn(NonNull<NSTextElement>) -> Bool + '_>
    ) -> Option<Retained<ProtocolObject<dyn NSTextLocation>>>
       where Self: Sized + Message { ... }
    unsafe fn replaceContentsInRange_withTextElements(
        &self,
        range: &NSTextRange,
        text_elements: Option<&NSArray<NSTextElement>>
    )
       where Self: Sized + Message { ... }
    unsafe fn synchronizeToBackingStore(
        &self,
        completion_handler: Option<&Block<dyn Fn(*mut NSError)>>
    )
       where Self: Sized + Message { ... }
    unsafe fn locationFromLocation_withOffset(
        &self,
        location: &ProtocolObject<dyn NSTextLocation>,
        offset: NSInteger
    ) -> Option<Retained<ProtocolObject<dyn NSTextLocation>>>
       where Self: Sized + Message { ... }
    unsafe fn offsetFromLocation_toLocation(
        &self,
        from: &ProtocolObject<dyn NSTextLocation>,
        to: &ProtocolObject<dyn NSTextLocation>
    ) -> NSInteger
       where Self: Sized + Message { ... }
    unsafe fn adjustedRangeFromRange_forEditingTextSelection(
        &self,
        text_range: &NSTextRange,
        for_editing_text_selection: bool
    ) -> Option<Retained<NSTextRange>>
       where Self: Sized + Message { ... }
}
Available on crate feature NSTextContentManager only.

Provided Methods§

source

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

Available on crate feature NSTextRange only.
source

unsafe fn enumerateTextElementsFromLocation_options_usingBlock( &self, text_location: Option<&ProtocolObject<dyn NSTextLocation>>, options: NSTextContentManagerEnumerationOptions, block: &Block<dyn Fn(NonNull<NSTextElement>) -> Bool + '_> ) -> Option<Retained<ProtocolObject<dyn NSTextLocation>>>
where Self: Sized + Message,

Available on crate features NSTextElement and NSTextRange and block2 only.
source

unsafe fn replaceContentsInRange_withTextElements( &self, range: &NSTextRange, text_elements: Option<&NSArray<NSTextElement>> )
where Self: Sized + Message,

Available on crate features NSTextElement and NSTextRange only.
source

unsafe fn synchronizeToBackingStore( &self, completion_handler: Option<&Block<dyn Fn(*mut NSError)>> )
where Self: Sized + Message,

Available on crate feature block2 only.
source

unsafe fn locationFromLocation_withOffset( &self, location: &ProtocolObject<dyn NSTextLocation>, offset: NSInteger ) -> Option<Retained<ProtocolObject<dyn NSTextLocation>>>
where Self: Sized + Message,

Available on crate feature NSTextRange only.
source

unsafe fn offsetFromLocation_toLocation( &self, from: &ProtocolObject<dyn NSTextLocation>, to: &ProtocolObject<dyn NSTextLocation> ) -> NSInteger
where Self: Sized + Message,

Available on crate feature NSTextRange only.
source

unsafe fn adjustedRangeFromRange_forEditingTextSelection( &self, text_range: &NSTextRange, for_editing_text_selection: bool ) -> Option<Retained<NSTextRange>>
where Self: Sized + Message,

Available on crate feature NSTextRange only.

Trait Implementations§

source§

impl ProtocolType for dyn NSTextElementProvider

source§

const NAME: &'static str = "NSTextElementProvider"

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 NSTextElementProvider

Implementations on Foreign Types§

source§

impl<T> NSTextElementProvider for ProtocolObject<T>

Implementors§