use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIRegion;
);
extern_conformance!(
unsafe impl NSCoding for UIRegion {}
);
extern_conformance!(
unsafe impl NSCopying for UIRegion {}
);
unsafe impl CopyingHelper for UIRegion {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UIRegion {}
);
impl UIRegion {
extern_methods!(
#[unsafe(method(infiniteRegion))]
#[unsafe(method_family = none)]
pub fn infiniteRegion(mtm: MainThreadMarker) -> Retained<UIRegion>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(initWithRadius:))]
#[unsafe(method_family = init)]
pub fn initWithRadius(this: Allocated<Self>, radius: CGFloat) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(initWithSize:))]
#[unsafe(method_family = init)]
pub fn initWithSize(this: Allocated<Self>, size: CGSize) -> Retained<Self>;
#[unsafe(method(inverseRegion))]
#[unsafe(method_family = none)]
pub fn inverseRegion(&self) -> Retained<Self>;
#[unsafe(method(regionByUnionWithRegion:))]
#[unsafe(method_family = none)]
pub fn regionByUnionWithRegion(&self, region: &UIRegion) -> Retained<Self>;
#[unsafe(method(regionByDifferenceFromRegion:))]
#[unsafe(method_family = none)]
pub fn regionByDifferenceFromRegion(&self, region: &UIRegion) -> Retained<Self>;
#[unsafe(method(regionByIntersectionWithRegion:))]
#[unsafe(method_family = none)]
pub fn regionByIntersectionWithRegion(&self, region: &UIRegion) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(containsPoint:))]
#[unsafe(method_family = none)]
pub fn containsPoint(&self, point: CGPoint) -> bool;
);
}
impl UIRegion {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}