use core::ffi::*;
use core::ptr::NonNull;
#[cfg(feature = "dispatch2")]
use dispatch2::*;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[cfg(all(feature = "MKMapSnapshot", feature = "block2"))]
pub type MKMapSnapshotCompletionHandler =
*mut block2::DynBlock<dyn Fn(*mut MKMapSnapshot, *mut NSError)>;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MKMapSnapshotter;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MKMapSnapshotter {}
);
impl MKMapSnapshotter {
extern_methods!(
#[cfg(feature = "MKMapSnapshotOptions")]
#[unsafe(method(initWithOptions:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithOptions(
this: Allocated<Self>,
options: &MKMapSnapshotOptions,
) -> Retained<Self>;
#[cfg(all(feature = "MKMapSnapshot", feature = "block2"))]
#[unsafe(method(startWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn startWithCompletionHandler(
&self,
completion_handler: MKMapSnapshotCompletionHandler,
);
#[cfg(all(feature = "MKMapSnapshot", feature = "block2", feature = "dispatch2"))]
#[unsafe(method(startWithQueue:completionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn startWithQueue_completionHandler(
&self,
queue: &DispatchQueue,
completion_handler: MKMapSnapshotCompletionHandler,
);
#[unsafe(method(cancel))]
#[unsafe(method_family = none)]
pub unsafe fn cancel(&self);
#[unsafe(method(isLoading))]
#[unsafe(method_family = none)]
pub unsafe fn isLoading(&self) -> bool;
);
}
impl MKMapSnapshotter {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}