objc2_social/generated/
SLComposeServiceViewController.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern_class!(
14 #[unsafe(super(NSViewController, NSResponder, NSObject))]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 #[cfg(feature = "objc2-app-kit")]
18 #[cfg(target_os = "macos")]
19 pub struct SLComposeServiceViewController;
20);
21
22#[cfg(feature = "objc2-app-kit")]
23#[cfg(target_os = "macos")]
24extern_conformance!(
25 unsafe impl NSCoding for SLComposeServiceViewController {}
26);
27
28#[cfg(feature = "objc2-app-kit")]
29#[cfg(target_os = "macos")]
30extern_conformance!(
31 unsafe impl NSEditor for SLComposeServiceViewController {}
32);
33
34#[cfg(feature = "objc2-app-kit")]
35#[cfg(target_os = "macos")]
36extern_conformance!(
37 unsafe impl NSObjectProtocol for SLComposeServiceViewController {}
38);
39
40#[cfg(feature = "objc2-app-kit")]
41#[cfg(target_os = "macos")]
42extern_conformance!(
43 unsafe impl NSSeguePerforming for SLComposeServiceViewController {}
44);
45
46#[cfg(feature = "objc2-app-kit")]
47#[cfg(target_os = "macos")]
48extern_conformance!(
49 unsafe impl NSTextDelegate for SLComposeServiceViewController {}
50);
51
52#[cfg(feature = "objc2-app-kit")]
53#[cfg(target_os = "macos")]
54extern_conformance!(
55 unsafe impl NSTextViewDelegate for SLComposeServiceViewController {}
56);
57
58#[cfg(feature = "objc2-app-kit")]
59#[cfg(target_os = "macos")]
60extern_conformance!(
61 unsafe impl NSUserInterfaceItemIdentification for SLComposeServiceViewController {}
62);
63
64#[cfg(feature = "objc2-app-kit")]
65#[cfg(target_os = "macos")]
66impl SLComposeServiceViewController {
67 extern_methods!(
68 #[unsafe(method(presentationAnimationDidFinish))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn presentationAnimationDidFinish(&self);
71
72 #[unsafe(method(textView))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn textView(&self) -> Option<Retained<NSTextView>>;
75
76 #[unsafe(method(contentText))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn contentText(&self) -> Option<Retained<NSString>>;
79
80 #[unsafe(method(placeholder))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn placeholder(&self) -> Retained<NSString>;
83
84 #[unsafe(method(setPlaceholder:))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn setPlaceholder(&self, placeholder: Option<&NSString>);
90
91 #[unsafe(method(didSelectPost))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn didSelectPost(&self);
94
95 #[unsafe(method(didSelectCancel))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn didSelectCancel(&self);
98
99 #[unsafe(method(cancel))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn cancel(&self);
102
103 #[unsafe(method(isContentValid))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn isContentValid(&self) -> bool;
106
107 #[unsafe(method(validateContent))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn validateContent(&self);
110
111 #[unsafe(method(charactersRemaining))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn charactersRemaining(&self) -> Option<Retained<NSNumber>>;
114
115 #[unsafe(method(setCharactersRemaining:))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn setCharactersRemaining(&self, characters_remaining: Option<&NSNumber>);
123 );
124}
125
126#[cfg(feature = "objc2-app-kit")]
128#[cfg(target_os = "macos")]
129impl SLComposeServiceViewController {
130 extern_methods!(
131 #[unsafe(method(initWithNibName:bundle:))]
132 #[unsafe(method_family = init)]
133 pub unsafe fn initWithNibName_bundle(
134 this: Allocated<Self>,
135 nib_name_or_nil: Option<&NSNibName>,
136 nib_bundle_or_nil: Option<&NSBundle>,
137 ) -> Retained<Self>;
138
139 #[unsafe(method(initWithCoder:))]
143 #[unsafe(method_family = init)]
144 pub unsafe fn initWithCoder(
145 this: Allocated<Self>,
146 coder: &NSCoder,
147 ) -> Option<Retained<Self>>;
148 );
149}
150
151#[cfg(feature = "objc2-app-kit")]
153#[cfg(target_os = "macos")]
154impl SLComposeServiceViewController {
155 extern_methods!(
156 #[unsafe(method(init))]
157 #[unsafe(method_family = init)]
158 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
159 );
160}
161
162#[cfg(feature = "objc2-app-kit")]
164#[cfg(target_os = "macos")]
165impl SLComposeServiceViewController {
166 extern_methods!(
167 #[unsafe(method(new))]
168 #[unsafe(method_family = new)]
169 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
170 );
171}