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 NSLevelIndicatorPlaceholderVisibility(pub NSInteger);
impl NSLevelIndicatorPlaceholderVisibility {
#[doc(alias = "NSLevelIndicatorPlaceholderVisibilityAutomatic")]
pub const Automatic: Self = Self(0);
#[doc(alias = "NSLevelIndicatorPlaceholderVisibilityAlways")]
pub const Always: Self = Self(1);
#[doc(alias = "NSLevelIndicatorPlaceholderVisibilityWhileEditing")]
pub const WhileEditing: Self = Self(2);
}
unsafe impl Encode for NSLevelIndicatorPlaceholderVisibility {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSLevelIndicatorPlaceholderVisibility {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSControl, NSView, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
pub struct NSLevelIndicator;
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSControl",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSAccessibility for NSLevelIndicator {}
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSControl",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSAccessibilityElementProtocol for NSLevelIndicator {}
);
#[cfg(all(
feature = "NSAnimation",
feature = "NSControl",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSAnimatablePropertyContainer for NSLevelIndicator {}
);
#[cfg(all(
feature = "NSAppearance",
feature = "NSControl",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSAppearanceCustomization for NSLevelIndicator {}
);
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
extern_conformance!(
unsafe impl NSCoding for NSLevelIndicator {}
);
#[cfg(all(
feature = "NSControl",
feature = "NSDragging",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSDraggingDestination for NSLevelIndicator {}
);
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
extern_conformance!(
unsafe impl NSObjectProtocol for NSLevelIndicator {}
);
#[cfg(all(
feature = "NSControl",
feature = "NSResponder",
feature = "NSUserInterfaceItemIdentification",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for NSLevelIndicator {}
);
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
impl NSLevelIndicator {
extern_methods!(
#[cfg(feature = "NSLevelIndicatorCell")]
#[unsafe(method(levelIndicatorStyle))]
#[unsafe(method_family = none)]
pub fn levelIndicatorStyle(&self) -> NSLevelIndicatorStyle;
#[cfg(feature = "NSLevelIndicatorCell")]
#[unsafe(method(setLevelIndicatorStyle:))]
#[unsafe(method_family = none)]
pub fn setLevelIndicatorStyle(&self, level_indicator_style: NSLevelIndicatorStyle);
#[unsafe(method(isEditable))]
#[unsafe(method_family = none)]
pub fn isEditable(&self) -> bool;
#[unsafe(method(setEditable:))]
#[unsafe(method_family = none)]
pub fn setEditable(&self, editable: bool);
#[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(tickMarkValueAtIndex:))]
#[unsafe(method_family = none)]
pub fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double;
#[unsafe(method(rectOfTickMarkAtIndex:))]
#[unsafe(method_family = none)]
pub fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect;
#[cfg(feature = "NSColor")]
#[unsafe(method(fillColor))]
#[unsafe(method_family = none)]
pub fn fillColor(&self) -> Retained<NSColor>;
#[cfg(feature = "NSColor")]
#[unsafe(method(setFillColor:))]
#[unsafe(method_family = none)]
pub fn setFillColor(&self, fill_color: Option<&NSColor>);
#[cfg(feature = "NSColor")]
#[unsafe(method(warningFillColor))]
#[unsafe(method_family = none)]
pub fn warningFillColor(&self) -> Retained<NSColor>;
#[cfg(feature = "NSColor")]
#[unsafe(method(setWarningFillColor:))]
#[unsafe(method_family = none)]
pub fn setWarningFillColor(&self, warning_fill_color: Option<&NSColor>);
#[cfg(feature = "NSColor")]
#[unsafe(method(criticalFillColor))]
#[unsafe(method_family = none)]
pub fn criticalFillColor(&self) -> Retained<NSColor>;
#[cfg(feature = "NSColor")]
#[unsafe(method(setCriticalFillColor:))]
#[unsafe(method_family = none)]
pub fn setCriticalFillColor(&self, critical_fill_color: Option<&NSColor>);
#[unsafe(method(drawsTieredCapacityLevels))]
#[unsafe(method_family = none)]
pub fn drawsTieredCapacityLevels(&self) -> bool;
#[unsafe(method(setDrawsTieredCapacityLevels:))]
#[unsafe(method_family = none)]
pub fn setDrawsTieredCapacityLevels(&self, draws_tiered_capacity_levels: bool);
#[unsafe(method(placeholderVisibility))]
#[unsafe(method_family = none)]
pub fn placeholderVisibility(&self) -> NSLevelIndicatorPlaceholderVisibility;
#[unsafe(method(setPlaceholderVisibility:))]
#[unsafe(method_family = none)]
pub fn setPlaceholderVisibility(
&self,
placeholder_visibility: NSLevelIndicatorPlaceholderVisibility,
);
#[cfg(feature = "NSImage")]
#[unsafe(method(ratingImage))]
#[unsafe(method_family = none)]
pub fn ratingImage(&self) -> Option<Retained<NSImage>>;
#[cfg(feature = "NSImage")]
#[unsafe(method(setRatingImage:))]
#[unsafe(method_family = none)]
pub fn setRatingImage(&self, rating_image: Option<&NSImage>);
#[cfg(feature = "NSImage")]
#[unsafe(method(ratingPlaceholderImage))]
#[unsafe(method_family = none)]
pub fn ratingPlaceholderImage(&self) -> Option<Retained<NSImage>>;
#[cfg(feature = "NSImage")]
#[unsafe(method(setRatingPlaceholderImage:))]
#[unsafe(method_family = none)]
pub fn setRatingPlaceholderImage(&self, rating_placeholder_image: Option<&NSImage>);
);
}
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
impl NSLevelIndicator {
extern_methods!(
#[unsafe(method(initWithFrame:))]
#[unsafe(method_family = init)]
pub fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
impl NSLevelIndicator {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
impl NSLevelIndicator {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}