objc2_foundation/generated/
NSScriptClassDescription.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9 #[unsafe(super(NSClassDescription, NSObject))]
11 #[derive(Debug, PartialEq, Eq, Hash)]
12 #[cfg(feature = "NSClassDescription")]
13 pub struct NSScriptClassDescription;
14);
15
16#[cfg(feature = "NSClassDescription")]
17extern_conformance!(
18 unsafe impl NSObjectProtocol for NSScriptClassDescription {}
19);
20
21#[cfg(feature = "NSClassDescription")]
22impl NSScriptClassDescription {
23 extern_methods!(
24 #[unsafe(method(classDescriptionForClass:))]
25 #[unsafe(method_family = none)]
26 pub unsafe fn classDescriptionForClass(
27 a_class: &AnyClass,
28 ) -> Option<Retained<NSScriptClassDescription>>;
29
30 #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
31 #[unsafe(method(initWithSuiteName:className:dictionary:))]
32 #[unsafe(method_family = init)]
33 pub unsafe fn initWithSuiteName_className_dictionary(
34 this: Allocated<Self>,
35 suite_name: &NSString,
36 class_name: &NSString,
37 class_declaration: Option<&NSDictionary>,
38 ) -> Option<Retained<Self>>;
39
40 #[cfg(feature = "NSString")]
41 #[unsafe(method(suiteName))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn suiteName(&self) -> Option<Retained<NSString>>;
44
45 #[cfg(feature = "NSString")]
46 #[unsafe(method(className))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn className(&self) -> Option<Retained<NSString>>;
49
50 #[cfg(feature = "NSString")]
51 #[unsafe(method(implementationClassName))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn implementationClassName(&self) -> Option<Retained<NSString>>;
54
55 #[unsafe(method(superclassDescription))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn superclassDescription(&self) -> Option<Retained<NSScriptClassDescription>>;
58
59 #[unsafe(method(appleEventCode))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn appleEventCode(&self) -> FourCharCode;
62
63 #[unsafe(method(matchesAppleEventCode:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn matchesAppleEventCode(&self, apple_event_code: FourCharCode) -> bool;
66
67 #[cfg(feature = "NSScriptCommandDescription")]
68 #[unsafe(method(supportsCommand:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn supportsCommand(
71 &self,
72 command_description: &NSScriptCommandDescription,
73 ) -> bool;
74
75 #[cfg(feature = "NSScriptCommandDescription")]
76 #[unsafe(method(selectorForCommand:))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn selectorForCommand(
79 &self,
80 command_description: &NSScriptCommandDescription,
81 ) -> Option<Sel>;
82
83 #[cfg(feature = "NSString")]
84 #[unsafe(method(typeForKey:))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn typeForKey(&self, key: &NSString) -> Option<Retained<NSString>>;
87
88 #[cfg(feature = "NSString")]
89 #[unsafe(method(classDescriptionForKey:))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn classDescriptionForKey(
92 &self,
93 key: &NSString,
94 ) -> Option<Retained<NSScriptClassDescription>>;
95
96 #[cfg(feature = "NSString")]
97 #[unsafe(method(appleEventCodeForKey:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn appleEventCodeForKey(&self, key: &NSString) -> FourCharCode;
100
101 #[cfg(feature = "NSString")]
102 #[unsafe(method(keyWithAppleEventCode:))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn keyWithAppleEventCode(
105 &self,
106 apple_event_code: FourCharCode,
107 ) -> Option<Retained<NSString>>;
108
109 #[cfg(feature = "NSString")]
110 #[unsafe(method(defaultSubcontainerAttributeKey))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn defaultSubcontainerAttributeKey(&self) -> Option<Retained<NSString>>;
113
114 #[cfg(feature = "NSString")]
115 #[unsafe(method(isLocationRequiredToCreateForKey:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn isLocationRequiredToCreateForKey(
118 &self,
119 to_many_relationship_key: &NSString,
120 ) -> bool;
121
122 #[cfg(feature = "NSString")]
123 #[unsafe(method(hasPropertyForKey:))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn hasPropertyForKey(&self, key: &NSString) -> bool;
126
127 #[cfg(feature = "NSString")]
128 #[unsafe(method(hasOrderedToManyRelationshipForKey:))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn hasOrderedToManyRelationshipForKey(&self, key: &NSString) -> bool;
131
132 #[cfg(feature = "NSString")]
133 #[unsafe(method(hasReadablePropertyForKey:))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn hasReadablePropertyForKey(&self, key: &NSString) -> bool;
136
137 #[cfg(feature = "NSString")]
138 #[unsafe(method(hasWritablePropertyForKey:))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn hasWritablePropertyForKey(&self, key: &NSString) -> bool;
141 );
142}
143
144#[cfg(feature = "NSClassDescription")]
146impl NSScriptClassDescription {
147 extern_methods!(
148 #[unsafe(method(init))]
149 #[unsafe(method_family = init)]
150 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
151
152 #[unsafe(method(new))]
153 #[unsafe(method_family = new)]
154 pub unsafe fn new() -> Retained<Self>;
155 );
156}
157
158#[cfg(feature = "NSClassDescription")]
160impl NSScriptClassDescription {
161 extern_methods!(
162 #[cfg(feature = "NSString")]
163 #[deprecated]
164 #[unsafe(method(isReadOnlyKey:))]
165 #[unsafe(method_family = none)]
166 pub unsafe fn isReadOnlyKey(&self, key: &NSString) -> bool;
167 );
168}
169
170mod private_NSObjectNSScriptClassDescription {
171 pub trait Sealed {}
172}
173
174#[doc(alias = "NSScriptClassDescription")]
176pub unsafe trait NSObjectNSScriptClassDescription:
177 ClassType + Sized + private_NSObjectNSScriptClassDescription::Sealed
178{
179 extern_methods!(
180 #[unsafe(method(classCode))]
181 #[unsafe(method_family = none)]
182 unsafe fn classCode(&self) -> FourCharCode;
183
184 #[cfg(feature = "NSString")]
185 #[unsafe(method(className))]
186 #[unsafe(method_family = none)]
187 unsafe fn className(&self) -> Retained<NSString>;
188 );
189}
190
191impl private_NSObjectNSScriptClassDescription::Sealed for NSObject {}
192unsafe impl NSObjectNSScriptClassDescription for NSObject {}