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
43unsafe impl NSObjectProtocol for AMAction {}
44
45impl AMAction {
46 extern_methods!(
47 #[unsafe(method(initWithDefinition:fromArchive:))]
48 #[unsafe(method_family = init)]
49 pub unsafe fn initWithDefinition_fromArchive(
50 this: Allocated<Self>,
51 dict: Option<&NSDictionary<NSString, AnyObject>>,
52 archived: bool,
53 ) -> Option<Retained<Self>>;
54
55 #[unsafe(method(initWithContentsOfURL:error:_))]
56 #[unsafe(method_family = init)]
57 pub unsafe fn initWithContentsOfURL_error(
58 this: Allocated<Self>,
59 file_url: &NSURL,
60 ) -> Result<Retained<Self>, Retained<NSError>>;
61
62 #[unsafe(method(name))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn name(&self) -> Retained<NSString>;
65
66 #[unsafe(method(ignoresInput))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn ignoresInput(&self) -> bool;
69
70 #[unsafe(method(selectedInputType))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn selectedInputType(&self) -> Option<Retained<NSString>>;
73
74 #[unsafe(method(setSelectedInputType:))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn setSelectedInputType(&self, selected_input_type: Option<&NSString>);
78
79 #[unsafe(method(selectedOutputType))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn selectedOutputType(&self) -> Option<Retained<NSString>>;
82
83 #[unsafe(method(setSelectedOutputType:))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn setSelectedOutputType(&self, selected_output_type: Option<&NSString>);
87
88 #[cfg(feature = "objc2-core-foundation")]
89 #[unsafe(method(progressValue))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn progressValue(&self) -> CGFloat;
92
93 #[cfg(feature = "objc2-core-foundation")]
94 #[unsafe(method(setProgressValue:))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn setProgressValue(&self, progress_value: CGFloat);
98
99 #[deprecated]
100 #[unsafe(method(runWithInput:fromAction:error:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn runWithInput_fromAction_error(
103 &self,
104 input: Option<&AnyObject>,
105 an_action: Option<&AMAction>,
106 error_info: Option<&mut Option<Retained<NSDictionary<NSString, AnyObject>>>>,
107 ) -> Option<Retained<AnyObject>>;
108
109 #[unsafe(method(runWithInput:error:_))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn runWithInput_error(
112 &self,
113 input: Option<&AnyObject>,
114 ) -> Result<Retained<AnyObject>, Retained<NSError>>;
115
116 #[unsafe(method(runAsynchronouslyWithInput:))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn runAsynchronouslyWithInput(&self, input: Option<&AnyObject>);
119
120 #[unsafe(method(willFinishRunning))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn willFinishRunning(&self);
123
124 #[deprecated]
125 #[unsafe(method(didFinishRunningWithError:))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn didFinishRunningWithError(
128 &self,
129 error_info: Option<&NSDictionary<NSString, AnyObject>>,
130 );
131
132 #[unsafe(method(finishRunningWithError:))]
133 #[unsafe(method_family = none)]
134 pub unsafe fn finishRunningWithError(&self, error: Option<&NSError>);
135
136 #[unsafe(method(output))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn output(&self) -> Option<Retained<AnyObject>>;
139
140 #[unsafe(method(setOutput:))]
142 #[unsafe(method_family = none)]
143 pub unsafe fn setOutput(&self, output: Option<&AnyObject>);
144
145 #[unsafe(method(stop))]
146 #[unsafe(method_family = none)]
147 pub unsafe fn stop(&self);
148
149 #[unsafe(method(reset))]
150 #[unsafe(method_family = none)]
151 pub unsafe fn reset(&self);
152
153 #[unsafe(method(writeToDictionary:))]
154 #[unsafe(method_family = none)]
155 pub unsafe fn writeToDictionary(
156 &self,
157 dictionary: &NSMutableDictionary<NSString, AnyObject>,
158 );
159
160 #[unsafe(method(opened))]
161 #[unsafe(method_family = none)]
162 pub unsafe fn opened(&self);
163
164 #[unsafe(method(activated))]
165 #[unsafe(method_family = none)]
166 pub unsafe fn activated(&self);
167
168 #[unsafe(method(closed))]
169 #[unsafe(method_family = none)]
170 pub unsafe fn closed(&self);
171
172 #[unsafe(method(updateParameters))]
173 #[unsafe(method_family = none)]
174 pub unsafe fn updateParameters(&self);
175
176 #[unsafe(method(parametersUpdated))]
177 #[unsafe(method_family = none)]
178 pub unsafe fn parametersUpdated(&self);
179
180 #[unsafe(method(isStopped))]
181 #[unsafe(method_family = none)]
182 pub unsafe fn isStopped(&self) -> bool;
183 );
184}
185
186impl AMAction {
188 extern_methods!(
189 #[unsafe(method(init))]
190 #[unsafe(method_family = init)]
191 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
192
193 #[unsafe(method(new))]
194 #[unsafe(method_family = new)]
195 pub unsafe fn new() -> Retained<Self>;
196 );
197}