objc2_gameplay_kit/generated/
GKSCNNodeComponent.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6#[cfg(feature = "objc2-scene-kit")]
7use objc2_scene_kit::*;
8
9use crate::*;
10
11extern_class!(
12    /// A component that encapsulates a SceneKit node.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/gameplaykit/gkscnnodecomponent?language=objc)
15    #[unsafe(super(GKComponent, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "GKComponent")]
18    pub struct GKSCNNodeComponent;
19);
20
21#[cfg(all(feature = "GKAgent", feature = "GKComponent"))]
22extern_conformance!(
23    unsafe impl GKAgentDelegate for GKSCNNodeComponent {}
24);
25
26#[cfg(feature = "GKComponent")]
27extern_conformance!(
28    unsafe impl NSCoding for GKSCNNodeComponent {}
29);
30
31#[cfg(feature = "GKComponent")]
32extern_conformance!(
33    unsafe impl NSCopying for GKSCNNodeComponent {}
34);
35
36#[cfg(feature = "GKComponent")]
37unsafe impl CopyingHelper for GKSCNNodeComponent {
38    type Result = Self;
39}
40
41#[cfg(feature = "GKComponent")]
42extern_conformance!(
43    unsafe impl NSObjectProtocol for GKSCNNodeComponent {}
44);
45
46#[cfg(feature = "GKComponent")]
47extern_conformance!(
48    unsafe impl NSSecureCoding for GKSCNNodeComponent {}
49);
50
51#[cfg(feature = "GKComponent")]
52impl GKSCNNodeComponent {
53    extern_methods!(
54        #[cfg(feature = "objc2-scene-kit")]
55        /// Creates a component that encapsulate the given SceneKit node. When the component is
56        /// added to an entity, the SCNNode's entity property will be set.
57        ///
58        ///
59        /// Parameter `node`: Node to associate with the component.
60        ///
61        /// See: SCNNode.entity
62        #[unsafe(method(componentWithNode:))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn componentWithNode(node: &SCNNode) -> Retained<Self>;
65
66        #[cfg(feature = "objc2-scene-kit")]
67        /// Initializes component to encapsulate the given SceneKit node. When the component is
68        /// added to an entity, the SCNNode's entity property will be set.
69        ///
70        ///
71        /// Parameter `node`: Node to associate with the component.
72        ///
73        /// See: SCNNode.entity
74        #[unsafe(method(initWithNode:))]
75        #[unsafe(method_family = init)]
76        pub unsafe fn initWithNode(this: Allocated<Self>, node: &SCNNode) -> Retained<Self>;
77
78        #[cfg(feature = "objc2-scene-kit")]
79        /// The SceneKit node this component encapsulates.
80        #[unsafe(method(node))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn node(&self) -> Retained<SCNNode>;
83    );
84}
85
86/// Methods declared on superclass `NSObject`.
87#[cfg(feature = "GKComponent")]
88impl GKSCNNodeComponent {
89    extern_methods!(
90        #[unsafe(method(init))]
91        #[unsafe(method_family = init)]
92        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
93
94        #[unsafe(method(new))]
95        #[unsafe(method_family = new)]
96        pub unsafe fn new() -> Retained<Self>;
97    );
98}