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