objc2_sprite_kit/generated/
SKTransformNode.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9#[cfg(feature = "objc2-core-foundation")]
10use objc2_core_foundation::*;
11use objc2_foundation::*;
12
13use crate::*;
14
15extern_class!(
16    /// An SKTransformNode can be applied a 3D rotation that will affect
17    /// the visual aspect of its children.
18    /// The physics and constraints of the children will behave as if none
19    /// of them were transformed.
20    ///
21    /// See also [Apple's documentation](https://developer.apple.com/documentation/spritekit/sktransformnode?language=objc)
22    #[unsafe(super(SKNode, NSResponder, NSObject))]
23    #[derive(Debug, PartialEq, Eq, Hash)]
24    #[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
25    #[cfg(target_os = "macos")]
26    pub struct SKTransformNode;
27);
28
29#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
30#[cfg(target_os = "macos")]
31unsafe impl NSCoding for SKTransformNode {}
32
33#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
34#[cfg(target_os = "macos")]
35unsafe impl NSCopying for SKTransformNode {}
36
37#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
38#[cfg(target_os = "macos")]
39unsafe impl CopyingHelper for SKTransformNode {
40    type Result = Self;
41}
42
43#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
44#[cfg(target_os = "macos")]
45unsafe impl NSObjectProtocol for SKTransformNode {}
46
47#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
48#[cfg(target_os = "macos")]
49unsafe impl NSSecureCoding for SKTransformNode {}
50
51#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
52#[cfg(target_os = "macos")]
53impl SKTransformNode {
54    extern_methods!(
55        #[cfg(feature = "objc2-core-foundation")]
56        #[unsafe(method(xRotation))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn xRotation(&self) -> CGFloat;
59
60        #[cfg(feature = "objc2-core-foundation")]
61        /// Setter for [`xRotation`][Self::xRotation].
62        #[unsafe(method(setXRotation:))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn setXRotation(&self, x_rotation: CGFloat);
65
66        #[cfg(feature = "objc2-core-foundation")]
67        #[unsafe(method(yRotation))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn yRotation(&self) -> CGFloat;
70
71        #[cfg(feature = "objc2-core-foundation")]
72        /// Setter for [`yRotation`][Self::yRotation].
73        #[unsafe(method(setYRotation:))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn setYRotation(&self, y_rotation: CGFloat);
76    );
77}
78
79/// Methods declared on superclass `SKNode`.
80#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
81#[cfg(target_os = "macos")]
82impl SKTransformNode {
83    extern_methods!(
84        #[unsafe(method(init))]
85        #[unsafe(method_family = init)]
86        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
87
88        /// Support coding and decoding via NSKeyedArchiver.
89        #[unsafe(method(initWithCoder:))]
90        #[unsafe(method_family = init)]
91        pub unsafe fn initWithCoder(
92            this: Allocated<Self>,
93            a_decoder: &NSCoder,
94        ) -> Option<Retained<Self>>;
95
96        #[unsafe(method(node))]
97        #[unsafe(method_family = none)]
98        pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
99
100        #[unsafe(method(nodeWithFileNamed:))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn nodeWithFileNamed(
103            filename: &NSString,
104            mtm: MainThreadMarker,
105        ) -> Option<Retained<Self>>;
106
107        #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
108        #[unsafe(method_family = none)]
109        pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
110            filename: &NSString,
111            classes: &NSSet<AnyClass>,
112            mtm: MainThreadMarker,
113        ) -> Result<Retained<Self>, Retained<NSError>>;
114    );
115}
116
117/// Methods declared on superclass `NSObject`.
118#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
119#[cfg(target_os = "macos")]
120impl SKTransformNode {
121    extern_methods!(
122        #[unsafe(method(new))]
123        #[unsafe(method_family = new)]
124        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
125    );
126}