objc2_app_kit/generated/
NSTextListElement.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    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstextlistelement?language=objc)
11    #[unsafe(super(NSTextParagraph, NSTextElement, NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[cfg(feature = "NSTextElement")]
14    pub struct NSTextListElement;
15);
16
17#[cfg(feature = "NSTextElement")]
18unsafe impl NSObjectProtocol for NSTextListElement {}
19
20#[cfg(feature = "NSTextElement")]
21impl NSTextListElement {
22    extern_methods!(
23        #[cfg(feature = "NSTextList")]
24        #[unsafe(method(initWithParentElement:textList:contents:markerAttributes:childElements:))]
25        #[unsafe(method_family = init)]
26        pub unsafe fn initWithParentElement_textList_contents_markerAttributes_childElements(
27            this: Allocated<Self>,
28            parent: Option<&NSTextListElement>,
29            text_list: &NSTextList,
30            contents: Option<&NSAttributedString>,
31            marker_attributes: Option<&NSDictionary<NSAttributedStringKey, AnyObject>>,
32            children: Option<&NSArray<NSTextListElement>>,
33        ) -> Retained<Self>;
34
35        #[unsafe(method(initWithAttributedString:))]
36        #[unsafe(method_family = init)]
37        pub unsafe fn initWithAttributedString(
38            this: Allocated<Self>,
39            attributed_string: Option<&NSAttributedString>,
40        ) -> Retained<Self>;
41
42        #[cfg(feature = "NSTextList")]
43        #[unsafe(method(textListElementWithContents:markerAttributes:textList:childElements:))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn textListElementWithContents_markerAttributes_textList_childElements(
46            contents: &NSAttributedString,
47            marker_attributes: Option<&NSDictionary<NSAttributedStringKey, AnyObject>>,
48            text_list: &NSTextList,
49            children: Option<&NSArray<NSTextListElement>>,
50        ) -> Retained<Self>;
51
52        #[cfg(feature = "NSTextList")]
53        #[unsafe(method(textListElementWithChildElements:textList:nestingLevel:))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn textListElementWithChildElements_textList_nestingLevel(
56            children: &NSArray<NSTextListElement>,
57            text_list: &NSTextList,
58            nesting_level: NSInteger,
59        ) -> Option<Retained<Self>>;
60
61        #[cfg(feature = "NSTextList")]
62        #[unsafe(method(textList))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn textList(&self) -> Retained<NSTextList>;
65
66        #[unsafe(method(contents))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn contents(&self) -> Option<Retained<NSAttributedString>>;
69
70        #[unsafe(method(markerAttributes))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn markerAttributes(
73            &self,
74        ) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>;
75
76        #[unsafe(method(attributedString))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn attributedString(&self) -> Retained<NSAttributedString>;
79
80        #[unsafe(method(childElements))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn childElements(&self) -> Retained<NSArray<NSTextListElement>>;
83
84        #[unsafe(method(parentElement))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn parentElement(&self) -> Option<Retained<NSTextListElement>>;
87    );
88}
89
90/// Methods declared on superclass `NSTextElement`.
91#[cfg(feature = "NSTextElement")]
92impl NSTextListElement {
93    extern_methods!(
94        #[cfg(feature = "NSTextContentManager")]
95        #[unsafe(method(initWithTextContentManager:))]
96        #[unsafe(method_family = init)]
97        pub unsafe fn initWithTextContentManager(
98            this: Allocated<Self>,
99            text_content_manager: Option<&NSTextContentManager>,
100        ) -> Retained<Self>;
101    );
102}
103
104/// Methods declared on superclass `NSObject`.
105#[cfg(feature = "NSTextElement")]
106impl NSTextListElement {
107    extern_methods!(
108        #[unsafe(method(init))]
109        #[unsafe(method_family = init)]
110        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
111
112        #[unsafe(method(new))]
113        #[unsafe(method_family = new)]
114        pub unsafe fn new() -> Retained<Self>;
115    );
116}