objc2_automator/generated/
AMAction.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct AMLogLevel(pub NSUInteger);
17impl AMLogLevel {
18 #[doc(alias = "AMLogLevelDebug")]
19 pub const Debug: Self = Self(0);
20 #[doc(alias = "AMLogLevelInfo")]
21 pub const Info: Self = Self(1);
22 #[doc(alias = "AMLogLevelWarn")]
23 pub const Warn: Self = Self(2);
24 #[doc(alias = "AMLogLevelError")]
25 pub const Error: Self = Self(3);
26}
27
28unsafe impl Encode for AMLogLevel {
29 const ENCODING: Encoding = NSUInteger::ENCODING;
30}
31
32unsafe impl RefEncode for AMLogLevel {
33 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
34}
35
36extern_class!(
37 #[unsafe(super(NSObject))]
39 #[derive(Debug, PartialEq, Eq, Hash)]
40 pub struct AMAction;
41);
42
43extern_conformance!(
44 unsafe impl NSObjectProtocol for AMAction {}
45);
46
47impl AMAction {
48 extern_methods!(
49 #[unsafe(method(initWithDefinition:fromArchive:))]
53 #[unsafe(method_family = init)]
54 pub unsafe fn initWithDefinition_fromArchive(
55 this: Allocated<Self>,
56 dict: Option<&NSDictionary<NSString, AnyObject>>,
57 archived: bool,
58 ) -> Option<Retained<Self>>;
59
60 #[unsafe(method(initWithContentsOfURL:error:_))]
61 #[unsafe(method_family = init)]
62 pub unsafe fn initWithContentsOfURL_error(
63 this: Allocated<Self>,
64 file_url: &NSURL,
65 ) -> Result<Retained<Self>, Retained<NSError>>;
66
67 #[unsafe(method(name))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn name(&self) -> Retained<NSString>;
70
71 #[unsafe(method(ignoresInput))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn ignoresInput(&self) -> bool;
74
75 #[unsafe(method(selectedInputType))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn selectedInputType(&self) -> Option<Retained<NSString>>;
78
79 #[unsafe(method(setSelectedInputType:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn setSelectedInputType(&self, selected_input_type: Option<&NSString>);
83
84 #[unsafe(method(selectedOutputType))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn selectedOutputType(&self) -> Option<Retained<NSString>>;
87
88 #[unsafe(method(setSelectedOutputType:))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn setSelectedOutputType(&self, selected_output_type: Option<&NSString>);
92
93 #[cfg(feature = "objc2-core-foundation")]
94 #[unsafe(method(progressValue))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn progressValue(&self) -> CGFloat;
97
98 #[cfg(feature = "objc2-core-foundation")]
99 #[unsafe(method(setProgressValue:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn setProgressValue(&self, progress_value: CGFloat);
103
104 #[deprecated]
109 #[unsafe(method(runWithInput:fromAction:error:))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn runWithInput_fromAction_error(
112 &self,
113 input: Option<&AnyObject>,
114 an_action: Option<&AMAction>,
115 error_info: Option<&mut Option<Retained<NSDictionary<NSString, AnyObject>>>>,
116 ) -> Option<Retained<AnyObject>>;
117
118 #[unsafe(method(runWithInput:error:_))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn runWithInput_error(
124 &self,
125 input: Option<&AnyObject>,
126 ) -> Result<Retained<AnyObject>, Retained<NSError>>;
127
128 #[unsafe(method(runAsynchronouslyWithInput:))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn runAsynchronouslyWithInput(&self, input: Option<&AnyObject>);
134
135 #[unsafe(method(willFinishRunning))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn willFinishRunning(&self);
138
139 #[deprecated]
143 #[unsafe(method(didFinishRunningWithError:))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn didFinishRunningWithError(
146 &self,
147 error_info: Option<&NSDictionary<NSString, AnyObject>>,
148 );
149
150 #[unsafe(method(finishRunningWithError:))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn finishRunningWithError(&self, error: Option<&NSError>);
153
154 #[unsafe(method(output))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn output(&self) -> Option<Retained<AnyObject>>;
157
158 #[unsafe(method(setOutput:))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn setOutput(&self, output: Option<&AnyObject>);
166
167 #[unsafe(method(stop))]
168 #[unsafe(method_family = none)]
169 pub unsafe fn stop(&self);
170
171 #[unsafe(method(reset))]
172 #[unsafe(method_family = none)]
173 pub unsafe fn reset(&self);
174
175 #[unsafe(method(writeToDictionary:))]
179 #[unsafe(method_family = none)]
180 pub unsafe fn writeToDictionary(
181 &self,
182 dictionary: &NSMutableDictionary<NSString, AnyObject>,
183 );
184
185 #[unsafe(method(opened))]
186 #[unsafe(method_family = none)]
187 pub unsafe fn opened(&self);
188
189 #[unsafe(method(activated))]
190 #[unsafe(method_family = none)]
191 pub unsafe fn activated(&self);
192
193 #[unsafe(method(closed))]
194 #[unsafe(method_family = none)]
195 pub unsafe fn closed(&self);
196
197 #[unsafe(method(updateParameters))]
198 #[unsafe(method_family = none)]
199 pub unsafe fn updateParameters(&self);
200
201 #[unsafe(method(parametersUpdated))]
202 #[unsafe(method_family = none)]
203 pub unsafe fn parametersUpdated(&self);
204
205 #[unsafe(method(isStopped))]
206 #[unsafe(method_family = none)]
207 pub unsafe fn isStopped(&self) -> bool;
208 );
209}
210
211impl AMAction {
213 extern_methods!(
214 #[unsafe(method(init))]
215 #[unsafe(method_family = init)]
216 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
217
218 #[unsafe(method(new))]
219 #[unsafe(method_family = new)]
220 pub unsafe fn new() -> Retained<Self>;
221 );
222}