1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

// NS_TYPED_ENUM
pub type CAShapeLayerFillRule = NSString;

// NS_TYPED_ENUM
pub type CAShapeLayerLineJoin = NSString;

// NS_TYPED_ENUM
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!(
    /// Methods declared on superclass `CALayer`
    #[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!(
    /// Methods declared on superclass `NSObject`
    #[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;
}