objc2_ui_kit/generated/
UIRefreshControl.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(UIControl, UIView, UIResponder, NSObject))]
18 #[thread_kind = MainThreadOnly]
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 #[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
21 pub struct UIRefreshControl;
22);
23
24#[cfg(all(
25 feature = "UIControl",
26 feature = "UIResponder",
27 feature = "UIView",
28 feature = "objc2-quartz-core"
29))]
30#[cfg(not(target_os = "watchos"))]
31extern_conformance!(
32 unsafe impl CALayerDelegate for UIRefreshControl {}
33);
34
35#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
36extern_conformance!(
37 unsafe impl NSCoding for UIRefreshControl {}
38);
39
40#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
41extern_conformance!(
42 unsafe impl NSObjectProtocol for UIRefreshControl {}
43);
44
45#[cfg(all(
46 feature = "UIAppearance",
47 feature = "UIControl",
48 feature = "UIResponder",
49 feature = "UIView"
50))]
51extern_conformance!(
52 unsafe impl UIAppearance for UIRefreshControl {}
53);
54
55#[cfg(all(
56 feature = "UIAppearance",
57 feature = "UIControl",
58 feature = "UIResponder",
59 feature = "UIView"
60))]
61extern_conformance!(
62 unsafe impl UIAppearanceContainer for UIRefreshControl {}
63);
64
65#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
66extern_conformance!(
67 unsafe impl UICoordinateSpace for UIRefreshControl {}
68);
69
70#[cfg(all(
71 feature = "UIControl",
72 feature = "UIDynamicBehavior",
73 feature = "UIResponder",
74 feature = "UIView"
75))]
76extern_conformance!(
77 unsafe impl UIDynamicItem for UIRefreshControl {}
78);
79
80#[cfg(all(
81 feature = "UIControl",
82 feature = "UIFocus",
83 feature = "UIResponder",
84 feature = "UIView"
85))]
86extern_conformance!(
87 unsafe impl UIFocusEnvironment for UIRefreshControl {}
88);
89
90#[cfg(all(
91 feature = "UIControl",
92 feature = "UIFocus",
93 feature = "UIResponder",
94 feature = "UIView"
95))]
96extern_conformance!(
97 unsafe impl UIFocusItem for UIRefreshControl {}
98);
99
100#[cfg(all(
101 feature = "UIControl",
102 feature = "UIFocus",
103 feature = "UIResponder",
104 feature = "UIView"
105))]
106extern_conformance!(
107 unsafe impl UIFocusItemContainer for UIRefreshControl {}
108);
109
110#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
111extern_conformance!(
112 unsafe impl UIResponderStandardEditActions for UIRefreshControl {}
113);
114
115#[cfg(all(
116 feature = "UIControl",
117 feature = "UIResponder",
118 feature = "UITraitCollection",
119 feature = "UIView"
120))]
121extern_conformance!(
122 unsafe impl UITraitEnvironment for UIRefreshControl {}
123);
124
125#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
126impl UIRefreshControl {
127 extern_methods!(
128 #[unsafe(method(init))]
129 #[unsafe(method_family = init)]
130 pub fn init(this: Allocated<Self>) -> Retained<Self>;
131
132 #[unsafe(method(isRefreshing))]
133 #[unsafe(method_family = none)]
134 pub fn isRefreshing(&self) -> bool;
135
136 #[cfg(feature = "UIColor")]
137 #[unsafe(method(tintColor))]
138 #[unsafe(method_family = none)]
139 pub fn tintColor(&self) -> Option<Retained<UIColor>>;
140
141 #[cfg(feature = "UIColor")]
142 #[unsafe(method(setTintColor:))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn setTintColor(&self, tint_color: Option<&UIColor>);
150
151 #[unsafe(method(attributedTitle))]
152 #[unsafe(method_family = none)]
153 pub fn attributedTitle(&self) -> Option<Retained<NSAttributedString>>;
154
155 #[unsafe(method(setAttributedTitle:))]
157 #[unsafe(method_family = none)]
158 pub fn setAttributedTitle(&self, attributed_title: Option<&NSAttributedString>);
159
160 #[unsafe(method(beginRefreshing))]
161 #[unsafe(method_family = none)]
162 pub fn beginRefreshing(&self);
163
164 #[unsafe(method(endRefreshing))]
165 #[unsafe(method_family = none)]
166 pub fn endRefreshing(&self);
167 );
168}
169
170#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
172impl UIRefreshControl {
173 extern_methods!(
174 #[cfg(feature = "objc2-core-foundation")]
175 #[unsafe(method(initWithFrame:))]
176 #[unsafe(method_family = init)]
177 pub fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
178
179 #[unsafe(method(initWithCoder:))]
183 #[unsafe(method_family = init)]
184 pub unsafe fn initWithCoder(
185 this: Allocated<Self>,
186 coder: &NSCoder,
187 ) -> Option<Retained<Self>>;
188
189 #[cfg(all(
190 feature = "UIAction",
191 feature = "UIMenuElement",
192 feature = "objc2-core-foundation"
193 ))]
194 #[unsafe(method(initWithFrame:primaryAction:))]
196 #[unsafe(method_family = init)]
197 pub fn initWithFrame_primaryAction(
198 this: Allocated<Self>,
199 frame: CGRect,
200 primary_action: Option<&UIAction>,
201 ) -> Retained<Self>;
202 );
203}
204
205#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
207impl UIRefreshControl {
208 extern_methods!(
209 #[unsafe(method(new))]
210 #[unsafe(method_family = new)]
211 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
212 );
213}