use core::ffi::*;
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-foundation")]
use objc2_foundation::*;
use crate::*;
#[cfg(feature = "objc2")]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ARPlaneAnchorAlignment(pub NSInteger);
#[cfg(feature = "objc2")]
impl ARPlaneAnchorAlignment {
#[doc(alias = "ARPlaneAnchorAlignmentHorizontal")]
pub const Horizontal: Self = Self(0);
#[doc(alias = "ARPlaneAnchorAlignmentVertical")]
pub const Vertical: Self = Self(1);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for ARPlaneAnchorAlignment {
const ENCODING: Encoding = NSInteger::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for ARPlaneAnchorAlignment {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[cfg(feature = "objc2")]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ARPlaneClassificationStatus(pub NSInteger);
#[cfg(feature = "objc2")]
impl ARPlaneClassificationStatus {
#[doc(alias = "ARPlaneClassificationStatusNotAvailable")]
pub const NotAvailable: Self = Self(0);
#[doc(alias = "ARPlaneClassificationStatusUndetermined")]
pub const Undetermined: Self = Self(1);
#[doc(alias = "ARPlaneClassificationStatusUnknown")]
pub const Unknown: Self = Self(2);
#[doc(alias = "ARPlaneClassificationStatusKnown")]
pub const Known: Self = Self(3);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for ARPlaneClassificationStatus {
const ENCODING: Encoding = NSInteger::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for ARPlaneClassificationStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[cfg(feature = "objc2")]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ARPlaneClassification(pub NSInteger);
#[cfg(feature = "objc2")]
impl ARPlaneClassification {
#[doc(alias = "ARPlaneClassificationNone")]
pub const None: Self = Self(0);
#[doc(alias = "ARPlaneClassificationWall")]
pub const Wall: Self = Self(1);
#[doc(alias = "ARPlaneClassificationFloor")]
pub const Floor: Self = Self(2);
#[doc(alias = "ARPlaneClassificationCeiling")]
pub const Ceiling: Self = Self(3);
#[doc(alias = "ARPlaneClassificationTable")]
pub const Table: Self = Self(4);
#[doc(alias = "ARPlaneClassificationSeat")]
pub const Seat: Self = Self(5);
#[doc(alias = "ARPlaneClassificationWindow")]
pub const Window: Self = Self(6);
#[doc(alias = "ARPlaneClassificationDoor")]
pub const Door: Self = Self(7);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for ARPlaneClassification {
const ENCODING: Encoding = NSInteger::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for ARPlaneClassification {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[cfg(feature = "objc2")]
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2")]
pub struct ARPlaneExtent;
);
#[cfg(feature = "objc2")]
unsafe impl Send for ARPlaneExtent {}
#[cfg(feature = "objc2")]
unsafe impl Sync for ARPlaneExtent {}
#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
extern_conformance!(
unsafe impl NSCoding for ARPlaneExtent {}
);
#[cfg(feature = "objc2")]
extern_conformance!(
unsafe impl NSObjectProtocol for ARPlaneExtent {}
);
#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
extern_conformance!(
unsafe impl NSSecureCoding for ARPlaneExtent {}
);
#[cfg(feature = "objc2")]
impl ARPlaneExtent {
extern_methods!(
#[unsafe(method(rotationOnYAxis))]
#[unsafe(method_family = none)]
pub unsafe fn rotationOnYAxis(&self) -> c_float;
#[unsafe(method(width))]
#[unsafe(method_family = none)]
pub unsafe fn width(&self) -> c_float;
#[unsafe(method(height))]
#[unsafe(method_family = none)]
pub unsafe fn height(&self) -> c_float;
);
}
#[cfg(feature = "objc2")]
impl ARPlaneExtent {
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>;
);
}
#[cfg(feature = "objc2")]
extern_class!(
#[unsafe(super(ARAnchor, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
pub struct ARPlaneAnchor;
);
#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
unsafe impl Send for ARPlaneAnchor {}
#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
unsafe impl Sync for ARPlaneAnchor {}
#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
extern_conformance!(
unsafe impl ARAnchorCopying for ARPlaneAnchor {}
);
#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
extern_conformance!(
unsafe impl NSCoding for ARPlaneAnchor {}
);
#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
extern_conformance!(
unsafe impl NSCopying for ARPlaneAnchor {}
);
#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
unsafe impl CopyingHelper for ARPlaneAnchor {
type Result = Self;
}
#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
extern_conformance!(
unsafe impl NSObjectProtocol for ARPlaneAnchor {}
);
#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
extern_conformance!(
unsafe impl NSSecureCoding for ARPlaneAnchor {}
);
#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
impl ARPlaneAnchor {
extern_methods!(
#[unsafe(method(isClassificationSupported))]
#[unsafe(method_family = none)]
pub unsafe fn isClassificationSupported() -> bool;
#[unsafe(method(alignment))]
#[unsafe(method_family = none)]
pub unsafe fn alignment(&self) -> ARPlaneAnchorAlignment;
#[unsafe(method(planeExtent))]
#[unsafe(method_family = none)]
pub unsafe fn planeExtent(&self) -> Retained<ARPlaneExtent>;
#[cfg(feature = "ARPlaneGeometry")]
#[unsafe(method(geometry))]
#[unsafe(method_family = none)]
pub unsafe fn geometry(&self) -> Retained<ARPlaneGeometry>;
#[unsafe(method(classificationStatus))]
#[unsafe(method_family = none)]
pub unsafe fn classificationStatus(&self) -> ARPlaneClassificationStatus;
#[unsafe(method(classification))]
#[unsafe(method_family = none)]
pub unsafe fn classification(&self) -> ARPlaneClassification;
);
}
#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
impl ARPlaneAnchor {
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>;
);
}