use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UISliderTick;
);
extern_conformance!(
unsafe impl NSCoding for UISliderTick {}
);
extern_conformance!(
unsafe impl NSCopying for UISliderTick {}
);
unsafe impl CopyingHelper for UISliderTick {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UISliderTick {}
);
impl UISliderTick {
extern_methods!(
#[unsafe(method(position))]
#[unsafe(method_family = none)]
pub fn position(&self) -> c_float;
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub fn title(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setTitle:))]
#[unsafe(method_family = none)]
pub fn setTitle(&self, title: Option<&NSString>);
#[cfg(feature = "UIImage")]
#[unsafe(method(image))]
#[unsafe(method_family = none)]
pub fn image(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(setImage:))]
#[unsafe(method_family = none)]
pub fn setImage(&self, image: Option<&UIImage>);
#[cfg(feature = "UIImage")]
#[unsafe(method(tickWithPosition:title:image:))]
#[unsafe(method_family = none)]
pub fn tickWithPosition_title_image(
position: c_float,
title: Option<&NSString>,
image: Option<&UIImage>,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UISliderTrackConfiguration;
);
extern_conformance!(
unsafe impl NSCoding for UISliderTrackConfiguration {}
);
extern_conformance!(
unsafe impl NSCopying for UISliderTrackConfiguration {}
);
unsafe impl CopyingHelper for UISliderTrackConfiguration {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UISliderTrackConfiguration {}
);
impl UISliderTrackConfiguration {
extern_methods!(
#[unsafe(method(allowsTickValuesOnly))]
#[unsafe(method_family = none)]
pub fn allowsTickValuesOnly(&self) -> bool;
#[unsafe(method(setAllowsTickValuesOnly:))]
#[unsafe(method_family = none)]
pub fn setAllowsTickValuesOnly(&self, allows_tick_values_only: bool);
#[unsafe(method(neutralValue))]
#[unsafe(method_family = none)]
pub fn neutralValue(&self) -> c_float;
#[unsafe(method(setNeutralValue:))]
#[unsafe(method_family = none)]
pub fn setNeutralValue(&self, neutral_value: c_float);
#[unsafe(method(minimumEnabledValue))]
#[unsafe(method_family = none)]
pub fn minimumEnabledValue(&self) -> c_float;
#[unsafe(method(setMinimumEnabledValue:))]
#[unsafe(method_family = none)]
pub fn setMinimumEnabledValue(&self, minimum_enabled_value: c_float);
#[unsafe(method(maximumEnabledValue))]
#[unsafe(method_family = none)]
pub fn maximumEnabledValue(&self) -> c_float;
#[unsafe(method(setMaximumEnabledValue:))]
#[unsafe(method_family = none)]
pub fn setMaximumEnabledValue(&self, maximum_enabled_value: c_float);
#[unsafe(method(ticks))]
#[unsafe(method_family = none)]
pub fn ticks(&self) -> Retained<NSArray<UISliderTick>>;
#[unsafe(method(configurationWithTicks:))]
#[unsafe(method_family = none)]
pub fn configurationWithTicks(
ticks: &NSArray<UISliderTick>,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[unsafe(method(configurationWithNumberOfTicks:))]
#[unsafe(method_family = none)]
pub fn configurationWithNumberOfTicks(
ticks: NSInteger,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}