objc2_gameplay_kit/generated/
GKObstacle.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct GKObstacle;
19);
20
21extern_conformance!(
22 unsafe impl NSObjectProtocol for GKObstacle {}
23);
24
25impl GKObstacle {
26 extern_methods!();
27}
28
29impl GKObstacle {
31 extern_methods!(
32 #[unsafe(method(init))]
33 #[unsafe(method_family = init)]
34 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
35
36 #[unsafe(method(new))]
37 #[unsafe(method_family = new)]
38 pub unsafe fn new() -> Retained<Self>;
39 );
40}
41
42extern_class!(
43 #[unsafe(super(GKObstacle, NSObject))]
47 #[derive(Debug, PartialEq, Eq, Hash)]
48 pub struct GKCircleObstacle;
49);
50
51extern_conformance!(
52 unsafe impl NSObjectProtocol for GKCircleObstacle {}
53);
54
55impl GKCircleObstacle {
56 extern_methods!(
57 #[unsafe(method(radius))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn radius(&self) -> c_float;
61
62 #[unsafe(method(setRadius:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn setRadius(&self, radius: c_float);
66
67 #[unsafe(method(obstacleWithRadius:))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn obstacleWithRadius(radius: c_float) -> Retained<Self>;
70
71 #[unsafe(method(initWithRadius:))]
72 #[unsafe(method_family = init)]
73 pub unsafe fn initWithRadius(this: Allocated<Self>, radius: c_float) -> Retained<Self>;
74 );
75}
76
77impl GKCircleObstacle {
79 extern_methods!(
80 #[unsafe(method(init))]
81 #[unsafe(method_family = init)]
82 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
83
84 #[unsafe(method(new))]
85 #[unsafe(method_family = new)]
86 pub unsafe fn new() -> Retained<Self>;
87 );
88}
89
90extern_class!(
91 #[unsafe(super(GKObstacle, NSObject))]
95 #[derive(Debug, PartialEq, Eq, Hash)]
96 pub struct GKPolygonObstacle;
97);
98
99extern_conformance!(
100 unsafe impl NSCoding for GKPolygonObstacle {}
101);
102
103extern_conformance!(
104 unsafe impl NSObjectProtocol for GKPolygonObstacle {}
105);
106
107extern_conformance!(
108 unsafe impl NSSecureCoding for GKPolygonObstacle {}
109);
110
111impl GKPolygonObstacle {
112 extern_methods!(
113 #[unsafe(method(vertexCount))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn vertexCount(&self) -> NSUInteger;
117 );
118}
119
120impl GKPolygonObstacle {
122 extern_methods!(
123 #[unsafe(method(init))]
124 #[unsafe(method_family = init)]
125 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
126
127 #[unsafe(method(new))]
128 #[unsafe(method_family = new)]
129 pub unsafe fn new() -> Retained<Self>;
130 );
131}
132
133extern_class!(
134 #[unsafe(super(GKObstacle, NSObject))]
139 #[derive(Debug, PartialEq, Eq, Hash)]
140 pub struct GKSphereObstacle;
141);
142
143extern_conformance!(
144 unsafe impl NSObjectProtocol for GKSphereObstacle {}
145);
146
147impl GKSphereObstacle {
148 extern_methods!(
149 #[unsafe(method(radius))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn radius(&self) -> c_float;
153
154 #[unsafe(method(setRadius:))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn setRadius(&self, radius: c_float);
158
159 #[unsafe(method(obstacleWithRadius:))]
160 #[unsafe(method_family = none)]
161 pub unsafe fn obstacleWithRadius(radius: c_float) -> Retained<Self>;
162
163 #[unsafe(method(initWithRadius:))]
164 #[unsafe(method_family = init)]
165 pub unsafe fn initWithRadius(this: Allocated<Self>, radius: c_float) -> Retained<Self>;
166 );
167}
168
169impl GKSphereObstacle {
171 extern_methods!(
172 #[unsafe(method(init))]
173 #[unsafe(method_family = init)]
174 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
175
176 #[unsafe(method(new))]
177 #[unsafe(method_family = new)]
178 pub unsafe fn new() -> Retained<Self>;
179 );
180}