objc2_ui_kit/generated/
UIVisualEffectView.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9#[cfg(feature = "objc2-quartz-core")]
10#[cfg(not(target_os = "watchos"))]
11use objc2_quartz_core::*;
12
13use crate::*;
14
15extern_class!(
16    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uivisualeffectview?language=objc)
17    #[unsafe(super(UIView, UIResponder, NSObject))]
18    #[thread_kind = MainThreadOnly]
19    #[derive(Debug, PartialEq, Eq, Hash)]
20    #[cfg(all(feature = "UIResponder", feature = "UIView"))]
21    pub struct UIVisualEffectView;
22);
23
24#[cfg(all(
25    feature = "UIResponder",
26    feature = "UIView",
27    feature = "objc2-quartz-core"
28))]
29#[cfg(not(target_os = "watchos"))]
30unsafe impl CALayerDelegate for UIVisualEffectView {}
31
32#[cfg(all(feature = "UIResponder", feature = "UIView"))]
33unsafe impl NSCoding for UIVisualEffectView {}
34
35#[cfg(all(feature = "UIResponder", feature = "UIView"))]
36unsafe impl NSObjectProtocol for UIVisualEffectView {}
37
38#[cfg(all(feature = "UIResponder", feature = "UIView"))]
39unsafe impl NSSecureCoding for UIVisualEffectView {}
40
41#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
42unsafe impl UIAppearance for UIVisualEffectView {}
43
44#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
45unsafe impl UIAppearanceContainer for UIVisualEffectView {}
46
47#[cfg(all(feature = "UIResponder", feature = "UIView"))]
48unsafe impl UICoordinateSpace for UIVisualEffectView {}
49
50#[cfg(all(
51    feature = "UIDynamicBehavior",
52    feature = "UIResponder",
53    feature = "UIView"
54))]
55unsafe impl UIDynamicItem for UIVisualEffectView {}
56
57#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
58unsafe impl UIFocusEnvironment for UIVisualEffectView {}
59
60#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
61unsafe impl UIFocusItem for UIVisualEffectView {}
62
63#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
64unsafe impl UIFocusItemContainer for UIVisualEffectView {}
65
66#[cfg(all(feature = "UIResponder", feature = "UIView"))]
67unsafe impl UIResponderStandardEditActions for UIVisualEffectView {}
68
69#[cfg(all(
70    feature = "UIResponder",
71    feature = "UITraitCollection",
72    feature = "UIView"
73))]
74unsafe impl UITraitEnvironment for UIVisualEffectView {}
75
76#[cfg(all(feature = "UIResponder", feature = "UIView"))]
77impl UIVisualEffectView {
78    extern_methods!(
79        #[unsafe(method(contentView))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn contentView(&self) -> Retained<UIView>;
82
83        #[cfg(feature = "UIVisualEffect")]
84        #[unsafe(method(effect))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn effect(&self) -> Option<Retained<UIVisualEffect>>;
87
88        #[cfg(feature = "UIVisualEffect")]
89        /// Setter for [`effect`][Self::effect].
90        #[unsafe(method(setEffect:))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn setEffect(&self, effect: Option<&UIVisualEffect>);
93
94        #[cfg(feature = "UIVisualEffect")]
95        #[unsafe(method(initWithEffect:))]
96        #[unsafe(method_family = init)]
97        pub unsafe fn initWithEffect(
98            this: Allocated<Self>,
99            effect: Option<&UIVisualEffect>,
100        ) -> Retained<Self>;
101
102        #[unsafe(method(initWithCoder:))]
103        #[unsafe(method_family = init)]
104        pub unsafe fn initWithCoder(
105            this: Allocated<Self>,
106            coder: &NSCoder,
107        ) -> Option<Retained<Self>>;
108    );
109}
110
111/// Methods declared on superclass `UIView`.
112#[cfg(all(feature = "UIResponder", feature = "UIView"))]
113impl UIVisualEffectView {
114    extern_methods!(
115        #[cfg(feature = "objc2-core-foundation")]
116        #[unsafe(method(initWithFrame:))]
117        #[unsafe(method_family = init)]
118        pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
119    );
120}
121
122/// Methods declared on superclass `NSObject`.
123#[cfg(all(feature = "UIResponder", feature = "UIView"))]
124impl UIVisualEffectView {
125    extern_methods!(
126        #[unsafe(method(init))]
127        #[unsafe(method_family = init)]
128        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
129
130        #[unsafe(method(new))]
131        #[unsafe(method_family = new)]
132        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
133    );
134}