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"))]
30extern_conformance!(
31    unsafe impl CALayerDelegate for UIVisualEffectView {}
32);
33
34#[cfg(all(feature = "UIResponder", feature = "UIView"))]
35extern_conformance!(
36    unsafe impl NSCoding for UIVisualEffectView {}
37);
38
39#[cfg(all(feature = "UIResponder", feature = "UIView"))]
40extern_conformance!(
41    unsafe impl NSObjectProtocol for UIVisualEffectView {}
42);
43
44#[cfg(all(feature = "UIResponder", feature = "UIView"))]
45extern_conformance!(
46    unsafe impl NSSecureCoding for UIVisualEffectView {}
47);
48
49#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
50extern_conformance!(
51    unsafe impl UIAppearance for UIVisualEffectView {}
52);
53
54#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
55extern_conformance!(
56    unsafe impl UIAppearanceContainer for UIVisualEffectView {}
57);
58
59#[cfg(all(feature = "UIResponder", feature = "UIView"))]
60extern_conformance!(
61    unsafe impl UICoordinateSpace for UIVisualEffectView {}
62);
63
64#[cfg(all(
65    feature = "UIDynamicBehavior",
66    feature = "UIResponder",
67    feature = "UIView"
68))]
69extern_conformance!(
70    unsafe impl UIDynamicItem for UIVisualEffectView {}
71);
72
73#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
74extern_conformance!(
75    unsafe impl UIFocusEnvironment for UIVisualEffectView {}
76);
77
78#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
79extern_conformance!(
80    unsafe impl UIFocusItem for UIVisualEffectView {}
81);
82
83#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
84extern_conformance!(
85    unsafe impl UIFocusItemContainer for UIVisualEffectView {}
86);
87
88#[cfg(all(feature = "UIResponder", feature = "UIView"))]
89extern_conformance!(
90    unsafe impl UIResponderStandardEditActions for UIVisualEffectView {}
91);
92
93#[cfg(all(
94    feature = "UIResponder",
95    feature = "UITraitCollection",
96    feature = "UIView"
97))]
98extern_conformance!(
99    unsafe impl UITraitEnvironment for UIVisualEffectView {}
100);
101
102#[cfg(all(feature = "UIResponder", feature = "UIView"))]
103impl UIVisualEffectView {
104    extern_methods!(
105        #[unsafe(method(contentView))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn contentView(&self) -> Retained<UIView>;
108
109        #[cfg(feature = "UIVisualEffect")]
110        #[unsafe(method(effect))]
111        #[unsafe(method_family = none)]
112        pub unsafe fn effect(&self) -> Option<Retained<UIVisualEffect>>;
113
114        #[cfg(feature = "UIVisualEffect")]
115        /// Setter for [`effect`][Self::effect].
116        #[unsafe(method(setEffect:))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn setEffect(&self, effect: Option<&UIVisualEffect>);
119
120        #[cfg(feature = "UIVisualEffect")]
121        #[unsafe(method(initWithEffect:))]
122        #[unsafe(method_family = init)]
123        pub unsafe fn initWithEffect(
124            this: Allocated<Self>,
125            effect: Option<&UIVisualEffect>,
126        ) -> Retained<Self>;
127
128        #[unsafe(method(initWithCoder:))]
129        #[unsafe(method_family = init)]
130        pub unsafe fn initWithCoder(
131            this: Allocated<Self>,
132            coder: &NSCoder,
133        ) -> Option<Retained<Self>>;
134    );
135}
136
137/// Methods declared on superclass `UIView`.
138#[cfg(all(feature = "UIResponder", feature = "UIView"))]
139impl UIVisualEffectView {
140    extern_methods!(
141        #[cfg(feature = "objc2-core-foundation")]
142        #[unsafe(method(initWithFrame:))]
143        #[unsafe(method_family = init)]
144        pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
145    );
146}
147
148/// Methods declared on superclass `NSObject`.
149#[cfg(all(feature = "UIResponder", feature = "UIView"))]
150impl UIVisualEffectView {
151    extern_methods!(
152        #[unsafe(method(init))]
153        #[unsafe(method_family = init)]
154        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
155
156        #[unsafe(method(new))]
157        #[unsafe(method_family = new)]
158        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
159    );
160}