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