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!(
#[unsafe(super(SKNode, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
pub struct SK3DNode;
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSCoding for SK3DNode {}
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSCopying for SK3DNode {}
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
unsafe impl CopyingHelper for SK3DNode {
type Result = Self;
}
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSObjectProtocol for SK3DNode {}
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSSecureCoding for SK3DNode {}
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl SK3DNode {
extern_methods!(
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(initWithViewportSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithViewportSize(
this: Allocated<Self>,
viewport_size: CGSize,
) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
a_decoder: &NSCoder,
) -> Option<Retained<Self>>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(nodeWithViewportSize:))]
#[unsafe(method_family = none)]
pub unsafe fn nodeWithViewportSize(
viewport_size: CGSize,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(viewportSize))]
#[unsafe(method_family = none)]
pub unsafe fn viewportSize(&self) -> CGSize;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setViewportSize:))]
#[unsafe(method_family = none)]
pub unsafe fn setViewportSize(&self, viewport_size: CGSize);
#[unsafe(method(sceneTime))]
#[unsafe(method_family = none)]
pub unsafe fn sceneTime(&self) -> NSTimeInterval;
#[unsafe(method(setSceneTime:))]
#[unsafe(method_family = none)]
pub unsafe fn setSceneTime(&self, scene_time: NSTimeInterval);
#[unsafe(method(isPlaying))]
#[unsafe(method_family = none)]
pub unsafe fn isPlaying(&self) -> bool;
#[unsafe(method(setPlaying:))]
#[unsafe(method_family = none)]
pub unsafe fn setPlaying(&self, playing: bool);
#[unsafe(method(loops))]
#[unsafe(method_family = none)]
pub unsafe fn loops(&self) -> bool;
#[unsafe(method(setLoops:))]
#[unsafe(method_family = none)]
pub unsafe fn setLoops(&self, loops: bool);
#[unsafe(method(autoenablesDefaultLighting))]
#[unsafe(method_family = none)]
pub unsafe fn autoenablesDefaultLighting(&self) -> bool;
#[unsafe(method(setAutoenablesDefaultLighting:))]
#[unsafe(method_family = none)]
pub unsafe fn setAutoenablesDefaultLighting(&self, autoenables_default_lighting: bool);
);
}
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl SK3DNode {
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 SK3DNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}