1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "NSClassDescription")]
    pub struct NSScriptClassDescription;

    #[cfg(feature = "NSClassDescription")]
    unsafe impl ClassType for NSScriptClassDescription {
        #[inherits(NSObject)]
        type Super = NSClassDescription;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "NSClassDescription")]
unsafe impl NSObjectProtocol for NSScriptClassDescription {}

extern_methods!(
    #[cfg(feature = "NSClassDescription")]
    unsafe impl NSScriptClassDescription {
        #[method_id(@__retain_semantics Other classDescriptionForClass:)]
        pub unsafe fn classDescriptionForClass(
            a_class: &AnyClass,
        ) -> Option<Retained<NSScriptClassDescription>>;

        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
        #[method_id(@__retain_semantics Init initWithSuiteName:className:dictionary:)]
        pub unsafe fn initWithSuiteName_className_dictionary(
            this: Allocated<Self>,
            suite_name: &NSString,
            class_name: &NSString,
            class_declaration: Option<&NSDictionary>,
        ) -> Option<Retained<Self>>;

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other suiteName)]
        pub unsafe fn suiteName(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other className)]
        pub unsafe fn className(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other implementationClassName)]
        pub unsafe fn implementationClassName(&self) -> Option<Retained<NSString>>;

        #[method_id(@__retain_semantics Other superclassDescription)]
        pub unsafe fn superclassDescription(&self) -> Option<Retained<NSScriptClassDescription>>;

        #[method(appleEventCode)]
        pub unsafe fn appleEventCode(&self) -> FourCharCode;

        #[method(matchesAppleEventCode:)]
        pub unsafe fn matchesAppleEventCode(&self, apple_event_code: FourCharCode) -> bool;

        #[cfg(feature = "NSScriptCommandDescription")]
        #[method(supportsCommand:)]
        pub unsafe fn supportsCommand(
            &self,
            command_description: &NSScriptCommandDescription,
        ) -> bool;

        #[cfg(feature = "NSScriptCommandDescription")]
        #[method(selectorForCommand:)]
        pub unsafe fn selectorForCommand(
            &self,
            command_description: &NSScriptCommandDescription,
        ) -> Option<Sel>;

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other typeForKey:)]
        pub unsafe fn typeForKey(&self, key: &NSString) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other classDescriptionForKey:)]
        pub unsafe fn classDescriptionForKey(
            &self,
            key: &NSString,
        ) -> Option<Retained<NSScriptClassDescription>>;

        #[cfg(feature = "NSString")]
        #[method(appleEventCodeForKey:)]
        pub unsafe fn appleEventCodeForKey(&self, key: &NSString) -> FourCharCode;

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other keyWithAppleEventCode:)]
        pub unsafe fn keyWithAppleEventCode(
            &self,
            apple_event_code: FourCharCode,
        ) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other defaultSubcontainerAttributeKey)]
        pub unsafe fn defaultSubcontainerAttributeKey(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "NSString")]
        #[method(isLocationRequiredToCreateForKey:)]
        pub unsafe fn isLocationRequiredToCreateForKey(
            &self,
            to_many_relationship_key: &NSString,
        ) -> bool;

        #[cfg(feature = "NSString")]
        #[method(hasPropertyForKey:)]
        pub unsafe fn hasPropertyForKey(&self, key: &NSString) -> bool;

        #[cfg(feature = "NSString")]
        #[method(hasOrderedToManyRelationshipForKey:)]
        pub unsafe fn hasOrderedToManyRelationshipForKey(&self, key: &NSString) -> bool;

        #[cfg(feature = "NSString")]
        #[method(hasReadablePropertyForKey:)]
        pub unsafe fn hasReadablePropertyForKey(&self, key: &NSString) -> bool;

        #[cfg(feature = "NSString")]
        #[method(hasWritablePropertyForKey:)]
        pub unsafe fn hasWritablePropertyForKey(&self, key: &NSString) -> bool;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "NSClassDescription")]
    unsafe impl NSScriptClassDescription {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;
    }
);

extern_methods!(
    /// NSDeprecated
    #[cfg(feature = "NSClassDescription")]
    unsafe impl NSScriptClassDescription {
        #[cfg(feature = "NSString")]
        #[deprecated]
        #[method(isReadOnlyKey:)]
        pub unsafe fn isReadOnlyKey(&self, key: &NSString) -> bool;
    }
);

extern_category!(
    /// Category "NSScriptClassDescription" on [`NSObject`].
    #[doc(alias = "NSScriptClassDescription")]
    pub unsafe trait NSObjectNSScriptClassDescription {
        #[method(classCode)]
        unsafe fn classCode(&self) -> FourCharCode;

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other className)]
        unsafe fn className(&self) -> Retained<NSString>;
    }

    unsafe impl NSObjectNSScriptClassDescription for NSObject {}
);