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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;

use crate::*;

extern "C" {
    #[cfg(feature = "NSString")]
    pub static NSOperationNotSupportedForKeyException: &'static NSString;
}

extern_category!(
    /// Category "NSScriptKeyValueCoding" on [`NSObject`].
    #[doc(alias = "NSScriptKeyValueCoding")]
    pub unsafe trait NSObjectNSScriptKeyValueCoding {
        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other valueAtIndex:inPropertyWithKey:)]
        unsafe fn valueAtIndex_inPropertyWithKey(
            &self,
            index: NSUInteger,
            key: &NSString,
        ) -> Option<Retained<AnyObject>>;

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other valueWithName:inPropertyWithKey:)]
        unsafe fn valueWithName_inPropertyWithKey(
            &self,
            name: &NSString,
            key: &NSString,
        ) -> Option<Retained<AnyObject>>;

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other valueWithUniqueID:inPropertyWithKey:)]
        unsafe fn valueWithUniqueID_inPropertyWithKey(
            &self,
            unique_id: &AnyObject,
            key: &NSString,
        ) -> Option<Retained<AnyObject>>;

        #[cfg(feature = "NSString")]
        #[method(insertValue:atIndex:inPropertyWithKey:)]
        unsafe fn insertValue_atIndex_inPropertyWithKey(
            &self,
            value: &AnyObject,
            index: NSUInteger,
            key: &NSString,
        );

        #[cfg(feature = "NSString")]
        #[method(removeValueAtIndex:fromPropertyWithKey:)]
        unsafe fn removeValueAtIndex_fromPropertyWithKey(&self, index: NSUInteger, key: &NSString);

        #[cfg(feature = "NSString")]
        #[method(replaceValueAtIndex:inPropertyWithKey:withValue:)]
        unsafe fn replaceValueAtIndex_inPropertyWithKey_withValue(
            &self,
            index: NSUInteger,
            key: &NSString,
            value: &AnyObject,
        );

        #[cfg(feature = "NSString")]
        #[method(insertValue:inPropertyWithKey:)]
        unsafe fn insertValue_inPropertyWithKey(&self, value: &AnyObject, key: &NSString);

        #[cfg(feature = "NSString")]
        #[method_id(@__retain_semantics Other coerceValue:forKey:)]
        unsafe fn coerceValue_forKey(
            &self,
            value: Option<&AnyObject>,
            key: &NSString,
        ) -> Option<Retained<AnyObject>>;
    }

    unsafe impl NSObjectNSScriptKeyValueCoding for NSObject {}
);