objc2_ui_kit/generated/
UITextFormattingCoordinator.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 pub unsafe trait UITextFormattingCoordinatorDelegate:
13 NSObjectProtocol + MainThreadOnly
14 {
15 #[cfg(all(feature = "UIResponder", feature = "block2"))]
16 #[unsafe(method(updateTextAttributesWithConversionHandler:))]
20 #[unsafe(method_family = none)]
21 unsafe fn updateTextAttributesWithConversionHandler(
22 &self,
23 conversion_handler: UITextAttributesConversionHandler,
24 );
25 }
26);
27
28extern_class!(
29 #[unsafe(super(NSObject))]
31 #[thread_kind = MainThreadOnly]
32 #[derive(Debug, PartialEq, Eq, Hash)]
33 pub struct UITextFormattingCoordinator;
34);
35
36extern_conformance!(
37 unsafe impl NSObjectProtocol for UITextFormattingCoordinator {}
38);
39
40#[cfg(feature = "UIFontPickerViewController")]
41extern_conformance!(
42 unsafe impl UIFontPickerViewControllerDelegate for UITextFormattingCoordinator {}
43);
44
45impl UITextFormattingCoordinator {
46 extern_methods!(
47 #[unsafe(method(delegate))]
48 #[unsafe(method_family = none)]
49 pub fn delegate(
50 &self,
51 ) -> Option<Retained<ProtocolObject<dyn UITextFormattingCoordinatorDelegate>>>;
52
53 #[unsafe(method(setDelegate:))]
57 #[unsafe(method_family = none)]
58 pub fn setDelegate(
59 &self,
60 delegate: Option<&ProtocolObject<dyn UITextFormattingCoordinatorDelegate>>,
61 );
62
63 #[unsafe(method(isFontPanelVisible))]
64 #[unsafe(method_family = none)]
65 pub fn isFontPanelVisible(mtm: MainThreadMarker) -> bool;
66
67 #[cfg(all(
68 feature = "UIResponder",
69 feature = "UIScene",
70 feature = "UIWindowScene"
71 ))]
72 #[unsafe(method(textFormattingCoordinatorForWindowScene:))]
73 #[unsafe(method_family = none)]
74 pub fn textFormattingCoordinatorForWindowScene(
75 window_scene: &UIWindowScene,
76 ) -> Retained<Self>;
77
78 #[cfg(all(
79 feature = "UIResponder",
80 feature = "UIScene",
81 feature = "UIWindowScene"
82 ))]
83 #[unsafe(method(initWithWindowScene:))]
84 #[unsafe(method_family = init)]
85 pub fn initWithWindowScene(
86 this: Allocated<Self>,
87 window_scene: &UIWindowScene,
88 ) -> Retained<Self>;
89
90 #[unsafe(method(init))]
91 #[unsafe(method_family = init)]
92 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
93
94 #[unsafe(method(setSelectedAttributes:isMultiple:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn setSelectedAttributes_isMultiple(
100 &self,
101 attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
102 flag: bool,
103 );
104
105 #[unsafe(method(toggleFontPanel:))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn toggleFontPanel(sender: &AnyObject, mtm: MainThreadMarker);
111 );
112}
113
114impl UITextFormattingCoordinator {
116 extern_methods!(
117 #[unsafe(method(new))]
118 #[unsafe(method_family = new)]
119 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
120 );
121}