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 unsafe 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 unsafe fn traitCollection(&self) -> Retained<UITraitCollection>;
32
33 #[cfg(feature = "UITraitCollection")]
34 #[unsafe(method(setTraitCollection:))]
36 #[unsafe(method_family = none)]
37 unsafe fn setTraitCollection(&self, trait_collection: &UITraitCollection);
38
39 #[unsafe(method(customStateForKey:))]
41 #[unsafe(method_family = none)]
42 unsafe fn customStateForKey(
43 &self,
44 key: &UIConfigurationStateCustomKey,
45 ) -> Option<Retained<AnyObject>>;
46
47 #[unsafe(method(setCustomState:forKey:))]
49 #[unsafe(method_family = none)]
50 unsafe fn setCustomState_forKey(
51 &self,
52 custom_state: Option<&AnyObject>,
53 key: &UIConfigurationStateCustomKey,
54 );
55
56 #[unsafe(method(objectForKeyedSubscript:))]
57 #[unsafe(method_family = none)]
58 unsafe fn objectForKeyedSubscript(
59 &self,
60 key: &UIConfigurationStateCustomKey,
61 ) -> Option<Retained<AnyObject>>;
62
63 #[unsafe(method(setObject:forKeyedSubscript:))]
64 #[unsafe(method_family = none)]
65 unsafe fn setObject_forKeyedSubscript(
66 &self,
67 obj: Option<&AnyObject>,
68 key: &UIConfigurationStateCustomKey,
69 );
70 }
71);