objc2-sprite-kit 0.3.2

Bindings to the SpriteKit framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// A SpriteKit node used to render a 2D array of textured sprites. Uses SKTileSet to determine what textures it can use to render. Separate tile map nodes can be layered on top of one another to achieve various effects, such as parallax scrolling.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/spritekit/sktilemapnode?language=objc)
    #[unsafe(super(SKNode, NSResponder, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
    #[cfg(target_os = "macos")]
    pub struct SKTileMapNode;
);

#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
    unsafe impl NSCoding for SKTileMapNode {}
);

#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
    unsafe impl NSCopying for SKTileMapNode {}
);

#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
unsafe impl CopyingHelper for SKTileMapNode {
    type Result = Self;
}

#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
    unsafe impl NSObjectProtocol for SKTileMapNode {}
);

#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
    unsafe impl NSSecureCoding for SKTileMapNode {}
);

#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl SKTileMapNode {
    extern_methods!(
        #[cfg(all(feature = "SKTileSet", feature = "objc2-core-foundation"))]
        /// Create a tile map node with the specified tile set and dimensions. The tiles of the map will be empty, equivalent to the nil tile definition/group.
        ///
        /// Parameter `tileSet`: the tile set that is used to render the tiles
        ///
        /// Parameter `columns`: the number of columns in the map that can hold tiles
        ///
        /// Parameter `rows`: the number of rows in the map that can hold tiles
        ///
        /// Parameter `tileSize`: the size of each tile in points
        #[unsafe(method(tileMapNodeWithTileSet:columns:rows:tileSize:))]
        #[unsafe(method_family = none)]
        pub unsafe fn tileMapNodeWithTileSet_columns_rows_tileSize(
            tile_set: &SKTileSet,
            columns: NSUInteger,
            rows: NSUInteger,
            tile_size: CGSize,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[cfg(all(feature = "SKTileSet", feature = "objc2-core-foundation"))]
        /// Create a tile map node with the specified tile set and dimensions, and fill it with the specified tile group.
        ///
        /// Parameter `tileSet`: the tile set that is used to render the tiles
        ///
        /// Parameter `columns`: the number of columns in the map that can hold tiles
        ///
        /// Parameter `rows`: the number of rows in the map that can hold tiles
        ///
        /// Parameter `tileSize`: the size of each tile in points
        ///
        /// Parameter `tileGroup`: the tile group we wish to fill the tile map with
        #[unsafe(method(tileMapNodeWithTileSet:columns:rows:tileSize:fillWithTileGroup:))]
        #[unsafe(method_family = none)]
        pub unsafe fn tileMapNodeWithTileSet_columns_rows_tileSize_fillWithTileGroup(
            tile_set: &SKTileSet,
            columns: NSUInteger,
            rows: NSUInteger,
            tile_size: CGSize,
            tile_group: &SKTileGroup,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[cfg(all(feature = "SKTileSet", feature = "objc2-core-foundation"))]
        /// Create a tile map node with the specified tile set and dimensions, and fill it with a specific layout of tile groups that belong to the provided tile set. The tileGroupLayout array should match the dimensions of the tile map (i.e., the number of elements should be equal to columns * rows). Index 0 of the array maps to column 0, row 0 of the tile map. Index 1 is column 1, row 0, and so on, wrapping around to the next row once the index passes the number of columns in the tile map. If the array has fewer elements than the number of tiles in the map, the remaining tiles are initialized with the nil tile group. If the array has more elements than the number of tiles in the map, the extra tile groups are ignored.
        ///
        /// Parameter `tileSet`: the tile set that is used to render the tiles
        ///
        /// Parameter `columns`: the number of columns in the map that can hold tiles
        ///
        /// Parameter `rows`: the number of rows in the map that can hold tiles
        ///
        /// Parameter `tileSize`: the size of each tile in points
        ///
        /// Parameter `tileGroupLayout`: an array of tile groups that we want to use to fill the tile map
        #[unsafe(method(tileMapNodeWithTileSet:columns:rows:tileSize:tileGroupLayout:))]
        #[unsafe(method_family = none)]
        pub unsafe fn tileMapNodeWithTileSet_columns_rows_tileSize_tileGroupLayout(
            tile_set: &SKTileSet,
            columns: NSUInteger,
            rows: NSUInteger,
            tile_size: CGSize,
            tile_group_layout: &NSArray<SKTileGroup>,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[cfg(all(feature = "SKTileSet", feature = "objc2-core-foundation"))]
        /// Initialize a tile map node with the specified tile set and dimensions. The tiles of the map will be empty, equivalent to the nil tile definition/group.
        ///
        /// Parameter `tileSet`: the tile set that is used to render the tiles
        ///
        /// Parameter `columns`: the number of columns in the map that can hold tiles
        ///
        /// Parameter `rows`: the number of rows in the map that can hold tiles
        ///
        /// Parameter `tileSize`: the size of each tile in points
        #[unsafe(method(initWithTileSet:columns:rows:tileSize:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithTileSet_columns_rows_tileSize(
            this: Allocated<Self>,
            tile_set: &SKTileSet,
            columns: NSUInteger,
            rows: NSUInteger,
            tile_size: CGSize,
        ) -> Retained<Self>;

        #[cfg(all(feature = "SKTileSet", feature = "objc2-core-foundation"))]
        /// Initialize a tile map node with the specified tile set and dimensions, and fill it with the specified tile group.
        ///
        /// Parameter `tileSet`: the tile set that is used to render the tiles
        ///
        /// Parameter `columns`: the number of columns in the map that can hold tiles
        ///
        /// Parameter `rows`: the number of rows in the map that can hold tiles
        ///
        /// Parameter `tileSize`: the size of each tile in points
        ///
        /// Parameter `tileGroup`: the tile group we wish to fill the tile map with
        #[unsafe(method(initWithTileSet:columns:rows:tileSize:fillWithTileGroup:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithTileSet_columns_rows_tileSize_fillWithTileGroup(
            this: Allocated<Self>,
            tile_set: &SKTileSet,
            columns: NSUInteger,
            rows: NSUInteger,
            tile_size: CGSize,
            tile_group: &SKTileGroup,
        ) -> Retained<Self>;

        #[cfg(all(feature = "SKTileSet", feature = "objc2-core-foundation"))]
        /// Initialize a tile map node with the specified tile set and dimensions, and fill it with a specific layout of tile groups that belong to the provided tile set. The tileGroupLayout array should match the dimensions of the tile map (i.e., the number of elements should be equal to columns * rows). Index 0 of the array maps to column 0, row 0 of the tile map. Index 1 is column 1, row 0, and so on, wrapping around to the next row once the index passes the number of columns in the tile map. If the array has fewer elements than the number of tiles in the map, the remaining tiles are initialized with the nil tile group. If the array has more elements than the number of tiles in the map, the extra tile groups are ignored.
        ///
        /// Parameter `tileSet`: the tile set that is used to render the tiles
        ///
        /// Parameter `columns`: the number of columns in the map that can hold tiles
        ///
        /// Parameter `rows`: the number of rows in the map that can hold tiles
        ///
        /// Parameter `tileSize`: the size of each tile in points
        ///
        /// Parameter `tileGroupLayout`: an array of tile groups that we want to use to fill the tile map
        #[unsafe(method(initWithTileSet:columns:rows:tileSize:tileGroupLayout:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithTileSet_columns_rows_tileSize_tileGroupLayout(
            this: Allocated<Self>,
            tile_set: &SKTileSet,
            columns: NSUInteger,
            rows: NSUInteger,
            tile_size: CGSize,
            tile_group_layout: &NSArray<SKTileGroup>,
        ) -> Retained<Self>;

        /// The number of columns in the tile map.
        #[unsafe(method(numberOfColumns))]
        #[unsafe(method_family = none)]
        pub unsafe fn numberOfColumns(&self) -> NSUInteger;

        /// Setter for [`numberOfColumns`][Self::numberOfColumns].
        #[unsafe(method(setNumberOfColumns:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setNumberOfColumns(&self, number_of_columns: NSUInteger);

        /// The number of rows in the tile map.
        #[unsafe(method(numberOfRows))]
        #[unsafe(method_family = none)]
        pub unsafe fn numberOfRows(&self) -> NSUInteger;

        /// Setter for [`numberOfRows`][Self::numberOfRows].
        #[unsafe(method(setNumberOfRows:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setNumberOfRows(&self, number_of_rows: NSUInteger);

        #[cfg(feature = "objc2-core-foundation")]
        /// The size of each tile in the map.
        #[unsafe(method(tileSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn tileSize(&self) -> CGSize;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`tileSize`][Self::tileSize].
        #[unsafe(method(setTileSize:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTileSize(&self, tile_size: CGSize);

        #[cfg(feature = "objc2-core-foundation")]
        /// The size of the tile map. This is dependent on the tileSize, the number of columns and rows in the map, and the tile set type.
        #[unsafe(method(mapSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn mapSize(&self) -> CGSize;

        #[cfg(feature = "SKTileSet")]
        /// The tile set being used by this tile map.
        #[unsafe(method(tileSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn tileSet(&self) -> Retained<SKTileSet>;

        #[cfg(feature = "SKTileSet")]
        /// Setter for [`tileSet`][Self::tileSet].
        #[unsafe(method(setTileSet:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTileSet(&self, tile_set: &SKTileSet);

        #[cfg(feature = "objc2-core-foundation")]
        /// Controls the blending between the texture and the tile map color. The valid interval of values is from 0.0 up to and including 1.0. A value above or below that interval is clamped to the minimum (0.0) if below or the maximum (1.0) if above.
        #[unsafe(method(colorBlendFactor))]
        #[unsafe(method_family = none)]
        pub unsafe fn colorBlendFactor(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`colorBlendFactor`][Self::colorBlendFactor].
        #[unsafe(method(setColorBlendFactor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setColorBlendFactor(&self, color_blend_factor: CGFloat);

        /// Base color for the tile map (If no texture is present, the color still is drawn).
        #[unsafe(method(color))]
        #[unsafe(method_family = none)]
        pub unsafe fn color(&self) -> Retained<NSColor>;

        /// Setter for [`color`][Self::color].
        #[unsafe(method(setColor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setColor(&self, color: &NSColor);

        /// Sets the blend mode to use when composing the tile map with the final framebuffer.
        ///
        /// See: SKNode.SKBlendMode
        #[unsafe(method(blendMode))]
        #[unsafe(method_family = none)]
        pub unsafe fn blendMode(&self) -> SKBlendMode;

        /// Setter for [`blendMode`][Self::blendMode].
        #[unsafe(method(setBlendMode:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setBlendMode(&self, blend_mode: SKBlendMode);

        #[cfg(feature = "objc2-core-foundation")]
        /// Used to choose the location in the tile map that maps to its 'position' in the parent's coordinate space. The valid interval for each input is from 0.0 up to and including 1.0.
        #[unsafe(method(anchorPoint))]
        #[unsafe(method_family = none)]
        pub unsafe fn anchorPoint(&self) -> CGPoint;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`anchorPoint`][Self::anchorPoint].
        #[unsafe(method(setAnchorPoint:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAnchorPoint(&self, anchor_point: CGPoint);

        #[cfg(feature = "SKShader")]
        /// A property that determines whether the tile map is rendered using a custom shader.
        #[unsafe(method(shader))]
        #[unsafe(method_family = none)]
        pub unsafe fn shader(&self) -> Option<Retained<SKShader>>;

        #[cfg(feature = "SKShader")]
        /// Setter for [`shader`][Self::shader].
        #[unsafe(method(setShader:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setShader(&self, shader: Option<&SKShader>);

        #[cfg(feature = "SKAttribute")]
        /// Optional dictionary of SKAttributeValues
        /// Attributes can be used with custom SKShaders.
        #[unsafe(method(attributeValues))]
        #[unsafe(method_family = none)]
        pub unsafe fn attributeValues(&self) -> Retained<NSDictionary<NSString, SKAttributeValue>>;

        #[cfg(feature = "SKAttribute")]
        /// Setter for [`attributeValues`][Self::attributeValues].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setAttributeValues:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAttributeValues(
            &self,
            attribute_values: &NSDictionary<NSString, SKAttributeValue>,
        );

        #[cfg(feature = "SKAttribute")]
        #[unsafe(method(valueForAttributeNamed:))]
        #[unsafe(method_family = none)]
        pub unsafe fn valueForAttributeNamed(
            &self,
            key: &NSString,
        ) -> Option<Retained<SKAttributeValue>>;

        #[cfg(feature = "SKAttribute")]
        #[unsafe(method(setValue:forAttributeNamed:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setValue_forAttributeNamed(&self, value: &SKAttributeValue, key: &NSString);

        /// Bitmask to indicate being lit by a set of lights using overlapping lighting categories.
        ///
        /// A light whose category is set to a value that masks to non-zero using this mask will
        /// apply light to this sprite.
        ///
        /// When used together with a normal texture, complex lighting effects can be used.
        #[unsafe(method(lightingBitMask))]
        #[unsafe(method_family = none)]
        pub unsafe fn lightingBitMask(&self) -> u32;

        /// Setter for [`lightingBitMask`][Self::lightingBitMask].
        #[unsafe(method(setLightingBitMask:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLightingBitMask(&self, lighting_bit_mask: u32);

        #[unsafe(method(enableAutomapping))]
        #[unsafe(method_family = none)]
        pub unsafe fn enableAutomapping(&self) -> bool;

        /// Setter for [`enableAutomapping`][Self::enableAutomapping].
        #[unsafe(method(setEnableAutomapping:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setEnableAutomapping(&self, enable_automapping: bool);

        #[cfg(feature = "SKTileSet")]
        /// Fill the entire tile map with the provided tile group.
        ///
        /// Parameter `tileGroup`: the tile group that will be used to fill the map
        #[unsafe(method(fillWithTileGroup:))]
        #[unsafe(method_family = none)]
        pub unsafe fn fillWithTileGroup(&self, tile_group: Option<&SKTileGroup>);

        #[cfg(feature = "SKTileDefinition")]
        /// Look up the tile definition at the specified tile index.
        ///
        /// Parameter `column`: the column index of the tile
        ///
        /// Parameter `row`: the row index of the tile
        #[unsafe(method(tileDefinitionAtColumn:row:))]
        #[unsafe(method_family = none)]
        pub unsafe fn tileDefinitionAtColumn_row(
            &self,
            column: NSUInteger,
            row: NSUInteger,
        ) -> Option<Retained<SKTileDefinition>>;

        #[cfg(feature = "SKTileSet")]
        /// Look up the tile group at the specified tile index.
        ///
        /// Parameter `column`: the column index of the tile
        ///
        /// Parameter `row`: the row index of the tile
        #[unsafe(method(tileGroupAtColumn:row:))]
        #[unsafe(method_family = none)]
        pub unsafe fn tileGroupAtColumn_row(
            &self,
            column: NSUInteger,
            row: NSUInteger,
        ) -> Option<Retained<SKTileGroup>>;

        #[cfg(feature = "SKTileSet")]
        /// Set the tile group at the specified tile index. When automapping is enabled, the appropriate tile definitions will automatically be selected and placed, possibly modifying neighboring tiles. When automapping is disabled, it will simply place the default center tile definition for the group, and will not modify any of the neihboring tiles.
        ///
        /// Parameter `tileGroup`: the tile group we want to place in the map
        ///
        /// Parameter `column`: the column index of the tile
        ///
        /// Parameter `row`: the row index of the tile
        #[unsafe(method(setTileGroup:forColumn:row:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTileGroup_forColumn_row(
            &self,
            tile_group: Option<&SKTileGroup>,
            column: NSUInteger,
            row: NSUInteger,
        );

        #[cfg(all(feature = "SKTileDefinition", feature = "SKTileSet"))]
        /// Set the tile group and tile defintion at the specified tile index. When automapping is enabled, it will attempt to resolve the surrounding tiles to allow the specified tile definition to be placed. When automapping is disabled, it will simply place the tile definition and not modify any of the neighboring tiles.
        ///
        /// Parameter `tileGroup`: the tile group we want to place in the map
        ///
        /// Parameter `tileDefinition`: the tile definition we want to place in the map
        ///
        /// Parameter `column`: the column index of the tile
        ///
        /// Parameter `row`: the row index of the tile
        #[unsafe(method(setTileGroup:andTileDefinition:forColumn:row:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTileGroup_andTileDefinition_forColumn_row(
            &self,
            tile_group: &SKTileGroup,
            tile_definition: &SKTileDefinition,
            column: NSUInteger,
            row: NSUInteger,
        );

        #[cfg(feature = "objc2-core-foundation")]
        /// Returns the column index of the tile that lies under the specified position. Returns NSUIntegerMax if the position does not fall within the tile map.
        ///
        /// Parameter `position`: the position we want to check against the tile map
        #[unsafe(method(tileColumnIndexFromPosition:))]
        #[unsafe(method_family = none)]
        pub unsafe fn tileColumnIndexFromPosition(&self, position: CGPoint) -> NSUInteger;

        #[cfg(feature = "objc2-core-foundation")]
        /// Returns the row index of the tile that lies under the specified position. Returns NSUIntegerMax if the position does not fall within the tile map.
        ///
        /// Parameter `position`: the position we want to check against the tile map
        #[unsafe(method(tileRowIndexFromPosition:))]
        #[unsafe(method_family = none)]
        pub unsafe fn tileRowIndexFromPosition(&self, position: CGPoint) -> NSUInteger;

        #[cfg(feature = "objc2-core-foundation")]
        /// Returns the position of the center of the tile at the specified column and row.
        ///
        /// Parameter `column`: the column index of the tile
        ///
        /// Parameter `row`: the row index of the tile
        #[unsafe(method(centerOfTileAtColumn:row:))]
        #[unsafe(method_family = none)]
        pub unsafe fn centerOfTileAtColumn_row(
            &self,
            column: NSUInteger,
            row: NSUInteger,
        ) -> CGPoint;
    );
}

/// Methods declared on superclass `SKNode`.
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl SKTileMapNode {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        /// Support coding and decoding via NSKeyedArchiver.
        ///
        /// # Safety
        ///
        /// `a_decoder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            a_decoder: &NSCoder,
        ) -> Option<Retained<Self>>;

        #[unsafe(method(node))]
        #[unsafe(method_family = none)]
        pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;

        #[unsafe(method(nodeWithFileNamed:))]
        #[unsafe(method_family = none)]
        pub unsafe fn nodeWithFileNamed(
            filename: &NSString,
            mtm: MainThreadMarker,
        ) -> Option<Retained<Self>>;

        /// # Safety
        ///
        /// `classes` generic probably has further requirements.
        #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
            filename: &NSString,
            classes: &NSSet<AnyClass>,
            mtm: MainThreadMarker,
        ) -> Result<Retained<Self>, Retained<NSError>>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl SKTileMapNode {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}