objc2_ui_kit/generated/
UITextFormattingViewControllerFormattingStyle.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// Type that defines formatting style presented in text formatting view.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uitextformattingviewcontrollerformattingstyle?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct UITextFormattingViewControllerFormattingStyle;
16);
17
18unsafe impl NSCoding for UITextFormattingViewControllerFormattingStyle {}
19
20unsafe impl NSCopying for UITextFormattingViewControllerFormattingStyle {}
21
22unsafe impl CopyingHelper for UITextFormattingViewControllerFormattingStyle {
23    type Result = Self;
24}
25
26unsafe impl NSObjectProtocol for UITextFormattingViewControllerFormattingStyle {}
27
28unsafe impl NSSecureCoding for UITextFormattingViewControllerFormattingStyle {}
29
30impl UITextFormattingViewControllerFormattingStyle {
31    extern_methods!(
32        /// Formatting style key.
33        #[unsafe(method(styleKey))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn styleKey(&self) -> Retained<NSString>;
36
37        /// Style title displayed in UI.
38        #[unsafe(method(title))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn title(&self) -> Retained<NSString>;
41
42        /// Attributes corresponding to this formatting style.
43        ///
44        /// Alongside `title`, these may be used to create a preview for this formatting style.
45        #[unsafe(method(attributes))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn attributes(&self)
48            -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
49
50        #[unsafe(method(initWithStyleKey:title:attributes:))]
51        #[unsafe(method_family = init)]
52        pub unsafe fn initWithStyleKey_title_attributes(
53            this: Allocated<Self>,
54            style_key: &NSString,
55            string: &NSString,
56            attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
57        ) -> Retained<Self>;
58    );
59}
60
61/// Methods declared on superclass `NSObject`.
62impl UITextFormattingViewControllerFormattingStyle {
63    extern_methods!(
64        #[unsafe(method(init))]
65        #[unsafe(method_family = init)]
66        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67
68        #[unsafe(method(new))]
69        #[unsafe(method_family = new)]
70        pub unsafe fn new() -> Retained<Self>;
71    );
72}