use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
pub type CAShapeLayerFillRule = NSString;
pub type CAShapeLayerLineJoin = NSString;
pub type CAShapeLayerLineCap = NSString;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CALayer")]
pub struct CAShapeLayer;
#[cfg(feature = "CALayer")]
unsafe impl ClassType for CAShapeLayer {
#[inherits(NSObject)]
type Super = CALayer;
type Mutability = InteriorMutable;
}
);
#[cfg(all(feature = "CALayer", feature = "CAMediaTiming"))]
unsafe impl CAMediaTiming for CAShapeLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSCoding for CAShapeLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSObjectProtocol for CAShapeLayer {}
#[cfg(feature = "CALayer")]
unsafe impl NSSecureCoding for CAShapeLayer {}
extern_methods!(
#[cfg(feature = "CALayer")]
unsafe impl CAShapeLayer {
#[method_id(@__retain_semantics Other fillRule)]
pub unsafe fn fillRule(&self) -> Retained<CAShapeLayerFillRule>;
#[method(setFillRule:)]
pub unsafe fn setFillRule(&self, fill_rule: &CAShapeLayerFillRule);
#[method(strokeStart)]
pub unsafe fn strokeStart(&self) -> CGFloat;
#[method(setStrokeStart:)]
pub unsafe fn setStrokeStart(&self, stroke_start: CGFloat);
#[method(strokeEnd)]
pub unsafe fn strokeEnd(&self) -> CGFloat;
#[method(setStrokeEnd:)]
pub unsafe fn setStrokeEnd(&self, stroke_end: CGFloat);
#[method(lineWidth)]
pub unsafe fn lineWidth(&self) -> CGFloat;
#[method(setLineWidth:)]
pub unsafe fn setLineWidth(&self, line_width: CGFloat);
#[method(miterLimit)]
pub unsafe fn miterLimit(&self) -> CGFloat;
#[method(setMiterLimit:)]
pub unsafe fn setMiterLimit(&self, miter_limit: CGFloat);
#[method_id(@__retain_semantics Other lineCap)]
pub unsafe fn lineCap(&self) -> Retained<CAShapeLayerLineCap>;
#[method(setLineCap:)]
pub unsafe fn setLineCap(&self, line_cap: &CAShapeLayerLineCap);
#[method_id(@__retain_semantics Other lineJoin)]
pub unsafe fn lineJoin(&self) -> Retained<CAShapeLayerLineJoin>;
#[method(setLineJoin:)]
pub unsafe fn setLineJoin(&self, line_join: &CAShapeLayerLineJoin);
#[method(lineDashPhase)]
pub unsafe fn lineDashPhase(&self) -> CGFloat;
#[method(setLineDashPhase:)]
pub unsafe fn setLineDashPhase(&self, line_dash_phase: CGFloat);
#[method_id(@__retain_semantics Other lineDashPattern)]
pub unsafe fn lineDashPattern(&self) -> Option<Retained<NSArray<NSNumber>>>;
#[method(setLineDashPattern:)]
pub unsafe fn setLineDashPattern(&self, line_dash_pattern: Option<&NSArray<NSNumber>>);
}
);
extern_methods!(
#[cfg(feature = "CALayer")]
unsafe impl CAShapeLayer {
#[method_id(@__retain_semantics Other layer)]
pub unsafe fn layer() -> Retained<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[method_id(@__retain_semantics Init initWithLayer:)]
pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
}
);
extern_methods!(
#[cfg(feature = "CALayer")]
unsafe impl CAShapeLayer {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);
extern "C" {
pub static kCAFillRuleNonZero: &'static CAShapeLayerFillRule;
}
extern "C" {
pub static kCAFillRuleEvenOdd: &'static CAShapeLayerFillRule;
}
extern "C" {
pub static kCALineJoinMiter: &'static CAShapeLayerLineJoin;
}
extern "C" {
pub static kCALineJoinRound: &'static CAShapeLayerLineJoin;
}
extern "C" {
pub static kCALineJoinBevel: &'static CAShapeLayerLineJoin;
}
extern "C" {
pub static kCALineCapButt: &'static CAShapeLayerLineCap;
}
extern "C" {
pub static kCALineCapRound: &'static CAShapeLayerLineCap;
}
extern "C" {
pub static kCALineCapSquare: &'static CAShapeLayerLineCap;
}