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:))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn atlasWithDictionary(
38 properties: &NSDictionary<NSString, AnyObject>,
39 ) -> Retained<Self>;
40
41 #[cfg(feature = "SKTexture")]
42 #[unsafe(method(textureNamed:))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn textureNamed(&self, name: &NSString) -> Retained<SKTexture>;
45
46 #[cfg(feature = "block2")]
47 #[unsafe(method(preloadTextureAtlases:withCompletionHandler:))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn preloadTextureAtlases_withCompletionHandler(
56 texture_atlases: &NSArray<SKTextureAtlas>,
57 completion_handler: &block2::DynBlock<dyn Fn()>,
58 );
59
60 #[cfg(feature = "block2")]
61 #[unsafe(method(preloadTextureAtlasesNamed:withCompletionHandler:))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn preloadTextureAtlasesNamed_withCompletionHandler(
72 atlas_names: &NSArray<NSString>,
73 completion_handler: &block2::DynBlock<
74 dyn Fn(*mut NSError, NonNull<NSArray<SKTextureAtlas>>),
75 >,
76 );
77
78 #[cfg(feature = "block2")]
79 #[unsafe(method(preloadWithCompletionHandler:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn preloadWithCompletionHandler(
83 &self,
84 completion_handler: &block2::DynBlock<dyn Fn()>,
85 );
86
87 #[unsafe(method(textureNames))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn textureNames(&self) -> Retained<NSArray<NSString>>;
90 );
91}
92
93impl SKTextureAtlas {
95 extern_methods!(
96 #[unsafe(method(init))]
97 #[unsafe(method_family = init)]
98 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
99
100 #[unsafe(method(new))]
101 #[unsafe(method_family = new)]
102 pub unsafe fn new() -> Retained<Self>;
103 );
104}