objc2_sprite_kit/generated/
SKCropNode.rs1use 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::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern_class!(
14 #[unsafe(super(SKNode, NSResponder, NSObject))]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 #[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
20 #[cfg(target_os = "macos")]
21 pub struct SKCropNode;
22);
23
24#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
25#[cfg(target_os = "macos")]
26unsafe impl NSCoding for SKCropNode {}
27
28#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
29#[cfg(target_os = "macos")]
30unsafe impl NSCopying for SKCropNode {}
31
32#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
33#[cfg(target_os = "macos")]
34unsafe impl CopyingHelper for SKCropNode {
35 type Result = Self;
36}
37
38#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
39#[cfg(target_os = "macos")]
40unsafe impl NSObjectProtocol for SKCropNode {}
41
42#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
43#[cfg(target_os = "macos")]
44unsafe impl NSSecureCoding for SKCropNode {}
45
46#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
47#[cfg(target_os = "macos")]
48impl SKCropNode {
49 extern_methods!(
50 #[unsafe(method(maskNode))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn maskNode(&self) -> Option<Retained<SKNode>>;
56
57 #[unsafe(method(setMaskNode:))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn setMaskNode(&self, mask_node: Option<&SKNode>);
61 );
62}
63
64#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
66#[cfg(target_os = "macos")]
67impl SKCropNode {
68 extern_methods!(
69 #[unsafe(method(init))]
70 #[unsafe(method_family = init)]
71 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
72
73 #[unsafe(method(initWithCoder:))]
75 #[unsafe(method_family = init)]
76 pub unsafe fn initWithCoder(
77 this: Allocated<Self>,
78 a_decoder: &NSCoder,
79 ) -> Option<Retained<Self>>;
80
81 #[unsafe(method(node))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
84
85 #[unsafe(method(nodeWithFileNamed:))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn nodeWithFileNamed(
88 filename: &NSString,
89 mtm: MainThreadMarker,
90 ) -> Option<Retained<Self>>;
91
92 #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
95 filename: &NSString,
96 classes: &NSSet<AnyClass>,
97 mtm: MainThreadMarker,
98 ) -> Result<Retained<Self>, Retained<NSError>>;
99 );
100}
101
102#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
104#[cfg(target_os = "macos")]
105impl SKCropNode {
106 extern_methods!(
107 #[unsafe(method(new))]
108 #[unsafe(method_family = new)]
109 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
110 );
111}