objc2_foundation/generated/
NSScriptCommandDescription.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsscriptcommanddescription?language=objc)
10    #[unsafe(super(NSObject))]
11    #[derive(Debug, PartialEq, Eq, Hash)]
12    pub struct NSScriptCommandDescription;
13);
14
15#[cfg(feature = "NSObject")]
16extern_conformance!(
17    unsafe impl NSCoding for NSScriptCommandDescription {}
18);
19
20extern_conformance!(
21    unsafe impl NSObjectProtocol for NSScriptCommandDescription {}
22);
23
24impl NSScriptCommandDescription {
25    extern_methods!(
26        #[unsafe(method(init))]
27        #[unsafe(method_family = init)]
28        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
29
30        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
31        #[unsafe(method(initWithSuiteName:commandName:dictionary:))]
32        #[unsafe(method_family = init)]
33        pub unsafe fn initWithSuiteName_commandName_dictionary(
34            this: Allocated<Self>,
35            suite_name: &NSString,
36            command_name: &NSString,
37            command_declaration: Option<&NSDictionary>,
38        ) -> Option<Retained<Self>>;
39
40        #[cfg(feature = "NSCoder")]
41        #[unsafe(method(initWithCoder:))]
42        #[unsafe(method_family = init)]
43        pub unsafe fn initWithCoder(
44            this: Allocated<Self>,
45            in_coder: &NSCoder,
46        ) -> Option<Retained<Self>>;
47
48        #[cfg(feature = "NSString")]
49        #[unsafe(method(suiteName))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn suiteName(&self) -> Retained<NSString>;
52
53        #[cfg(feature = "NSString")]
54        #[unsafe(method(commandName))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn commandName(&self) -> Retained<NSString>;
57
58        #[unsafe(method(appleEventClassCode))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn appleEventClassCode(&self) -> FourCharCode;
61
62        #[unsafe(method(appleEventCode))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn appleEventCode(&self) -> FourCharCode;
65
66        #[cfg(feature = "NSString")]
67        #[unsafe(method(commandClassName))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn commandClassName(&self) -> Retained<NSString>;
70
71        #[cfg(feature = "NSString")]
72        #[unsafe(method(returnType))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn returnType(&self) -> Option<Retained<NSString>>;
75
76        #[unsafe(method(appleEventCodeForReturnType))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn appleEventCodeForReturnType(&self) -> FourCharCode;
79
80        #[cfg(all(feature = "NSArray", feature = "NSString"))]
81        #[unsafe(method(argumentNames))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn argumentNames(&self) -> Retained<NSArray<NSString>>;
84
85        #[cfg(feature = "NSString")]
86        #[unsafe(method(typeForArgumentWithName:))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn typeForArgumentWithName(
89            &self,
90            argument_name: &NSString,
91        ) -> Option<Retained<NSString>>;
92
93        #[cfg(feature = "NSString")]
94        #[unsafe(method(appleEventCodeForArgumentWithName:))]
95        #[unsafe(method_family = none)]
96        pub unsafe fn appleEventCodeForArgumentWithName(
97            &self,
98            argument_name: &NSString,
99        ) -> FourCharCode;
100
101        #[cfg(feature = "NSString")]
102        #[unsafe(method(isOptionalArgumentWithName:))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn isOptionalArgumentWithName(&self, argument_name: &NSString) -> bool;
105
106        #[cfg(feature = "NSScriptCommand")]
107        #[unsafe(method(createCommandInstance))]
108        #[unsafe(method_family = none)]
109        pub unsafe fn createCommandInstance(&self) -> Retained<NSScriptCommand>;
110
111        #[cfg(all(feature = "NSScriptCommand", feature = "NSZone"))]
112        #[unsafe(method(createCommandInstanceWithZone:))]
113        #[unsafe(method_family = none)]
114        pub unsafe fn createCommandInstanceWithZone(
115            &self,
116            zone: *mut NSZone,
117        ) -> Retained<NSScriptCommand>;
118    );
119}
120
121/// Methods declared on superclass `NSObject`.
122impl NSScriptCommandDescription {
123    extern_methods!(
124        #[unsafe(method(new))]
125        #[unsafe(method_family = new)]
126        pub unsafe fn new() -> Retained<Self>;
127    );
128}