objc2_sprite_kit/generated/
SKNode.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
15/// Blend modes that the SKNode uses to compose with the framebuffer to produce blended colors.
16///
17/// See also [Apple's documentation](https://developer.apple.com/documentation/spritekit/skblendmode?language=objc)
18// NS_ENUM
19#[repr(transparent)]
20#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
21pub struct SKBlendMode(pub NSInteger);
22impl SKBlendMode {
23    #[doc(alias = "SKBlendModeAlpha")]
24    pub const Alpha: Self = Self(0);
25    #[doc(alias = "SKBlendModeAdd")]
26    pub const Add: Self = Self(1);
27    #[doc(alias = "SKBlendModeSubtract")]
28    pub const Subtract: Self = Self(2);
29    #[doc(alias = "SKBlendModeMultiply")]
30    pub const Multiply: Self = Self(3);
31    #[doc(alias = "SKBlendModeMultiplyX2")]
32    pub const MultiplyX2: Self = Self(4);
33    #[doc(alias = "SKBlendModeScreen")]
34    pub const Screen: Self = Self(5);
35    #[doc(alias = "SKBlendModeReplace")]
36    pub const Replace: Self = Self(6);
37    #[doc(alias = "SKBlendModeMultiplyAlpha")]
38    pub const MultiplyAlpha: Self = Self(7);
39}
40
41unsafe impl Encode for SKBlendMode {
42    const ENCODING: Encoding = NSInteger::ENCODING;
43}
44
45unsafe impl RefEncode for SKBlendMode {
46    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
47}
48
49/// [Apple's documentation](https://developer.apple.com/documentation/spritekit/sknodefocusbehavior?language=objc)
50// NS_ENUM
51#[repr(transparent)]
52#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
53pub struct SKNodeFocusBehavior(pub NSInteger);
54impl SKNodeFocusBehavior {
55    #[doc(alias = "SKNodeFocusBehaviorNone")]
56    pub const None: Self = Self(0);
57    #[doc(alias = "SKNodeFocusBehaviorOccluding")]
58    pub const Occluding: Self = Self(1);
59    #[doc(alias = "SKNodeFocusBehaviorFocusable")]
60    pub const Focusable: Self = Self(2);
61}
62
63unsafe impl Encode for SKNodeFocusBehavior {
64    const ENCODING: Encoding = NSInteger::ENCODING;
65}
66
67unsafe impl RefEncode for SKNodeFocusBehavior {
68    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
69}
70
71extern_class!(
72    /// [Apple's documentation](https://developer.apple.com/documentation/spritekit/sknode?language=objc)
73    #[unsafe(super(NSResponder, NSObject))]
74    #[derive(Debug, PartialEq, Eq, Hash)]
75    #[cfg(feature = "objc2-app-kit")]
76    #[cfg(target_os = "macos")]
77    pub struct SKNode;
78);
79
80#[cfg(feature = "objc2-app-kit")]
81#[cfg(target_os = "macos")]
82extern_conformance!(
83    unsafe impl NSCoding for SKNode {}
84);
85
86#[cfg(feature = "objc2-app-kit")]
87#[cfg(target_os = "macos")]
88extern_conformance!(
89    unsafe impl NSCopying for SKNode {}
90);
91
92#[cfg(feature = "objc2-app-kit")]
93#[cfg(target_os = "macos")]
94unsafe impl CopyingHelper for SKNode {
95    type Result = Self;
96}
97
98#[cfg(feature = "objc2-app-kit")]
99#[cfg(target_os = "macos")]
100extern_conformance!(
101    unsafe impl NSObjectProtocol for SKNode {}
102);
103
104#[cfg(feature = "objc2-app-kit")]
105#[cfg(target_os = "macos")]
106extern_conformance!(
107    unsafe impl NSSecureCoding for SKNode {}
108);
109
110#[cfg(feature = "objc2-app-kit")]
111#[cfg(target_os = "macos")]
112impl SKNode {
113    extern_methods!(
114        #[unsafe(method(init))]
115        #[unsafe(method_family = init)]
116        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
117
118        /// Support coding and decoding via NSKeyedArchiver.
119        #[unsafe(method(initWithCoder:))]
120        #[unsafe(method_family = init)]
121        pub unsafe fn initWithCoder(
122            this: Allocated<Self>,
123            a_decoder: &NSCoder,
124        ) -> Option<Retained<Self>>;
125
126        #[unsafe(method(node))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
129
130        #[unsafe(method(nodeWithFileNamed:))]
131        #[unsafe(method_family = none)]
132        pub unsafe fn nodeWithFileNamed(
133            filename: &NSString,
134            mtm: MainThreadMarker,
135        ) -> Option<Retained<Self>>;
136
137        #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
138        #[unsafe(method_family = none)]
139        pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
140            filename: &NSString,
141            classes: &NSSet<AnyClass>,
142            mtm: MainThreadMarker,
143        ) -> Result<Retained<Self>, Retained<NSError>>;
144
145        #[cfg(feature = "objc2-core-foundation")]
146        #[unsafe(method(frame))]
147        #[unsafe(method_family = none)]
148        pub unsafe fn frame(&self) -> CGRect;
149
150        #[cfg(feature = "objc2-core-foundation")]
151        /// Calculates the bounding box including all child nodes in parents coordinate system.
152        #[unsafe(method(calculateAccumulatedFrame))]
153        #[unsafe(method_family = none)]
154        pub unsafe fn calculateAccumulatedFrame(&self) -> CGRect;
155
156        #[cfg(feature = "objc2-core-foundation")]
157        /// The position of the node in the parent's coordinate system
158        #[unsafe(method(position))]
159        #[unsafe(method_family = none)]
160        pub unsafe fn position(&self) -> CGPoint;
161
162        #[cfg(feature = "objc2-core-foundation")]
163        /// Setter for [`position`][Self::position].
164        #[unsafe(method(setPosition:))]
165        #[unsafe(method_family = none)]
166        pub unsafe fn setPosition(&self, position: CGPoint);
167
168        #[cfg(feature = "objc2-core-foundation")]
169        /// The z-order of the node (used for ordering). Negative z is "into" the screen, Positive z is "out" of the screen. A greater zPosition will sort in front of a lesser zPosition.
170        #[unsafe(method(zPosition))]
171        #[unsafe(method_family = none)]
172        pub unsafe fn zPosition(&self) -> CGFloat;
173
174        #[cfg(feature = "objc2-core-foundation")]
175        /// Setter for [`zPosition`][Self::zPosition].
176        #[unsafe(method(setZPosition:))]
177        #[unsafe(method_family = none)]
178        pub unsafe fn setZPosition(&self, z_position: CGFloat);
179
180        #[cfg(feature = "objc2-core-foundation")]
181        /// The Euler rotation about the z axis (in radians)
182        #[unsafe(method(zRotation))]
183        #[unsafe(method_family = none)]
184        pub unsafe fn zRotation(&self) -> CGFloat;
185
186        #[cfg(feature = "objc2-core-foundation")]
187        /// Setter for [`zRotation`][Self::zRotation].
188        #[unsafe(method(setZRotation:))]
189        #[unsafe(method_family = none)]
190        pub unsafe fn setZRotation(&self, z_rotation: CGFloat);
191
192        #[cfg(feature = "objc2-core-foundation")]
193        /// The scaling in the X axis
194        #[unsafe(method(xScale))]
195        #[unsafe(method_family = none)]
196        pub unsafe fn xScale(&self) -> CGFloat;
197
198        #[cfg(feature = "objc2-core-foundation")]
199        /// Setter for [`xScale`][Self::xScale].
200        #[unsafe(method(setXScale:))]
201        #[unsafe(method_family = none)]
202        pub unsafe fn setXScale(&self, x_scale: CGFloat);
203
204        #[cfg(feature = "objc2-core-foundation")]
205        /// The scaling in the Y axis
206        #[unsafe(method(yScale))]
207        #[unsafe(method_family = none)]
208        pub unsafe fn yScale(&self) -> CGFloat;
209
210        #[cfg(feature = "objc2-core-foundation")]
211        /// Setter for [`yScale`][Self::yScale].
212        #[unsafe(method(setYScale:))]
213        #[unsafe(method_family = none)]
214        pub unsafe fn setYScale(&self, y_scale: CGFloat);
215
216        #[cfg(feature = "objc2-core-foundation")]
217        /// The speed multiplier applied to all actions run on this node. Inherited by its children.
218        #[unsafe(method(speed))]
219        #[unsafe(method_family = none)]
220        pub unsafe fn speed(&self) -> CGFloat;
221
222        #[cfg(feature = "objc2-core-foundation")]
223        /// Setter for [`speed`][Self::speed].
224        #[unsafe(method(setSpeed:))]
225        #[unsafe(method_family = none)]
226        pub unsafe fn setSpeed(&self, speed: CGFloat);
227
228        #[cfg(feature = "objc2-core-foundation")]
229        /// Alpha of this node (multiplied by the output color to give the final result)
230        #[unsafe(method(alpha))]
231        #[unsafe(method_family = none)]
232        pub unsafe fn alpha(&self) -> CGFloat;
233
234        #[cfg(feature = "objc2-core-foundation")]
235        /// Setter for [`alpha`][Self::alpha].
236        #[unsafe(method(setAlpha:))]
237        #[unsafe(method_family = none)]
238        pub unsafe fn setAlpha(&self, alpha: CGFloat);
239
240        /// Controls whether or not the node's actions is updated or paused.
241        #[unsafe(method(isPaused))]
242        #[unsafe(method_family = none)]
243        pub unsafe fn isPaused(&self) -> bool;
244
245        /// Setter for [`isPaused`][Self::isPaused].
246        #[unsafe(method(setPaused:))]
247        #[unsafe(method_family = none)]
248        pub unsafe fn setPaused(&self, paused: bool);
249
250        /// Controls whether or not the node and its children are rendered.
251        #[unsafe(method(isHidden))]
252        #[unsafe(method_family = none)]
253        pub unsafe fn isHidden(&self) -> bool;
254
255        /// Setter for [`isHidden`][Self::isHidden].
256        #[unsafe(method(setHidden:))]
257        #[unsafe(method_family = none)]
258        pub unsafe fn setHidden(&self, hidden: bool);
259
260        /// Controls whether or not the node receives touch events
261        #[unsafe(method(isUserInteractionEnabled))]
262        #[unsafe(method_family = none)]
263        pub unsafe fn isUserInteractionEnabled(&self) -> bool;
264
265        /// Setter for [`isUserInteractionEnabled`][Self::isUserInteractionEnabled].
266        #[unsafe(method(setUserInteractionEnabled:))]
267        #[unsafe(method_family = none)]
268        pub unsafe fn setUserInteractionEnabled(&self, user_interaction_enabled: bool);
269
270        /// Determines how this node participates in the focus system.  The default is SKNodeFocusBehaviorNone.
271        #[unsafe(method(focusBehavior))]
272        #[unsafe(method_family = none)]
273        pub unsafe fn focusBehavior(&self) -> SKNodeFocusBehavior;
274
275        /// Setter for [`focusBehavior`][Self::focusBehavior].
276        #[unsafe(method(setFocusBehavior:))]
277        #[unsafe(method_family = none)]
278        pub unsafe fn setFocusBehavior(&self, focus_behavior: SKNodeFocusBehavior);
279
280        /// The parent of the node.
281        ///
282        /// If this is nil the node has not been added to another group and is thus the root node of its own graph.
283        #[unsafe(method(parent))]
284        #[unsafe(method_family = none)]
285        pub unsafe fn parent(&self) -> Option<Retained<SKNode>>;
286
287        /// The children of this node.
288        #[unsafe(method(children))]
289        #[unsafe(method_family = none)]
290        pub unsafe fn children(&self) -> Retained<NSArray<SKNode>>;
291
292        /// The client assignable name.
293        ///
294        /// In general, this should be unique among peers in the scene graph.
295        #[unsafe(method(name))]
296        #[unsafe(method_family = none)]
297        pub unsafe fn name(&self) -> Option<Retained<NSString>>;
298
299        /// Setter for [`name`][Self::name].
300        #[unsafe(method(setName:))]
301        #[unsafe(method_family = none)]
302        pub unsafe fn setName(&self, name: Option<&NSString>);
303
304        #[cfg(all(feature = "SKEffectNode", feature = "SKScene"))]
305        /// The scene that the node is currently in.
306        #[unsafe(method(scene))]
307        #[unsafe(method_family = none)]
308        pub unsafe fn scene(&self) -> Option<Retained<SKScene>>;
309
310        #[cfg(feature = "SKPhysicsBody")]
311        /// Physics body attached to the node, with synchronized scale, rotation, and position
312        #[unsafe(method(physicsBody))]
313        #[unsafe(method_family = none)]
314        pub unsafe fn physicsBody(&self) -> Option<Retained<SKPhysicsBody>>;
315
316        #[cfg(feature = "SKPhysicsBody")]
317        /// Setter for [`physicsBody`][Self::physicsBody].
318        #[unsafe(method(setPhysicsBody:))]
319        #[unsafe(method_family = none)]
320        pub unsafe fn setPhysicsBody(&self, physics_body: Option<&SKPhysicsBody>);
321
322        /// An optional dictionary that can be used to store your own data in a node. Defaults to nil.
323        #[unsafe(method(userData))]
324        #[unsafe(method_family = none)]
325        pub unsafe fn userData(&self) -> Option<Retained<NSMutableDictionary>>;
326
327        /// Setter for [`userData`][Self::userData].
328        #[unsafe(method(setUserData:))]
329        #[unsafe(method_family = none)]
330        pub unsafe fn setUserData(&self, user_data: Option<&NSMutableDictionary>);
331
332        #[cfg(feature = "SKReachConstraints")]
333        /// Kinematic constraints, used in IK solving
334        #[unsafe(method(reachConstraints))]
335        #[unsafe(method_family = none)]
336        pub unsafe fn reachConstraints(&self) -> Option<Retained<SKReachConstraints>>;
337
338        #[cfg(feature = "SKReachConstraints")]
339        /// Setter for [`reachConstraints`][Self::reachConstraints].
340        #[unsafe(method(setReachConstraints:))]
341        #[unsafe(method_family = none)]
342        pub unsafe fn setReachConstraints(&self, reach_constraints: Option<&SKReachConstraints>);
343
344        #[cfg(feature = "SKConstraint")]
345        /// Optional array of SKConstraints
346        /// Constraints are evaluated each frame after actions and physics.
347        /// The node's transform will be changed to satisfy the constraint.
348        #[unsafe(method(constraints))]
349        #[unsafe(method_family = none)]
350        pub unsafe fn constraints(&self) -> Option<Retained<NSArray<SKConstraint>>>;
351
352        #[cfg(feature = "SKConstraint")]
353        /// Setter for [`constraints`][Self::constraints].
354        #[unsafe(method(setConstraints:))]
355        #[unsafe(method_family = none)]
356        pub unsafe fn setConstraints(&self, constraints: Option<&NSArray<SKConstraint>>);
357
358        #[cfg(feature = "SKAttribute")]
359        /// Optional dictionary of SKAttributeValues
360        /// Attributes can be used with custom SKShaders.
361        /// DEPRECATED: Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).
362        #[deprecated]
363        #[unsafe(method(attributeValues))]
364        #[unsafe(method_family = none)]
365        pub unsafe fn attributeValues(&self) -> Retained<NSDictionary<NSString, SKAttributeValue>>;
366
367        #[cfg(feature = "SKAttribute")]
368        /// Setter for [`attributeValues`][Self::attributeValues].
369        #[deprecated]
370        #[unsafe(method(setAttributeValues:))]
371        #[unsafe(method_family = none)]
372        pub unsafe fn setAttributeValues(
373            &self,
374            attribute_values: &NSDictionary<NSString, SKAttributeValue>,
375        );
376
377        #[cfg(feature = "SKAttribute")]
378        #[deprecated]
379        #[unsafe(method(valueForAttributeNamed:))]
380        #[unsafe(method_family = none)]
381        pub unsafe fn valueForAttributeNamed(
382            &self,
383            key: &NSString,
384        ) -> Option<Retained<SKAttributeValue>>;
385
386        #[cfg(feature = "SKAttribute")]
387        #[deprecated]
388        #[unsafe(method(setValue:forAttributeNamed:))]
389        #[unsafe(method_family = none)]
390        pub unsafe fn setValue_forAttributeNamed(&self, value: &SKAttributeValue, key: &NSString);
391
392        #[cfg(feature = "objc2-core-foundation")]
393        /// Sets both the x
394        /// &
395        /// y scale
396        ///
397        ///
398        /// Parameter `scale`: the uniform scale to set.
399        #[unsafe(method(setScale:))]
400        #[unsafe(method_family = none)]
401        pub unsafe fn setScale(&self, scale: CGFloat);
402
403        /// Adds a node as a child node of this node
404        ///
405        /// The added node must not have a parent.
406        ///
407        ///
408        /// Parameter `node`: the child node to add.
409        #[unsafe(method(addChild:))]
410        #[unsafe(method_family = none)]
411        pub unsafe fn addChild(&self, node: &SKNode);
412
413        #[unsafe(method(insertChild:atIndex:))]
414        #[unsafe(method_family = none)]
415        pub unsafe fn insertChild_atIndex(&self, node: &SKNode, index: NSInteger);
416
417        #[unsafe(method(removeChildrenInArray:))]
418        #[unsafe(method_family = none)]
419        pub unsafe fn removeChildrenInArray(&self, nodes: &NSArray<SKNode>);
420
421        #[unsafe(method(removeAllChildren))]
422        #[unsafe(method_family = none)]
423        pub unsafe fn removeAllChildren(&self);
424
425        #[unsafe(method(removeFromParent))]
426        #[unsafe(method_family = none)]
427        pub unsafe fn removeFromParent(&self);
428
429        #[unsafe(method(moveToParent:))]
430        #[unsafe(method_family = none)]
431        pub unsafe fn moveToParent(&self, parent: &SKNode);
432
433        #[unsafe(method(childNodeWithName:))]
434        #[unsafe(method_family = none)]
435        pub unsafe fn childNodeWithName(&self, name: &NSString) -> Option<Retained<SKNode>>;
436
437        #[cfg(feature = "block2")]
438        #[unsafe(method(enumerateChildNodesWithName:usingBlock:))]
439        #[unsafe(method_family = none)]
440        pub unsafe fn enumerateChildNodesWithName_usingBlock(
441            &self,
442            name: &NSString,
443            block: &block2::DynBlock<dyn Fn(NonNull<SKNode>, NonNull<Bool>)>,
444        );
445
446        /// Simplified shorthand for enumerateChildNodesWithName that returns an array of the matching nodes.
447        /// This allows subscripting of the form:
448        /// NSArray *childrenMatchingName = node[
449        /// "
450        /// name"]
451        ///
452        /// or even complex like:
453        /// NSArray *siblingsBeginningWithA = node[
454        /// "
455        /// ../a*"]
456        ///
457        ///
458        /// Parameter `name`: An Xpath style path that can include simple regular expressions for matching node names.
459        ///
460        /// See: enumerateChildNodesWithName:usingBlock:
461        #[unsafe(method(objectForKeyedSubscript:))]
462        #[unsafe(method_family = none)]
463        pub unsafe fn objectForKeyedSubscript(&self, name: &NSString) -> Retained<NSArray<SKNode>>;
464
465        #[unsafe(method(inParentHierarchy:))]
466        #[unsafe(method_family = none)]
467        pub unsafe fn inParentHierarchy(&self, parent: &SKNode) -> bool;
468
469        #[cfg(feature = "SKAction")]
470        #[unsafe(method(runAction:))]
471        #[unsafe(method_family = none)]
472        pub unsafe fn runAction(&self, action: &SKAction);
473
474        #[cfg(all(feature = "SKAction", feature = "block2"))]
475        #[unsafe(method(runAction:completion:))]
476        #[unsafe(method_family = none)]
477        pub unsafe fn runAction_completion(
478            &self,
479            action: &SKAction,
480            block: &block2::DynBlock<dyn Fn()>,
481        );
482
483        #[cfg(feature = "SKAction")]
484        #[unsafe(method(runAction:withKey:))]
485        #[unsafe(method_family = none)]
486        pub unsafe fn runAction_withKey(&self, action: &SKAction, key: &NSString);
487
488        #[unsafe(method(hasActions))]
489        #[unsafe(method_family = none)]
490        pub unsafe fn hasActions(&self) -> bool;
491
492        #[cfg(feature = "SKAction")]
493        #[unsafe(method(actionForKey:))]
494        #[unsafe(method_family = none)]
495        pub unsafe fn actionForKey(&self, key: &NSString) -> Option<Retained<SKAction>>;
496
497        #[unsafe(method(removeActionForKey:))]
498        #[unsafe(method_family = none)]
499        pub unsafe fn removeActionForKey(&self, key: &NSString);
500
501        #[unsafe(method(removeAllActions))]
502        #[unsafe(method_family = none)]
503        pub unsafe fn removeAllActions(&self);
504
505        #[cfg(feature = "objc2-core-foundation")]
506        #[unsafe(method(containsPoint:))]
507        #[unsafe(method_family = none)]
508        pub unsafe fn containsPoint(&self, p: CGPoint) -> bool;
509
510        #[cfg(feature = "objc2-core-foundation")]
511        /// Returns the node itself or a child node at the point given.
512        /// If the receiver is returned there is no child node at the given point.
513        ///
514        /// Returns: a child node or self at the given location.
515        #[unsafe(method(nodeAtPoint:))]
516        #[unsafe(method_family = none)]
517        pub unsafe fn nodeAtPoint(&self, p: CGPoint) -> Retained<SKNode>;
518
519        #[cfg(feature = "objc2-core-foundation")]
520        #[unsafe(method(nodesAtPoint:))]
521        #[unsafe(method_family = none)]
522        pub unsafe fn nodesAtPoint(&self, p: CGPoint) -> Retained<NSArray<SKNode>>;
523
524        #[cfg(feature = "objc2-core-foundation")]
525        #[unsafe(method(convertPoint:fromNode:))]
526        #[unsafe(method_family = none)]
527        pub unsafe fn convertPoint_fromNode(&self, point: CGPoint, node: &SKNode) -> CGPoint;
528
529        #[cfg(feature = "objc2-core-foundation")]
530        #[unsafe(method(convertPoint:toNode:))]
531        #[unsafe(method_family = none)]
532        pub unsafe fn convertPoint_toNode(&self, point: CGPoint, node: &SKNode) -> CGPoint;
533
534        #[unsafe(method(intersectsNode:))]
535        #[unsafe(method_family = none)]
536        pub unsafe fn intersectsNode(&self, node: &SKNode) -> bool;
537
538        #[unsafe(method(isEqualToNode:))]
539        #[unsafe(method_family = none)]
540        pub unsafe fn isEqualToNode(&self, node: &SKNode) -> bool;
541    );
542}
543
544/// Methods declared on superclass `NSObject`.
545#[cfg(feature = "objc2-app-kit")]
546#[cfg(target_os = "macos")]
547impl SKNode {
548    extern_methods!(
549        #[unsafe(method(new))]
550        #[unsafe(method_family = new)]
551        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
552    );
553}
554
555mod private_NSEventSKNodeEvent {
556    pub trait Sealed {}
557}
558
559/// Category "SKNodeEvent" on [`NSEvent`].
560#[doc(alias = "SKNodeEvent")]
561pub unsafe trait NSEventSKNodeEvent:
562    ClassType + Sized + private_NSEventSKNodeEvent::Sealed
563{
564    extern_methods!(
565        #[cfg(all(feature = "objc2-app-kit", feature = "objc2-core-foundation"))]
566        #[cfg(target_os = "macos")]
567        #[unsafe(method(locationInNode:))]
568        #[unsafe(method_family = none)]
569        unsafe fn locationInNode(&self, node: &SKNode) -> CGPoint;
570    );
571}
572
573#[cfg(feature = "objc2-app-kit")]
574#[cfg(target_os = "macos")]
575impl private_NSEventSKNodeEvent::Sealed for NSEvent {}
576#[cfg(feature = "objc2-app-kit")]
577#[cfg(target_os = "macos")]
578unsafe impl NSEventSKNodeEvent for NSEvent {}