objc2_map_kit/generated/
MKUserLocation.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::*;
6#[cfg(feature = "objc2-core-location")]
7use objc2_core_location::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkuserlocation?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct MKUserLocation;
17);
18
19#[cfg(feature = "MKAnnotation")]
20unsafe impl MKAnnotation for MKUserLocation {}
21
22unsafe impl NSObjectProtocol for MKUserLocation {}
23
24impl MKUserLocation {
25    extern_methods!(
26        #[unsafe(method(isUpdating))]
27        #[unsafe(method_family = none)]
28        pub unsafe fn isUpdating(&self) -> bool;
29
30        #[cfg(feature = "objc2-core-location")]
31        #[unsafe(method(location))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn location(&self) -> Option<Retained<CLLocation>>;
34
35        #[cfg(feature = "objc2-core-location")]
36        #[unsafe(method(heading))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn heading(&self) -> Option<Retained<CLHeading>>;
39
40        #[unsafe(method(title))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn title(&self) -> Option<Retained<NSString>>;
43
44        /// Setter for [`title`][Self::title].
45        #[unsafe(method(setTitle:))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn setTitle(&self, title: Option<&NSString>);
48
49        #[unsafe(method(subtitle))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn subtitle(&self) -> Option<Retained<NSString>>;
52
53        /// Setter for [`subtitle`][Self::subtitle].
54        #[unsafe(method(setSubtitle:))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>);
57    );
58}
59
60/// Methods declared on superclass `NSObject`.
61impl MKUserLocation {
62    extern_methods!(
63        #[unsafe(method(init))]
64        #[unsafe(method_family = init)]
65        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66
67        #[unsafe(method(new))]
68        #[unsafe(method_family = new)]
69        pub unsafe fn new() -> Retained<Self>;
70    );
71}