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")]
31extern_conformance!(
32    unsafe impl NSCoding for SKTransformNode {}
33);
34
35#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
36#[cfg(target_os = "macos")]
37extern_conformance!(
38    unsafe impl NSCopying for SKTransformNode {}
39);
40
41#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
42#[cfg(target_os = "macos")]
43unsafe impl CopyingHelper for SKTransformNode {
44    type Result = Self;
45}
46
47#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
48#[cfg(target_os = "macos")]
49extern_conformance!(
50    unsafe impl NSObjectProtocol for SKTransformNode {}
51);
52
53#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
54#[cfg(target_os = "macos")]
55extern_conformance!(
56    unsafe impl NSSecureCoding for SKTransformNode {}
57);
58
59#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
60#[cfg(target_os = "macos")]
61impl SKTransformNode {
62    extern_methods!(
63        #[cfg(feature = "objc2-core-foundation")]
64        #[unsafe(method(xRotation))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn xRotation(&self) -> CGFloat;
67
68        #[cfg(feature = "objc2-core-foundation")]
69        /// Setter for [`xRotation`][Self::xRotation].
70        #[unsafe(method(setXRotation:))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn setXRotation(&self, x_rotation: CGFloat);
73
74        #[cfg(feature = "objc2-core-foundation")]
75        #[unsafe(method(yRotation))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn yRotation(&self) -> CGFloat;
78
79        #[cfg(feature = "objc2-core-foundation")]
80        /// Setter for [`yRotation`][Self::yRotation].
81        #[unsafe(method(setYRotation:))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn setYRotation(&self, y_rotation: CGFloat);
84    );
85}
86
87/// Methods declared on superclass `SKNode`.
88#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
89#[cfg(target_os = "macos")]
90impl SKTransformNode {
91    extern_methods!(
92        #[unsafe(method(init))]
93        #[unsafe(method_family = init)]
94        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
95
96        /// Support coding and decoding via NSKeyedArchiver.
97        #[unsafe(method(initWithCoder:))]
98        #[unsafe(method_family = init)]
99        pub unsafe fn initWithCoder(
100            this: Allocated<Self>,
101            a_decoder: &NSCoder,
102        ) -> Option<Retained<Self>>;
103
104        #[unsafe(method(node))]
105        #[unsafe(method_family = none)]
106        pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
107
108        #[unsafe(method(nodeWithFileNamed:))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn nodeWithFileNamed(
111            filename: &NSString,
112            mtm: MainThreadMarker,
113        ) -> Option<Retained<Self>>;
114
115        #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
116        #[unsafe(method_family = none)]
117        pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
118            filename: &NSString,
119            classes: &NSSet<AnyClass>,
120            mtm: MainThreadMarker,
121        ) -> Result<Retained<Self>, Retained<NSError>>;
122    );
123}
124
125/// Methods declared on superclass `NSObject`.
126#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
127#[cfg(target_os = "macos")]
128impl SKTransformNode {
129    extern_methods!(
130        #[unsafe(method(new))]
131        #[unsafe(method_family = new)]
132        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
133    );
134}