objc2_sprite_kit/generated/
SKTextureAtlas.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct SKTextureAtlas;
15);
16
17extern_conformance!(
18 unsafe impl NSCoding for SKTextureAtlas {}
19);
20
21extern_conformance!(
22 unsafe impl NSObjectProtocol for SKTextureAtlas {}
23);
24
25extern_conformance!(
26 unsafe impl NSSecureCoding for SKTextureAtlas {}
27);
28
29impl SKTextureAtlas {
30 extern_methods!(
31 #[unsafe(method(atlasNamed:))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn atlasNamed(name: &NSString) -> Retained<Self>;
34
35 #[unsafe(method(atlasWithDictionary:))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn atlasWithDictionary(
41 properties: &NSDictionary<NSString, AnyObject>,
42 ) -> Retained<Self>;
43
44 #[cfg(feature = "SKTexture")]
45 #[unsafe(method(textureNamed:))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn textureNamed(&self, name: &NSString) -> Retained<SKTexture>;
48
49 #[cfg(feature = "block2")]
50 #[unsafe(method(preloadTextureAtlases:withCompletionHandler:))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn preloadTextureAtlases_withCompletionHandler(
59 texture_atlases: &NSArray<SKTextureAtlas>,
60 completion_handler: &block2::DynBlock<dyn Fn()>,
61 );
62
63 #[cfg(feature = "block2")]
64 #[unsafe(method(preloadTextureAtlasesNamed:withCompletionHandler:))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn preloadTextureAtlasesNamed_withCompletionHandler(
75 atlas_names: &NSArray<NSString>,
76 completion_handler: &block2::DynBlock<
77 dyn Fn(*mut NSError, NonNull<NSArray<SKTextureAtlas>>),
78 >,
79 );
80
81 #[cfg(feature = "block2")]
82 #[unsafe(method(preloadWithCompletionHandler:))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn preloadWithCompletionHandler(
86 &self,
87 completion_handler: &block2::DynBlock<dyn Fn()>,
88 );
89
90 #[unsafe(method(textureNames))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn textureNames(&self) -> Retained<NSArray<NSString>>;
93 );
94}
95
96impl SKTextureAtlas {
98 extern_methods!(
99 #[unsafe(method(init))]
100 #[unsafe(method_family = init)]
101 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
102
103 #[unsafe(method(new))]
104 #[unsafe(method_family = new)]
105 pub unsafe fn new() -> Retained<Self>;
106 );
107}