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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

pub type CLHeadingComponentValue = c_double;

extern "C" {
    #[cfg(feature = "CLLocation")]
    pub static kCLHeadingFilterNone: CLLocationDegrees;
}

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct CLHeading;

    unsafe impl ClassType for CLHeading {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSCoding for CLHeading {}

unsafe impl NSCopying for CLHeading {}

unsafe impl NSObjectProtocol for CLHeading {}

unsafe impl NSSecureCoding for CLHeading {}

extern_methods!(
    unsafe impl CLHeading {
        #[cfg(feature = "CLLocation")]
        #[method(magneticHeading)]
        pub unsafe fn magneticHeading(&self) -> CLLocationDirection;

        #[cfg(feature = "CLLocation")]
        #[method(trueHeading)]
        pub unsafe fn trueHeading(&self) -> CLLocationDirection;

        #[cfg(feature = "CLLocation")]
        #[method(headingAccuracy)]
        pub unsafe fn headingAccuracy(&self) -> CLLocationDirection;

        #[method(x)]
        pub unsafe fn x(&self) -> CLHeadingComponentValue;

        #[method(y)]
        pub unsafe fn y(&self) -> CLHeadingComponentValue;

        #[method(z)]
        pub unsafe fn z(&self) -> CLHeadingComponentValue;

        #[method_id(@__retain_semantics Other timestamp)]
        pub unsafe fn timestamp(&self) -> Retained<NSDate>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl CLHeading {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;
    }
);