use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(SKNode, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
pub struct SKReferenceNode;
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSCoding for SKReferenceNode {}
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSCopying for SKReferenceNode {}
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
unsafe impl CopyingHelper for SKReferenceNode {
type Result = Self;
}
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSObjectProtocol for SKReferenceNode {}
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSSecureCoding for SKReferenceNode {}
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl SKReferenceNode {
extern_methods!(
#[unsafe(method(initWithURL:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithURL(this: Allocated<Self>, url: Option<&NSURL>) -> Retained<Self>;
#[unsafe(method(initWithFileNamed:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithFileNamed(
this: Allocated<Self>,
file_name: Option<&NSString>,
) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
a_decoder: &NSCoder,
) -> Option<Retained<Self>>;
#[unsafe(method(referenceNodeWithFileNamed:))]
#[unsafe(method_family = none)]
pub unsafe fn referenceNodeWithFileNamed(
file_name: &NSString,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[unsafe(method(referenceNodeWithURL:))]
#[unsafe(method_family = none)]
pub unsafe fn referenceNodeWithURL(
reference_url: &NSURL,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[unsafe(method(didLoadReferenceNode:))]
#[unsafe(method_family = none)]
pub unsafe fn didLoadReferenceNode(&self, node: Option<&SKNode>);
#[unsafe(method(resolveReferenceNode))]
#[unsafe(method_family = none)]
pub unsafe fn resolveReferenceNode(&self);
);
}
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl SKReferenceNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> 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>>;
#[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>>;
);
}
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl SKReferenceNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}