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")]
26extern_conformance!(
27 unsafe impl NSCoding for SKCropNode {}
28);
29
30#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
31#[cfg(target_os = "macos")]
32extern_conformance!(
33 unsafe impl NSCopying for SKCropNode {}
34);
35
36#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
37#[cfg(target_os = "macos")]
38unsafe impl CopyingHelper for SKCropNode {
39 type Result = Self;
40}
41
42#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
43#[cfg(target_os = "macos")]
44extern_conformance!(
45 unsafe impl NSObjectProtocol for SKCropNode {}
46);
47
48#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
49#[cfg(target_os = "macos")]
50extern_conformance!(
51 unsafe impl NSSecureCoding for SKCropNode {}
52);
53
54#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
55#[cfg(target_os = "macos")]
56impl SKCropNode {
57 extern_methods!(
58 #[unsafe(method(maskNode))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn maskNode(&self) -> Option<Retained<SKNode>>;
64
65 #[unsafe(method(setMaskNode:))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn setMaskNode(&self, mask_node: Option<&SKNode>);
69 );
70}
71
72#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
74#[cfg(target_os = "macos")]
75impl SKCropNode {
76 extern_methods!(
77 #[unsafe(method(init))]
78 #[unsafe(method_family = init)]
79 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
80
81 #[unsafe(method(initWithCoder:))]
87 #[unsafe(method_family = init)]
88 pub unsafe fn initWithCoder(
89 this: Allocated<Self>,
90 a_decoder: &NSCoder,
91 ) -> Option<Retained<Self>>;
92
93 #[unsafe(method(node))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
96
97 #[unsafe(method(nodeWithFileNamed:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn nodeWithFileNamed(
100 filename: &NSString,
101 mtm: MainThreadMarker,
102 ) -> Option<Retained<Self>>;
103
104 #[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#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
119#[cfg(target_os = "macos")]
120impl SKCropNode {
121 extern_methods!(
122 #[unsafe(method(new))]
123 #[unsafe(method_family = new)]
124 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
125 );
126}