objc2_ui_kit/generated/UITextSelectionHighlightView.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 /// A view that displays a tinted highlight behind rendered text to indicate selection.
12 ///
13 /// When a selection is ranged (i.e., length is > 0), a highlight view is shown to indicate the selected text range.
14 ///
15 /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextselectionhighlightview?language=objc)
16 #[cfg(feature = "UIView")]
17 pub unsafe trait UITextSelectionHighlightView:
18 UICoordinateSpace + MainThreadOnly
19 {
20 #[cfg(feature = "UITextInput")]
21 /// A collection of
22 /// `UITextSelectionRects`representing the geometry of the current selection. Rects are expected to be in the
23 /// receiver's coordinate space.
24 #[unsafe(method(selectionRects))]
25 #[unsafe(method_family = none)]
26 unsafe fn selectionRects(&self) -> Retained<NSArray<UITextSelectionRect>>;
27
28 #[cfg(feature = "UITextInput")]
29 /// Setter for [`selectionRects`][Self::selectionRects].
30 #[unsafe(method(setSelectionRects:))]
31 #[unsafe(method_family = none)]
32 unsafe fn setSelectionRects(&self, selection_rects: &NSArray<UITextSelectionRect>);
33 }
34);