objc2_map_kit/generated/
MKMapSnapshotter.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[cfg(all(feature = "MKMapSnapshot", feature = "block2"))]
12pub type MKMapSnapshotCompletionHandler =
13 *mut block2::Block<dyn Fn(*mut MKMapSnapshot, *mut NSError)>;
14
15extern_class!(
16 #[unsafe(super(NSObject))]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 pub struct MKMapSnapshotter;
20);
21
22unsafe impl NSObjectProtocol for MKMapSnapshotter {}
23
24impl MKMapSnapshotter {
25 extern_methods!(
26 #[cfg(feature = "MKMapSnapshotOptions")]
27 #[unsafe(method(initWithOptions:))]
28 #[unsafe(method_family = init)]
29 pub unsafe fn initWithOptions(
30 this: Allocated<Self>,
31 options: &MKMapSnapshotOptions,
32 ) -> Retained<Self>;
33
34 #[cfg(all(feature = "MKMapSnapshot", feature = "block2"))]
35 #[unsafe(method(startWithCompletionHandler:))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn startWithCompletionHandler(
38 &self,
39 completion_handler: MKMapSnapshotCompletionHandler,
40 );
41
42 #[unsafe(method(cancel))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn cancel(&self);
45
46 #[unsafe(method(isLoading))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn isLoading(&self) -> bool;
49 );
50}
51
52impl MKMapSnapshotter {
54 extern_methods!(
55 #[unsafe(method(init))]
56 #[unsafe(method_family = init)]
57 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
58
59 #[unsafe(method(new))]
60 #[unsafe(method_family = new)]
61 pub unsafe fn new() -> Retained<Self>;
62 );
63}