use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
use objc2_quartz_core::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIProgressViewStyle(pub NSInteger);
impl UIProgressViewStyle {
#[doc(alias = "UIProgressViewStyleDefault")]
pub const Default: Self = Self(0);
#[doc(alias = "UIProgressViewStyleBar")]
pub const Bar: Self = Self(1);
}
unsafe impl Encode for UIProgressViewStyle {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UIProgressViewStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(UIView, UIResponder, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
pub struct UIProgressView;
);
#[cfg(all(
feature = "UIResponder",
feature = "UIView",
feature = "objc2-quartz-core"
))]
#[cfg(not(target_os = "watchos"))]
extern_conformance!(
unsafe impl CALayerDelegate for UIProgressView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl NSCoding for UIProgressView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl NSObjectProtocol for UIProgressView {}
);
#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIAppearance for UIProgressView {}
);
#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIAppearanceContainer for UIProgressView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UICoordinateSpace for UIProgressView {}
);
#[cfg(all(
feature = "UIDynamicBehavior",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIDynamicItem for UIProgressView {}
);
#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIFocusEnvironment for UIProgressView {}
);
#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIFocusItem for UIProgressView {}
);
#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIFocusItemContainer for UIProgressView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIResponderStandardEditActions for UIProgressView {}
);
#[cfg(all(
feature = "UIResponder",
feature = "UITraitCollection",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UITraitEnvironment for UIProgressView {}
);
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
impl UIProgressView {
extern_methods!(
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(initWithFrame:))]
#[unsafe(method_family = init)]
pub fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
#[unsafe(method(initWithProgressViewStyle:))]
#[unsafe(method_family = init)]
pub fn initWithProgressViewStyle(
this: Allocated<Self>,
style: UIProgressViewStyle,
) -> Retained<Self>;
#[unsafe(method(progressViewStyle))]
#[unsafe(method_family = none)]
pub fn progressViewStyle(&self) -> UIProgressViewStyle;
#[unsafe(method(setProgressViewStyle:))]
#[unsafe(method_family = none)]
pub fn setProgressViewStyle(&self, progress_view_style: UIProgressViewStyle);
#[unsafe(method(progress))]
#[unsafe(method_family = none)]
pub fn progress(&self) -> c_float;
#[unsafe(method(setProgress:))]
#[unsafe(method_family = none)]
pub fn setProgress(&self, progress: c_float);
#[cfg(feature = "UIColor")]
#[unsafe(method(progressTintColor))]
#[unsafe(method_family = none)]
pub fn progressTintColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[unsafe(method(setProgressTintColor:))]
#[unsafe(method_family = none)]
pub fn setProgressTintColor(&self, progress_tint_color: Option<&UIColor>);
#[cfg(feature = "UIColor")]
#[unsafe(method(trackTintColor))]
#[unsafe(method_family = none)]
pub fn trackTintColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[unsafe(method(setTrackTintColor:))]
#[unsafe(method_family = none)]
pub fn setTrackTintColor(&self, track_tint_color: Option<&UIColor>);
#[cfg(feature = "UIImage")]
#[unsafe(method(progressImage))]
#[unsafe(method_family = none)]
pub fn progressImage(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(setProgressImage:))]
#[unsafe(method_family = none)]
pub fn setProgressImage(&self, progress_image: Option<&UIImage>);
#[cfg(feature = "UIImage")]
#[unsafe(method(trackImage))]
#[unsafe(method_family = none)]
pub fn trackImage(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(setTrackImage:))]
#[unsafe(method_family = none)]
pub fn setTrackImage(&self, track_image: Option<&UIImage>);
#[unsafe(method(setProgress:animated:))]
#[unsafe(method_family = none)]
pub fn setProgress_animated(&self, progress: c_float, animated: bool);
#[unsafe(method(observedProgress))]
#[unsafe(method_family = none)]
pub fn observedProgress(&self) -> Option<Retained<NSProgress>>;
#[unsafe(method(setObservedProgress:))]
#[unsafe(method_family = none)]
pub fn setObservedProgress(&self, observed_progress: Option<&NSProgress>);
);
}
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
impl UIProgressView {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(all(feature = "UIResponder", feature = "UIView"))]
impl UIProgressView {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}