objc2_ar_kit/generated/
ARRaycastQuery.rs1use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9#[cfg(feature = "objc2")]
14#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct ARRaycastTarget(pub NSInteger);
17#[cfg(feature = "objc2")]
18impl ARRaycastTarget {
19 #[doc(alias = "ARRaycastTargetExistingPlaneGeometry")]
21 pub const ExistingPlaneGeometry: Self = Self(0);
22 #[doc(alias = "ARRaycastTargetExistingPlaneInfinite")]
24 pub const ExistingPlaneInfinite: Self = Self(1);
25 #[doc(alias = "ARRaycastTargetEstimatedPlane")]
29 pub const EstimatedPlane: Self = Self(2);
30}
31
32#[cfg(feature = "objc2")]
33unsafe impl Encode for ARRaycastTarget {
34 const ENCODING: Encoding = NSInteger::ENCODING;
35}
36
37#[cfg(feature = "objc2")]
38unsafe impl RefEncode for ARRaycastTarget {
39 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
40}
41
42#[cfg(feature = "objc2")]
47#[repr(transparent)]
48#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
49pub struct ARRaycastTargetAlignment(pub NSInteger);
50#[cfg(feature = "objc2")]
51impl ARRaycastTargetAlignment {
52 #[doc(alias = "ARRaycastTargetAlignmentHorizontal")]
54 pub const Horizontal: Self = Self(0);
55 #[doc(alias = "ARRaycastTargetAlignmentVertical")]
57 pub const Vertical: Self = Self(1);
58 #[doc(alias = "ARRaycastTargetAlignmentAny")]
60 pub const Any: Self = Self(2);
61}
62
63#[cfg(feature = "objc2")]
64unsafe impl Encode for ARRaycastTargetAlignment {
65 const ENCODING: Encoding = NSInteger::ENCODING;
66}
67
68#[cfg(feature = "objc2")]
69unsafe impl RefEncode for ARRaycastTargetAlignment {
70 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
71}
72
73#[cfg(feature = "objc2")]
74extern_class!(
75 #[unsafe(super(NSObject))]
81 #[derive(Debug, PartialEq, Eq, Hash)]
82 #[cfg(feature = "objc2")]
83 pub struct ARRaycastQuery;
84);
85
86#[cfg(feature = "objc2")]
87extern_conformance!(
88 unsafe impl NSObjectProtocol for ARRaycastQuery {}
89);
90
91#[cfg(feature = "objc2")]
92impl ARRaycastQuery {
93 extern_methods!(
94 #[unsafe(method(target))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn target(&self) -> ARRaycastTarget;
98
99 #[unsafe(method(targetAlignment))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn targetAlignment(&self) -> ARRaycastTargetAlignment;
103
104 #[unsafe(method(init))]
105 #[unsafe(method_family = init)]
106 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
107
108 #[unsafe(method(new))]
109 #[unsafe(method_family = new)]
110 pub unsafe fn new(&self) -> Retained<Self>;
111 );
112}
113
114#[cfg(feature = "objc2")]
116impl ARRaycastQuery {
117 extern_methods!(
118 #[unsafe(method(new))]
119 #[unsafe(method_family = new)]
120 pub unsafe fn new_class() -> Retained<Self>;
121 );
122}