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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-map-kit")]
use objc2_map_kit::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "EKObject")]
    pub struct EKStructuredLocation;

    #[cfg(feature = "EKObject")]
    unsafe impl ClassType for EKStructuredLocation {
        #[inherits(NSObject)]
        type Super = EKObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "EKObject")]
unsafe impl NSCopying for EKStructuredLocation {}

#[cfg(feature = "EKObject")]
unsafe impl NSObjectProtocol for EKStructuredLocation {}

extern_methods!(
    #[cfg(feature = "EKObject")]
    unsafe impl EKStructuredLocation {
        #[method_id(@__retain_semantics Other locationWithTitle:)]
        pub unsafe fn locationWithTitle(title: &NSString) -> Retained<Self>;

        #[cfg(feature = "objc2-map-kit")]
        #[method_id(@__retain_semantics Other locationWithMapItem:)]
        pub unsafe fn locationWithMapItem(map_item: &MKMapItem) -> Retained<Self>;

        #[method_id(@__retain_semantics Other title)]
        pub unsafe fn title(&self) -> Option<Retained<NSString>>;

        #[method(setTitle:)]
        pub unsafe fn setTitle(&self, title: Option<&NSString>);

        #[cfg(feature = "objc2-core-location")]
        #[method_id(@__retain_semantics Other geoLocation)]
        pub unsafe fn geoLocation(&self) -> Option<Retained<CLLocation>>;

        #[cfg(feature = "objc2-core-location")]
        #[method(setGeoLocation:)]
        pub unsafe fn setGeoLocation(&self, geo_location: Option<&CLLocation>);

        #[method(radius)]
        pub unsafe fn radius(&self) -> c_double;

        #[method(setRadius:)]
        pub unsafe fn setRadius(&self, radius: c_double);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "EKObject")]
    unsafe impl EKStructuredLocation {
        #[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>;
    }
);