objc2_model_io/generated/
MDLObject.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 pub struct MDLObject;
20);
21
22#[cfg(feature = "MDLTypes")]
23unsafe impl MDLNamed for MDLObject {}
24
25unsafe impl NSObjectProtocol for MDLObject {}
26
27impl MDLObject {
28 extern_methods!(
29 #[cfg(feature = "MDLTypes")]
30 #[unsafe(method(components))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn components(&self) -> Retained<NSArray<ProtocolObject<dyn MDLComponent>>>;
34
35 #[cfg(feature = "MDLTypes")]
36 #[unsafe(method(setComponent:forProtocol:))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn setComponent_forProtocol(
41 &self,
42 component: &ProtocolObject<dyn MDLComponent>,
43 protocol: &AnyProtocol,
44 );
45
46 #[cfg(feature = "MDLTypes")]
47 #[unsafe(method(componentConformingToProtocol:))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn componentConformingToProtocol(
52 &self,
53 protocol: &AnyProtocol,
54 ) -> Option<Retained<ProtocolObject<dyn MDLComponent>>>;
55
56 #[cfg(feature = "MDLTypes")]
57 #[unsafe(method(objectForKeyedSubscript:))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn objectForKeyedSubscript(
65 &self,
66 key: &AnyProtocol,
67 ) -> Option<Retained<ProtocolObject<dyn MDLComponent>>>;
68
69 #[cfg(feature = "MDLTypes")]
70 #[unsafe(method(setObject:forKeyedSubscript:))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn setObject_forKeyedSubscript(
78 &self,
79 obj: Option<&ProtocolObject<dyn MDLComponent>>,
80 key: &AnyProtocol,
81 );
82
83 #[unsafe(method(parent))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn parent(&self) -> Option<Retained<MDLObject>>;
90
91 #[unsafe(method(setParent:))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn setParent(&self, parent: Option<&MDLObject>);
96
97 #[unsafe(method(instance))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn instance(&self) -> Option<Retained<MDLObject>>;
111
112 #[unsafe(method(setInstance:))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn setInstance(&self, instance: Option<&MDLObject>);
116
117 #[unsafe(method(path))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn path(&self) -> Retained<NSString>;
127
128 #[unsafe(method(objectAtPath:))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn objectAtPath(&self, path: &NSString) -> Retained<MDLObject>;
132
133 #[cfg(feature = "block2")]
134 #[unsafe(method(enumerateChildObjectsOfClass:root:usingBlock:stopPointer:))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn enumerateChildObjectsOfClass_root_usingBlock_stopPointer(
137 &self,
138 object_class: &AnyClass,
139 root: &MDLObject,
140 block: &block2::Block<dyn Fn(NonNull<MDLObject>, NonNull<Bool>)>,
141 stop_pointer: NonNull<Bool>,
142 );
143
144 #[cfg(all(feature = "MDLTransform", feature = "MDLTypes"))]
145 #[unsafe(method(transform))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn transform(
154 &self,
155 ) -> Option<Retained<ProtocolObject<dyn MDLTransformComponent>>>;
156
157 #[cfg(all(feature = "MDLTransform", feature = "MDLTypes"))]
158 #[unsafe(method(setTransform:))]
160 #[unsafe(method_family = none)]
161 pub unsafe fn setTransform(
162 &self,
163 transform: Option<&ProtocolObject<dyn MDLTransformComponent>>,
164 );
165
166 #[cfg(feature = "MDLTypes")]
167 #[unsafe(method(children))]
174 #[unsafe(method_family = none)]
175 pub unsafe fn children(&self) -> Retained<ProtocolObject<dyn MDLObjectContainerComponent>>;
176
177 #[cfg(feature = "MDLTypes")]
178 #[unsafe(method(setChildren:))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn setChildren(
182 &self,
183 children: &ProtocolObject<dyn MDLObjectContainerComponent>,
184 );
185
186 #[unsafe(method(hidden))]
190 #[unsafe(method_family = none)]
191 pub unsafe fn hidden(&self) -> bool;
192
193 #[unsafe(method(setHidden:))]
195 #[unsafe(method_family = none)]
196 pub unsafe fn setHidden(&self, hidden: bool);
197
198 #[unsafe(method(addChild:))]
208 #[unsafe(method_family = none)]
209 pub unsafe fn addChild(&self, child: &MDLObject);
210 );
211}
212
213impl MDLObject {
215 extern_methods!(
216 #[unsafe(method(init))]
217 #[unsafe(method_family = init)]
218 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
219
220 #[unsafe(method(new))]
221 #[unsafe(method_family = new)]
222 pub unsafe fn new() -> Retained<Self>;
223 );
224}
225
226extern_class!(
227 #[unsafe(super(NSObject))]
235 #[derive(Debug, PartialEq, Eq, Hash)]
236 pub struct MDLObjectContainer;
237);
238
239#[cfg(feature = "MDLTypes")]
240unsafe impl MDLComponent for MDLObjectContainer {}
241
242#[cfg(feature = "MDLTypes")]
243unsafe impl MDLObjectContainerComponent for MDLObjectContainer {}
244
245unsafe impl NSFastEnumeration for MDLObjectContainer {}
246
247unsafe impl NSObjectProtocol for MDLObjectContainer {}
248
249impl MDLObjectContainer {
250 extern_methods!();
251}
252
253impl MDLObjectContainer {
255 extern_methods!(
256 #[unsafe(method(init))]
257 #[unsafe(method_family = init)]
258 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
259
260 #[unsafe(method(new))]
261 #[unsafe(method_family = new)]
262 pub unsafe fn new() -> Retained<Self>;
263 );
264}