use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SKTextureAtlas;
);
extern_conformance!(
unsafe impl NSCoding for SKTextureAtlas {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for SKTextureAtlas {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SKTextureAtlas {}
);
impl SKTextureAtlas {
extern_methods!(
#[unsafe(method(atlasNamed:))]
#[unsafe(method_family = none)]
pub unsafe fn atlasNamed(name: &NSString) -> Retained<Self>;
#[unsafe(method(atlasWithDictionary:))]
#[unsafe(method_family = none)]
pub unsafe fn atlasWithDictionary(
properties: &NSDictionary<NSString, AnyObject>,
) -> Retained<Self>;
#[cfg(feature = "SKTexture")]
#[unsafe(method(textureNamed:))]
#[unsafe(method_family = none)]
pub unsafe fn textureNamed(&self, name: &NSString) -> Retained<SKTexture>;
#[cfg(feature = "block2")]
#[unsafe(method(preloadTextureAtlases:withCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn preloadTextureAtlases_withCompletionHandler(
texture_atlases: &NSArray<SKTextureAtlas>,
completion_handler: &block2::DynBlock<dyn Fn()>,
);
#[cfg(feature = "block2")]
#[unsafe(method(preloadTextureAtlasesNamed:withCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn preloadTextureAtlasesNamed_withCompletionHandler(
atlas_names: &NSArray<NSString>,
completion_handler: &block2::DynBlock<
dyn Fn(*mut NSError, NonNull<NSArray<SKTextureAtlas>>),
>,
);
#[cfg(feature = "block2")]
#[unsafe(method(preloadWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn preloadWithCompletionHandler(
&self,
completion_handler: &block2::DynBlock<dyn Fn()>,
);
#[unsafe(method(textureNames))]
#[unsafe(method_family = none)]
pub unsafe fn textureNames(&self) -> Retained<NSArray<NSString>>;
);
}
impl SKTextureAtlas {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}