use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[cfg(all(feature = "MKLocalSearchResponse", feature = "block2"))]
pub type MKLocalSearchCompletionHandler =
*mut block2::DynBlock<dyn Fn(*mut MKLocalSearchResponse, *mut NSError)>;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MKLocalSearch;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MKLocalSearch {}
);
impl MKLocalSearch {
extern_methods!(
#[cfg(feature = "MKLocalSearchRequest")]
#[unsafe(method(initWithRequest:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithRequest(
this: Allocated<Self>,
request: &MKLocalSearchRequest,
) -> Retained<Self>;
#[cfg(feature = "MKLocalPointsOfInterestRequest")]
#[unsafe(method(initWithPointsOfInterestRequest:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithPointsOfInterestRequest(
this: Allocated<Self>,
request: &MKLocalPointsOfInterestRequest,
) -> Retained<Self>;
#[cfg(all(feature = "MKLocalSearchResponse", feature = "block2"))]
#[unsafe(method(startWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn startWithCompletionHandler(
&self,
completion_handler: MKLocalSearchCompletionHandler,
);
#[unsafe(method(cancel))]
#[unsafe(method_family = none)]
pub unsafe fn cancel(&self);
#[unsafe(method(isSearching))]
#[unsafe(method_family = none)]
pub unsafe fn isSearching(&self) -> bool;
);
}
impl MKLocalSearch {
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>;
);
}