objc2_gameplay_kit/generated/
GKScene.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 pub unsafe trait GKSceneRootNodeType: NSObjectProtocol {}
18);
19
20extern_class!(
21 #[unsafe(super(NSObject))]
25 #[derive(Debug, PartialEq, Eq, Hash)]
26 pub struct GKScene;
27);
28
29extern_conformance!(
30 unsafe impl NSCoding for GKScene {}
31);
32
33extern_conformance!(
34 unsafe impl NSCopying for GKScene {}
35);
36
37unsafe impl CopyingHelper for GKScene {
38 type Result = Self;
39}
40
41extern_conformance!(
42 unsafe impl NSObjectProtocol for GKScene {}
43);
44
45extern_conformance!(
46 unsafe impl NSSecureCoding for GKScene {}
47);
48
49impl GKScene {
50 extern_methods!(
51 #[unsafe(method(sceneWithFileNamed:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn sceneWithFileNamed(filename: &NSString) -> Option<Retained<Self>>;
55
56 #[unsafe(method(sceneWithFileNamed:rootNode:))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn sceneWithFileNamed_rootNode(
60 filename: &NSString,
61 root_node: &ProtocolObject<dyn GKSceneRootNodeType>,
62 ) -> Option<Retained<Self>>;
63
64 #[cfg(feature = "GKEntity")]
65 #[unsafe(method(entities))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn entities(&self) -> Retained<NSArray<GKEntity>>;
69
70 #[unsafe(method(rootNode))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn rootNode(&self) -> Option<Retained<ProtocolObject<dyn GKSceneRootNodeType>>>;
77
78 #[unsafe(method(setRootNode:))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn setRootNode(
82 &self,
83 root_node: Option<&ProtocolObject<dyn GKSceneRootNodeType>>,
84 );
85
86 #[cfg(feature = "GKGraph")]
87 #[unsafe(method(graphs))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn graphs(&self) -> Retained<NSDictionary<NSString, GKGraph>>;
91
92 #[cfg(feature = "GKEntity")]
93 #[unsafe(method(addEntity:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn addEntity(&self, entity: &GKEntity);
100
101 #[cfg(feature = "GKEntity")]
102 #[unsafe(method(removeEntity:))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn removeEntity(&self, entity: &GKEntity);
109
110 #[cfg(feature = "GKGraph")]
111 #[unsafe(method(addGraph:name:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn addGraph_name(&self, graph: &GKGraph, name: &NSString);
118
119 #[unsafe(method(removeGraph:))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn removeGraph(&self, name: &NSString);
126 );
127}
128
129impl GKScene {
131 extern_methods!(
132 #[unsafe(method(init))]
133 #[unsafe(method_family = init)]
134 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
135
136 #[unsafe(method(new))]
137 #[unsafe(method_family = new)]
138 pub unsafe fn new() -> Retained<Self>;
139 );
140}