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        /// # Safety
32        ///
33        /// `command_declaration` generic should be of the correct type.
34        #[unsafe(method(initWithSuiteName:commandName:dictionary:))]
35        #[unsafe(method_family = init)]
36        pub unsafe fn initWithSuiteName_commandName_dictionary(
37            this: Allocated<Self>,
38            suite_name: &NSString,
39            command_name: &NSString,
40            command_declaration: Option<&NSDictionary>,
41        ) -> Option<Retained<Self>>;
42
43        #[cfg(feature = "NSCoder")]
44        /// # Safety
45        ///
46        /// `in_coder` possibly has further requirements.
47        #[unsafe(method(initWithCoder:))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn initWithCoder(
50            this: Allocated<Self>,
51            in_coder: &NSCoder,
52        ) -> Option<Retained<Self>>;
53
54        #[cfg(feature = "NSString")]
55        #[unsafe(method(suiteName))]
56        #[unsafe(method_family = none)]
57        pub fn suiteName(&self) -> Retained<NSString>;
58
59        #[cfg(feature = "NSString")]
60        #[unsafe(method(commandName))]
61        #[unsafe(method_family = none)]
62        pub fn commandName(&self) -> Retained<NSString>;
63
64        #[unsafe(method(appleEventClassCode))]
65        #[unsafe(method_family = none)]
66        pub fn appleEventClassCode(&self) -> FourCharCode;
67
68        #[unsafe(method(appleEventCode))]
69        #[unsafe(method_family = none)]
70        pub fn appleEventCode(&self) -> FourCharCode;
71
72        #[cfg(feature = "NSString")]
73        #[unsafe(method(commandClassName))]
74        #[unsafe(method_family = none)]
75        pub fn commandClassName(&self) -> Retained<NSString>;
76
77        #[cfg(feature = "NSString")]
78        #[unsafe(method(returnType))]
79        #[unsafe(method_family = none)]
80        pub fn returnType(&self) -> Option<Retained<NSString>>;
81
82        #[unsafe(method(appleEventCodeForReturnType))]
83        #[unsafe(method_family = none)]
84        pub fn appleEventCodeForReturnType(&self) -> FourCharCode;
85
86        #[cfg(all(feature = "NSArray", feature = "NSString"))]
87        #[unsafe(method(argumentNames))]
88        #[unsafe(method_family = none)]
89        pub fn argumentNames(&self) -> Retained<NSArray<NSString>>;
90
91        #[cfg(feature = "NSString")]
92        #[unsafe(method(typeForArgumentWithName:))]
93        #[unsafe(method_family = none)]
94        pub fn typeForArgumentWithName(
95            &self,
96            argument_name: &NSString,
97        ) -> Option<Retained<NSString>>;
98
99        #[cfg(feature = "NSString")]
100        #[unsafe(method(appleEventCodeForArgumentWithName:))]
101        #[unsafe(method_family = none)]
102        pub fn appleEventCodeForArgumentWithName(&self, argument_name: &NSString) -> FourCharCode;
103
104        #[cfg(feature = "NSString")]
105        #[unsafe(method(isOptionalArgumentWithName:))]
106        #[unsafe(method_family = none)]
107        pub fn isOptionalArgumentWithName(&self, argument_name: &NSString) -> bool;
108
109        #[cfg(feature = "NSScriptCommand")]
110        #[unsafe(method(createCommandInstance))]
111        #[unsafe(method_family = none)]
112        pub fn createCommandInstance(&self) -> Retained<NSScriptCommand>;
113
114        #[cfg(all(feature = "NSScriptCommand", feature = "NSZone"))]
115        /// # Safety
116        ///
117        /// `zone` must be a valid pointer or null.
118        #[unsafe(method(createCommandInstanceWithZone:))]
119        #[unsafe(method_family = none)]
120        pub unsafe fn createCommandInstanceWithZone(
121            &self,
122            zone: *mut NSZone,
123        ) -> Retained<NSScriptCommand>;
124    );
125}
126
127/// Methods declared on superclass `NSObject`.
128impl NSScriptCommandDescription {
129    extern_methods!(
130        #[unsafe(method(new))]
131        #[unsafe(method_family = new)]
132        pub unsafe fn new() -> Retained<Self>;
133    );
134}