objc2_app_kit/generated/
NSStepperCell.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nssteppercell?language=objc)
12    #[unsafe(super(NSActionCell, NSCell, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
15    pub struct NSStepperCell;
16);
17
18#[cfg(all(
19    feature = "NSAccessibilityProtocols",
20    feature = "NSActionCell",
21    feature = "NSCell"
22))]
23unsafe impl NSAccessibility for NSStepperCell {}
24
25#[cfg(all(
26    feature = "NSAccessibilityProtocols",
27    feature = "NSActionCell",
28    feature = "NSCell"
29))]
30unsafe impl NSAccessibilityElementProtocol for NSStepperCell {}
31
32#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
33unsafe impl NSCoding for NSStepperCell {}
34
35#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
36unsafe impl NSCopying for NSStepperCell {}
37
38#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
39unsafe impl CopyingHelper for NSStepperCell {
40    type Result = Self;
41}
42
43#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
44unsafe impl NSObjectProtocol for NSStepperCell {}
45
46#[cfg(all(
47    feature = "NSActionCell",
48    feature = "NSCell",
49    feature = "NSUserInterfaceItemIdentification"
50))]
51unsafe impl NSUserInterfaceItemIdentification for NSStepperCell {}
52
53#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
54impl NSStepperCell {
55    extern_methods!(
56        #[unsafe(method(minValue))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn minValue(&self) -> c_double;
59
60        /// Setter for [`minValue`][Self::minValue].
61        #[unsafe(method(setMinValue:))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn setMinValue(&self, min_value: c_double);
64
65        #[unsafe(method(maxValue))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn maxValue(&self) -> c_double;
68
69        /// Setter for [`maxValue`][Self::maxValue].
70        #[unsafe(method(setMaxValue:))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn setMaxValue(&self, max_value: c_double);
73
74        #[unsafe(method(increment))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn increment(&self) -> c_double;
77
78        /// Setter for [`increment`][Self::increment].
79        #[unsafe(method(setIncrement:))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn setIncrement(&self, increment: c_double);
82
83        #[unsafe(method(valueWraps))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn valueWraps(&self) -> bool;
86
87        /// Setter for [`valueWraps`][Self::valueWraps].
88        #[unsafe(method(setValueWraps:))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn setValueWraps(&self, value_wraps: bool);
91
92        #[unsafe(method(autorepeat))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn autorepeat(&self) -> bool;
95
96        /// Setter for [`autorepeat`][Self::autorepeat].
97        #[unsafe(method(setAutorepeat:))]
98        #[unsafe(method_family = none)]
99        pub unsafe fn setAutorepeat(&self, autorepeat: bool);
100    );
101}
102
103/// Methods declared on superclass `NSCell`.
104#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
105impl NSStepperCell {
106    extern_methods!(
107        #[unsafe(method(init))]
108        #[unsafe(method_family = init)]
109        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
110
111        #[unsafe(method(initTextCell:))]
112        #[unsafe(method_family = init)]
113        pub unsafe fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
114
115        #[cfg(feature = "NSImage")]
116        #[unsafe(method(initImageCell:))]
117        #[unsafe(method_family = init)]
118        pub unsafe fn initImageCell(
119            this: Allocated<Self>,
120            image: Option<&NSImage>,
121        ) -> Retained<Self>;
122
123        #[unsafe(method(initWithCoder:))]
124        #[unsafe(method_family = init)]
125        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
126    );
127}
128
129/// Methods declared on superclass `NSObject`.
130#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
131impl NSStepperCell {
132    extern_methods!(
133        #[unsafe(method(new))]
134        #[unsafe(method_family = new)]
135        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
136    );
137}