1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// An object subclass representing lens specification for glasses
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkglasseslensspecification?language=objc)
#[unsafe(super(HKLensSpecification, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "HKLensSpecification")]
pub struct HKGlassesLensSpecification;
);
#[cfg(feature = "HKLensSpecification")]
unsafe impl Send for HKGlassesLensSpecification {}
#[cfg(feature = "HKLensSpecification")]
unsafe impl Sync for HKGlassesLensSpecification {}
#[cfg(feature = "HKLensSpecification")]
extern_conformance!(
unsafe impl NSCoding for HKGlassesLensSpecification {}
);
#[cfg(feature = "HKLensSpecification")]
extern_conformance!(
unsafe impl NSCopying for HKGlassesLensSpecification {}
);
#[cfg(feature = "HKLensSpecification")]
unsafe impl CopyingHelper for HKGlassesLensSpecification {
type Result = Self;
}
#[cfg(feature = "HKLensSpecification")]
extern_conformance!(
unsafe impl NSObjectProtocol for HKGlassesLensSpecification {}
);
#[cfg(feature = "HKLensSpecification")]
extern_conformance!(
unsafe impl NSSecureCoding for HKGlassesLensSpecification {}
);
#[cfg(feature = "HKLensSpecification")]
impl HKGlassesLensSpecification {
extern_methods!(
#[cfg(feature = "HKQuantity")]
/// The distance between the back of the eyeglass lens and the eye (measured in mm)
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(vertexDistance))]
#[unsafe(method_family = none)]
pub unsafe fn vertexDistance(&self) -> Option<Retained<HKQuantity>>;
#[cfg(feature = "HKVisionPrism")]
/// The object encapsulating the prism fields
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(prism))]
#[unsafe(method_family = none)]
pub unsafe fn prism(&self) -> Option<Retained<HKVisionPrism>>;
#[cfg(feature = "HKQuantity")]
/// The distance from each pupil to the center of the nose (measured in mm) when looking at a far target.
/// Can be described as combined or individual value. For distance prescriptions, the pupillary distance will be a far value.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(farPupillaryDistance))]
#[unsafe(method_family = none)]
pub unsafe fn farPupillaryDistance(&self) -> Option<Retained<HKQuantity>>;
#[cfg(feature = "HKQuantity")]
/// The distance from each pupil to the center of the nose (measured in mm) when looking at a near target.
/// Can be described as combined or individual value. For near prescriptions, the pupillary distance will be a near value.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(nearPupillaryDistance))]
#[unsafe(method_family = none)]
pub unsafe fn nearPupillaryDistance(&self) -> Option<Retained<HKQuantity>>;
#[cfg(all(feature = "HKQuantity", feature = "HKVisionPrism"))]
/// Parameter `sphere`: The lens power to correct nearsightedness or farsightedness
///
/// Parameter `cylinder`: The lens power required to correct astigmatism
///
/// Parameter `axis`: The angle along which cylindrical power should be positioned to correct astigmatism
///
/// Parameter `addPower`: The power adjustment applied to a multifocal lens to correct presbyopia
///
/// Parameter `vertexDistance`: The distance between the back of the eyeglass lens and the eye
///
/// Parameter `prism`: The object encapsulating the prism fields
///
/// Parameter `farPupillaryDistance`: The distance from each pupil to the center of the nose (measured in mm) when looking at a far target.
/// Can be described as combined or individual value. For distance prescriptions, the pupillary distance will be a far value.
///
/// Parameter `nearPupillaryDistance`: The distance from each pupil to the center of the nose (measured in mm) when looking at a near target.
/// Can be described as combined or individual value. For near prescriptions, the pupillary distance will be a near value.
#[unsafe(method(initWithSphere:cylinder:axis:addPower:vertexDistance:prism:farPupillaryDistance:nearPupillaryDistance:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSphere_cylinder_axis_addPower_vertexDistance_prism_farPupillaryDistance_nearPupillaryDistance(
this: Allocated<Self>,
sphere: &HKQuantity,
cylinder: Option<&HKQuantity>,
axis: Option<&HKQuantity>,
add_power: Option<&HKQuantity>,
vertex_distance: Option<&HKQuantity>,
prism: Option<&HKVisionPrism>,
far_pupillary_distance: Option<&HKQuantity>,
near_pupillary_distance: Option<&HKQuantity>,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}