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")]
24unsafe impl NSCoding for SLComposeServiceViewController {}
25
26#[cfg(feature = "objc2-app-kit")]
27#[cfg(target_os = "macos")]
28unsafe impl NSEditor for SLComposeServiceViewController {}
29
30#[cfg(feature = "objc2-app-kit")]
31#[cfg(target_os = "macos")]
32unsafe impl NSObjectProtocol for SLComposeServiceViewController {}
33
34#[cfg(feature = "objc2-app-kit")]
35#[cfg(target_os = "macos")]
36unsafe impl NSSeguePerforming for SLComposeServiceViewController {}
37
38#[cfg(feature = "objc2-app-kit")]
39#[cfg(target_os = "macos")]
40unsafe impl NSTextDelegate for SLComposeServiceViewController {}
41
42#[cfg(feature = "objc2-app-kit")]
43#[cfg(target_os = "macos")]
44unsafe impl NSTextViewDelegate for SLComposeServiceViewController {}
45
46#[cfg(feature = "objc2-app-kit")]
47#[cfg(target_os = "macos")]
48unsafe impl NSUserInterfaceItemIdentification for SLComposeServiceViewController {}
49
50#[cfg(feature = "objc2-app-kit")]
51#[cfg(target_os = "macos")]
52impl SLComposeServiceViewController {
53 extern_methods!(
54 #[unsafe(method(presentationAnimationDidFinish))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn presentationAnimationDidFinish(&self);
57
58 #[unsafe(method(textView))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn textView(&self) -> Option<Retained<NSTextView>>;
61
62 #[unsafe(method(contentText))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn contentText(&self) -> Option<Retained<NSString>>;
65
66 #[unsafe(method(placeholder))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn placeholder(&self) -> Retained<NSString>;
69
70 #[unsafe(method(setPlaceholder:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn setPlaceholder(&self, placeholder: Option<&NSString>);
74
75 #[unsafe(method(didSelectPost))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn didSelectPost(&self);
78
79 #[unsafe(method(didSelectCancel))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn didSelectCancel(&self);
82
83 #[unsafe(method(cancel))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn cancel(&self);
86
87 #[unsafe(method(isContentValid))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn isContentValid(&self) -> bool;
90
91 #[unsafe(method(validateContent))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn validateContent(&self);
94
95 #[unsafe(method(charactersRemaining))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn charactersRemaining(&self) -> Option<Retained<NSNumber>>;
98
99 #[unsafe(method(setCharactersRemaining:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn setCharactersRemaining(&self, characters_remaining: Option<&NSNumber>);
103 );
104}
105
106#[cfg(feature = "objc2-app-kit")]
108#[cfg(target_os = "macos")]
109impl SLComposeServiceViewController {
110 extern_methods!(
111 #[unsafe(method(initWithNibName:bundle:))]
112 #[unsafe(method_family = init)]
113 pub unsafe fn initWithNibName_bundle(
114 this: Allocated<Self>,
115 nib_name_or_nil: Option<&NSNibName>,
116 nib_bundle_or_nil: Option<&NSBundle>,
117 ) -> Retained<Self>;
118
119 #[unsafe(method(initWithCoder:))]
120 #[unsafe(method_family = init)]
121 pub unsafe fn initWithCoder(
122 this: Allocated<Self>,
123 coder: &NSCoder,
124 ) -> Option<Retained<Self>>;
125 );
126}
127
128#[cfg(feature = "objc2-app-kit")]
130#[cfg(target_os = "macos")]
131impl SLComposeServiceViewController {
132 extern_methods!(
133 #[unsafe(method(init))]
134 #[unsafe(method_family = init)]
135 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
136 );
137}
138
139#[cfg(feature = "objc2-app-kit")]
141#[cfg(target_os = "macos")]
142impl SLComposeServiceViewController {
143 extern_methods!(
144 #[unsafe(method(new))]
145 #[unsafe(method_family = new)]
146 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
147 );
148}