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::*;
#[cfg(feature = "objc2-core-graphics")]
use objc2_core_graphics::*;
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 SKShapeNode;
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSCoding for SKShapeNode {}
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSCopying for SKShapeNode {}
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
unsafe impl CopyingHelper for SKShapeNode {
type Result = Self;
}
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSObjectProtocol for SKShapeNode {}
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSSecureCoding for SKShapeNode {}
);
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl SKShapeNode {
extern_methods!(
#[cfg(feature = "objc2-core-graphics")]
#[unsafe(method(shapeNodeWithPath:))]
#[unsafe(method_family = none)]
pub unsafe fn shapeNodeWithPath(path: &CGPath, mtm: MainThreadMarker) -> Retained<Self>;
#[cfg(feature = "objc2-core-graphics")]
#[unsafe(method(shapeNodeWithPath:centered:))]
#[unsafe(method_family = none)]
pub unsafe fn shapeNodeWithPath_centered(
path: &CGPath,
centered: bool,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(shapeNodeWithRect:))]
#[unsafe(method_family = none)]
pub unsafe fn shapeNodeWithRect(rect: CGRect, mtm: MainThreadMarker) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(shapeNodeWithRectOfSize:))]
#[unsafe(method_family = none)]
pub unsafe fn shapeNodeWithRectOfSize(
size: CGSize,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(shapeNodeWithRect:cornerRadius:))]
#[unsafe(method_family = none)]
pub unsafe fn shapeNodeWithRect_cornerRadius(
rect: CGRect,
corner_radius: CGFloat,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(shapeNodeWithRectOfSize:cornerRadius:))]
#[unsafe(method_family = none)]
pub unsafe fn shapeNodeWithRectOfSize_cornerRadius(
size: CGSize,
corner_radius: CGFloat,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(shapeNodeWithCircleOfRadius:))]
#[unsafe(method_family = none)]
pub unsafe fn shapeNodeWithCircleOfRadius(
radius: CGFloat,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(shapeNodeWithEllipseInRect:))]
#[unsafe(method_family = none)]
pub unsafe fn shapeNodeWithEllipseInRect(
rect: CGRect,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(shapeNodeWithEllipseOfSize:))]
#[unsafe(method_family = none)]
pub unsafe fn shapeNodeWithEllipseOfSize(
size: CGSize,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(shapeNodeWithPoints:count:))]
#[unsafe(method_family = none)]
pub unsafe fn shapeNodeWithPoints_count(
points: NonNull<CGPoint>,
num_points: usize,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(shapeNodeWithSplinePoints:count:))]
#[unsafe(method_family = none)]
pub unsafe fn shapeNodeWithSplinePoints_count(
points: NonNull<CGPoint>,
num_points: usize,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-graphics")]
#[unsafe(method(path))]
#[unsafe(method_family = none)]
pub unsafe fn path(&self) -> Option<Retained<CGPath>>;
#[cfg(feature = "objc2-core-graphics")]
#[unsafe(method(setPath:))]
#[unsafe(method_family = none)]
pub unsafe fn setPath(&self, path: Option<&CGPath>);
#[unsafe(method(strokeColor))]
#[unsafe(method_family = none)]
pub unsafe fn strokeColor(&self) -> Retained<NSColor>;
#[unsafe(method(setStrokeColor:))]
#[unsafe(method_family = none)]
pub unsafe fn setStrokeColor(&self, stroke_color: &NSColor);
#[unsafe(method(fillColor))]
#[unsafe(method_family = none)]
pub unsafe fn fillColor(&self) -> Retained<NSColor>;
#[unsafe(method(setFillColor:))]
#[unsafe(method_family = none)]
pub unsafe fn setFillColor(&self, fill_color: &NSColor);
#[unsafe(method(blendMode))]
#[unsafe(method_family = none)]
pub unsafe fn blendMode(&self) -> SKBlendMode;
#[unsafe(method(setBlendMode:))]
#[unsafe(method_family = none)]
pub unsafe fn setBlendMode(&self, blend_mode: SKBlendMode);
#[unsafe(method(isAntialiased))]
#[unsafe(method_family = none)]
pub unsafe fn isAntialiased(&self) -> bool;
#[unsafe(method(setAntialiased:))]
#[unsafe(method_family = none)]
pub unsafe fn setAntialiased(&self, antialiased: bool);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(lineWidth))]
#[unsafe(method_family = none)]
pub unsafe fn lineWidth(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setLineWidth:))]
#[unsafe(method_family = none)]
pub unsafe fn setLineWidth(&self, line_width: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(glowWidth))]
#[unsafe(method_family = none)]
pub unsafe fn glowWidth(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setGlowWidth:))]
#[unsafe(method_family = none)]
pub unsafe fn setGlowWidth(&self, glow_width: CGFloat);
#[cfg(feature = "objc2-core-graphics")]
#[unsafe(method(lineCap))]
#[unsafe(method_family = none)]
pub unsafe fn lineCap(&self) -> CGLineCap;
#[cfg(feature = "objc2-core-graphics")]
#[unsafe(method(setLineCap:))]
#[unsafe(method_family = none)]
pub unsafe fn setLineCap(&self, line_cap: CGLineCap);
#[cfg(feature = "objc2-core-graphics")]
#[unsafe(method(lineJoin))]
#[unsafe(method_family = none)]
pub unsafe fn lineJoin(&self) -> CGLineJoin;
#[cfg(feature = "objc2-core-graphics")]
#[unsafe(method(setLineJoin:))]
#[unsafe(method_family = none)]
pub unsafe fn setLineJoin(&self, line_join: CGLineJoin);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(miterLimit))]
#[unsafe(method_family = none)]
pub unsafe fn miterLimit(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setMiterLimit:))]
#[unsafe(method_family = none)]
pub unsafe fn setMiterLimit(&self, miter_limit: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(lineLength))]
#[unsafe(method_family = none)]
pub unsafe fn lineLength(&self) -> CGFloat;
#[cfg(feature = "SKTexture")]
#[unsafe(method(fillTexture))]
#[unsafe(method_family = none)]
pub unsafe fn fillTexture(&self) -> Option<Retained<SKTexture>>;
#[cfg(feature = "SKTexture")]
#[unsafe(method(setFillTexture:))]
#[unsafe(method_family = none)]
pub unsafe fn setFillTexture(&self, fill_texture: Option<&SKTexture>);
#[cfg(feature = "SKShader")]
#[unsafe(method(fillShader))]
#[unsafe(method_family = none)]
pub unsafe fn fillShader(&self) -> Option<Retained<SKShader>>;
#[cfg(feature = "SKShader")]
#[unsafe(method(setFillShader:))]
#[unsafe(method_family = none)]
pub unsafe fn setFillShader(&self, fill_shader: Option<&SKShader>);
#[cfg(feature = "SKTexture")]
#[unsafe(method(strokeTexture))]
#[unsafe(method_family = none)]
pub unsafe fn strokeTexture(&self) -> Option<Retained<SKTexture>>;
#[cfg(feature = "SKTexture")]
#[unsafe(method(setStrokeTexture:))]
#[unsafe(method_family = none)]
pub unsafe fn setStrokeTexture(&self, stroke_texture: Option<&SKTexture>);
#[cfg(feature = "SKShader")]
#[unsafe(method(strokeShader))]
#[unsafe(method_family = none)]
pub unsafe fn strokeShader(&self) -> Option<Retained<SKShader>>;
#[cfg(feature = "SKShader")]
#[unsafe(method(setStrokeShader:))]
#[unsafe(method_family = none)]
pub unsafe fn setStrokeShader(&self, stroke_shader: Option<&SKShader>);
#[cfg(feature = "SKAttribute")]
#[unsafe(method(attributeValues))]
#[unsafe(method_family = none)]
pub unsafe fn attributeValues(&self) -> Retained<NSDictionary<NSString, SKAttributeValue>>;
#[cfg(feature = "SKAttribute")]
#[unsafe(method(setAttributeValues:))]
#[unsafe(method_family = none)]
pub unsafe fn setAttributeValues(
&self,
attribute_values: &NSDictionary<NSString, SKAttributeValue>,
);
#[cfg(feature = "SKAttribute")]
#[unsafe(method(valueForAttributeNamed:))]
#[unsafe(method_family = none)]
pub unsafe fn valueForAttributeNamed(
&self,
key: &NSString,
) -> Option<Retained<SKAttributeValue>>;
#[cfg(feature = "SKAttribute")]
#[unsafe(method(setValue:forAttributeNamed:))]
#[unsafe(method_family = none)]
pub unsafe fn setValue_forAttributeNamed(&self, value: &SKAttributeValue, key: &NSString);
);
}
#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl SKShapeNode {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
a_decoder: &NSCoder,
) -> Option<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 SKShapeNode {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}