objc2_map_kit/generated/
MKMapSnapshot.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-app-kit")]
6#[cfg(target_os = "macos")]
7use objc2_app_kit::*;
8#[cfg(feature = "objc2-core-location")]
9use objc2_core_location::*;
10use objc2_foundation::*;
11
12use crate::*;
13
14extern_class!(
15    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkmapsnapshot?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct MKMapSnapshot;
19);
20
21unsafe impl NSObjectProtocol for MKMapSnapshot {}
22
23impl MKMapSnapshot {
24    extern_methods!(
25        #[cfg(feature = "objc2-app-kit")]
26        #[cfg(target_os = "macos")]
27        #[unsafe(method(image))]
28        #[unsafe(method_family = none)]
29        pub unsafe fn image(&self) -> Retained<NSImage>;
30
31        #[cfg(feature = "objc2-app-kit")]
32        #[cfg(target_os = "macos")]
33        #[unsafe(method(appearance))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn appearance(&self) -> Retained<NSAppearance>;
36
37        #[cfg(feature = "objc2-core-location")]
38        #[unsafe(method(pointForCoordinate:))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn pointForCoordinate(&self, coordinate: CLLocationCoordinate2D) -> NSPoint;
41    );
42}
43
44/// Methods declared on superclass `NSObject`.
45impl MKMapSnapshot {
46    extern_methods!(
47        #[unsafe(method(init))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
50
51        #[unsafe(method(new))]
52        #[unsafe(method_family = new)]
53        pub unsafe fn new() -> Retained<Self>;
54    );
55}