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 UISliderStyle(pub NSInteger);
impl UISliderStyle {
#[doc(alias = "UISliderStyleDefault")]
pub const Default: Self = Self(0);
#[doc(alias = "UISliderStyleThumbless")]
pub const Thumbless: Self = Self(1);
}
unsafe impl Encode for UISliderStyle {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for UISliderStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(UIControl, UIView, UIResponder, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
pub struct UISlider;
);
#[cfg(all(
feature = "UIControl",
feature = "UIResponder",
feature = "UIView",
feature = "objc2-quartz-core"
))]
#[cfg(not(target_os = "watchos"))]
extern_conformance!(
unsafe impl CALayerDelegate for UISlider {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl NSCoding for UISlider {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl NSObjectProtocol for UISlider {}
);
#[cfg(all(
feature = "UIAppearance",
feature = "UIControl",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIAppearance for UISlider {}
);
#[cfg(all(
feature = "UIAppearance",
feature = "UIControl",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIAppearanceContainer for UISlider {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UICoordinateSpace for UISlider {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIDynamicBehavior",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIDynamicItem for UISlider {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIFocus",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIFocusEnvironment for UISlider {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIFocus",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIFocusItem for UISlider {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIFocus",
feature = "UIResponder",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UIFocusItemContainer for UISlider {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
extern_conformance!(
unsafe impl UIResponderStandardEditActions for UISlider {}
);
#[cfg(all(
feature = "UIControl",
feature = "UIResponder",
feature = "UITraitCollection",
feature = "UIView"
))]
extern_conformance!(
unsafe impl UITraitEnvironment for UISlider {}
);
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
impl UISlider {
extern_methods!(
#[unsafe(method(value))]
#[unsafe(method_family = none)]
pub fn value(&self) -> c_float;
#[unsafe(method(setValue:))]
#[unsafe(method_family = none)]
pub fn setValue(&self, value: c_float);
#[unsafe(method(minimumValue))]
#[unsafe(method_family = none)]
pub fn minimumValue(&self) -> c_float;
#[unsafe(method(setMinimumValue:))]
#[unsafe(method_family = none)]
pub fn setMinimumValue(&self, minimum_value: c_float);
#[unsafe(method(maximumValue))]
#[unsafe(method_family = none)]
pub fn maximumValue(&self) -> c_float;
#[unsafe(method(setMaximumValue:))]
#[unsafe(method_family = none)]
pub fn setMaximumValue(&self, maximum_value: c_float);
#[cfg(feature = "UIImage")]
#[unsafe(method(minimumValueImage))]
#[unsafe(method_family = none)]
pub fn minimumValueImage(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(setMinimumValueImage:))]
#[unsafe(method_family = none)]
pub fn setMinimumValueImage(&self, minimum_value_image: Option<&UIImage>);
#[cfg(feature = "UIImage")]
#[unsafe(method(maximumValueImage))]
#[unsafe(method_family = none)]
pub fn maximumValueImage(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(setMaximumValueImage:))]
#[unsafe(method_family = none)]
pub fn setMaximumValueImage(&self, maximum_value_image: Option<&UIImage>);
#[unsafe(method(isContinuous))]
#[unsafe(method_family = none)]
pub fn isContinuous(&self) -> bool;
#[unsafe(method(setContinuous:))]
#[unsafe(method_family = none)]
pub fn setContinuous(&self, continuous: bool);
#[cfg(feature = "UISliderTrackConfiguration")]
#[unsafe(method(trackConfiguration))]
#[unsafe(method_family = none)]
pub fn trackConfiguration(&self) -> Option<Retained<UISliderTrackConfiguration>>;
#[cfg(feature = "UISliderTrackConfiguration")]
#[unsafe(method(setTrackConfiguration:))]
#[unsafe(method_family = none)]
pub fn setTrackConfiguration(
&self,
track_configuration: Option<&UISliderTrackConfiguration>,
);
#[unsafe(method(sliderStyle))]
#[unsafe(method_family = none)]
pub fn sliderStyle(&self) -> UISliderStyle;
#[unsafe(method(setSliderStyle:))]
#[unsafe(method_family = none)]
pub fn setSliderStyle(&self, slider_style: UISliderStyle);
#[cfg(feature = "UIColor")]
#[unsafe(method(minimumTrackTintColor))]
#[unsafe(method_family = none)]
pub fn minimumTrackTintColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[unsafe(method(setMinimumTrackTintColor:))]
#[unsafe(method_family = none)]
pub fn setMinimumTrackTintColor(&self, minimum_track_tint_color: Option<&UIColor>);
#[cfg(feature = "UIColor")]
#[unsafe(method(maximumTrackTintColor))]
#[unsafe(method_family = none)]
pub fn maximumTrackTintColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[unsafe(method(setMaximumTrackTintColor:))]
#[unsafe(method_family = none)]
pub fn setMaximumTrackTintColor(&self, maximum_track_tint_color: Option<&UIColor>);
#[cfg(feature = "UIColor")]
#[unsafe(method(thumbTintColor))]
#[unsafe(method_family = none)]
pub fn thumbTintColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[unsafe(method(setThumbTintColor:))]
#[unsafe(method_family = none)]
pub fn setThumbTintColor(&self, thumb_tint_color: Option<&UIColor>);
#[unsafe(method(setValue:animated:))]
#[unsafe(method_family = none)]
pub fn setValue_animated(&self, value: c_float, animated: bool);
#[cfg(feature = "UIImage")]
#[unsafe(method(setThumbImage:forState:))]
#[unsafe(method_family = none)]
pub fn setThumbImage_forState(&self, image: Option<&UIImage>, state: UIControlState);
#[cfg(feature = "UIImage")]
#[unsafe(method(setMinimumTrackImage:forState:))]
#[unsafe(method_family = none)]
pub fn setMinimumTrackImage_forState(&self, image: Option<&UIImage>, state: UIControlState);
#[cfg(feature = "UIImage")]
#[unsafe(method(setMaximumTrackImage:forState:))]
#[unsafe(method_family = none)]
pub fn setMaximumTrackImage_forState(&self, image: Option<&UIImage>, state: UIControlState);
#[cfg(feature = "UIImage")]
#[unsafe(method(thumbImageForState:))]
#[unsafe(method_family = none)]
pub fn thumbImageForState(&self, state: UIControlState) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(minimumTrackImageForState:))]
#[unsafe(method_family = none)]
pub fn minimumTrackImageForState(&self, state: UIControlState)
-> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(maximumTrackImageForState:))]
#[unsafe(method_family = none)]
pub fn maximumTrackImageForState(&self, state: UIControlState)
-> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(currentThumbImage))]
#[unsafe(method_family = none)]
pub fn currentThumbImage(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(currentMinimumTrackImage))]
#[unsafe(method_family = none)]
pub fn currentMinimumTrackImage(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(currentMaximumTrackImage))]
#[unsafe(method_family = none)]
pub fn currentMaximumTrackImage(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(minimumValueImageRectForBounds:))]
#[unsafe(method_family = none)]
pub fn minimumValueImageRectForBounds(&self, bounds: CGRect) -> CGRect;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(maximumValueImageRectForBounds:))]
#[unsafe(method_family = none)]
pub fn maximumValueImageRectForBounds(&self, bounds: CGRect) -> CGRect;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(trackRectForBounds:))]
#[unsafe(method_family = none)]
pub fn trackRectForBounds(&self, bounds: CGRect) -> CGRect;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(thumbRectForBounds:trackRect:value:))]
#[unsafe(method_family = none)]
pub fn thumbRectForBounds_trackRect_value(
&self,
bounds: CGRect,
rect: CGRect,
value: c_float,
) -> CGRect;
);
}
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
impl UISlider {
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>>;
#[cfg(all(
feature = "UIAction",
feature = "UIMenuElement",
feature = "objc2-core-foundation"
))]
#[unsafe(method(initWithFrame:primaryAction:))]
#[unsafe(method_family = init)]
pub fn initWithFrame_primaryAction(
this: Allocated<Self>,
frame: CGRect,
primary_action: Option<&UIAction>,
) -> Retained<Self>;
);
}
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
impl UISlider {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
impl UISlider {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}