objc2_ui_kit/generated/
UITextCursorView.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_protocol!(
9    /// A view that displays a flashing cursor (aka "caret") view.
10    ///
11    /// When a selection is not ranged (or has a zero-length), a cursor view is displayed.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextcursorview?language=objc)
14    #[cfg(feature = "UIView")]
15    pub unsafe trait UITextCursorView: UICoordinateSpace + MainThreadOnly {
16        /// Enables the blink animation. Disabled by default.
17        #[unsafe(method(isBlinking))]
18        #[unsafe(method_family = none)]
19        unsafe fn isBlinking(&self) -> bool;
20
21        /// Setter for [`isBlinking`][Self::isBlinking].
22        #[unsafe(method(setBlinking:))]
23        #[unsafe(method_family = none)]
24        unsafe fn setBlinking(&self, blinking: bool);
25
26        /// Call this when the cursor is moving (i.e., during typing) to make sure the cursor doesn't blink while text is being inserted.
27        #[unsafe(method(resetBlinkAnimation))]
28        #[unsafe(method_family = none)]
29        unsafe fn resetBlinkAnimation(&self);
30    }
31);