objc2_ui_kit/generated/
UITextDragPreviewRenderer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
15 #[thread_kind = MainThreadOnly]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 pub struct UITextDragPreviewRenderer;
18);
19
20unsafe impl NSObjectProtocol for UITextDragPreviewRenderer {}
21
22impl UITextDragPreviewRenderer {
23 extern_methods!(
24 #[cfg(feature = "NSLayoutManager")]
25 #[unsafe(method(initWithLayoutManager:range:))]
26 #[unsafe(method_family = init)]
27 pub unsafe fn initWithLayoutManager_range(
28 this: Allocated<Self>,
29 layout_manager: &NSLayoutManager,
30 range: NSRange,
31 ) -> Retained<Self>;
32
33 #[cfg(feature = "NSLayoutManager")]
34 #[unsafe(method(initWithLayoutManager:range:unifyRects:))]
35 #[unsafe(method_family = init)]
36 pub unsafe fn initWithLayoutManager_range_unifyRects(
37 this: Allocated<Self>,
38 layout_manager: &NSLayoutManager,
39 range: NSRange,
40 unify_rects: bool,
41 ) -> Retained<Self>;
42
43 #[unsafe(method(new))]
44 #[unsafe(method_family = new)]
45 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
46
47 #[unsafe(method(init))]
48 #[unsafe(method_family = init)]
49 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
50
51 #[cfg(feature = "NSLayoutManager")]
52 #[unsafe(method(layoutManager))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn layoutManager(&self) -> Retained<NSLayoutManager>;
55
56 #[cfg(feature = "UIImage")]
57 #[unsafe(method(image))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn image(&self) -> Retained<UIImage>;
60
61 #[cfg(feature = "objc2-core-foundation")]
62 #[unsafe(method(firstLineRect))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn firstLineRect(&self) -> CGRect;
65
66 #[cfg(feature = "objc2-core-foundation")]
67 #[unsafe(method(bodyRect))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn bodyRect(&self) -> CGRect;
70
71 #[cfg(feature = "objc2-core-foundation")]
72 #[unsafe(method(lastLineRect))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn lastLineRect(&self) -> CGRect;
75
76 #[cfg(feature = "objc2-core-foundation")]
77 #[unsafe(method(adjustFirstLineRect:bodyRect:lastLineRect:textOrigin:))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn adjustFirstLineRect_bodyRect_lastLineRect_textOrigin(
80 &self,
81 first_line_rect: NonNull<CGRect>,
82 body_rect: NonNull<CGRect>,
83 last_line_rect: NonNull<CGRect>,
84 origin: CGPoint,
85 );
86 );
87}