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:))]
83 #[unsafe(method_family = init)]
84 pub unsafe fn initWithCoder(
85 this: Allocated<Self>,
86 a_decoder: &NSCoder,
87 ) -> Option<Retained<Self>>;
88
89 #[unsafe(method(node))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
92
93 #[unsafe(method(nodeWithFileNamed:))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn nodeWithFileNamed(
96 filename: &NSString,
97 mtm: MainThreadMarker,
98 ) -> Option<Retained<Self>>;
99
100 #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
103 filename: &NSString,
104 classes: &NSSet<AnyClass>,
105 mtm: MainThreadMarker,
106 ) -> Result<Retained<Self>, Retained<NSError>>;
107 );
108}
109
110#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
112#[cfg(target_os = "macos")]
113impl SKCropNode {
114 extern_methods!(
115 #[unsafe(method(new))]
116 #[unsafe(method_family = new)]
117 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
118 );
119}