objc2_automator/generated/
AMAppleScriptAction.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-osa-kit")]
8use objc2_osa_kit::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(AMBundleAction, AMAction, NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
17 pub struct AMAppleScriptAction;
18);
19
20#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
21extern_conformance!(
22 unsafe impl NSCoding for AMAppleScriptAction {}
23);
24
25#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
26extern_conformance!(
27 unsafe impl NSCopying for AMAppleScriptAction {}
28);
29
30#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
31unsafe impl CopyingHelper for AMAppleScriptAction {
32 type Result = Self;
33}
34
35#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
36extern_conformance!(
37 unsafe impl NSObjectProtocol for AMAppleScriptAction {}
38);
39
40#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
41extern_conformance!(
42 unsafe impl NSSecureCoding for AMAppleScriptAction {}
43);
44
45#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
46impl AMAppleScriptAction {
47 extern_methods!(
48 #[cfg(feature = "objc2-osa-kit")]
49 #[unsafe(method(script))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn script(&self) -> Option<Retained<OSAScript>>;
52
53 #[cfg(feature = "objc2-osa-kit")]
54 #[unsafe(method(setScript:))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn setScript(&self, script: Option<&OSAScript>);
60 );
61}
62
63#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
65impl AMAppleScriptAction {
66 extern_methods!(
67 #[unsafe(method(initWithDefinition:fromArchive:))]
71 #[unsafe(method_family = init)]
72 pub unsafe fn initWithDefinition_fromArchive(
73 this: Allocated<Self>,
74 dict: Option<&NSDictionary<NSString, AnyObject>>,
75 archived: bool,
76 ) -> Option<Retained<Self>>;
77
78 #[unsafe(method(initWithContentsOfURL:error:_))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn initWithContentsOfURL_error(
81 this: Allocated<Self>,
82 file_url: &NSURL,
83 ) -> Result<Retained<Self>, Retained<NSError>>;
84 );
85}
86
87#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
89impl AMAppleScriptAction {
90 extern_methods!(
91 #[unsafe(method(init))]
92 #[unsafe(method_family = init)]
93 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
94
95 #[unsafe(method(new))]
96 #[unsafe(method_family = new)]
97 pub unsafe fn new() -> Retained<Self>;
98 );
99}