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§
Sourceunsafe fn insertText_replacementRange(
&self,
string: &AnyObject,
replacement_range: NSRange,
)
unsafe fn insertText_replacementRange( &self, string: &AnyObject, replacement_range: NSRange, )
§Safety
string should be of the correct type.
Sourceunsafe fn doCommandBySelector(&self, selector: Sel)
unsafe fn doCommandBySelector(&self, selector: Sel)
§Safety
selector must be a valid selector.
Sourceunsafe fn setMarkedText_selectedRange_replacementRange(
&self,
string: &AnyObject,
selected_range: NSRange,
replacement_range: NSRange,
)
unsafe fn setMarkedText_selectedRange_replacementRange( &self, string: &AnyObject, selected_range: NSRange, replacement_range: NSRange, )
§Safety
string should be of the correct type.
fn unmarkText(&self)
fn selectedRange(&self) -> NSRange
fn markedRange(&self) -> NSRange
fn hasMarkedText(&self) -> bool
Sourceunsafe fn attributedSubstringForProposedRange_actualRange(
&self,
range: NSRange,
actual_range: NSRangePointer,
) -> Option<Retained<NSAttributedString>>
unsafe fn attributedSubstringForProposedRange_actualRange( &self, range: NSRange, actual_range: NSRangePointer, ) -> Option<Retained<NSAttributedString>>
§Safety
actual_range must be a valid pointer or null.
fn validAttributesForMarkedText( &self, ) -> Retained<NSArray<NSAttributedStringKey>>
Sourceunsafe fn firstRectForCharacterRange_actualRange(
&self,
range: NSRange,
actual_range: NSRangePointer,
) -> NSRect
unsafe fn firstRectForCharacterRange_actualRange( &self, range: NSRange, actual_range: NSRangePointer, ) -> NSRect
§Safety
actual_range must be a valid pointer or null.
fn characterIndexForPoint(&self, point: NSPoint) -> NSUInteger
fn attributedString(&self) -> Retained<NSAttributedString>
fn fractionOfDistanceThroughGlyphForPoint(&self, point: NSPoint) -> CGFloat
Available on crate feature
objc2-core-foundation only.fn baselineDeltaForCharacterAtIndex(&self, an_index: NSUInteger) -> CGFloat
Available on crate feature
objc2-core-foundation only.fn windowLevel(&self) -> NSInteger
fn drawsVerticallyForCharacterAtIndex(&self, char_index: NSUInteger) -> bool
fn preferredTextAccessoryPlacement(&self) -> NSTextCursorAccessoryPlacement
fn unionRectInVisibleSelectedRange(&self) -> NSRect
fn documentVisibleRect(&self) -> NSRect
fn supportsAdaptiveImageGlyph(&self) -> bool
fn insertAdaptiveImageGlyph_replacementRange( &self, adaptive_image_glyph: &NSAdaptiveImageGlyph, replacement_range: NSRange, )
Available on crate feature
NSAdaptiveImageGlyph only.Trait Implementations§
impl<T> ImplementedBy<T> for dyn NSTextInputClient
Source§impl ProtocolType for dyn NSTextInputClient
impl ProtocolType for dyn NSTextInputClient
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
impl<T> NSTextInputClient for ProtocolObject<T>where
T: ?Sized + NSTextInputClient,
Implementors§
impl NSTextInputClient for NSTextView
Available on crate feature
NSTextView only.