1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIBlurEffectStyle(pub NSInteger);
impl UIBlurEffectStyle {
    #[doc(alias = "UIBlurEffectStyleExtraLight")]
    pub const ExtraLight: Self = Self(0);
    #[doc(alias = "UIBlurEffectStyleLight")]
    pub const Light: Self = Self(1);
    #[doc(alias = "UIBlurEffectStyleDark")]
    pub const Dark: Self = Self(2);
    #[doc(alias = "UIBlurEffectStyleExtraDark")]
    pub const ExtraDark: Self = Self(3);
    #[doc(alias = "UIBlurEffectStyleRegular")]
    pub const Regular: Self = Self(4);
    #[doc(alias = "UIBlurEffectStyleProminent")]
    pub const Prominent: Self = Self(5);
    #[doc(alias = "UIBlurEffectStyleSystemUltraThinMaterial")]
    pub const SystemUltraThinMaterial: Self = Self(6);
    #[doc(alias = "UIBlurEffectStyleSystemThinMaterial")]
    pub const SystemThinMaterial: Self = Self(7);
    #[doc(alias = "UIBlurEffectStyleSystemMaterial")]
    pub const SystemMaterial: Self = Self(8);
    #[doc(alias = "UIBlurEffectStyleSystemThickMaterial")]
    pub const SystemThickMaterial: Self = Self(9);
    #[doc(alias = "UIBlurEffectStyleSystemChromeMaterial")]
    pub const SystemChromeMaterial: Self = Self(10);
    #[doc(alias = "UIBlurEffectStyleSystemUltraThinMaterialLight")]
    pub const SystemUltraThinMaterialLight: Self = Self(11);
    #[doc(alias = "UIBlurEffectStyleSystemThinMaterialLight")]
    pub const SystemThinMaterialLight: Self = Self(12);
    #[doc(alias = "UIBlurEffectStyleSystemMaterialLight")]
    pub const SystemMaterialLight: Self = Self(13);
    #[doc(alias = "UIBlurEffectStyleSystemThickMaterialLight")]
    pub const SystemThickMaterialLight: Self = Self(14);
    #[doc(alias = "UIBlurEffectStyleSystemChromeMaterialLight")]
    pub const SystemChromeMaterialLight: Self = Self(15);
    #[doc(alias = "UIBlurEffectStyleSystemUltraThinMaterialDark")]
    pub const SystemUltraThinMaterialDark: Self = Self(16);
    #[doc(alias = "UIBlurEffectStyleSystemThinMaterialDark")]
    pub const SystemThinMaterialDark: Self = Self(17);
    #[doc(alias = "UIBlurEffectStyleSystemMaterialDark")]
    pub const SystemMaterialDark: Self = Self(18);
    #[doc(alias = "UIBlurEffectStyleSystemThickMaterialDark")]
    pub const SystemThickMaterialDark: Self = Self(19);
    #[doc(alias = "UIBlurEffectStyleSystemChromeMaterialDark")]
    pub const SystemChromeMaterialDark: Self = Self(20);
}

unsafe impl Encode for UIBlurEffectStyle {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for UIBlurEffectStyle {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "UIVisualEffect")]
    pub struct UIBlurEffect;

    #[cfg(feature = "UIVisualEffect")]
    unsafe impl ClassType for UIBlurEffect {
        #[inherits(NSObject)]
        type Super = UIVisualEffect;
        type Mutability = MainThreadOnly;
    }
);

#[cfg(feature = "UIVisualEffect")]
unsafe impl NSCoding for UIBlurEffect {}

#[cfg(feature = "UIVisualEffect")]
unsafe impl NSCopying for UIBlurEffect {}

#[cfg(feature = "UIVisualEffect")]
unsafe impl NSObjectProtocol for UIBlurEffect {}

#[cfg(feature = "UIVisualEffect")]
unsafe impl NSSecureCoding for UIBlurEffect {}

extern_methods!(
    #[cfg(feature = "UIVisualEffect")]
    unsafe impl UIBlurEffect {
        #[method_id(@__retain_semantics Other effectWithStyle:)]
        pub unsafe fn effectWithStyle(
            style: UIBlurEffectStyle,
            mtm: MainThreadMarker,
        ) -> Retained<UIBlurEffect>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "UIVisualEffect")]
    unsafe impl UIBlurEffect {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);