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

use crate::*;

// NS_TYPED_EXTENSIBLE_ENUM
pub type UIConfigurationStateCustomKey = NSString;

extern_protocol!(
    pub unsafe trait UIConfigurationState:
        NSCopying + NSObjectProtocol + NSSecureCoding + IsMainThreadOnly
    {
        #[cfg(feature = "UITraitCollection")]
        #[method_id(@__retain_semantics Init initWithTraitCollection:)]
        unsafe fn initWithTraitCollection(
            this: Allocated<Self>,
            trait_collection: &UITraitCollection,
        ) -> Retained<Self>;

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

        #[cfg(feature = "UITraitCollection")]
        #[method(setTraitCollection:)]
        unsafe fn setTraitCollection(&self, trait_collection: &UITraitCollection);

        #[method_id(@__retain_semantics Other customStateForKey:)]
        unsafe fn customStateForKey(
            &self,
            key: &UIConfigurationStateCustomKey,
        ) -> Option<Retained<AnyObject>>;

        #[method(setCustomState:forKey:)]
        unsafe fn setCustomState_forKey(
            &self,
            custom_state: Option<&AnyObject>,
            key: &UIConfigurationStateCustomKey,
        );

        #[method_id(@__retain_semantics Other objectForKeyedSubscript:)]
        unsafe fn objectForKeyedSubscript(
            &self,
            key: &UIConfigurationStateCustomKey,
        ) -> Option<Retained<AnyObject>>;

        #[method(setObject:forKeyedSubscript:)]
        unsafe fn setObject_forKeyedSubscript(
            &self,
            obj: Option<&AnyObject>,
            key: &UIConfigurationStateCustomKey,
        );
    }

    unsafe impl ProtocolType for dyn UIConfigurationState {}
);