objc2_event_kit/generated/
EKStructuredLocation.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-location")]
7use objc2_core_location::*;
8use objc2_foundation::*;
9#[cfg(feature = "objc2-map-kit")]
10use objc2_map_kit::*;
11
12use crate::*;
13
14extern_class!(
15 #[unsafe(super(EKObject, NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 #[cfg(feature = "EKObject")]
19 pub struct EKStructuredLocation;
20);
21
22#[cfg(feature = "EKObject")]
23extern_conformance!(
24 unsafe impl NSCopying for EKStructuredLocation {}
25);
26
27#[cfg(feature = "EKObject")]
28unsafe impl CopyingHelper for EKStructuredLocation {
29 type Result = Self;
30}
31
32#[cfg(feature = "EKObject")]
33extern_conformance!(
34 unsafe impl NSObjectProtocol for EKStructuredLocation {}
35);
36
37#[cfg(feature = "EKObject")]
38impl EKStructuredLocation {
39 extern_methods!(
40 #[unsafe(method(locationWithTitle:))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn locationWithTitle(title: &NSString) -> Retained<Self>;
43
44 #[cfg(feature = "objc2-map-kit")]
45 #[unsafe(method(locationWithMapItem:))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn locationWithMapItem(map_item: &MKMapItem) -> Retained<Self>;
48
49 #[unsafe(method(title))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn title(&self) -> Option<Retained<NSString>>;
52
53 #[unsafe(method(setTitle:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn setTitle(&self, title: Option<&NSString>);
57
58 #[cfg(feature = "objc2-core-location")]
59 #[unsafe(method(geoLocation))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn geoLocation(&self) -> Option<Retained<CLLocation>>;
62
63 #[cfg(feature = "objc2-core-location")]
64 #[unsafe(method(setGeoLocation:))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn setGeoLocation(&self, geo_location: Option<&CLLocation>);
68
69 #[unsafe(method(radius))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn radius(&self) -> c_double;
72
73 #[unsafe(method(setRadius:))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn setRadius(&self, radius: c_double);
77 );
78}
79
80#[cfg(feature = "EKObject")]
82impl EKStructuredLocation {
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}