use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(HMEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "HMEvent")]
pub struct HMLocationEvent;
);
#[cfg(feature = "HMEvent")]
unsafe impl Send for HMLocationEvent {}
#[cfg(feature = "HMEvent")]
unsafe impl Sync for HMLocationEvent {}
#[cfg(feature = "HMEvent")]
extern_conformance!(
unsafe impl NSCopying for HMLocationEvent {}
);
#[cfg(feature = "HMEvent")]
unsafe impl CopyingHelper for HMLocationEvent {
type Result = Self;
}
#[cfg(feature = "HMEvent")]
extern_conformance!(
unsafe impl NSMutableCopying for HMLocationEvent {}
);
#[cfg(feature = "HMEvent")]
unsafe impl MutableCopyingHelper for HMLocationEvent {
type Result = HMMutableLocationEvent;
}
#[cfg(feature = "HMEvent")]
extern_conformance!(
unsafe impl NSObjectProtocol for HMLocationEvent {}
);
#[cfg(feature = "HMEvent")]
impl HMLocationEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(initWithRegion:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithRegion(this: Allocated<Self>, region: &CLRegion) -> Retained<Self>;
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(region))]
#[unsafe(method_family = none)]
pub unsafe fn region(&self) -> Option<Retained<CLRegion>>;
#[cfg(all(feature = "block2", feature = "objc2-core-location"))]
#[deprecated = "No longer supported."]
#[unsafe(method(updateRegion:completionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn updateRegion_completionHandler(
&self,
region: &CLRegion,
completion: &block2::DynBlock<dyn Fn(*mut NSError)>,
);
);
}
#[cfg(feature = "HMEvent")]
impl HMLocationEvent {
extern_methods!(
#[deprecated = "HMEvent is abstract"]
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(HMLocationEvent, HMEvent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "HMEvent")]
pub struct HMMutableLocationEvent;
);
#[cfg(feature = "HMEvent")]
unsafe impl Send for HMMutableLocationEvent {}
#[cfg(feature = "HMEvent")]
unsafe impl Sync for HMMutableLocationEvent {}
#[cfg(feature = "HMEvent")]
extern_conformance!(
unsafe impl NSCopying for HMMutableLocationEvent {}
);
#[cfg(feature = "HMEvent")]
unsafe impl CopyingHelper for HMMutableLocationEvent {
type Result = HMLocationEvent;
}
#[cfg(feature = "HMEvent")]
extern_conformance!(
unsafe impl NSMutableCopying for HMMutableLocationEvent {}
);
#[cfg(feature = "HMEvent")]
unsafe impl MutableCopyingHelper for HMMutableLocationEvent {
type Result = Self;
}
#[cfg(feature = "HMEvent")]
extern_conformance!(
unsafe impl NSObjectProtocol for HMMutableLocationEvent {}
);
#[cfg(feature = "HMEvent")]
impl HMMutableLocationEvent {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(region))]
#[unsafe(method_family = none)]
pub unsafe fn region(&self) -> Option<Retained<CLRegion>>;
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(setRegion:))]
#[unsafe(method_family = none)]
pub unsafe fn setRegion(&self, region: Option<&CLRegion>);
);
}
#[cfg(feature = "HMEvent")]
impl HMMutableLocationEvent {
extern_methods!(
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(initWithRegion:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithRegion(this: Allocated<Self>, region: &CLRegion) -> Retained<Self>;
);
}
#[cfg(feature = "HMEvent")]
impl HMMutableLocationEvent {
extern_methods!(
#[deprecated = "HMEvent is abstract"]
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}