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")]
19extern_conformance!(
20 unsafe impl NSCoding for UIVibrancyEffect {}
21);
22
23#[cfg(feature = "UIVisualEffect")]
24extern_conformance!(
25 unsafe impl NSCopying for UIVibrancyEffect {}
26);
27
28#[cfg(feature = "UIVisualEffect")]
29unsafe impl CopyingHelper for UIVibrancyEffect {
30 type Result = Self;
31}
32
33#[cfg(feature = "UIVisualEffect")]
34extern_conformance!(
35 unsafe impl NSObjectProtocol for UIVibrancyEffect {}
36);
37
38#[cfg(feature = "UIVisualEffect")]
39extern_conformance!(
40 unsafe impl NSSecureCoding for UIVibrancyEffect {}
41);
42
43#[cfg(feature = "UIVisualEffect")]
44impl UIVibrancyEffect {
45 extern_methods!(
46 #[cfg(feature = "UIBlurEffect")]
47 #[unsafe(method(effectForBlurEffect:))]
48 #[unsafe(method_family = none)]
49 pub fn effectForBlurEffect(blur_effect: &UIBlurEffect) -> Retained<UIVibrancyEffect>;
50 );
51}
52
53#[cfg(feature = "UIVisualEffect")]
55impl UIVibrancyEffect {
56 extern_methods!(
57 #[unsafe(method(init))]
58 #[unsafe(method_family = init)]
59 pub fn init(this: Allocated<Self>) -> Retained<Self>;
60
61 #[unsafe(method(new))]
62 #[unsafe(method_family = new)]
63 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
64 );
65}
66
67#[repr(transparent)]
70#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
71pub struct UIVibrancyEffectStyle(pub NSInteger);
72impl UIVibrancyEffectStyle {
73 #[doc(alias = "UIVibrancyEffectStyleLabel")]
74 pub const Label: Self = Self(0);
75 #[doc(alias = "UIVibrancyEffectStyleSecondaryLabel")]
76 pub const SecondaryLabel: Self = Self(1);
77 #[doc(alias = "UIVibrancyEffectStyleTertiaryLabel")]
78 pub const TertiaryLabel: Self = Self(2);
79 #[doc(alias = "UIVibrancyEffectStyleQuaternaryLabel")]
80 pub const QuaternaryLabel: Self = Self(3);
81 #[doc(alias = "UIVibrancyEffectStyleFill")]
82 pub const Fill: Self = Self(4);
83 #[doc(alias = "UIVibrancyEffectStyleSecondaryFill")]
84 pub const SecondaryFill: Self = Self(5);
85 #[doc(alias = "UIVibrancyEffectStyleTertiaryFill")]
86 pub const TertiaryFill: Self = Self(6);
87 #[doc(alias = "UIVibrancyEffectStyleSeparator")]
88 pub const Separator: Self = Self(7);
89}
90
91unsafe impl Encode for UIVibrancyEffectStyle {
92 const ENCODING: Encoding = NSInteger::ENCODING;
93}
94
95unsafe impl RefEncode for UIVibrancyEffectStyle {
96 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
97}
98
99#[cfg(feature = "UIVisualEffect")]
101impl UIVibrancyEffect {
102 extern_methods!(
103 #[cfg(feature = "UIBlurEffect")]
104 #[unsafe(method(effectForBlurEffect:style:))]
105 #[unsafe(method_family = none)]
106 pub fn effectForBlurEffect_style(
107 blur_effect: &UIBlurEffect,
108 style: UIVibrancyEffectStyle,
109 ) -> Retained<UIVibrancyEffect>;
110 );
111}