objc2_ui_kit/generated/
UITraitListEnvironment.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct UIListEnvironment(pub NSInteger);
17impl UIListEnvironment {
18 #[doc(alias = "UIListEnvironmentUnspecified")]
20 pub const Unspecified: Self = Self(0);
21 #[doc(alias = "UIListEnvironmentNone")]
23 pub const None: Self = Self(1);
24 #[doc(alias = "UIListEnvironmentPlain")]
26 pub const Plain: Self = Self(2);
27 #[doc(alias = "UIListEnvironmentGrouped")]
29 pub const Grouped: Self = Self(3);
30 #[doc(alias = "UIListEnvironmentInsetGrouped")]
32 pub const InsetGrouped: Self = Self(4);
33 #[doc(alias = "UIListEnvironmentSidebar")]
35 pub const Sidebar: Self = Self(5);
36 #[doc(alias = "UIListEnvironmentSidebarPlain")]
38 pub const SidebarPlain: Self = Self(6);
39}
40
41unsafe impl Encode for UIListEnvironment {
42 const ENCODING: Encoding = NSInteger::ENCODING;
43}
44
45unsafe impl RefEncode for UIListEnvironment {
46 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
47}
48
49extern_class!(
50 #[unsafe(super(NSObject))]
55 #[thread_kind = MainThreadOnly]
56 #[derive(Debug, PartialEq, Eq, Hash)]
57 pub struct UITraitListEnvironment;
58);
59
60extern_conformance!(
61 unsafe impl NSObjectProtocol for UITraitListEnvironment {}
62);
63
64#[cfg(feature = "UITrait")]
65extern_conformance!(
66 unsafe impl UINSIntegerTraitDefinition for UITraitListEnvironment {}
67);
68
69#[cfg(feature = "UITrait")]
70extern_conformance!(
71 unsafe impl UITraitDefinition for UITraitListEnvironment {}
72);
73
74impl UITraitListEnvironment {
75 extern_methods!();
76}
77
78impl UITraitListEnvironment {
80 extern_methods!(
81 #[unsafe(method(init))]
82 #[unsafe(method_family = init)]
83 pub fn init(this: Allocated<Self>) -> Retained<Self>;
84
85 #[unsafe(method(new))]
86 #[unsafe(method_family = new)]
87 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
88 );
89}