objc2_automator/generated/
AMAppleScriptAction.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#[cfg(feature = "objc2-osa-kit")]
8use objc2_osa_kit::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/automator/amapplescriptaction?language=objc)
14    #[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"))]
21unsafe impl NSCoding for AMAppleScriptAction {}
22
23#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
24unsafe impl NSCopying for AMAppleScriptAction {}
25
26#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
27unsafe impl CopyingHelper for AMAppleScriptAction {
28    type Result = Self;
29}
30
31#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
32unsafe impl NSObjectProtocol for AMAppleScriptAction {}
33
34#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
35unsafe impl NSSecureCoding for AMAppleScriptAction {}
36
37#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
38impl AMAppleScriptAction {
39    extern_methods!(
40        #[cfg(feature = "objc2-osa-kit")]
41        #[unsafe(method(script))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn script(&self) -> Option<Retained<OSAScript>>;
44
45        #[cfg(feature = "objc2-osa-kit")]
46        /// Setter for [`script`][Self::script].
47        #[unsafe(method(setScript:))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn setScript(&self, script: Option<&OSAScript>);
50    );
51}
52
53/// Methods declared on superclass `AMAction`.
54#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
55impl AMAppleScriptAction {
56    extern_methods!(
57        #[unsafe(method(initWithDefinition:fromArchive:))]
58        #[unsafe(method_family = init)]
59        pub unsafe fn initWithDefinition_fromArchive(
60            this: Allocated<Self>,
61            dict: Option<&NSDictionary<NSString, AnyObject>>,
62            archived: bool,
63        ) -> Option<Retained<Self>>;
64
65        #[unsafe(method(initWithContentsOfURL:error:_))]
66        #[unsafe(method_family = init)]
67        pub unsafe fn initWithContentsOfURL_error(
68            this: Allocated<Self>,
69            file_url: &NSURL,
70        ) -> Result<Retained<Self>, Retained<NSError>>;
71    );
72}
73
74/// Methods declared on superclass `NSObject`.
75#[cfg(all(feature = "AMAction", feature = "AMBundleAction"))]
76impl AMAppleScriptAction {
77    extern_methods!(
78        #[unsafe(method(init))]
79        #[unsafe(method_family = init)]
80        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
81
82        #[unsafe(method(new))]
83        #[unsafe(method_family = new)]
84        pub unsafe fn new() -> Retained<Self>;
85    );
86}