objc2_app_kit/generated/
NSBezierPath.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-core-graphics")]
9#[cfg(target_vendor = "apple")]
10use objc2_core_graphics::*;
11use objc2_foundation::*;
12
13use crate::*;
14
15/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nslinecapstyle?language=objc)
16// NS_ENUM
17#[repr(transparent)]
18#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
19pub struct NSLineCapStyle(pub NSUInteger);
20impl NSLineCapStyle {
21    #[doc(alias = "NSLineCapStyleButt")]
22    pub const Butt: Self = Self(0);
23    #[doc(alias = "NSLineCapStyleRound")]
24    pub const Round: Self = Self(1);
25    #[doc(alias = "NSLineCapStyleSquare")]
26    pub const Square: Self = Self(2);
27}
28
29unsafe impl Encode for NSLineCapStyle {
30    const ENCODING: Encoding = NSUInteger::ENCODING;
31}
32
33unsafe impl RefEncode for NSLineCapStyle {
34    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
35}
36
37/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nslinejoinstyle?language=objc)
38// NS_ENUM
39#[repr(transparent)]
40#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
41pub struct NSLineJoinStyle(pub NSUInteger);
42impl NSLineJoinStyle {
43    #[doc(alias = "NSLineJoinStyleMiter")]
44    pub const Miter: Self = Self(0);
45    #[doc(alias = "NSLineJoinStyleRound")]
46    pub const Round: Self = Self(1);
47    #[doc(alias = "NSLineJoinStyleBevel")]
48    pub const Bevel: Self = Self(2);
49}
50
51unsafe impl Encode for NSLineJoinStyle {
52    const ENCODING: Encoding = NSUInteger::ENCODING;
53}
54
55unsafe impl RefEncode for NSLineJoinStyle {
56    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
57}
58
59/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nswindingrule?language=objc)
60// NS_ENUM
61#[repr(transparent)]
62#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
63pub struct NSWindingRule(pub NSUInteger);
64impl NSWindingRule {
65    #[doc(alias = "NSWindingRuleNonZero")]
66    pub const NonZero: Self = Self(0);
67    #[doc(alias = "NSWindingRuleEvenOdd")]
68    pub const EvenOdd: Self = Self(1);
69}
70
71unsafe impl Encode for NSWindingRule {
72    const ENCODING: Encoding = NSUInteger::ENCODING;
73}
74
75unsafe impl RefEncode for NSWindingRule {
76    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
77}
78
79/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsbezierpathelement?language=objc)
80// NS_ENUM
81#[repr(transparent)]
82#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
83pub struct NSBezierPathElement(pub NSUInteger);
84impl NSBezierPathElement {
85    #[doc(alias = "NSBezierPathElementMoveTo")]
86    pub const MoveTo: Self = Self(0);
87    #[doc(alias = "NSBezierPathElementLineTo")]
88    pub const LineTo: Self = Self(1);
89    #[doc(alias = "NSBezierPathElementCubicCurveTo")]
90    pub const CubicCurveTo: Self = Self(2);
91    #[doc(alias = "NSBezierPathElementClosePath")]
92    pub const ClosePath: Self = Self(3);
93    #[doc(alias = "NSBezierPathElementQuadraticCurveTo")]
94    pub const QuadraticCurveTo: Self = Self(4);
95    #[doc(alias = "NSBezierPathElementCurveTo")]
96    #[deprecated]
97    pub const CurveTo: Self = Self(NSBezierPathElement::CubicCurveTo.0);
98}
99
100unsafe impl Encode for NSBezierPathElement {
101    const ENCODING: Encoding = NSUInteger::ENCODING;
102}
103
104unsafe impl RefEncode for NSBezierPathElement {
105    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
106}
107
108extern_class!(
109    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsbezierpath?language=objc)
110    #[unsafe(super(NSObject))]
111    #[derive(Debug, PartialEq, Eq, Hash)]
112    pub struct NSBezierPath;
113);
114
115extern_conformance!(
116    unsafe impl NSCoding for NSBezierPath {}
117);
118
119extern_conformance!(
120    unsafe impl NSCopying for NSBezierPath {}
121);
122
123unsafe impl CopyingHelper for NSBezierPath {
124    type Result = Self;
125}
126
127extern_conformance!(
128    unsafe impl NSObjectProtocol for NSBezierPath {}
129);
130
131extern_conformance!(
132    unsafe impl NSSecureCoding for NSBezierPath {}
133);
134
135impl NSBezierPath {
136    extern_methods!(
137        #[unsafe(method(bezierPath))]
138        #[unsafe(method_family = none)]
139        pub fn bezierPath() -> Retained<NSBezierPath>;
140
141        #[unsafe(method(bezierPathWithRect:))]
142        #[unsafe(method_family = none)]
143        pub fn bezierPathWithRect(rect: NSRect) -> Retained<NSBezierPath>;
144
145        #[unsafe(method(bezierPathWithOvalInRect:))]
146        #[unsafe(method_family = none)]
147        pub fn bezierPathWithOvalInRect(rect: NSRect) -> Retained<NSBezierPath>;
148
149        #[cfg(feature = "objc2-core-foundation")]
150        #[unsafe(method(bezierPathWithRoundedRect:xRadius:yRadius:))]
151        #[unsafe(method_family = none)]
152        pub fn bezierPathWithRoundedRect_xRadius_yRadius(
153            rect: NSRect,
154            x_radius: CGFloat,
155            y_radius: CGFloat,
156        ) -> Retained<NSBezierPath>;
157
158        #[cfg(feature = "objc2-core-graphics")]
159        #[cfg(target_vendor = "apple")]
160        #[unsafe(method(bezierPathWithCGPath:))]
161        #[unsafe(method_family = none)]
162        pub fn bezierPathWithCGPath(cg_path: &CGPath) -> Retained<NSBezierPath>;
163
164        #[cfg(feature = "objc2-core-graphics")]
165        #[cfg(target_vendor = "apple")]
166        #[unsafe(method(CGPath))]
167        #[unsafe(method_family = none)]
168        pub fn CGPath(&self) -> Retained<CGPath>;
169
170        #[cfg(feature = "objc2-core-graphics")]
171        #[cfg(target_vendor = "apple")]
172        /// Setter for [`CGPath`][Self::CGPath].
173        #[unsafe(method(setCGPath:))]
174        #[unsafe(method_family = none)]
175        pub fn setCGPath(&self, cg_path: &CGPath);
176
177        #[unsafe(method(fillRect:))]
178        #[unsafe(method_family = none)]
179        pub fn fillRect(rect: NSRect);
180
181        #[unsafe(method(strokeRect:))]
182        #[unsafe(method_family = none)]
183        pub fn strokeRect(rect: NSRect);
184
185        #[unsafe(method(clipRect:))]
186        #[unsafe(method_family = none)]
187        pub fn clipRect(rect: NSRect);
188
189        #[unsafe(method(strokeLineFromPoint:toPoint:))]
190        #[unsafe(method_family = none)]
191        pub fn strokeLineFromPoint_toPoint(point1: NSPoint, point2: NSPoint);
192
193        /// # Safety
194        ///
195        /// `packed_glyphs` must be a valid pointer.
196        #[unsafe(method(drawPackedGlyphs:atPoint:))]
197        #[unsafe(method_family = none)]
198        pub unsafe fn drawPackedGlyphs_atPoint(packed_glyphs: NonNull<c_char>, point: NSPoint);
199
200        #[cfg(feature = "objc2-core-foundation")]
201        #[unsafe(method(defaultMiterLimit))]
202        #[unsafe(method_family = none)]
203        pub fn defaultMiterLimit() -> CGFloat;
204
205        #[cfg(feature = "objc2-core-foundation")]
206        /// Setter for [`defaultMiterLimit`][Self::defaultMiterLimit].
207        #[unsafe(method(setDefaultMiterLimit:))]
208        #[unsafe(method_family = none)]
209        pub fn setDefaultMiterLimit(default_miter_limit: CGFloat);
210
211        #[cfg(feature = "objc2-core-foundation")]
212        #[unsafe(method(defaultFlatness))]
213        #[unsafe(method_family = none)]
214        pub fn defaultFlatness() -> CGFloat;
215
216        #[cfg(feature = "objc2-core-foundation")]
217        /// Setter for [`defaultFlatness`][Self::defaultFlatness].
218        #[unsafe(method(setDefaultFlatness:))]
219        #[unsafe(method_family = none)]
220        pub fn setDefaultFlatness(default_flatness: CGFloat);
221
222        #[unsafe(method(defaultWindingRule))]
223        #[unsafe(method_family = none)]
224        pub fn defaultWindingRule() -> NSWindingRule;
225
226        /// Setter for [`defaultWindingRule`][Self::defaultWindingRule].
227        #[unsafe(method(setDefaultWindingRule:))]
228        #[unsafe(method_family = none)]
229        pub fn setDefaultWindingRule(default_winding_rule: NSWindingRule);
230
231        #[unsafe(method(defaultLineCapStyle))]
232        #[unsafe(method_family = none)]
233        pub fn defaultLineCapStyle() -> NSLineCapStyle;
234
235        /// Setter for [`defaultLineCapStyle`][Self::defaultLineCapStyle].
236        #[unsafe(method(setDefaultLineCapStyle:))]
237        #[unsafe(method_family = none)]
238        pub fn setDefaultLineCapStyle(default_line_cap_style: NSLineCapStyle);
239
240        #[unsafe(method(defaultLineJoinStyle))]
241        #[unsafe(method_family = none)]
242        pub fn defaultLineJoinStyle() -> NSLineJoinStyle;
243
244        /// Setter for [`defaultLineJoinStyle`][Self::defaultLineJoinStyle].
245        #[unsafe(method(setDefaultLineJoinStyle:))]
246        #[unsafe(method_family = none)]
247        pub fn setDefaultLineJoinStyle(default_line_join_style: NSLineJoinStyle);
248
249        #[cfg(feature = "objc2-core-foundation")]
250        #[unsafe(method(defaultLineWidth))]
251        #[unsafe(method_family = none)]
252        pub fn defaultLineWidth() -> CGFloat;
253
254        #[cfg(feature = "objc2-core-foundation")]
255        /// Setter for [`defaultLineWidth`][Self::defaultLineWidth].
256        #[unsafe(method(setDefaultLineWidth:))]
257        #[unsafe(method_family = none)]
258        pub fn setDefaultLineWidth(default_line_width: CGFloat);
259
260        #[unsafe(method(moveToPoint:))]
261        #[unsafe(method_family = none)]
262        pub fn moveToPoint(&self, point: NSPoint);
263
264        #[unsafe(method(lineToPoint:))]
265        #[unsafe(method_family = none)]
266        pub fn lineToPoint(&self, point: NSPoint);
267
268        #[unsafe(method(curveToPoint:controlPoint1:controlPoint2:))]
269        #[unsafe(method_family = none)]
270        pub fn curveToPoint_controlPoint1_controlPoint2(
271            &self,
272            end_point: NSPoint,
273            control_point1: NSPoint,
274            control_point2: NSPoint,
275        );
276
277        #[unsafe(method(curveToPoint:controlPoint:))]
278        #[unsafe(method_family = none)]
279        pub fn curveToPoint_controlPoint(&self, end_point: NSPoint, control_point: NSPoint);
280
281        #[unsafe(method(closePath))]
282        #[unsafe(method_family = none)]
283        pub fn closePath(&self);
284
285        #[unsafe(method(removeAllPoints))]
286        #[unsafe(method_family = none)]
287        pub fn removeAllPoints(&self);
288
289        #[unsafe(method(relativeMoveToPoint:))]
290        #[unsafe(method_family = none)]
291        pub fn relativeMoveToPoint(&self, point: NSPoint);
292
293        #[unsafe(method(relativeLineToPoint:))]
294        #[unsafe(method_family = none)]
295        pub fn relativeLineToPoint(&self, point: NSPoint);
296
297        #[unsafe(method(relativeCurveToPoint:controlPoint1:controlPoint2:))]
298        #[unsafe(method_family = none)]
299        pub fn relativeCurveToPoint_controlPoint1_controlPoint2(
300            &self,
301            end_point: NSPoint,
302            control_point1: NSPoint,
303            control_point2: NSPoint,
304        );
305
306        #[unsafe(method(relativeCurveToPoint:controlPoint:))]
307        #[unsafe(method_family = none)]
308        pub fn relativeCurveToPoint_controlPoint(&self, end_point: NSPoint, control_point: NSPoint);
309
310        #[cfg(feature = "objc2-core-foundation")]
311        #[unsafe(method(lineWidth))]
312        #[unsafe(method_family = none)]
313        pub fn lineWidth(&self) -> CGFloat;
314
315        #[cfg(feature = "objc2-core-foundation")]
316        /// Setter for [`lineWidth`][Self::lineWidth].
317        #[unsafe(method(setLineWidth:))]
318        #[unsafe(method_family = none)]
319        pub fn setLineWidth(&self, line_width: CGFloat);
320
321        #[unsafe(method(lineCapStyle))]
322        #[unsafe(method_family = none)]
323        pub fn lineCapStyle(&self) -> NSLineCapStyle;
324
325        /// Setter for [`lineCapStyle`][Self::lineCapStyle].
326        #[unsafe(method(setLineCapStyle:))]
327        #[unsafe(method_family = none)]
328        pub fn setLineCapStyle(&self, line_cap_style: NSLineCapStyle);
329
330        #[unsafe(method(lineJoinStyle))]
331        #[unsafe(method_family = none)]
332        pub fn lineJoinStyle(&self) -> NSLineJoinStyle;
333
334        /// Setter for [`lineJoinStyle`][Self::lineJoinStyle].
335        #[unsafe(method(setLineJoinStyle:))]
336        #[unsafe(method_family = none)]
337        pub fn setLineJoinStyle(&self, line_join_style: NSLineJoinStyle);
338
339        #[unsafe(method(windingRule))]
340        #[unsafe(method_family = none)]
341        pub fn windingRule(&self) -> NSWindingRule;
342
343        /// Setter for [`windingRule`][Self::windingRule].
344        #[unsafe(method(setWindingRule:))]
345        #[unsafe(method_family = none)]
346        pub fn setWindingRule(&self, winding_rule: NSWindingRule);
347
348        #[cfg(feature = "objc2-core-foundation")]
349        #[unsafe(method(miterLimit))]
350        #[unsafe(method_family = none)]
351        pub fn miterLimit(&self) -> CGFloat;
352
353        #[cfg(feature = "objc2-core-foundation")]
354        /// Setter for [`miterLimit`][Self::miterLimit].
355        #[unsafe(method(setMiterLimit:))]
356        #[unsafe(method_family = none)]
357        pub fn setMiterLimit(&self, miter_limit: CGFloat);
358
359        #[cfg(feature = "objc2-core-foundation")]
360        #[unsafe(method(flatness))]
361        #[unsafe(method_family = none)]
362        pub fn flatness(&self) -> CGFloat;
363
364        #[cfg(feature = "objc2-core-foundation")]
365        /// Setter for [`flatness`][Self::flatness].
366        #[unsafe(method(setFlatness:))]
367        #[unsafe(method_family = none)]
368        pub fn setFlatness(&self, flatness: CGFloat);
369
370        #[cfg(feature = "objc2-core-foundation")]
371        /// # Safety
372        ///
373        /// - `pattern` must be a valid pointer or null.
374        /// - `count` must be a valid pointer or null.
375        /// - `phase` must be a valid pointer or null.
376        #[unsafe(method(getLineDash:count:phase:))]
377        #[unsafe(method_family = none)]
378        pub unsafe fn getLineDash_count_phase(
379            &self,
380            pattern: *mut CGFloat,
381            count: *mut NSInteger,
382            phase: *mut CGFloat,
383        );
384
385        #[cfg(feature = "objc2-core-foundation")]
386        /// # Safety
387        ///
388        /// `pattern` must be a valid pointer or null.
389        #[unsafe(method(setLineDash:count:phase:))]
390        #[unsafe(method_family = none)]
391        pub unsafe fn setLineDash_count_phase(
392            &self,
393            pattern: *const CGFloat,
394            count: NSInteger,
395            phase: CGFloat,
396        );
397
398        #[unsafe(method(stroke))]
399        #[unsafe(method_family = none)]
400        pub fn stroke(&self);
401
402        #[unsafe(method(fill))]
403        #[unsafe(method_family = none)]
404        pub fn fill(&self);
405
406        #[unsafe(method(addClip))]
407        #[unsafe(method_family = none)]
408        pub fn addClip(&self);
409
410        #[unsafe(method(setClip))]
411        #[unsafe(method_family = none)]
412        pub fn setClip(&self);
413
414        #[unsafe(method(bezierPathByFlatteningPath))]
415        #[unsafe(method_family = none)]
416        pub fn bezierPathByFlatteningPath(&self) -> Retained<NSBezierPath>;
417
418        #[unsafe(method(bezierPathByReversingPath))]
419        #[unsafe(method_family = none)]
420        pub fn bezierPathByReversingPath(&self) -> Retained<NSBezierPath>;
421
422        #[unsafe(method(transformUsingAffineTransform:))]
423        #[unsafe(method_family = none)]
424        pub fn transformUsingAffineTransform(&self, transform: &NSAffineTransform);
425
426        #[unsafe(method(isEmpty))]
427        #[unsafe(method_family = none)]
428        pub fn isEmpty(&self) -> bool;
429
430        #[unsafe(method(currentPoint))]
431        #[unsafe(method_family = none)]
432        pub fn currentPoint(&self) -> NSPoint;
433
434        #[unsafe(method(controlPointBounds))]
435        #[unsafe(method_family = none)]
436        pub fn controlPointBounds(&self) -> NSRect;
437
438        #[unsafe(method(bounds))]
439        #[unsafe(method_family = none)]
440        pub fn bounds(&self) -> NSRect;
441
442        #[unsafe(method(elementCount))]
443        #[unsafe(method_family = none)]
444        pub fn elementCount(&self) -> NSInteger;
445
446        /// # Safety
447        ///
448        /// `points` must be a valid pointer or null.
449        #[unsafe(method(elementAtIndex:associatedPoints:))]
450        #[unsafe(method_family = none)]
451        pub unsafe fn elementAtIndex_associatedPoints(
452            &self,
453            index: NSInteger,
454            points: NSPointArray,
455        ) -> NSBezierPathElement;
456
457        #[unsafe(method(elementAtIndex:))]
458        #[unsafe(method_family = none)]
459        pub fn elementAtIndex(&self, index: NSInteger) -> NSBezierPathElement;
460
461        /// # Safety
462        ///
463        /// `points` must be a valid pointer or null.
464        #[unsafe(method(setAssociatedPoints:atIndex:))]
465        #[unsafe(method_family = none)]
466        pub unsafe fn setAssociatedPoints_atIndex(&self, points: NSPointArray, index: NSInteger);
467
468        #[unsafe(method(appendBezierPath:))]
469        #[unsafe(method_family = none)]
470        pub fn appendBezierPath(&self, path: &NSBezierPath);
471
472        #[unsafe(method(appendBezierPathWithRect:))]
473        #[unsafe(method_family = none)]
474        pub fn appendBezierPathWithRect(&self, rect: NSRect);
475
476        /// # Safety
477        ///
478        /// `points` must be a valid pointer.
479        #[unsafe(method(appendBezierPathWithPoints:count:))]
480        #[unsafe(method_family = none)]
481        pub unsafe fn appendBezierPathWithPoints_count(
482            &self,
483            points: NSPointArray,
484            count: NSInteger,
485        );
486
487        #[unsafe(method(appendBezierPathWithOvalInRect:))]
488        #[unsafe(method_family = none)]
489        pub fn appendBezierPathWithOvalInRect(&self, rect: NSRect);
490
491        #[cfg(feature = "objc2-core-foundation")]
492        #[unsafe(method(appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:clockwise:))]
493        #[unsafe(method_family = none)]
494        pub fn appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise(
495            &self,
496            center: NSPoint,
497            radius: CGFloat,
498            start_angle: CGFloat,
499            end_angle: CGFloat,
500            clockwise: bool,
501        );
502
503        #[cfg(feature = "objc2-core-foundation")]
504        #[unsafe(method(appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:))]
505        #[unsafe(method_family = none)]
506        pub fn appendBezierPathWithArcWithCenter_radius_startAngle_endAngle(
507            &self,
508            center: NSPoint,
509            radius: CGFloat,
510            start_angle: CGFloat,
511            end_angle: CGFloat,
512        );
513
514        #[cfg(feature = "objc2-core-foundation")]
515        #[unsafe(method(appendBezierPathWithArcFromPoint:toPoint:radius:))]
516        #[unsafe(method_family = none)]
517        pub fn appendBezierPathWithArcFromPoint_toPoint_radius(
518            &self,
519            point1: NSPoint,
520            point2: NSPoint,
521            radius: CGFloat,
522        );
523
524        #[cfg(all(feature = "NSFont", feature = "objc2-core-graphics"))]
525        #[cfg(target_vendor = "apple")]
526        #[unsafe(method(appendBezierPathWithCGGlyph:inFont:))]
527        #[unsafe(method_family = none)]
528        pub fn appendBezierPathWithCGGlyph_inFont(&self, glyph: CGGlyph, font: &NSFont);
529
530        #[cfg(all(feature = "NSFont", feature = "objc2-core-graphics"))]
531        #[cfg(target_vendor = "apple")]
532        /// # Safety
533        ///
534        /// `glyphs` must be a valid pointer.
535        #[unsafe(method(appendBezierPathWithCGGlyphs:count:inFont:))]
536        #[unsafe(method_family = none)]
537        pub unsafe fn appendBezierPathWithCGGlyphs_count_inFont(
538            &self,
539            glyphs: NonNull<CGGlyph>,
540            count: NSInteger,
541            font: &NSFont,
542        );
543
544        #[cfg(feature = "objc2-core-foundation")]
545        #[unsafe(method(appendBezierPathWithRoundedRect:xRadius:yRadius:))]
546        #[unsafe(method_family = none)]
547        pub fn appendBezierPathWithRoundedRect_xRadius_yRadius(
548            &self,
549            rect: NSRect,
550            x_radius: CGFloat,
551            y_radius: CGFloat,
552        );
553
554        #[unsafe(method(containsPoint:))]
555        #[unsafe(method_family = none)]
556        pub fn containsPoint(&self, point: NSPoint) -> bool;
557    );
558}
559
560/// Methods declared on superclass `NSObject`.
561impl NSBezierPath {
562    extern_methods!(
563        #[unsafe(method(init))]
564        #[unsafe(method_family = init)]
565        pub fn init(this: Allocated<Self>) -> Retained<Self>;
566
567        #[unsafe(method(new))]
568        #[unsafe(method_family = new)]
569        pub fn new() -> Retained<Self>;
570    );
571}
572
573impl DefaultRetained for NSBezierPath {
574    #[inline]
575    fn default_retained() -> Retained<Self> {
576        Self::new()
577    }
578}
579
580/// NSBezierPathDeprecated.
581impl NSBezierPath {
582    extern_methods!(
583        #[deprecated]
584        #[unsafe(method(cachesBezierPath))]
585        #[unsafe(method_family = none)]
586        pub fn cachesBezierPath(&self) -> bool;
587
588        #[deprecated]
589        #[unsafe(method(setCachesBezierPath:))]
590        #[unsafe(method_family = none)]
591        pub fn setCachesBezierPath(&self, flag: bool);
592
593        #[cfg(feature = "NSFont")]
594        #[deprecated = "Use -appendBezierPathWithCGGlyph:inFont: instead"]
595        #[unsafe(method(appendBezierPathWithGlyph:inFont:))]
596        #[unsafe(method_family = none)]
597        pub fn appendBezierPathWithGlyph_inFont(&self, glyph: NSGlyph, font: &NSFont);
598
599        #[cfg(feature = "NSFont")]
600        /// # Safety
601        ///
602        /// `glyphs` must be a valid pointer.
603        #[deprecated = "Use -appendBezierPathWithCGGlyphs:count:inFont: instead"]
604        #[unsafe(method(appendBezierPathWithGlyphs:count:inFont:))]
605        #[unsafe(method_family = none)]
606        pub unsafe fn appendBezierPathWithGlyphs_count_inFont(
607            &self,
608            glyphs: NonNull<NSGlyph>,
609            count: NSInteger,
610            font: &NSFont,
611        );
612
613        /// # Safety
614        ///
615        /// `packed_glyphs` must be a valid pointer.
616        #[deprecated = "Use -appendBezierPathWithCGGlyphs:count:inFont: instead"]
617        #[unsafe(method(appendBezierPathWithPackedGlyphs:))]
618        #[unsafe(method_family = none)]
619        pub unsafe fn appendBezierPathWithPackedGlyphs(&self, packed_glyphs: NonNull<c_char>);
620    );
621}
622
623/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsbuttlinecapstyle?language=objc)
624#[deprecated]
625pub static NSButtLineCapStyle: NSLineCapStyle = NSLineCapStyle(NSLineCapStyle::Butt.0);
626
627/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsroundlinecapstyle?language=objc)
628#[deprecated]
629pub static NSRoundLineCapStyle: NSLineCapStyle = NSLineCapStyle(NSLineCapStyle::Round.0);
630
631/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nssquarelinecapstyle?language=objc)
632#[deprecated]
633pub static NSSquareLineCapStyle: NSLineCapStyle = NSLineCapStyle(NSLineCapStyle::Square.0);
634
635/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsmiterlinejoinstyle?language=objc)
636#[deprecated]
637pub static NSMiterLineJoinStyle: NSLineJoinStyle = NSLineJoinStyle(NSLineJoinStyle::Miter.0);
638
639/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsroundlinejoinstyle?language=objc)
640#[deprecated]
641pub static NSRoundLineJoinStyle: NSLineJoinStyle = NSLineJoinStyle(NSLineJoinStyle::Round.0);
642
643/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsbevellinejoinstyle?language=objc)
644#[deprecated]
645pub static NSBevelLineJoinStyle: NSLineJoinStyle = NSLineJoinStyle(NSLineJoinStyle::Bevel.0);
646
647/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsnonzerowindingrule?language=objc)
648#[deprecated]
649pub static NSNonZeroWindingRule: NSWindingRule = NSWindingRule(NSWindingRule::NonZero.0);
650
651/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsevenoddwindingrule?language=objc)
652#[deprecated]
653pub static NSEvenOddWindingRule: NSWindingRule = NSWindingRule(NSWindingRule::EvenOdd.0);
654
655/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsmovetobezierpathelement?language=objc)
656#[deprecated]
657pub static NSMoveToBezierPathElement: NSBezierPathElement =
658    NSBezierPathElement(NSBezierPathElement::MoveTo.0);
659
660/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nslinetobezierpathelement?language=objc)
661#[deprecated]
662pub static NSLineToBezierPathElement: NSBezierPathElement =
663    NSBezierPathElement(NSBezierPathElement::LineTo.0);
664
665/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscurvetobezierpathelement?language=objc)
666#[deprecated]
667pub static NSCurveToBezierPathElement: NSBezierPathElement =
668    NSBezierPathElement(NSBezierPathElement::CurveTo.0);
669
670/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsclosepathbezierpathelement?language=objc)
671#[deprecated]
672pub static NSClosePathBezierPathElement: NSBezierPathElement =
673    NSBezierPathElement(NSBezierPathElement::ClosePath.0);