objc2_metric_kit/generated/
MXUnit.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// An NSUnit subclass representing the number of signal bars for signal strength.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxunitsignalbars?language=objc)
13    #[unsafe(super(NSDimension, NSUnit, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct MXUnitSignalBars;
16);
17
18extern_conformance!(
19    unsafe impl NSCoding for MXUnitSignalBars {}
20);
21
22extern_conformance!(
23    unsafe impl NSCopying for MXUnitSignalBars {}
24);
25
26unsafe impl CopyingHelper for MXUnitSignalBars {
27    type Result = Self;
28}
29
30extern_conformance!(
31    unsafe impl NSObjectProtocol for MXUnitSignalBars {}
32);
33
34extern_conformance!(
35    unsafe impl NSSecureCoding for MXUnitSignalBars {}
36);
37
38impl MXUnitSignalBars {
39    extern_methods!(
40        #[unsafe(method(bars))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn bars() -> Retained<MXUnitSignalBars>;
43    );
44}
45
46/// Methods declared on superclass `NSDimension`.
47impl MXUnitSignalBars {
48    extern_methods!(
49        #[unsafe(method(initWithSymbol:converter:))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn initWithSymbol_converter(
52            this: Allocated<Self>,
53            symbol: &NSString,
54            converter: &NSUnitConverter,
55        ) -> Retained<Self>;
56
57        #[unsafe(method(baseUnit))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn baseUnit() -> Retained<Self>;
60    );
61}
62
63/// Methods declared on superclass `NSUnit`.
64impl MXUnitSignalBars {
65    extern_methods!(
66        #[unsafe(method(init))]
67        #[unsafe(method_family = init)]
68        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
69
70        #[unsafe(method(new))]
71        #[unsafe(method_family = new)]
72        pub unsafe fn new() -> Retained<Self>;
73
74        #[unsafe(method(initWithSymbol:))]
75        #[unsafe(method_family = init)]
76        pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
77    );
78}
79
80extern_class!(
81    /// An NSUnit subclass representing the linear space Display APL.
82    ///
83    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxunitaveragepixelluminance?language=objc)
84    #[unsafe(super(NSDimension, NSUnit, NSObject))]
85    #[derive(Debug, PartialEq, Eq, Hash)]
86    pub struct MXUnitAveragePixelLuminance;
87);
88
89extern_conformance!(
90    unsafe impl NSCoding for MXUnitAveragePixelLuminance {}
91);
92
93extern_conformance!(
94    unsafe impl NSCopying for MXUnitAveragePixelLuminance {}
95);
96
97unsafe impl CopyingHelper for MXUnitAveragePixelLuminance {
98    type Result = Self;
99}
100
101extern_conformance!(
102    unsafe impl NSObjectProtocol for MXUnitAveragePixelLuminance {}
103);
104
105extern_conformance!(
106    unsafe impl NSSecureCoding for MXUnitAveragePixelLuminance {}
107);
108
109impl MXUnitAveragePixelLuminance {
110    extern_methods!(
111        #[unsafe(method(apl))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn apl() -> Retained<MXUnitAveragePixelLuminance>;
114    );
115}
116
117/// Methods declared on superclass `NSDimension`.
118impl MXUnitAveragePixelLuminance {
119    extern_methods!(
120        #[unsafe(method(initWithSymbol:converter:))]
121        #[unsafe(method_family = init)]
122        pub unsafe fn initWithSymbol_converter(
123            this: Allocated<Self>,
124            symbol: &NSString,
125            converter: &NSUnitConverter,
126        ) -> Retained<Self>;
127
128        #[unsafe(method(baseUnit))]
129        #[unsafe(method_family = none)]
130        pub unsafe fn baseUnit() -> Retained<Self>;
131    );
132}
133
134/// Methods declared on superclass `NSUnit`.
135impl MXUnitAveragePixelLuminance {
136    extern_methods!(
137        #[unsafe(method(init))]
138        #[unsafe(method_family = init)]
139        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
140
141        #[unsafe(method(new))]
142        #[unsafe(method_family = new)]
143        pub unsafe fn new() -> Retained<Self>;
144
145        #[unsafe(method(initWithSymbol:))]
146        #[unsafe(method_family = init)]
147        pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
148    );
149}