objc2_foundation/generated/
NSScriptKeyValueCoding.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern "C" {
10    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsoperationnotsupportedforkeyexception?language=objc)
11    #[cfg(feature = "NSString")]
12    pub static NSOperationNotSupportedForKeyException: &'static NSString;
13}
14
15mod private_NSObjectNSScriptKeyValueCoding {
16    pub trait Sealed {}
17}
18
19/// Category "NSScriptKeyValueCoding" on [`NSObject`].
20#[doc(alias = "NSScriptKeyValueCoding")]
21pub unsafe trait NSObjectNSScriptKeyValueCoding:
22    ClassType + Sized + private_NSObjectNSScriptKeyValueCoding::Sealed
23{
24    extern_methods!(
25        #[cfg(feature = "NSString")]
26        #[unsafe(method(valueAtIndex:inPropertyWithKey:))]
27        #[unsafe(method_family = none)]
28        fn valueAtIndex_inPropertyWithKey(
29            &self,
30            index: NSUInteger,
31            key: &NSString,
32        ) -> Option<Retained<AnyObject>>;
33
34        #[cfg(feature = "NSString")]
35        #[unsafe(method(valueWithName:inPropertyWithKey:))]
36        #[unsafe(method_family = none)]
37        fn valueWithName_inPropertyWithKey(
38            &self,
39            name: &NSString,
40            key: &NSString,
41        ) -> Option<Retained<AnyObject>>;
42
43        #[cfg(feature = "NSString")]
44        /// # Safety
45        ///
46        /// `unique_id` should be of the correct type.
47        #[unsafe(method(valueWithUniqueID:inPropertyWithKey:))]
48        #[unsafe(method_family = none)]
49        unsafe fn valueWithUniqueID_inPropertyWithKey(
50            &self,
51            unique_id: &AnyObject,
52            key: &NSString,
53        ) -> Option<Retained<AnyObject>>;
54
55        #[cfg(feature = "NSString")]
56        /// # Safety
57        ///
58        /// `value` should be of the correct type.
59        #[unsafe(method(insertValue:atIndex:inPropertyWithKey:))]
60        #[unsafe(method_family = none)]
61        unsafe fn insertValue_atIndex_inPropertyWithKey(
62            &self,
63            value: &AnyObject,
64            index: NSUInteger,
65            key: &NSString,
66        );
67
68        #[cfg(feature = "NSString")]
69        #[unsafe(method(removeValueAtIndex:fromPropertyWithKey:))]
70        #[unsafe(method_family = none)]
71        fn removeValueAtIndex_fromPropertyWithKey(&self, index: NSUInteger, key: &NSString);
72
73        #[cfg(feature = "NSString")]
74        /// # Safety
75        ///
76        /// `value` should be of the correct type.
77        #[unsafe(method(replaceValueAtIndex:inPropertyWithKey:withValue:))]
78        #[unsafe(method_family = none)]
79        unsafe fn replaceValueAtIndex_inPropertyWithKey_withValue(
80            &self,
81            index: NSUInteger,
82            key: &NSString,
83            value: &AnyObject,
84        );
85
86        #[cfg(feature = "NSString")]
87        /// # Safety
88        ///
89        /// `value` should be of the correct type.
90        #[unsafe(method(insertValue:inPropertyWithKey:))]
91        #[unsafe(method_family = none)]
92        unsafe fn insertValue_inPropertyWithKey(&self, value: &AnyObject, key: &NSString);
93
94        #[cfg(feature = "NSString")]
95        /// # Safety
96        ///
97        /// `value` should be of the correct type.
98        #[unsafe(method(coerceValue:forKey:))]
99        #[unsafe(method_family = none)]
100        unsafe fn coerceValue_forKey(
101            &self,
102            value: Option<&AnyObject>,
103            key: &NSString,
104        ) -> Option<Retained<AnyObject>>;
105    );
106}
107
108impl private_NSObjectNSScriptKeyValueCoding::Sealed for NSObject {}
109unsafe impl NSObjectNSScriptKeyValueCoding for NSObject {}