objc2_map_kit/generated/
MKDirections.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[cfg(all(feature = "MKDirectionsResponse", feature = "block2"))]
12pub type MKDirectionsHandler = *mut block2::Block<dyn Fn(*mut MKDirectionsResponse, *mut NSError)>;
13
14#[cfg(all(feature = "MKDirectionsResponse", feature = "block2"))]
16pub type MKETAHandler = *mut block2::Block<dyn Fn(*mut MKETAResponse, *mut NSError)>;
17
18extern_class!(
19 #[unsafe(super(NSObject))]
21 #[derive(Debug, PartialEq, Eq, Hash)]
22 pub struct MKDirections;
23);
24
25unsafe impl NSObjectProtocol for MKDirections {}
26
27impl MKDirections {
28 extern_methods!(
29 #[cfg(feature = "MKDirectionsRequest")]
30 #[unsafe(method(initWithRequest:))]
31 #[unsafe(method_family = init)]
32 pub unsafe fn initWithRequest(
33 this: Allocated<Self>,
34 request: &MKDirectionsRequest,
35 ) -> Retained<Self>;
36
37 #[cfg(all(feature = "MKDirectionsResponse", feature = "block2"))]
38 #[unsafe(method(calculateDirectionsWithCompletionHandler:))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn calculateDirectionsWithCompletionHandler(
41 &self,
42 completion_handler: MKDirectionsHandler,
43 );
44
45 #[cfg(all(feature = "MKDirectionsResponse", feature = "block2"))]
46 #[unsafe(method(calculateETAWithCompletionHandler:))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn calculateETAWithCompletionHandler(&self, completion_handler: MKETAHandler);
49
50 #[unsafe(method(cancel))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn cancel(&self);
53
54 #[unsafe(method(isCalculating))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn isCalculating(&self) -> bool;
57 );
58}
59
60impl MKDirections {
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}