use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSLevelIndicatorStyle(pub NSUInteger);
impl NSLevelIndicatorStyle {
#[doc(alias = "NSLevelIndicatorStyleRelevancy")]
pub const Relevancy: Self = Self(0);
#[doc(alias = "NSLevelIndicatorStyleContinuousCapacity")]
pub const ContinuousCapacity: Self = Self(1);
#[doc(alias = "NSLevelIndicatorStyleDiscreteCapacity")]
pub const DiscreteCapacity: Self = Self(2);
#[doc(alias = "NSLevelIndicatorStyleRating")]
pub const Rating: Self = Self(3);
}
unsafe impl Encode for NSLevelIndicatorStyle {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for NSLevelIndicatorStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSActionCell, NSCell, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
pub struct NSLevelIndicatorCell;
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSActionCell",
feature = "NSCell"
))]
extern_conformance!(
unsafe impl NSAccessibility for NSLevelIndicatorCell {}
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSActionCell",
feature = "NSCell"
))]
extern_conformance!(
unsafe impl NSAccessibilityElementProtocol for NSLevelIndicatorCell {}
);
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
extern_conformance!(
unsafe impl NSCoding for NSLevelIndicatorCell {}
);
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
extern_conformance!(
unsafe impl NSCopying for NSLevelIndicatorCell {}
);
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
unsafe impl CopyingHelper for NSLevelIndicatorCell {
type Result = Self;
}
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
extern_conformance!(
unsafe impl NSObjectProtocol for NSLevelIndicatorCell {}
);
#[cfg(all(
feature = "NSActionCell",
feature = "NSCell",
feature = "NSUserInterfaceItemIdentification"
))]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for NSLevelIndicatorCell {}
);
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
impl NSLevelIndicatorCell {
extern_methods!(
#[unsafe(method(initWithLevelIndicatorStyle:))]
#[unsafe(method_family = init)]
pub fn initWithLevelIndicatorStyle(
this: Allocated<Self>,
level_indicator_style: NSLevelIndicatorStyle,
) -> Retained<Self>;
#[unsafe(method(levelIndicatorStyle))]
#[unsafe(method_family = none)]
pub fn levelIndicatorStyle(&self) -> NSLevelIndicatorStyle;
#[unsafe(method(setLevelIndicatorStyle:))]
#[unsafe(method_family = none)]
pub fn setLevelIndicatorStyle(&self, level_indicator_style: NSLevelIndicatorStyle);
#[unsafe(method(minValue))]
#[unsafe(method_family = none)]
pub fn minValue(&self) -> c_double;
#[unsafe(method(setMinValue:))]
#[unsafe(method_family = none)]
pub fn setMinValue(&self, min_value: c_double);
#[unsafe(method(maxValue))]
#[unsafe(method_family = none)]
pub fn maxValue(&self) -> c_double;
#[unsafe(method(setMaxValue:))]
#[unsafe(method_family = none)]
pub fn setMaxValue(&self, max_value: c_double);
#[unsafe(method(warningValue))]
#[unsafe(method_family = none)]
pub fn warningValue(&self) -> c_double;
#[unsafe(method(setWarningValue:))]
#[unsafe(method_family = none)]
pub fn setWarningValue(&self, warning_value: c_double);
#[unsafe(method(criticalValue))]
#[unsafe(method_family = none)]
pub fn criticalValue(&self) -> c_double;
#[unsafe(method(setCriticalValue:))]
#[unsafe(method_family = none)]
pub fn setCriticalValue(&self, critical_value: c_double);
#[cfg(feature = "NSSliderCell")]
#[unsafe(method(tickMarkPosition))]
#[unsafe(method_family = none)]
pub fn tickMarkPosition(&self) -> NSTickMarkPosition;
#[cfg(feature = "NSSliderCell")]
#[unsafe(method(setTickMarkPosition:))]
#[unsafe(method_family = none)]
pub fn setTickMarkPosition(&self, tick_mark_position: NSTickMarkPosition);
#[unsafe(method(numberOfTickMarks))]
#[unsafe(method_family = none)]
pub fn numberOfTickMarks(&self) -> NSInteger;
#[unsafe(method(setNumberOfTickMarks:))]
#[unsafe(method_family = none)]
pub fn setNumberOfTickMarks(&self, number_of_tick_marks: NSInteger);
#[unsafe(method(numberOfMajorTickMarks))]
#[unsafe(method_family = none)]
pub fn numberOfMajorTickMarks(&self) -> NSInteger;
#[unsafe(method(setNumberOfMajorTickMarks:))]
#[unsafe(method_family = none)]
pub fn setNumberOfMajorTickMarks(&self, number_of_major_tick_marks: NSInteger);
#[unsafe(method(rectOfTickMarkAtIndex:))]
#[unsafe(method_family = none)]
pub fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect;
#[unsafe(method(tickMarkValueAtIndex:))]
#[unsafe(method_family = none)]
pub fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double;
);
}
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
impl NSLevelIndicatorCell {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initTextCell:))]
#[unsafe(method_family = init)]
pub fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
#[cfg(feature = "NSImage")]
#[unsafe(method(initImageCell:))]
#[unsafe(method_family = init)]
pub fn initImageCell(this: Allocated<Self>, image: Option<&NSImage>) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
);
}
#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
impl NSLevelIndicatorCell {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
#[deprecated]
pub static NSRelevancyLevelIndicatorStyle: NSLevelIndicatorStyle =
NSLevelIndicatorStyle(NSLevelIndicatorStyle::Relevancy.0);
#[deprecated]
pub static NSContinuousCapacityLevelIndicatorStyle: NSLevelIndicatorStyle =
NSLevelIndicatorStyle(NSLevelIndicatorStyle::ContinuousCapacity.0);
#[deprecated]
pub static NSDiscreteCapacityLevelIndicatorStyle: NSLevelIndicatorStyle =
NSLevelIndicatorStyle(NSLevelIndicatorStyle::DiscreteCapacity.0);
#[deprecated]
pub static NSRatingLevelIndicatorStyle: NSLevelIndicatorStyle =
NSLevelIndicatorStyle(NSLevelIndicatorStyle::Rating.0);