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
18unsafe impl NSCoding for MXUnitSignalBars {}
19
20unsafe impl NSCopying for MXUnitSignalBars {}
21
22unsafe impl CopyingHelper for MXUnitSignalBars {
23    type Result = Self;
24}
25
26unsafe impl NSObjectProtocol for MXUnitSignalBars {}
27
28unsafe impl NSSecureCoding for MXUnitSignalBars {}
29
30impl MXUnitSignalBars {
31    extern_methods!(
32        #[unsafe(method(bars))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn bars() -> Retained<MXUnitSignalBars>;
35    );
36}
37
38/// Methods declared on superclass `NSDimension`.
39impl MXUnitSignalBars {
40    extern_methods!(
41        #[unsafe(method(initWithSymbol:converter:))]
42        #[unsafe(method_family = init)]
43        pub unsafe fn initWithSymbol_converter(
44            this: Allocated<Self>,
45            symbol: &NSString,
46            converter: &NSUnitConverter,
47        ) -> Retained<Self>;
48
49        #[unsafe(method(baseUnit))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn baseUnit() -> Retained<Self>;
52    );
53}
54
55/// Methods declared on superclass `NSUnit`.
56impl MXUnitSignalBars {
57    extern_methods!(
58        #[unsafe(method(init))]
59        #[unsafe(method_family = init)]
60        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
61
62        #[unsafe(method(new))]
63        #[unsafe(method_family = new)]
64        pub unsafe fn new() -> Retained<Self>;
65
66        #[unsafe(method(initWithSymbol:))]
67        #[unsafe(method_family = init)]
68        pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
69    );
70}
71
72extern_class!(
73    /// An NSUnit subclass representing the linear space Display APL.
74    ///
75    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxunitaveragepixelluminance?language=objc)
76    #[unsafe(super(NSDimension, NSUnit, NSObject))]
77    #[derive(Debug, PartialEq, Eq, Hash)]
78    pub struct MXUnitAveragePixelLuminance;
79);
80
81unsafe impl NSCoding for MXUnitAveragePixelLuminance {}
82
83unsafe impl NSCopying for MXUnitAveragePixelLuminance {}
84
85unsafe impl CopyingHelper for MXUnitAveragePixelLuminance {
86    type Result = Self;
87}
88
89unsafe impl NSObjectProtocol for MXUnitAveragePixelLuminance {}
90
91unsafe impl NSSecureCoding for MXUnitAveragePixelLuminance {}
92
93impl MXUnitAveragePixelLuminance {
94    extern_methods!(
95        #[unsafe(method(apl))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn apl() -> Retained<MXUnitAveragePixelLuminance>;
98    );
99}
100
101/// Methods declared on superclass `NSDimension`.
102impl MXUnitAveragePixelLuminance {
103    extern_methods!(
104        #[unsafe(method(initWithSymbol:converter:))]
105        #[unsafe(method_family = init)]
106        pub unsafe fn initWithSymbol_converter(
107            this: Allocated<Self>,
108            symbol: &NSString,
109            converter: &NSUnitConverter,
110        ) -> Retained<Self>;
111
112        #[unsafe(method(baseUnit))]
113        #[unsafe(method_family = none)]
114        pub unsafe fn baseUnit() -> Retained<Self>;
115    );
116}
117
118/// Methods declared on superclass `NSUnit`.
119impl MXUnitAveragePixelLuminance {
120    extern_methods!(
121        #[unsafe(method(init))]
122        #[unsafe(method_family = init)]
123        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
124
125        #[unsafe(method(new))]
126        #[unsafe(method_family = new)]
127        pub unsafe fn new() -> Retained<Self>;
128
129        #[unsafe(method(initWithSymbol:))]
130        #[unsafe(method_family = init)]
131        pub unsafe fn initWithSymbol(this: Allocated<Self>, symbol: &NSString) -> Retained<Self>;
132    );
133}