Trait NSTextSelectionDataSource

Source
pub unsafe trait NSTextSelectionDataSource: NSObjectProtocol {
    // Provided methods
    unsafe fn documentRange(&self) -> Retained<NSTextRange>
       where Self: Sized + Message { ... }
    unsafe fn enumerateSubstringsFromLocation_options_usingBlock(
        &self,
        location: &ProtocolObject<dyn NSTextLocation>,
        options: NSStringEnumerationOptions,
        block: &DynBlock<dyn Fn(*mut NSString, NonNull<NSTextRange>, *mut NSTextRange, NonNull<Bool>) + '_>,
    )
       where Self: Sized + Message { ... }
    unsafe fn textRangeForSelectionGranularity_enclosingLocation(
        &self,
        selection_granularity: NSTextSelectionGranularity,
        location: &ProtocolObject<dyn NSTextLocation>,
    ) -> Option<Retained<NSTextRange>>
       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 baseWritingDirectionAtLocation(
        &self,
        location: &ProtocolObject<dyn NSTextLocation>,
    ) -> NSTextSelectionNavigationWritingDirection
       where Self: Sized + Message { ... }
    unsafe fn enumerateCaretOffsetsInLineFragmentAtLocation_usingBlock(
        &self,
        location: &ProtocolObject<dyn NSTextLocation>,
        block: &DynBlock<dyn Fn(CGFloat, NonNull<ProtocolObject<dyn NSTextLocation>>, Bool, NonNull<Bool>) + '_>,
    )
       where Self: Sized + Message { ... }
    unsafe fn lineFragmentRangeForPoint_inContainerAtLocation(
        &self,
        point: CGPoint,
        location: &ProtocolObject<dyn NSTextLocation>,
    ) -> Option<Retained<NSTextRange>>
       where Self: Sized + Message { ... }
    unsafe fn enumerateContainerBoundariesFromLocation_reverse_usingBlock(
        &self,
        location: &ProtocolObject<dyn NSTextLocation>,
        reverse: bool,
        block: &DynBlock<dyn Fn(NonNull<ProtocolObject<dyn NSTextLocation>>, NonNull<Bool>) + '_>,
    )
       where Self: Sized + Message { ... }
    unsafe fn textLayoutOrientationAtLocation(
        &self,
        location: &ProtocolObject<dyn NSTextLocation>,
    ) -> NSTextSelectionNavigationLayoutOrientation
       where Self: Sized + Message { ... }
}
Available on crate feature NSTextSelectionNavigation only.
Expand description

Provided Methods§

Source

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

Available on crate feature NSTextRange only.
Source

unsafe fn enumerateSubstringsFromLocation_options_usingBlock( &self, location: &ProtocolObject<dyn NSTextLocation>, options: NSStringEnumerationOptions, block: &DynBlock<dyn Fn(*mut NSString, NonNull<NSTextRange>, *mut NSTextRange, NonNull<Bool>) + '_>, )
where Self: Sized + Message,

Available on crate features NSTextRange and block2 only.
Source

unsafe fn textRangeForSelectionGranularity_enclosingLocation( &self, selection_granularity: NSTextSelectionGranularity, location: &ProtocolObject<dyn NSTextLocation>, ) -> Option<Retained<NSTextRange>>
where Self: Sized + Message,

Available on crate features NSTextRange and NSTextSelection 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 baseWritingDirectionAtLocation( &self, location: &ProtocolObject<dyn NSTextLocation>, ) -> NSTextSelectionNavigationWritingDirection
where Self: Sized + Message,

Available on crate feature NSTextRange only.
Source

unsafe fn enumerateCaretOffsetsInLineFragmentAtLocation_usingBlock( &self, location: &ProtocolObject<dyn NSTextLocation>, block: &DynBlock<dyn Fn(CGFloat, NonNull<ProtocolObject<dyn NSTextLocation>>, Bool, NonNull<Bool>) + '_>, )
where Self: Sized + Message,

Available on crate features NSTextRange and block2 and objc2-core-foundation only.
Source

unsafe fn lineFragmentRangeForPoint_inContainerAtLocation( &self, point: CGPoint, location: &ProtocolObject<dyn NSTextLocation>, ) -> Option<Retained<NSTextRange>>
where Self: Sized + Message,

Available on crate features NSTextRange and objc2-core-foundation only.
Source

unsafe fn enumerateContainerBoundariesFromLocation_reverse_usingBlock( &self, location: &ProtocolObject<dyn NSTextLocation>, reverse: bool, block: &DynBlock<dyn Fn(NonNull<ProtocolObject<dyn NSTextLocation>>, NonNull<Bool>) + '_>, )
where Self: Sized + Message,

Available on crate features NSTextRange and block2 only.
Source

unsafe fn textLayoutOrientationAtLocation( &self, location: &ProtocolObject<dyn NSTextLocation>, ) -> NSTextSelectionNavigationLayoutOrientation
where Self: Sized + Message,

Available on crate feature NSTextRange only.

Trait Implementations§

Source§

impl ProtocolType for dyn NSTextSelectionDataSource

Source§

const NAME: &'static str = "NSTextSelectionDataSource"

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
Source§

impl<T> ImplementedBy<T> for dyn NSTextSelectionDataSource

Implementations on Foreign Types§

Source§

impl<T> NSTextSelectionDataSource for ProtocolObject<T>

Implementors§

Source§

impl NSTextSelectionDataSource for NSTextLayoutManager

Available on crate feature NSTextLayoutManager only.