use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSControl, NSView, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
pub struct NSSlider;
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSControl",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSAccessibility for NSSlider {}
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSControl",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSAccessibilityElementProtocol for NSSlider {}
);
#[cfg(all(
feature = "NSAccessibilityProtocols",
feature = "NSControl",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSAccessibilitySlider for NSSlider {}
);
#[cfg(all(
feature = "NSAnimation",
feature = "NSControl",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSAnimatablePropertyContainer for NSSlider {}
);
#[cfg(all(
feature = "NSAppearance",
feature = "NSControl",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSAppearanceCustomization for NSSlider {}
);
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
extern_conformance!(
unsafe impl NSCoding for NSSlider {}
);
#[cfg(all(
feature = "NSControl",
feature = "NSDragging",
feature = "NSResponder",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSDraggingDestination for NSSlider {}
);
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
extern_conformance!(
unsafe impl NSObjectProtocol for NSSlider {}
);
#[cfg(all(
feature = "NSControl",
feature = "NSResponder",
feature = "NSUserInterfaceItemIdentification",
feature = "NSView"
))]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for NSSlider {}
);
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
impl NSSlider {
extern_methods!(
#[cfg(feature = "NSSliderCell")]
#[unsafe(method(sliderType))]
#[unsafe(method_family = none)]
pub fn sliderType(&self) -> NSSliderType;
#[cfg(feature = "NSSliderCell")]
#[unsafe(method(setSliderType:))]
#[unsafe(method_family = none)]
pub fn setSliderType(&self, slider_type: NSSliderType);
#[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(neutralValue))]
#[unsafe(method_family = none)]
pub fn neutralValue(&self) -> c_double;
#[unsafe(method(setNeutralValue:))]
#[unsafe(method_family = none)]
pub fn setNeutralValue(&self, neutral_value: c_double);
#[unsafe(method(altIncrementValue))]
#[unsafe(method_family = none)]
pub fn altIncrementValue(&self) -> c_double;
#[unsafe(method(setAltIncrementValue:))]
#[unsafe(method_family = none)]
pub fn setAltIncrementValue(&self, alt_increment_value: c_double);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(knobThickness))]
#[unsafe(method_family = none)]
pub fn knobThickness(&self) -> CGFloat;
#[cfg(feature = "NSEvent")]
#[unsafe(method(acceptsFirstMouse:))]
#[unsafe(method_family = none)]
pub fn acceptsFirstMouse(&self, event: Option<&NSEvent>) -> bool;
#[unsafe(method(setVertical:))]
#[unsafe(method_family = none)]
pub fn setVertical(&self, vertical: bool);
#[cfg(feature = "NSColor")]
#[unsafe(method(trackFillColor))]
#[unsafe(method_family = none)]
pub fn trackFillColor(&self) -> Option<Retained<NSColor>>;
#[cfg(feature = "NSColor")]
#[unsafe(method(setTrackFillColor:))]
#[unsafe(method_family = none)]
pub fn setTrackFillColor(&self, track_fill_color: Option<&NSColor>);
#[cfg(feature = "NSTintProminence")]
#[unsafe(method(tintProminence))]
#[unsafe(method_family = none)]
pub fn tintProminence(&self) -> NSTintProminence;
#[cfg(feature = "NSTintProminence")]
#[unsafe(method(setTintProminence:))]
#[unsafe(method_family = none)]
pub fn setTintProminence(&self, tint_prominence: NSTintProminence);
);
}
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
impl NSSlider {
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 NSSlider {
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 NSSlider {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
impl NSSlider {
extern_methods!();
}
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
impl NSSlider {
extern_methods!(
#[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);
#[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(allowsTickMarkValuesOnly))]
#[unsafe(method_family = none)]
pub fn allowsTickMarkValuesOnly(&self) -> bool;
#[unsafe(method(setAllowsTickMarkValuesOnly:))]
#[unsafe(method_family = none)]
pub fn setAllowsTickMarkValuesOnly(&self, allows_tick_mark_values_only: bool);
#[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;
#[unsafe(method(indexOfTickMarkAtPoint:))]
#[unsafe(method_family = none)]
pub fn indexOfTickMarkAtPoint(&self, point: NSPoint) -> NSInteger;
#[unsafe(method(closestTickMarkValueToValue:))]
#[unsafe(method_family = none)]
pub fn closestTickMarkValueToValue(&self, value: c_double) -> c_double;
);
}
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
impl NSSlider {
extern_methods!(
#[unsafe(method(sliderWithTarget:action:))]
#[unsafe(method_family = none)]
pub unsafe fn sliderWithTarget_action(
target: Option<&AnyObject>,
action: Option<Sel>,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[unsafe(method(sliderWithValue:minValue:maxValue:target:action:))]
#[unsafe(method_family = none)]
pub unsafe fn sliderWithValue_minValue_maxValue_target_action(
value: c_double,
min_value: c_double,
max_value: c_double,
target: Option<&AnyObject>,
action: Option<Sel>,
mtm: MainThreadMarker,
) -> Retained<Self>;
);
}
#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
impl NSSlider {
extern_methods!(
#[cfg(feature = "NSCell")]
#[deprecated = "-setTitleCell: had no effect since 10.0"]
#[unsafe(method(setTitleCell:))]
#[unsafe(method_family = none)]
pub unsafe fn setTitleCell(&self, cell: Option<&NSCell>);
#[deprecated = "-titleCell has returned nil since 10.0"]
#[unsafe(method(titleCell))]
#[unsafe(method_family = none)]
pub fn titleCell(&self) -> Option<Retained<AnyObject>>;
#[cfg(feature = "NSColor")]
#[deprecated = "-setTitleColor: had no effect since 10.0"]
#[unsafe(method(setTitleColor:))]
#[unsafe(method_family = none)]
pub unsafe fn setTitleColor(&self, new_color: Option<&NSColor>);
#[cfg(feature = "NSColor")]
#[deprecated = "-titleColor has returned nil since 10.0"]
#[unsafe(method(titleColor))]
#[unsafe(method_family = none)]
pub fn titleColor(&self) -> Option<Retained<NSColor>>;
#[cfg(feature = "NSFont")]
#[deprecated = "-setTitleFont: had no effect since 10.0"]
#[unsafe(method(setTitleFont:))]
#[unsafe(method_family = none)]
pub unsafe fn setTitleFont(&self, font_obj: Option<&NSFont>);
#[cfg(feature = "NSFont")]
#[deprecated = "-titleFont has returned nil since 10.0"]
#[unsafe(method(titleFont))]
#[unsafe(method_family = none)]
pub fn titleFont(&self) -> Option<Retained<NSFont>>;
#[deprecated = "-title has returned nil since 10.0"]
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub fn title(&self) -> Option<Retained<NSString>>;
#[deprecated = "-setTitle: had no effect since 10.0"]
#[unsafe(method(setTitle:))]
#[unsafe(method_family = none)]
pub unsafe fn setTitle(&self, string: Option<&NSString>);
#[cfg(feature = "objc2-core-foundation")]
#[deprecated = "-knobThickness has returned 0 since 10.0"]
#[unsafe(method(setKnobThickness:))]
#[unsafe(method_family = none)]
pub fn setKnobThickness(&self, thickness: CGFloat);
#[cfg(feature = "NSImage")]
#[deprecated = "-setImage: had no effect since 10.0"]
#[unsafe(method(setImage:))]
#[unsafe(method_family = none)]
pub unsafe fn setImage(&self, background_image: Option<&NSImage>);
#[cfg(feature = "NSImage")]
#[deprecated = "-image has returned nil since 10.0"]
#[unsafe(method(image))]
#[unsafe(method_family = none)]
pub fn image(&self) -> Option<Retained<NSImage>>;
);
}