objc2_social/generated/
SLComposeServiceViewController.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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    /// [Apple's documentation](https://developer.apple.com/documentation/social/slcomposeserviceviewcontroller?language=objc)
15    #[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        /// Setter for [`placeholder`][Self::placeholder].
85        #[unsafe(method(setPlaceholder:))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn setPlaceholder(&self, placeholder: Option<&NSString>);
88
89        #[unsafe(method(didSelectPost))]
90        #[unsafe(method_family = none)]
91        pub unsafe fn didSelectPost(&self);
92
93        #[unsafe(method(didSelectCancel))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn didSelectCancel(&self);
96
97        #[unsafe(method(cancel))]
98        #[unsafe(method_family = none)]
99        pub unsafe fn cancel(&self);
100
101        #[unsafe(method(isContentValid))]
102        #[unsafe(method_family = none)]
103        pub unsafe fn isContentValid(&self) -> bool;
104
105        #[unsafe(method(validateContent))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn validateContent(&self);
108
109        #[unsafe(method(charactersRemaining))]
110        #[unsafe(method_family = none)]
111        pub unsafe fn charactersRemaining(&self) -> Option<Retained<NSNumber>>;
112
113        /// Setter for [`charactersRemaining`][Self::charactersRemaining].
114        #[unsafe(method(setCharactersRemaining:))]
115        #[unsafe(method_family = none)]
116        pub unsafe fn setCharactersRemaining(&self, characters_remaining: Option<&NSNumber>);
117    );
118}
119
120/// Methods declared on superclass `NSViewController`.
121#[cfg(feature = "objc2-app-kit")]
122#[cfg(target_os = "macos")]
123impl SLComposeServiceViewController {
124    extern_methods!(
125        #[unsafe(method(initWithNibName:bundle:))]
126        #[unsafe(method_family = init)]
127        pub unsafe fn initWithNibName_bundle(
128            this: Allocated<Self>,
129            nib_name_or_nil: Option<&NSNibName>,
130            nib_bundle_or_nil: Option<&NSBundle>,
131        ) -> Retained<Self>;
132
133        #[unsafe(method(initWithCoder:))]
134        #[unsafe(method_family = init)]
135        pub unsafe fn initWithCoder(
136            this: Allocated<Self>,
137            coder: &NSCoder,
138        ) -> Option<Retained<Self>>;
139    );
140}
141
142/// Methods declared on superclass `NSResponder`.
143#[cfg(feature = "objc2-app-kit")]
144#[cfg(target_os = "macos")]
145impl SLComposeServiceViewController {
146    extern_methods!(
147        #[unsafe(method(init))]
148        #[unsafe(method_family = init)]
149        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
150    );
151}
152
153/// Methods declared on superclass `NSObject`.
154#[cfg(feature = "objc2-app-kit")]
155#[cfg(target_os = "macos")]
156impl SLComposeServiceViewController {
157    extern_methods!(
158        #[unsafe(method(new))]
159        #[unsafe(method_family = new)]
160        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
161    );
162}