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