objc2_ui_kit/generated/
UIBlurEffect.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct UIBlurEffectStyle(pub NSInteger);
14impl UIBlurEffectStyle {
15 #[doc(alias = "UIBlurEffectStyleExtraLight")]
16 pub const ExtraLight: Self = Self(0);
17 #[doc(alias = "UIBlurEffectStyleLight")]
18 pub const Light: Self = Self(1);
19 #[doc(alias = "UIBlurEffectStyleDark")]
20 pub const Dark: Self = Self(2);
21 #[doc(alias = "UIBlurEffectStyleExtraDark")]
22 pub const ExtraDark: Self = Self(3);
23 #[doc(alias = "UIBlurEffectStyleRegular")]
24 pub const Regular: Self = Self(4);
25 #[doc(alias = "UIBlurEffectStyleProminent")]
26 pub const Prominent: Self = Self(5);
27 #[doc(alias = "UIBlurEffectStyleSystemUltraThinMaterial")]
28 pub const SystemUltraThinMaterial: Self = Self(6);
29 #[doc(alias = "UIBlurEffectStyleSystemThinMaterial")]
30 pub const SystemThinMaterial: Self = Self(7);
31 #[doc(alias = "UIBlurEffectStyleSystemMaterial")]
32 pub const SystemMaterial: Self = Self(8);
33 #[doc(alias = "UIBlurEffectStyleSystemThickMaterial")]
34 pub const SystemThickMaterial: Self = Self(9);
35 #[doc(alias = "UIBlurEffectStyleSystemChromeMaterial")]
36 pub const SystemChromeMaterial: Self = Self(10);
37 #[doc(alias = "UIBlurEffectStyleSystemUltraThinMaterialLight")]
38 pub const SystemUltraThinMaterialLight: Self = Self(11);
39 #[doc(alias = "UIBlurEffectStyleSystemThinMaterialLight")]
40 pub const SystemThinMaterialLight: Self = Self(12);
41 #[doc(alias = "UIBlurEffectStyleSystemMaterialLight")]
42 pub const SystemMaterialLight: Self = Self(13);
43 #[doc(alias = "UIBlurEffectStyleSystemThickMaterialLight")]
44 pub const SystemThickMaterialLight: Self = Self(14);
45 #[doc(alias = "UIBlurEffectStyleSystemChromeMaterialLight")]
46 pub const SystemChromeMaterialLight: Self = Self(15);
47 #[doc(alias = "UIBlurEffectStyleSystemUltraThinMaterialDark")]
48 pub const SystemUltraThinMaterialDark: Self = Self(16);
49 #[doc(alias = "UIBlurEffectStyleSystemThinMaterialDark")]
50 pub const SystemThinMaterialDark: Self = Self(17);
51 #[doc(alias = "UIBlurEffectStyleSystemMaterialDark")]
52 pub const SystemMaterialDark: Self = Self(18);
53 #[doc(alias = "UIBlurEffectStyleSystemThickMaterialDark")]
54 pub const SystemThickMaterialDark: Self = Self(19);
55 #[doc(alias = "UIBlurEffectStyleSystemChromeMaterialDark")]
56 pub const SystemChromeMaterialDark: Self = Self(20);
57}
58
59unsafe impl Encode for UIBlurEffectStyle {
60 const ENCODING: Encoding = NSInteger::ENCODING;
61}
62
63unsafe impl RefEncode for UIBlurEffectStyle {
64 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
65}
66
67extern_class!(
68 #[unsafe(super(UIVisualEffect, NSObject))]
70 #[thread_kind = MainThreadOnly]
71 #[derive(Debug, PartialEq, Eq, Hash)]
72 #[cfg(feature = "UIVisualEffect")]
73 pub struct UIBlurEffect;
74);
75
76#[cfg(feature = "UIVisualEffect")]
77extern_conformance!(
78 unsafe impl NSCoding for UIBlurEffect {}
79);
80
81#[cfg(feature = "UIVisualEffect")]
82extern_conformance!(
83 unsafe impl NSCopying for UIBlurEffect {}
84);
85
86#[cfg(feature = "UIVisualEffect")]
87unsafe impl CopyingHelper for UIBlurEffect {
88 type Result = Self;
89}
90
91#[cfg(feature = "UIVisualEffect")]
92extern_conformance!(
93 unsafe impl NSObjectProtocol for UIBlurEffect {}
94);
95
96#[cfg(feature = "UIVisualEffect")]
97extern_conformance!(
98 unsafe impl NSSecureCoding for UIBlurEffect {}
99);
100
101#[cfg(feature = "UIVisualEffect")]
102impl UIBlurEffect {
103 extern_methods!(
104 #[unsafe(method(effectWithStyle:))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn effectWithStyle(
107 style: UIBlurEffectStyle,
108 mtm: MainThreadMarker,
109 ) -> Retained<UIBlurEffect>;
110 );
111}
112
113#[cfg(feature = "UIVisualEffect")]
115impl UIBlurEffect {
116 extern_methods!(
117 #[unsafe(method(init))]
118 #[unsafe(method_family = init)]
119 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
120
121 #[unsafe(method(new))]
122 #[unsafe(method_family = new)]
123 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
124 );
125}