objc2_ui_kit/generated/
UIFocusEffect.rs1use 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 #[unsafe(super(NSObject))]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 pub struct UIFocusEffect;
20);
21
22extern_conformance!(
23 unsafe impl NSCopying for UIFocusEffect {}
24);
25
26unsafe impl CopyingHelper for UIFocusEffect {
27 type Result = Self;
28}
29
30extern_conformance!(
31 unsafe impl NSObjectProtocol for UIFocusEffect {}
32);
33
34impl UIFocusEffect {
35 extern_methods!(
36 #[unsafe(method(effect))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn effect() -> Retained<Self>;
40
41 #[unsafe(method(init))]
42 #[unsafe(method_family = init)]
43 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
44
45 #[unsafe(method(new))]
46 #[unsafe(method_family = new)]
47 pub unsafe fn new() -> Retained<Self>;
48 );
49}
50
51#[repr(transparent)]
54#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
55pub struct UIFocusHaloEffectPosition(pub NSInteger);
56impl UIFocusHaloEffectPosition {
57 #[doc(alias = "UIFocusHaloEffectPositionAutomatic")]
59 pub const Automatic: Self = Self(0);
60 #[doc(alias = "UIFocusHaloEffectPositionOutside")]
62 pub const Outside: Self = Self(1);
63 #[doc(alias = "UIFocusHaloEffectPositionInside")]
65 pub const Inside: Self = Self(2);
66}
67
68unsafe impl Encode for UIFocusHaloEffectPosition {
69 const ENCODING: Encoding = NSInteger::ENCODING;
70}
71
72unsafe impl RefEncode for UIFocusHaloEffectPosition {
73 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
74}
75
76extern_class!(
77 #[unsafe(super(UIFocusEffect, NSObject))]
79 #[derive(Debug, PartialEq, Eq, Hash)]
80 pub struct UIFocusHaloEffect;
81);
82
83extern_conformance!(
84 unsafe impl NSCopying for UIFocusHaloEffect {}
85);
86
87unsafe impl CopyingHelper for UIFocusHaloEffect {
88 type Result = Self;
89}
90
91extern_conformance!(
92 unsafe impl NSObjectProtocol for UIFocusHaloEffect {}
93);
94
95impl UIFocusHaloEffect {
96 extern_methods!(
97 #[cfg(feature = "objc2-core-foundation")]
98 #[unsafe(method(effectWithRect:))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn effectWithRect(rect: CGRect) -> Retained<Self>;
102
103 #[cfg(all(feature = "objc2-core-foundation", feature = "objc2-quartz-core"))]
104 #[cfg(not(target_os = "watchos"))]
105 #[unsafe(method(effectWithRoundedRect:cornerRadius:curve:))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn effectWithRoundedRect_cornerRadius_curve(
109 rect: CGRect,
110 corner_radius: CGFloat,
111 curve: &CALayerCornerCurve,
112 ) -> Retained<Self>;
113
114 #[cfg(feature = "UIBezierPath")]
115 #[unsafe(method(effectWithPath:))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn effectWithPath(bezier_path: &UIBezierPath) -> Retained<Self>;
119
120 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
121 #[unsafe(method(containerView))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn containerView(&self, mtm: MainThreadMarker) -> Option<Retained<UIView>>;
127
128 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
129 #[unsafe(method(setContainerView:))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn setContainerView(&self, container_view: Option<&UIView>);
134
135 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
136 #[unsafe(method(referenceView))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn referenceView(&self, mtm: MainThreadMarker) -> Option<Retained<UIView>>;
145
146 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
147 #[unsafe(method(setReferenceView:))]
150 #[unsafe(method_family = none)]
151 pub unsafe fn setReferenceView(&self, reference_view: Option<&UIView>);
152
153 #[unsafe(method(position))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn position(&self) -> UIFocusHaloEffectPosition;
158
159 #[unsafe(method(setPosition:))]
161 #[unsafe(method_family = none)]
162 pub unsafe fn setPosition(&self, position: UIFocusHaloEffectPosition);
163 );
164}
165
166impl UIFocusHaloEffect {
168 extern_methods!(
169 #[unsafe(method(effect))]
171 #[unsafe(method_family = none)]
172 pub unsafe fn effect() -> Retained<Self>;
173
174 #[unsafe(method(init))]
175 #[unsafe(method_family = init)]
176 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
177
178 #[unsafe(method(new))]
179 #[unsafe(method_family = new)]
180 pub unsafe fn new() -> Retained<Self>;
181 );
182}