objc2_ui_kit/generated/
UIVibrancyEffect.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(UIVisualEffect, NSObject))]
12 #[thread_kind = MainThreadOnly]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "UIVisualEffect")]
15 pub struct UIVibrancyEffect;
16);
17
18#[cfg(feature = "UIVisualEffect")]
19unsafe impl NSCoding for UIVibrancyEffect {}
20
21#[cfg(feature = "UIVisualEffect")]
22unsafe impl NSCopying for UIVibrancyEffect {}
23
24#[cfg(feature = "UIVisualEffect")]
25unsafe impl CopyingHelper for UIVibrancyEffect {
26 type Result = Self;
27}
28
29#[cfg(feature = "UIVisualEffect")]
30unsafe impl NSObjectProtocol for UIVibrancyEffect {}
31
32#[cfg(feature = "UIVisualEffect")]
33unsafe impl NSSecureCoding for UIVibrancyEffect {}
34
35#[cfg(feature = "UIVisualEffect")]
36impl UIVibrancyEffect {
37 extern_methods!(
38 #[cfg(feature = "UIBlurEffect")]
39 #[unsafe(method(effectForBlurEffect:))]
40 #[unsafe(method_family = none)]
41 pub unsafe fn effectForBlurEffect(blur_effect: &UIBlurEffect)
42 -> Retained<UIVibrancyEffect>;
43 );
44}
45
46#[cfg(feature = "UIVisualEffect")]
48impl UIVibrancyEffect {
49 extern_methods!(
50 #[unsafe(method(init))]
51 #[unsafe(method_family = init)]
52 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
53
54 #[unsafe(method(new))]
55 #[unsafe(method_family = new)]
56 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
57 );
58}
59
60#[repr(transparent)]
63#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
64pub struct UIVibrancyEffectStyle(pub NSInteger);
65impl UIVibrancyEffectStyle {
66 #[doc(alias = "UIVibrancyEffectStyleLabel")]
67 pub const Label: Self = Self(0);
68 #[doc(alias = "UIVibrancyEffectStyleSecondaryLabel")]
69 pub const SecondaryLabel: Self = Self(1);
70 #[doc(alias = "UIVibrancyEffectStyleTertiaryLabel")]
71 pub const TertiaryLabel: Self = Self(2);
72 #[doc(alias = "UIVibrancyEffectStyleQuaternaryLabel")]
73 pub const QuaternaryLabel: Self = Self(3);
74 #[doc(alias = "UIVibrancyEffectStyleFill")]
75 pub const Fill: Self = Self(4);
76 #[doc(alias = "UIVibrancyEffectStyleSecondaryFill")]
77 pub const SecondaryFill: Self = Self(5);
78 #[doc(alias = "UIVibrancyEffectStyleTertiaryFill")]
79 pub const TertiaryFill: Self = Self(6);
80 #[doc(alias = "UIVibrancyEffectStyleSeparator")]
81 pub const Separator: Self = Self(7);
82}
83
84unsafe impl Encode for UIVibrancyEffectStyle {
85 const ENCODING: Encoding = NSInteger::ENCODING;
86}
87
88unsafe impl RefEncode for UIVibrancyEffectStyle {
89 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
90}
91
92#[cfg(feature = "UIVisualEffect")]
94impl UIVibrancyEffect {
95 extern_methods!(
96 #[cfg(feature = "UIBlurEffect")]
97 #[unsafe(method(effectForBlurEffect:style:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn effectForBlurEffect_style(
100 blur_effect: &UIBlurEffect,
101 style: UIVibrancyEffectStyle,
102 ) -> Retained<UIVibrancyEffect>;
103 );
104}