objc2_automator/generated/
AMWorkflow.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct AMWorkflow;
15);
16
17unsafe impl NSCopying for AMWorkflow {}
18
19unsafe impl CopyingHelper for AMWorkflow {
20 type Result = Self;
21}
22
23unsafe impl NSObjectProtocol for AMWorkflow {}
24
25impl AMWorkflow {
26 extern_methods!(
27 #[unsafe(method(runWorkflowAtURL:withInput:error:_))]
28 #[unsafe(method_family = none)]
29 pub unsafe fn runWorkflowAtURL_withInput_error(
30 file_url: &NSURL,
31 input: Option<&AnyObject>,
32 ) -> Result<Retained<AnyObject>, Retained<NSError>>;
33
34 #[unsafe(method(init))]
35 #[unsafe(method_family = init)]
36 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
37
38 #[unsafe(method(initWithContentsOfURL:error:_))]
39 #[unsafe(method_family = init)]
40 pub unsafe fn initWithContentsOfURL_error(
41 this: Allocated<Self>,
42 file_url: &NSURL,
43 ) -> Result<Retained<Self>, Retained<NSError>>;
44
45 #[unsafe(method(writeToURL:error:_))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn writeToURL_error(&self, file_url: &NSURL) -> Result<(), Retained<NSError>>;
48
49 #[unsafe(method(setValue:forVariableWithName:))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn setValue_forVariableWithName(
52 &self,
53 value: Option<&AnyObject>,
54 variable_name: &NSString,
55 ) -> bool;
56
57 #[unsafe(method(valueForVariableWithName:))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn valueForVariableWithName(
60 &self,
61 variable_name: &NSString,
62 ) -> Option<Retained<AnyObject>>;
63
64 #[cfg(feature = "AMAction")]
65 #[unsafe(method(addAction:))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn addAction(&self, action: &AMAction);
68
69 #[cfg(feature = "AMAction")]
70 #[unsafe(method(removeAction:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn removeAction(&self, action: &AMAction);
73
74 #[cfg(feature = "AMAction")]
75 #[unsafe(method(insertAction:atIndex:))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn insertAction_atIndex(&self, action: &AMAction, index: NSUInteger);
78
79 #[unsafe(method(moveActionAtIndex:toIndex:))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn moveActionAtIndex_toIndex(
82 &self,
83 start_index: NSUInteger,
84 end_index: NSUInteger,
85 );
86
87 #[unsafe(method(fileURL))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn fileURL(&self) -> Option<Retained<NSURL>>;
90
91 #[cfg(feature = "AMAction")]
92 #[unsafe(method(actions))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn actions(&self) -> Retained<NSArray<AMAction>>;
95
96 #[unsafe(method(input))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn input(&self) -> Option<Retained<AnyObject>>;
99
100 #[unsafe(method(setInput:))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn setInput(&self, input: Option<&AnyObject>);
104
105 #[unsafe(method(output))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn output(&self) -> Option<Retained<AnyObject>>;
108 );
109}
110
111impl AMWorkflow {
113 extern_methods!(
114 #[unsafe(method(new))]
115 #[unsafe(method_family = new)]
116 pub unsafe fn new() -> Retained<Self>;
117 );
118}