//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

// NS_TYPED_EXTENSIBLE_ENUM
pub type NSSliderAccessoryWidth = CGFloat;

extern "C" {
    pub static NSSliderAccessoryWidthDefault: NSSliderAccessoryWidth;
}

extern "C" {
    pub static NSSliderAccessoryWidthWide: NSSliderAccessoryWidth;
}

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "NSTouchBarItem")]
    pub struct NSSliderTouchBarItem;

    #[cfg(feature = "NSTouchBarItem")]
    unsafe impl ClassType for NSSliderTouchBarItem {
        #[inherits(NSObject)]
        type Super = NSTouchBarItem;
        type Mutability = MainThreadOnly;
    }
);

#[cfg(feature = "NSTouchBarItem")]
unsafe impl NSCoding for NSSliderTouchBarItem {}

#[cfg(feature = "NSTouchBarItem")]
unsafe impl NSObjectProtocol for NSSliderTouchBarItem {}

extern_methods!(
    #[cfg(feature = "NSTouchBarItem")]
    unsafe impl NSSliderTouchBarItem {
        #[cfg(all(
            feature = "NSResponder",
            feature = "NSUserInterfaceCompression",
            feature = "NSView"
        ))]
        #[method_id(@__retain_semantics Other view)]
        pub unsafe fn view(&self) -> Retained<NSView>;

        #[cfg(all(
            feature = "NSControl",
            feature = "NSResponder",
            feature = "NSSlider",
            feature = "NSView"
        ))]
        #[method_id(@__retain_semantics Other slider)]
        pub unsafe fn slider(&self) -> Retained<NSSlider>;

        #[cfg(all(
            feature = "NSControl",
            feature = "NSResponder",
            feature = "NSSlider",
            feature = "NSView"
        ))]
        #[method(setSlider:)]
        pub unsafe fn setSlider(&self, slider: &NSSlider);

        #[method(doubleValue)]
        pub unsafe fn doubleValue(&self) -> c_double;

        #[method(setDoubleValue:)]
        pub unsafe fn setDoubleValue(&self, double_value: c_double);

        #[method(minimumSliderWidth)]
        pub unsafe fn minimumSliderWidth(&self) -> CGFloat;

        #[method(setMinimumSliderWidth:)]
        pub unsafe fn setMinimumSliderWidth(&self, minimum_slider_width: CGFloat);

        #[method(maximumSliderWidth)]
        pub unsafe fn maximumSliderWidth(&self) -> CGFloat;

        #[method(setMaximumSliderWidth:)]
        pub unsafe fn setMaximumSliderWidth(&self, maximum_slider_width: CGFloat);

        #[method_id(@__retain_semantics Other label)]
        pub unsafe fn label(&self) -> Option<Retained<NSString>>;

        #[method(setLabel:)]
        pub unsafe fn setLabel(&self, label: Option<&NSString>);

        #[cfg(feature = "NSSliderAccessory")]
        #[method_id(@__retain_semantics Other minimumValueAccessory)]
        pub unsafe fn minimumValueAccessory(&self) -> Option<Retained<NSSliderAccessory>>;

        #[cfg(feature = "NSSliderAccessory")]
        #[method(setMinimumValueAccessory:)]
        pub unsafe fn setMinimumValueAccessory(
            &self,
            minimum_value_accessory: Option<&NSSliderAccessory>,
        );

        #[cfg(feature = "NSSliderAccessory")]
        #[method_id(@__retain_semantics Other maximumValueAccessory)]
        pub unsafe fn maximumValueAccessory(&self) -> Option<Retained<NSSliderAccessory>>;

        #[cfg(feature = "NSSliderAccessory")]
        #[method(setMaximumValueAccessory:)]
        pub unsafe fn setMaximumValueAccessory(
            &self,
            maximum_value_accessory: Option<&NSSliderAccessory>,
        );

        #[method(valueAccessoryWidth)]
        pub unsafe fn valueAccessoryWidth(&self) -> NSSliderAccessoryWidth;

        #[method(setValueAccessoryWidth:)]
        pub unsafe fn setValueAccessoryWidth(&self, value_accessory_width: NSSliderAccessoryWidth);

        #[method_id(@__retain_semantics Other target)]
        pub unsafe fn target(&self) -> Option<Retained<AnyObject>>;

        #[method(setTarget:)]
        pub unsafe fn setTarget(&self, target: Option<&AnyObject>);

        #[method(action)]
        pub unsafe fn action(&self) -> Option<Sel>;

        #[method(setAction:)]
        pub unsafe fn setAction(&self, action: Option<Sel>);

        #[method_id(@__retain_semantics Other customizationLabel)]
        pub unsafe fn customizationLabel(&self) -> Retained<NSString>;

        #[method(setCustomizationLabel:)]
        pub unsafe fn setCustomizationLabel(&self, customization_label: Option<&NSString>);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSTouchBarItem`
    #[cfg(feature = "NSTouchBarItem")]
    unsafe impl NSSliderTouchBarItem {
        #[method_id(@__retain_semantics Init initWithIdentifier:)]
        pub unsafe fn initWithIdentifier(
            this: Allocated<Self>,
            identifier: &NSTouchBarItemIdentifier,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithCoder:)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "NSTouchBarItem")]
    unsafe impl NSSliderTouchBarItem {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);
