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        ///
98        /// # Safety
99        ///
100        /// `a_decoder` possibly has further requirements.
101        #[unsafe(method(initWithCoder:))]
102        #[unsafe(method_family = init)]
103        pub unsafe fn initWithCoder(
104            this: Allocated<Self>,
105            a_decoder: &NSCoder,
106        ) -> Option<Retained<Self>>;
107
108        #[unsafe(method(node))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
111
112        #[unsafe(method(nodeWithFileNamed:))]
113        #[unsafe(method_family = none)]
114        pub unsafe fn nodeWithFileNamed(
115            filename: &NSString,
116            mtm: MainThreadMarker,
117        ) -> Option<Retained<Self>>;
118
119        /// # Safety
120        ///
121        /// `classes` generic probably has further requirements.
122        #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
123        #[unsafe(method_family = none)]
124        pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
125            filename: &NSString,
126            classes: &NSSet<AnyClass>,
127            mtm: MainThreadMarker,
128        ) -> Result<Retained<Self>, Retained<NSError>>;
129    );
130}
131
132/// Methods declared on superclass `NSObject`.
133#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
134#[cfg(target_os = "macos")]
135impl SKTransformNode {
136    extern_methods!(
137        #[unsafe(method(new))]
138        #[unsafe(method_family = new)]
139        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
140    );
141}