objc2_ui_kit/generated/
UIUpdateLink.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-quartz-core")]
7#[cfg(not(target_os = "watchos"))]
8use objc2_quartz_core::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
17 #[thread_kind = MainThreadOnly]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 pub struct UIUpdateLink;
20);
21
22unsafe impl NSObjectProtocol for UIUpdateLink {}
23
24impl UIUpdateLink {
25 extern_methods!(
26 #[unsafe(method(new))]
27 #[unsafe(method_family = new)]
28 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
29
30 #[unsafe(method(init))]
31 #[unsafe(method_family = init)]
32 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
33
34 #[cfg(all(
35 feature = "UIResponder",
36 feature = "UIScene",
37 feature = "UIWindowScene"
38 ))]
39 #[unsafe(method(updateLinkForWindowScene:))]
40 #[unsafe(method_family = none)]
41 pub unsafe fn updateLinkForWindowScene(
42 window_scene: &UIWindowScene,
43 ) -> Retained<UIUpdateLink>;
44
45 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
46 #[unsafe(method(updateLinkForView:))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn updateLinkForView(view: &UIView) -> Retained<UIUpdateLink>;
49
50 #[cfg(all(
51 feature = "UIUpdateActionPhase",
52 feature = "UIUpdateInfo",
53 feature = "block2"
54 ))]
55 #[unsafe(method(addActionToPhase:handler:))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn addActionToPhase_handler(
58 &self,
59 phase: &UIUpdateActionPhase,
60 handler: &block2::Block<dyn Fn(NonNull<UIUpdateLink>, NonNull<UIUpdateInfo>)>,
61 );
62
63 #[cfg(feature = "UIUpdateActionPhase")]
64 #[unsafe(method(addActionToPhase:target:selector:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn addActionToPhase_target_selector(
67 &self,
68 phase: &UIUpdateActionPhase,
69 target: &AnyObject,
70 selector: Sel,
71 );
72
73 #[unsafe(method(isEnabled))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn isEnabled(&self) -> bool;
77
78 #[unsafe(method(setEnabled:))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn setEnabled(&self, enabled: bool);
82
83 #[unsafe(method(requiresContinuousUpdates))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn requiresContinuousUpdates(&self) -> bool;
88
89 #[unsafe(method(setRequiresContinuousUpdates:))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn setRequiresContinuousUpdates(&self, requires_continuous_updates: bool);
93
94 #[unsafe(method(wantsLowLatencyEventDispatch))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn wantsLowLatencyEventDispatch(&self) -> bool;
100
101 #[unsafe(method(setWantsLowLatencyEventDispatch:))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn setWantsLowLatencyEventDispatch(
105 &self,
106 wants_low_latency_event_dispatch: bool,
107 );
108
109 #[unsafe(method(wantsImmediatePresentation))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn wantsImmediatePresentation(&self) -> bool;
121
122 #[unsafe(method(setWantsImmediatePresentation:))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn setWantsImmediatePresentation(&self, wants_immediate_presentation: bool);
126
127 #[cfg(feature = "objc2-quartz-core")]
128 #[cfg(not(target_os = "watchos"))]
129 #[unsafe(method(preferredFrameRateRange))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn preferredFrameRateRange(&self) -> CAFrameRateRange;
134
135 #[cfg(feature = "objc2-quartz-core")]
136 #[cfg(not(target_os = "watchos"))]
137 #[unsafe(method(setPreferredFrameRateRange:))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn setPreferredFrameRateRange(
141 &self,
142 preferred_frame_rate_range: CAFrameRateRange,
143 );
144
145 #[cfg(feature = "UIUpdateInfo")]
146 #[unsafe(method(currentUpdateInfo))]
149 #[unsafe(method_family = none)]
150 pub unsafe fn currentUpdateInfo(&self) -> Option<Retained<UIUpdateInfo>>;
151 );
152}
153
154impl UIUpdateLink {
156 extern_methods!(
157 #[cfg(all(feature = "UIUpdateInfo", feature = "block2"))]
158 #[unsafe(method(addActionWithHandler:))]
160 #[unsafe(method_family = none)]
161 pub unsafe fn addActionWithHandler(
162 &self,
163 handler: &block2::Block<dyn Fn(NonNull<UIUpdateLink>, NonNull<UIUpdateInfo>)>,
164 );
165
166 #[unsafe(method(addActionWithTarget:selector:))]
168 #[unsafe(method_family = none)]
169 pub unsafe fn addActionWithTarget_selector(&self, target: &AnyObject, selector: Sel);
170
171 #[cfg(all(
172 feature = "UIResponder",
173 feature = "UIScene",
174 feature = "UIUpdateInfo",
175 feature = "UIWindowScene",
176 feature = "block2"
177 ))]
178 #[unsafe(method(updateLinkForWindowScene:actionHandler:))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn updateLinkForWindowScene_actionHandler(
182 window_scene: &UIWindowScene,
183 handler: &block2::Block<dyn Fn(NonNull<UIUpdateLink>, NonNull<UIUpdateInfo>)>,
184 ) -> Retained<UIUpdateLink>;
185
186 #[cfg(all(
187 feature = "UIResponder",
188 feature = "UIScene",
189 feature = "UIWindowScene"
190 ))]
191 #[unsafe(method(updateLinkForWindowScene:actionTarget:selector:))]
193 #[unsafe(method_family = none)]
194 pub unsafe fn updateLinkForWindowScene_actionTarget_selector(
195 window_scene: &UIWindowScene,
196 target: &AnyObject,
197 selector: Sel,
198 ) -> Retained<UIUpdateLink>;
199
200 #[cfg(all(
201 feature = "UIResponder",
202 feature = "UIUpdateInfo",
203 feature = "UIView",
204 feature = "block2"
205 ))]
206 #[unsafe(method(updateLinkForView:actionHandler:))]
208 #[unsafe(method_family = none)]
209 pub unsafe fn updateLinkForView_actionHandler(
210 view: &UIView,
211 handler: &block2::Block<dyn Fn(NonNull<UIUpdateLink>, NonNull<UIUpdateInfo>)>,
212 ) -> Retained<UIUpdateLink>;
213
214 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
215 #[unsafe(method(updateLinkForView:actionTarget:selector:))]
217 #[unsafe(method_family = none)]
218 pub unsafe fn updateLinkForView_actionTarget_selector(
219 view: &UIView,
220 target: &AnyObject,
221 selector: Sel,
222 ) -> Retained<UIUpdateLink>;
223 );
224}