objc2-ui-kit 0.3.2

Bindings to the UIKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_protocol!(
    /// A view that displays a tinted highlight behind rendered text to indicate selection.
    ///
    /// When a selection is ranged (i.e., length is > 0), a highlight view is shown to indicate the selected text range.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextselectionhighlightview?language=objc)
    #[cfg(feature = "UIView")]
    pub unsafe trait UITextSelectionHighlightView:
        UICoordinateSpace + MainThreadOnly
    {
        #[cfg(feature = "UITextInput")]
        /// A collection of
        /// `UITextSelectionRects`representing the geometry of the current selection. Rects are expected to be in the
        /// receiver's coordinate space.
        #[unsafe(method(selectionRects))]
        #[unsafe(method_family = none)]
        fn selectionRects(&self) -> Retained<NSArray<UITextSelectionRect>>;

        #[cfg(feature = "UITextInput")]
        /// Setter for [`selectionRects`][Self::selectionRects].
        #[unsafe(method(setSelectionRects:))]
        #[unsafe(method_family = none)]
        fn setSelectionRects(&self, selection_rects: &NSArray<UITextSelectionRect>);
    }
);