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:))]
17 #[unsafe(method_family = none)]
18 unsafe fn updateTextAttributesWithConversionHandler(
19 &self,
20 conversion_handler: UITextAttributesConversionHandler,
21 );
22 }
23);
24
25extern_class!(
26 #[unsafe(super(NSObject))]
28 #[thread_kind = MainThreadOnly]
29 #[derive(Debug, PartialEq, Eq, Hash)]
30 pub struct UITextFormattingCoordinator;
31);
32
33unsafe impl NSObjectProtocol for UITextFormattingCoordinator {}
34
35#[cfg(feature = "UIFontPickerViewController")]
36unsafe impl UIFontPickerViewControllerDelegate for UITextFormattingCoordinator {}
37
38impl UITextFormattingCoordinator {
39 extern_methods!(
40 #[unsafe(method(delegate))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn delegate(
43 &self,
44 ) -> Option<Retained<ProtocolObject<dyn UITextFormattingCoordinatorDelegate>>>;
45
46 #[unsafe(method(setDelegate:))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn setDelegate(
51 &self,
52 delegate: Option<&ProtocolObject<dyn UITextFormattingCoordinatorDelegate>>,
53 );
54
55 #[unsafe(method(isFontPanelVisible))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn isFontPanelVisible(mtm: MainThreadMarker) -> bool;
58
59 #[cfg(all(
60 feature = "UIResponder",
61 feature = "UIScene",
62 feature = "UIWindowScene"
63 ))]
64 #[unsafe(method(textFormattingCoordinatorForWindowScene:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn textFormattingCoordinatorForWindowScene(
67 window_scene: &UIWindowScene,
68 ) -> Retained<Self>;
69
70 #[cfg(all(
71 feature = "UIResponder",
72 feature = "UIScene",
73 feature = "UIWindowScene"
74 ))]
75 #[unsafe(method(initWithWindowScene:))]
76 #[unsafe(method_family = init)]
77 pub unsafe fn initWithWindowScene(
78 this: Allocated<Self>,
79 window_scene: &UIWindowScene,
80 ) -> Retained<Self>;
81
82 #[unsafe(method(init))]
83 #[unsafe(method_family = init)]
84 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
85
86 #[unsafe(method(setSelectedAttributes:isMultiple:))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn setSelectedAttributes_isMultiple(
89 &self,
90 attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
91 flag: bool,
92 );
93
94 #[unsafe(method(toggleFontPanel:))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn toggleFontPanel(sender: &AnyObject, mtm: MainThreadMarker);
97 );
98}
99
100impl UITextFormattingCoordinator {
102 extern_methods!(
103 #[unsafe(method(new))]
104 #[unsafe(method_family = new)]
105 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
106 );
107}