objc2_ui_kit/generated/
UIProgressView.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
15#[repr(transparent)]
18#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
19pub struct UIProgressViewStyle(pub NSInteger);
20impl UIProgressViewStyle {
21 #[doc(alias = "UIProgressViewStyleDefault")]
22 pub const Default: Self = Self(0);
23 #[doc(alias = "UIProgressViewStyleBar")]
24 pub const Bar: Self = Self(1);
25}
26
27unsafe impl Encode for UIProgressViewStyle {
28 const ENCODING: Encoding = NSInteger::ENCODING;
29}
30
31unsafe impl RefEncode for UIProgressViewStyle {
32 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
33}
34
35extern_class!(
36 #[unsafe(super(UIView, UIResponder, NSObject))]
38 #[thread_kind = MainThreadOnly]
39 #[derive(Debug, PartialEq, Eq, Hash)]
40 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
41 pub struct UIProgressView;
42);
43
44#[cfg(all(
45 feature = "UIResponder",
46 feature = "UIView",
47 feature = "objc2-quartz-core"
48))]
49#[cfg(not(target_os = "watchos"))]
50extern_conformance!(
51 unsafe impl CALayerDelegate for UIProgressView {}
52);
53
54#[cfg(all(feature = "UIResponder", feature = "UIView"))]
55extern_conformance!(
56 unsafe impl NSCoding for UIProgressView {}
57);
58
59#[cfg(all(feature = "UIResponder", feature = "UIView"))]
60extern_conformance!(
61 unsafe impl NSObjectProtocol for UIProgressView {}
62);
63
64#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
65extern_conformance!(
66 unsafe impl UIAppearance for UIProgressView {}
67);
68
69#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
70extern_conformance!(
71 unsafe impl UIAppearanceContainer for UIProgressView {}
72);
73
74#[cfg(all(feature = "UIResponder", feature = "UIView"))]
75extern_conformance!(
76 unsafe impl UICoordinateSpace for UIProgressView {}
77);
78
79#[cfg(all(
80 feature = "UIDynamicBehavior",
81 feature = "UIResponder",
82 feature = "UIView"
83))]
84extern_conformance!(
85 unsafe impl UIDynamicItem for UIProgressView {}
86);
87
88#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
89extern_conformance!(
90 unsafe impl UIFocusEnvironment for UIProgressView {}
91);
92
93#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
94extern_conformance!(
95 unsafe impl UIFocusItem for UIProgressView {}
96);
97
98#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
99extern_conformance!(
100 unsafe impl UIFocusItemContainer for UIProgressView {}
101);
102
103#[cfg(all(feature = "UIResponder", feature = "UIView"))]
104extern_conformance!(
105 unsafe impl UIResponderStandardEditActions for UIProgressView {}
106);
107
108#[cfg(all(
109 feature = "UIResponder",
110 feature = "UITraitCollection",
111 feature = "UIView"
112))]
113extern_conformance!(
114 unsafe impl UITraitEnvironment for UIProgressView {}
115);
116
117#[cfg(all(feature = "UIResponder", feature = "UIView"))]
118impl UIProgressView {
119 extern_methods!(
120 #[cfg(feature = "objc2-core-foundation")]
121 #[unsafe(method(initWithFrame:))]
122 #[unsafe(method_family = init)]
123 pub fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
124
125 #[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 #[unsafe(method(initWithProgressViewStyle:))]
136 #[unsafe(method_family = init)]
137 pub fn initWithProgressViewStyle(
138 this: Allocated<Self>,
139 style: UIProgressViewStyle,
140 ) -> Retained<Self>;
141
142 #[unsafe(method(progressViewStyle))]
143 #[unsafe(method_family = none)]
144 pub fn progressViewStyle(&self) -> UIProgressViewStyle;
145
146 #[unsafe(method(setProgressViewStyle:))]
148 #[unsafe(method_family = none)]
149 pub fn setProgressViewStyle(&self, progress_view_style: UIProgressViewStyle);
150
151 #[unsafe(method(progress))]
152 #[unsafe(method_family = none)]
153 pub fn progress(&self) -> c_float;
154
155 #[unsafe(method(setProgress:))]
157 #[unsafe(method_family = none)]
158 pub fn setProgress(&self, progress: c_float);
159
160 #[cfg(feature = "UIColor")]
161 #[unsafe(method(progressTintColor))]
162 #[unsafe(method_family = none)]
163 pub fn progressTintColor(&self) -> Option<Retained<UIColor>>;
164
165 #[cfg(feature = "UIColor")]
166 #[unsafe(method(setProgressTintColor:))]
168 #[unsafe(method_family = none)]
169 pub fn setProgressTintColor(&self, progress_tint_color: Option<&UIColor>);
170
171 #[cfg(feature = "UIColor")]
172 #[unsafe(method(trackTintColor))]
173 #[unsafe(method_family = none)]
174 pub fn trackTintColor(&self) -> Option<Retained<UIColor>>;
175
176 #[cfg(feature = "UIColor")]
177 #[unsafe(method(setTrackTintColor:))]
179 #[unsafe(method_family = none)]
180 pub fn setTrackTintColor(&self, track_tint_color: Option<&UIColor>);
181
182 #[cfg(feature = "UIImage")]
183 #[unsafe(method(progressImage))]
184 #[unsafe(method_family = none)]
185 pub fn progressImage(&self) -> Option<Retained<UIImage>>;
186
187 #[cfg(feature = "UIImage")]
188 #[unsafe(method(setProgressImage:))]
190 #[unsafe(method_family = none)]
191 pub fn setProgressImage(&self, progress_image: Option<&UIImage>);
192
193 #[cfg(feature = "UIImage")]
194 #[unsafe(method(trackImage))]
195 #[unsafe(method_family = none)]
196 pub fn trackImage(&self) -> Option<Retained<UIImage>>;
197
198 #[cfg(feature = "UIImage")]
199 #[unsafe(method(setTrackImage:))]
201 #[unsafe(method_family = none)]
202 pub fn setTrackImage(&self, track_image: Option<&UIImage>);
203
204 #[unsafe(method(setProgress:animated:))]
205 #[unsafe(method_family = none)]
206 pub fn setProgress_animated(&self, progress: c_float, animated: bool);
207
208 #[unsafe(method(observedProgress))]
209 #[unsafe(method_family = none)]
210 pub fn observedProgress(&self) -> Option<Retained<NSProgress>>;
211
212 #[unsafe(method(setObservedProgress:))]
214 #[unsafe(method_family = none)]
215 pub fn setObservedProgress(&self, observed_progress: Option<&NSProgress>);
216 );
217}
218
219#[cfg(all(feature = "UIResponder", feature = "UIView"))]
221impl UIProgressView {
222 extern_methods!(
223 #[unsafe(method(init))]
224 #[unsafe(method_family = init)]
225 pub fn init(this: Allocated<Self>) -> Retained<Self>;
226 );
227}
228
229#[cfg(all(feature = "UIResponder", feature = "UIView"))]
231impl UIProgressView {
232 extern_methods!(
233 #[unsafe(method(new))]
234 #[unsafe(method_family = new)]
235 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
236 );
237}