objc2_ui_kit/generated/
UIConfigurationState.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10pub type UIConfigurationStateCustomKey = NSString;
13
14extern_protocol!(
15 pub unsafe trait UIConfigurationState:
17 NSObjectProtocol + NSCopying + NSSecureCoding + MainThreadOnly
18 {
19 #[cfg(feature = "UITraitCollection")]
20 #[unsafe(method(initWithTraitCollection:))]
22 #[unsafe(method_family = init)]
23 fn initWithTraitCollection(
24 this: Allocated<Self>,
25 trait_collection: &UITraitCollection,
26 ) -> Retained<Self>;
27
28 #[cfg(feature = "UITraitCollection")]
29 #[unsafe(method(traitCollection))]
30 #[unsafe(method_family = none)]
31 fn traitCollection(&self) -> Retained<UITraitCollection>;
32
33 #[cfg(feature = "UITraitCollection")]
34 #[unsafe(method(setTraitCollection:))]
36 #[unsafe(method_family = none)]
37 fn setTraitCollection(&self, trait_collection: &UITraitCollection);
38
39 #[unsafe(method(customStateForKey:))]
41 #[unsafe(method_family = none)]
42 fn customStateForKey(
43 &self,
44 key: &UIConfigurationStateCustomKey,
45 ) -> Option<Retained<AnyObject>>;
46
47 #[unsafe(method(setCustomState:forKey:))]
53 #[unsafe(method_family = none)]
54 unsafe fn setCustomState_forKey(
55 &self,
56 custom_state: Option<&AnyObject>,
57 key: &UIConfigurationStateCustomKey,
58 );
59
60 #[unsafe(method(objectForKeyedSubscript:))]
61 #[unsafe(method_family = none)]
62 fn objectForKeyedSubscript(
63 &self,
64 key: &UIConfigurationStateCustomKey,
65 ) -> Option<Retained<AnyObject>>;
66
67 #[unsafe(method(setObject:forKeyedSubscript:))]
71 #[unsafe(method_family = none)]
72 unsafe fn setObject_forKeyedSubscript(
73 &self,
74 obj: Option<&AnyObject>,
75 key: &UIConfigurationStateCustomKey,
76 );
77 }
78);