objc2_core_location/generated/
CLHeading.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
10/// [Apple's documentation](https://developer.apple.com/documentation/corelocation/clheadingcomponentvalue?language=objc)
11pub type CLHeadingComponentValue = c_double;
12
13extern "C" {
14    /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/kclheadingfilternone?language=objc)
15    #[cfg(feature = "CLLocation")]
16    pub static kCLHeadingFilterNone: CLLocationDegrees;
17}
18
19extern_class!(
20    /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/clheading?language=objc)
21    #[unsafe(super(NSObject))]
22    #[derive(Debug, PartialEq, Eq, Hash)]
23    pub struct CLHeading;
24);
25
26extern_conformance!(
27    unsafe impl NSCoding for CLHeading {}
28);
29
30extern_conformance!(
31    unsafe impl NSCopying for CLHeading {}
32);
33
34unsafe impl CopyingHelper for CLHeading {
35    type Result = Self;
36}
37
38extern_conformance!(
39    unsafe impl NSObjectProtocol for CLHeading {}
40);
41
42extern_conformance!(
43    unsafe impl NSSecureCoding for CLHeading {}
44);
45
46impl CLHeading {
47    extern_methods!(
48        #[cfg(feature = "CLLocation")]
49        #[unsafe(method(magneticHeading))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn magneticHeading(&self) -> CLLocationDirection;
52
53        #[cfg(feature = "CLLocation")]
54        #[unsafe(method(trueHeading))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn trueHeading(&self) -> CLLocationDirection;
57
58        #[cfg(feature = "CLLocation")]
59        #[unsafe(method(headingAccuracy))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn headingAccuracy(&self) -> CLLocationDirection;
62
63        #[unsafe(method(x))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn x(&self) -> CLHeadingComponentValue;
66
67        #[unsafe(method(y))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn y(&self) -> CLHeadingComponentValue;
70
71        #[unsafe(method(z))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn z(&self) -> CLHeadingComponentValue;
74
75        #[unsafe(method(timestamp))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn timestamp(&self) -> Retained<NSDate>;
78    );
79}
80
81/// Methods declared on superclass `NSObject`.
82impl CLHeading {
83    extern_methods!(
84        #[unsafe(method(init))]
85        #[unsafe(method_family = init)]
86        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
87
88        #[unsafe(method(new))]
89        #[unsafe(method_family = new)]
90        pub unsafe fn new() -> Retained<Self>;
91    );
92}