objc2_map_kit/generated/
MKOverlayRenderer.rs1use 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")]
9use objc2_core_graphics::*;
10
11use crate::*;
12
13extern_class!(
14 #[unsafe(super(NSObject))]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 pub struct MKOverlayRenderer;
18);
19
20unsafe impl NSObjectProtocol for MKOverlayRenderer {}
21
22impl MKOverlayRenderer {
23 extern_methods!(
24 #[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
25 #[unsafe(method(initWithOverlay:))]
26 #[unsafe(method_family = init)]
27 pub unsafe fn initWithOverlay(
28 this: Allocated<Self>,
29 overlay: &ProtocolObject<dyn MKOverlay>,
30 ) -> Retained<Self>;
31
32 #[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
33 #[unsafe(method(overlay))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn overlay(&self) -> Retained<ProtocolObject<dyn MKOverlay>>;
36
37 #[cfg(all(feature = "MKGeometry", feature = "objc2-core-foundation"))]
38 #[unsafe(method(pointForMapPoint:))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn pointForMapPoint(&self, map_point: MKMapPoint) -> CGPoint;
41
42 #[cfg(all(feature = "MKGeometry", feature = "objc2-core-foundation"))]
43 #[unsafe(method(mapPointForPoint:))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn mapPointForPoint(&self, point: CGPoint) -> MKMapPoint;
46
47 #[cfg(all(feature = "MKGeometry", feature = "objc2-core-foundation"))]
48 #[unsafe(method(rectForMapRect:))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn rectForMapRect(&self, map_rect: MKMapRect) -> CGRect;
51
52 #[cfg(all(feature = "MKGeometry", feature = "objc2-core-foundation"))]
53 #[unsafe(method(mapRectForRect:))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn mapRectForRect(&self, rect: CGRect) -> MKMapRect;
56
57 #[cfg(all(feature = "MKGeometry", feature = "objc2-core-foundation"))]
58 #[unsafe(method(canDrawMapRect:zoomScale:))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn canDrawMapRect_zoomScale(
61 &self,
62 map_rect: MKMapRect,
63 zoom_scale: MKZoomScale,
64 ) -> bool;
65
66 #[cfg(all(
67 feature = "MKGeometry",
68 feature = "objc2-core-foundation",
69 feature = "objc2-core-graphics"
70 ))]
71 #[unsafe(method(drawMapRect:zoomScale:inContext:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn drawMapRect_zoomScale_inContext(
74 &self,
75 map_rect: MKMapRect,
76 zoom_scale: MKZoomScale,
77 context: &CGContext,
78 );
79
80 #[unsafe(method(setNeedsDisplay))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn setNeedsDisplay(&self);
83
84 #[cfg(feature = "MKGeometry")]
85 #[unsafe(method(setNeedsDisplayInMapRect:))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn setNeedsDisplayInMapRect(&self, map_rect: MKMapRect);
88
89 #[cfg(all(feature = "MKGeometry", feature = "objc2-core-foundation"))]
90 #[unsafe(method(setNeedsDisplayInMapRect:zoomScale:))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn setNeedsDisplayInMapRect_zoomScale(
93 &self,
94 map_rect: MKMapRect,
95 zoom_scale: MKZoomScale,
96 );
97
98 #[cfg(feature = "objc2-core-foundation")]
99 #[unsafe(method(alpha))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn alpha(&self) -> CGFloat;
102
103 #[cfg(feature = "objc2-core-foundation")]
104 #[unsafe(method(setAlpha:))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn setAlpha(&self, alpha: CGFloat);
108
109 #[cfg(feature = "objc2-core-foundation")]
110 #[unsafe(method(contentScaleFactor))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn contentScaleFactor(&self) -> CGFloat;
113
114 #[cfg(feature = "objc2-core-graphics")]
115 #[unsafe(method(blendMode))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn blendMode(&self) -> CGBlendMode;
118
119 #[cfg(feature = "objc2-core-graphics")]
120 #[unsafe(method(setBlendMode:))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn setBlendMode(&self, blend_mode: CGBlendMode);
124 );
125}
126
127impl MKOverlayRenderer {
129 extern_methods!(
130 #[unsafe(method(init))]
131 #[unsafe(method_family = init)]
132 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
133
134 #[unsafe(method(new))]
135 #[unsafe(method_family = new)]
136 pub unsafe fn new() -> Retained<Self>;
137 );
138}
139
140extern "C-unwind" {
141 #[cfg(all(feature = "MKGeometry", feature = "objc2-core-foundation"))]
142 pub fn MKRoadWidthAtZoomScale(zoom_scale: MKZoomScale) -> CGFloat;
143}