objc2_map_kit/generated/
MKOverlayPathRenderer.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-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9#[cfg(feature = "objc2-core-foundation")]
10use objc2_core_foundation::*;
11#[cfg(feature = "objc2-core-graphics")]
12use objc2_core_graphics::*;
13use objc2_foundation::*;
14
15use crate::*;
16
17extern_class!(
18    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkoverlaypathrenderer?language=objc)
19    #[unsafe(super(MKOverlayRenderer, NSObject))]
20    #[derive(Debug, PartialEq, Eq, Hash)]
21    #[cfg(feature = "MKOverlayRenderer")]
22    pub struct MKOverlayPathRenderer;
23);
24
25#[cfg(feature = "MKOverlayRenderer")]
26unsafe impl NSObjectProtocol for MKOverlayPathRenderer {}
27
28#[cfg(feature = "MKOverlayRenderer")]
29impl MKOverlayPathRenderer {
30    extern_methods!(
31        #[cfg(feature = "objc2-app-kit")]
32        #[cfg(target_os = "macos")]
33        #[unsafe(method(fillColor))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn fillColor(&self) -> Option<Retained<NSColor>>;
36
37        #[cfg(feature = "objc2-app-kit")]
38        #[cfg(target_os = "macos")]
39        /// Setter for [`fillColor`][Self::fillColor].
40        #[unsafe(method(setFillColor:))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn setFillColor(&self, fill_color: Option<&NSColor>);
43
44        #[cfg(feature = "objc2-app-kit")]
45        #[cfg(target_os = "macos")]
46        #[unsafe(method(strokeColor))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn strokeColor(&self) -> Option<Retained<NSColor>>;
49
50        #[cfg(feature = "objc2-app-kit")]
51        #[cfg(target_os = "macos")]
52        /// Setter for [`strokeColor`][Self::strokeColor].
53        #[unsafe(method(setStrokeColor:))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn setStrokeColor(&self, stroke_color: Option<&NSColor>);
56
57        #[cfg(feature = "objc2-core-foundation")]
58        #[unsafe(method(lineWidth))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn lineWidth(&self) -> CGFloat;
61
62        #[cfg(feature = "objc2-core-foundation")]
63        /// Setter for [`lineWidth`][Self::lineWidth].
64        #[unsafe(method(setLineWidth:))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn setLineWidth(&self, line_width: CGFloat);
67
68        #[cfg(feature = "objc2-core-graphics")]
69        #[unsafe(method(lineJoin))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn lineJoin(&self) -> CGLineJoin;
72
73        #[cfg(feature = "objc2-core-graphics")]
74        /// Setter for [`lineJoin`][Self::lineJoin].
75        #[unsafe(method(setLineJoin:))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn setLineJoin(&self, line_join: CGLineJoin);
78
79        #[cfg(feature = "objc2-core-graphics")]
80        #[unsafe(method(lineCap))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn lineCap(&self) -> CGLineCap;
83
84        #[cfg(feature = "objc2-core-graphics")]
85        /// Setter for [`lineCap`][Self::lineCap].
86        #[unsafe(method(setLineCap:))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn setLineCap(&self, line_cap: CGLineCap);
89
90        #[cfg(feature = "objc2-core-foundation")]
91        #[unsafe(method(miterLimit))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn miterLimit(&self) -> CGFloat;
94
95        #[cfg(feature = "objc2-core-foundation")]
96        /// Setter for [`miterLimit`][Self::miterLimit].
97        #[unsafe(method(setMiterLimit:))]
98        #[unsafe(method_family = none)]
99        pub unsafe fn setMiterLimit(&self, miter_limit: CGFloat);
100
101        #[cfg(feature = "objc2-core-foundation")]
102        #[unsafe(method(lineDashPhase))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn lineDashPhase(&self) -> CGFloat;
105
106        #[cfg(feature = "objc2-core-foundation")]
107        /// Setter for [`lineDashPhase`][Self::lineDashPhase].
108        #[unsafe(method(setLineDashPhase:))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn setLineDashPhase(&self, line_dash_phase: CGFloat);
111
112        #[unsafe(method(lineDashPattern))]
113        #[unsafe(method_family = none)]
114        pub unsafe fn lineDashPattern(&self) -> Option<Retained<NSArray<NSNumber>>>;
115
116        /// Setter for [`lineDashPattern`][Self::lineDashPattern].
117        #[unsafe(method(setLineDashPattern:))]
118        #[unsafe(method_family = none)]
119        pub unsafe fn setLineDashPattern(&self, line_dash_pattern: Option<&NSArray<NSNumber>>);
120
121        #[unsafe(method(shouldRasterize))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn shouldRasterize(&self) -> bool;
124
125        /// Setter for [`shouldRasterize`][Self::shouldRasterize].
126        #[unsafe(method(setShouldRasterize:))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn setShouldRasterize(&self, should_rasterize: bool);
129
130        #[unsafe(method(createPath))]
131        #[unsafe(method_family = none)]
132        pub unsafe fn createPath(&self);
133
134        #[cfg(feature = "objc2-core-graphics")]
135        #[unsafe(method(path))]
136        #[unsafe(method_family = none)]
137        pub unsafe fn path(&self) -> Option<Retained<CGPath>>;
138
139        #[cfg(feature = "objc2-core-graphics")]
140        /// Setter for [`path`][Self::path].
141        #[unsafe(method(setPath:))]
142        #[unsafe(method_family = none)]
143        pub unsafe fn setPath(&self, path: Option<&CGPath>);
144
145        #[unsafe(method(invalidatePath))]
146        #[unsafe(method_family = none)]
147        pub unsafe fn invalidatePath(&self);
148
149        #[cfg(all(
150            feature = "MKGeometry",
151            feature = "objc2-core-foundation",
152            feature = "objc2-core-graphics"
153        ))]
154        #[unsafe(method(applyStrokePropertiesToContext:atZoomScale:))]
155        #[unsafe(method_family = none)]
156        pub unsafe fn applyStrokePropertiesToContext_atZoomScale(
157            &self,
158            context: &CGContext,
159            zoom_scale: MKZoomScale,
160        );
161
162        #[cfg(all(
163            feature = "MKGeometry",
164            feature = "objc2-core-foundation",
165            feature = "objc2-core-graphics"
166        ))]
167        #[unsafe(method(applyFillPropertiesToContext:atZoomScale:))]
168        #[unsafe(method_family = none)]
169        pub unsafe fn applyFillPropertiesToContext_atZoomScale(
170            &self,
171            context: &CGContext,
172            zoom_scale: MKZoomScale,
173        );
174
175        #[cfg(feature = "objc2-core-graphics")]
176        #[unsafe(method(strokePath:inContext:))]
177        #[unsafe(method_family = none)]
178        pub unsafe fn strokePath_inContext(&self, path: &CGPath, context: &CGContext);
179
180        #[cfg(feature = "objc2-core-graphics")]
181        #[unsafe(method(fillPath:inContext:))]
182        #[unsafe(method_family = none)]
183        pub unsafe fn fillPath_inContext(&self, path: &CGPath, context: &CGContext);
184    );
185}
186
187/// Methods declared on superclass `MKOverlayRenderer`.
188#[cfg(feature = "MKOverlayRenderer")]
189impl MKOverlayPathRenderer {
190    extern_methods!(
191        #[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
192        #[unsafe(method(initWithOverlay:))]
193        #[unsafe(method_family = init)]
194        pub unsafe fn initWithOverlay(
195            this: Allocated<Self>,
196            overlay: &ProtocolObject<dyn MKOverlay>,
197        ) -> Retained<Self>;
198    );
199}
200
201/// Methods declared on superclass `NSObject`.
202#[cfg(feature = "MKOverlayRenderer")]
203impl MKOverlayPathRenderer {
204    extern_methods!(
205        #[unsafe(method(init))]
206        #[unsafe(method_family = init)]
207        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
208
209        #[unsafe(method(new))]
210        #[unsafe(method_family = new)]
211        pub unsafe fn new() -> Retained<Self>;
212    );
213}