use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
#[cfg(feature = "objc2-core-graphics")]
use objc2_core_graphics::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MKOverlayRenderer;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MKOverlayRenderer {}
);
impl MKOverlayRenderer {
extern_methods!(
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(initWithOverlay:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithOverlay(
this: Allocated<Self>,
overlay: &ProtocolObject<dyn MKOverlay>,
) -> Retained<Self>;
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(overlay))]
#[unsafe(method_family = none)]
pub unsafe fn overlay(&self) -> Retained<ProtocolObject<dyn MKOverlay>>;
#[cfg(all(feature = "MKGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(pointForMapPoint:))]
#[unsafe(method_family = none)]
pub unsafe fn pointForMapPoint(&self, map_point: MKMapPoint) -> CGPoint;
#[cfg(all(feature = "MKGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(mapPointForPoint:))]
#[unsafe(method_family = none)]
pub unsafe fn mapPointForPoint(&self, point: CGPoint) -> MKMapPoint;
#[cfg(all(feature = "MKGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(rectForMapRect:))]
#[unsafe(method_family = none)]
pub unsafe fn rectForMapRect(&self, map_rect: MKMapRect) -> CGRect;
#[cfg(all(feature = "MKGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(mapRectForRect:))]
#[unsafe(method_family = none)]
pub unsafe fn mapRectForRect(&self, rect: CGRect) -> MKMapRect;
#[cfg(all(feature = "MKGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(canDrawMapRect:zoomScale:))]
#[unsafe(method_family = none)]
pub unsafe fn canDrawMapRect_zoomScale(
&self,
map_rect: MKMapRect,
zoom_scale: MKZoomScale,
) -> bool;
#[cfg(all(
feature = "MKGeometry",
feature = "objc2-core-foundation",
feature = "objc2-core-graphics"
))]
#[unsafe(method(drawMapRect:zoomScale:inContext:))]
#[unsafe(method_family = none)]
pub unsafe fn drawMapRect_zoomScale_inContext(
&self,
map_rect: MKMapRect,
zoom_scale: MKZoomScale,
context: &CGContext,
);
#[unsafe(method(setNeedsDisplay))]
#[unsafe(method_family = none)]
pub unsafe fn setNeedsDisplay(&self);
#[cfg(feature = "MKGeometry")]
#[unsafe(method(setNeedsDisplayInMapRect:))]
#[unsafe(method_family = none)]
pub unsafe fn setNeedsDisplayInMapRect(&self, map_rect: MKMapRect);
#[cfg(all(feature = "MKGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(setNeedsDisplayInMapRect:zoomScale:))]
#[unsafe(method_family = none)]
pub unsafe fn setNeedsDisplayInMapRect_zoomScale(
&self,
map_rect: MKMapRect,
zoom_scale: MKZoomScale,
);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(alpha))]
#[unsafe(method_family = none)]
pub unsafe fn alpha(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setAlpha:))]
#[unsafe(method_family = none)]
pub unsafe fn setAlpha(&self, alpha: CGFloat);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(contentScaleFactor))]
#[unsafe(method_family = none)]
pub unsafe fn contentScaleFactor(&self) -> CGFloat;
#[cfg(feature = "objc2-core-graphics")]
#[unsafe(method(blendMode))]
#[unsafe(method_family = none)]
pub unsafe fn blendMode(&self) -> CGBlendMode;
#[cfg(feature = "objc2-core-graphics")]
#[unsafe(method(setBlendMode:))]
#[unsafe(method_family = none)]
pub unsafe fn setBlendMode(&self, blend_mode: CGBlendMode);
);
}
impl MKOverlayRenderer {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern "C-unwind" {
#[cfg(all(feature = "MKGeometry", feature = "objc2-core-foundation"))]
pub fn MKRoadWidthAtZoomScale(zoom_scale: MKZoomScale) -> CGFloat;
}