icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::CoreAnimation::*;
use crate::Foundation::*;

typed_enum!(
    pub type CAShapeLayerFillRule = NSString;
);

typed_enum!(
    pub type CAShapeLayerLineJoin = NSString;
);

typed_enum!(
    pub type CAShapeLayerLineCap = NSString;
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CoreAnimation_CAShapeLayer")]
    pub struct CAShapeLayer;

    #[cfg(feature = "CoreAnimation_CAShapeLayer")]
    unsafe impl ClassType for CAShapeLayer {
        #[inherits(NSObject)]
        type Super = CALayer;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "CoreAnimation_CAShapeLayer")]
unsafe impl CAMediaTiming for CAShapeLayer {}

#[cfg(feature = "CoreAnimation_CAShapeLayer")]
unsafe impl NSCoding for CAShapeLayer {}

#[cfg(feature = "CoreAnimation_CAShapeLayer")]
unsafe impl NSObjectProtocol for CAShapeLayer {}

#[cfg(feature = "CoreAnimation_CAShapeLayer")]
unsafe impl NSSecureCoding for CAShapeLayer {}

extern_methods!(
    #[cfg(feature = "CoreAnimation_CAShapeLayer")]
    unsafe impl CAShapeLayer {
        #[method_id(@__retain_semantics Other fillRule)]
        pub unsafe fn fillRule(&self) -> Id<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) -> Id<CAShapeLayerLineCap>;

        #[method(setLineCap:)]
        pub unsafe fn setLineCap(&self, line_cap: &CAShapeLayerLineCap);

        #[method_id(@__retain_semantics Other lineJoin)]
        pub unsafe fn lineJoin(&self) -> Id<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);

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))]
        #[method_id(@__retain_semantics Other lineDashPattern)]
        pub unsafe fn lineDashPattern(&self) -> Option<Id<NSArray<NSNumber>>>;

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))]
        #[method(setLineDashPattern:)]
        pub unsafe fn setLineDashPattern(&self, line_dash_pattern: Option<&NSArray<NSNumber>>);
    }
);

extern_methods!(
    /// Methods declared on superclass `CALayer`
    #[cfg(feature = "CoreAnimation_CAShapeLayer")]
    unsafe impl CAShapeLayer {
        #[method_id(@__retain_semantics Other layer)]
        pub unsafe fn layer() -> Id<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics Init initWithLayer:)]
        pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "CoreAnimation_CAShapeLayer")]
    unsafe impl CAShapeLayer {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_static!(kCAFillRuleNonZero: &'static CAShapeLayerFillRule);

extern_static!(kCAFillRuleEvenOdd: &'static CAShapeLayerFillRule);

extern_static!(kCALineJoinMiter: &'static CAShapeLayerLineJoin);

extern_static!(kCALineJoinRound: &'static CAShapeLayerLineJoin);

extern_static!(kCALineJoinBevel: &'static CAShapeLayerLineJoin);

extern_static!(kCALineCapButt: &'static CAShapeLayerLineCap);

extern_static!(kCALineCapRound: &'static CAShapeLayerLineCap);

extern_static!(kCALineCapSquare: &'static CAShapeLayerLineCap);