1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! 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::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use crate::*;
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextloupesession?language=objc)
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UITextLoupeSession;
);
extern_conformance!(
unsafe impl NSObjectProtocol for UITextLoupeSession {}
);
impl UITextLoupeSession {
extern_methods!(
#[cfg(all(
feature = "UIResponder",
feature = "UIView",
feature = "objc2-core-foundation"
))]
/// Begins a loupe session at the specified point. The system will animate the presentation of the loupe, as well as its position and hierarchy.
///
///
/// Parameter `at`: The point in
/// `view's`coordinate space where the loupe should begin.
///
/// Parameter `widgetView`: Optionally, a system-provided selection view that the animation can start from.
///
/// Parameter `view`: The coordinate space that all subsequent movement updates are provided in.
#[unsafe(method(beginLoupeSessionAtPoint:fromSelectionWidgetView:inView:))]
#[unsafe(method_family = none)]
pub fn beginLoupeSessionAtPoint_fromSelectionWidgetView_inView(
point: CGPoint,
selection_widget: Option<&UIView>,
interaction_view: &UIView,
) -> Option<Retained<Self>>;
#[cfg(feature = "objc2-core-foundation")]
/// Call this when a text selection gesture moves to a particular point.
///
///
/// Parameter `point`: The center point of the touch tracked by the gesture recognizer.
///
/// Parameter `caretRect`: The current position of the caret/range handle. Pass in CGRectNull if there is no current selection/no caret rect visible.
///
/// Parameter `trackingCaret`: Provide YES if the loupe should track the caret instead of the touch.
#[unsafe(method(moveToPoint:withCaretRect:trackingCaret:))]
#[unsafe(method_family = none)]
pub fn moveToPoint_withCaretRect_trackingCaret(
&self,
point: CGPoint,
caret_rect: CGRect,
tracks_caret: bool,
);
/// Invalidates the loupe session. Hides the loupe and cleans up transient state.
#[unsafe(method(invalidate))]
#[unsafe(method_family = none)]
pub fn invalidate(&self);
);
}
/// Methods declared on superclass `NSObject`.
impl UITextLoupeSession {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}