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")]
20extern_conformance!(
21    unsafe impl MKAnnotation for MKUserLocation {}
22);
23
24extern_conformance!(
25    unsafe impl NSObjectProtocol for MKUserLocation {}
26);
27
28impl MKUserLocation {
29    extern_methods!(
30        #[unsafe(method(isUpdating))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn isUpdating(&self) -> bool;
33
34        #[cfg(feature = "objc2-core-location")]
35        #[unsafe(method(location))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn location(&self) -> Option<Retained<CLLocation>>;
38
39        #[cfg(feature = "objc2-core-location")]
40        #[unsafe(method(heading))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn heading(&self) -> Option<Retained<CLHeading>>;
43
44        #[unsafe(method(title))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn title(&self) -> Option<Retained<NSString>>;
47
48        /// Setter for [`title`][Self::title].
49        ///
50        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
51        #[unsafe(method(setTitle:))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn setTitle(&self, title: Option<&NSString>);
54
55        #[unsafe(method(subtitle))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn subtitle(&self) -> Option<Retained<NSString>>;
58
59        /// Setter for [`subtitle`][Self::subtitle].
60        ///
61        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
62        #[unsafe(method(setSubtitle:))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>);
65    );
66}
67
68/// Methods declared on superclass `NSObject`.
69impl MKUserLocation {
70    extern_methods!(
71        #[unsafe(method(init))]
72        #[unsafe(method_family = init)]
73        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
74
75        #[unsafe(method(new))]
76        #[unsafe(method_family = new)]
77        pub unsafe fn new() -> Retained<Self>;
78    );
79}