use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MKOverlayLevel(pub NSInteger);
impl MKOverlayLevel {
#[doc(alias = "MKOverlayLevelAboveRoads")]
pub const AboveRoads: Self = Self(0);
#[doc(alias = "MKOverlayLevelAboveLabels")]
pub const AboveLabels: Self = Self(1);
}
unsafe impl Encode for MKOverlayLevel {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for MKOverlayLevel {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MKUserTrackingMode(pub NSInteger);
impl MKUserTrackingMode {
#[doc(alias = "MKUserTrackingModeNone")]
pub const None: Self = Self(0);
#[doc(alias = "MKUserTrackingModeFollow")]
pub const Follow: Self = Self(1);
#[doc(alias = "MKUserTrackingModeFollowWithHeading")]
pub const FollowWithHeading: Self = Self(2);
}
unsafe impl Encode for MKUserTrackingMode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for MKUserTrackingMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
pub static MKMapViewDefaultAnnotationViewReuseIdentifier: &'static NSString;
}
extern "C" {
pub static MKMapViewDefaultClusterAnnotationViewReuseIdentifier: &'static NSString;
}
extern_class!(
#[unsafe(super(NSView, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
pub struct MKMapView;
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSAccessibility for MKMapView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSAccessibilityElementProtocol for MKMapView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSAnimatablePropertyContainer for MKMapView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSAppearanceCustomization for MKMapView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSCoding for MKMapView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSDraggingDestination for MKMapView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSObjectProtocol for MKMapView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for MKMapView {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl MKMapView {
extern_methods!(
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub unsafe fn delegate(&self) -> Option<Retained<ProtocolObject<dyn MKMapViewDelegate>>>;
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn MKMapViewDelegate>>);
#[cfg(feature = "MKTypes")]
#[deprecated = "Use respective MKMapConfiguration"]
#[unsafe(method(mapType))]
#[unsafe(method_family = none)]
pub unsafe fn mapType(&self) -> MKMapType;
#[cfg(feature = "MKTypes")]
#[deprecated = "Use respective MKMapConfiguration"]
#[unsafe(method(setMapType:))]
#[unsafe(method_family = none)]
pub unsafe fn setMapType(&self, map_type: MKMapType);
#[cfg(feature = "MKMapConfiguration")]
#[unsafe(method(preferredConfiguration))]
#[unsafe(method_family = none)]
pub unsafe fn preferredConfiguration(&self) -> Retained<MKMapConfiguration>;
#[cfg(feature = "MKMapConfiguration")]
#[unsafe(method(setPreferredConfiguration:))]
#[unsafe(method_family = none)]
pub unsafe fn setPreferredConfiguration(
&self,
preferred_configuration: &MKMapConfiguration,
);
#[cfg(all(feature = "MKGeometry", feature = "objc2-core-location"))]
#[unsafe(method(region))]
#[unsafe(method_family = none)]
pub unsafe fn region(&self) -> MKCoordinateRegion;
#[cfg(all(feature = "MKGeometry", feature = "objc2-core-location"))]
#[unsafe(method(setRegion:))]
#[unsafe(method_family = none)]
pub unsafe fn setRegion(&self, region: MKCoordinateRegion);
#[cfg(all(feature = "MKGeometry", feature = "objc2-core-location"))]
#[unsafe(method(setRegion:animated:))]
#[unsafe(method_family = none)]
pub unsafe fn setRegion_animated(&self, region: MKCoordinateRegion, animated: bool);
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(centerCoordinate))]
#[unsafe(method_family = none)]
pub unsafe fn centerCoordinate(&self) -> CLLocationCoordinate2D;
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(setCenterCoordinate:))]
#[unsafe(method_family = none)]
pub unsafe fn setCenterCoordinate(&self, center_coordinate: CLLocationCoordinate2D);
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(setCenterCoordinate:animated:))]
#[unsafe(method_family = none)]
pub unsafe fn setCenterCoordinate_animated(
&self,
coordinate: CLLocationCoordinate2D,
animated: bool,
);
#[cfg(all(feature = "MKGeometry", feature = "objc2-core-location"))]
#[unsafe(method(regionThatFits:))]
#[unsafe(method_family = none)]
pub unsafe fn regionThatFits(&self, region: MKCoordinateRegion) -> MKCoordinateRegion;
#[cfg(feature = "MKGeometry")]
#[unsafe(method(visibleMapRect))]
#[unsafe(method_family = none)]
pub unsafe fn visibleMapRect(&self) -> MKMapRect;
#[cfg(feature = "MKGeometry")]
#[unsafe(method(setVisibleMapRect:))]
#[unsafe(method_family = none)]
pub unsafe fn setVisibleMapRect(&self, visible_map_rect: MKMapRect);
#[cfg(feature = "MKGeometry")]
#[unsafe(method(setVisibleMapRect:animated:))]
#[unsafe(method_family = none)]
pub unsafe fn setVisibleMapRect_animated(&self, map_rect: MKMapRect, animate: bool);
#[cfg(feature = "MKGeometry")]
#[unsafe(method(mapRectThatFits:))]
#[unsafe(method_family = none)]
pub unsafe fn mapRectThatFits(&self, map_rect: MKMapRect) -> MKMapRect;
#[cfg(feature = "MKGeometry")]
#[unsafe(method(setVisibleMapRect:edgePadding:animated:))]
#[unsafe(method_family = none)]
pub unsafe fn setVisibleMapRect_edgePadding_animated(
&self,
map_rect: MKMapRect,
insets: NSEdgeInsets,
animate: bool,
);
#[cfg(feature = "MKGeometry")]
#[unsafe(method(mapRectThatFits:edgePadding:))]
#[unsafe(method_family = none)]
pub unsafe fn mapRectThatFits_edgePadding(
&self,
map_rect: MKMapRect,
insets: NSEdgeInsets,
) -> MKMapRect;
#[cfg(feature = "MKMapCamera")]
#[unsafe(method(camera))]
#[unsafe(method_family = none)]
pub unsafe fn camera(&self) -> Retained<MKMapCamera>;
#[cfg(feature = "MKMapCamera")]
#[unsafe(method(setCamera:))]
#[unsafe(method_family = none)]
pub unsafe fn setCamera(&self, camera: &MKMapCamera);
#[cfg(feature = "MKMapCamera")]
#[unsafe(method(setCamera:animated:))]
#[unsafe(method_family = none)]
pub unsafe fn setCamera_animated(&self, camera: &MKMapCamera, animated: bool);
#[cfg(feature = "MKMapCameraZoomRange")]
#[unsafe(method(cameraZoomRange))]
#[unsafe(method_family = none)]
pub unsafe fn cameraZoomRange(&self) -> Retained<MKMapCameraZoomRange>;
#[cfg(feature = "MKMapCameraZoomRange")]
#[unsafe(method(setCameraZoomRange:))]
#[unsafe(method_family = none)]
pub unsafe fn setCameraZoomRange(&self, camera_zoom_range: Option<&MKMapCameraZoomRange>);
#[cfg(feature = "MKMapCameraZoomRange")]
#[unsafe(method(setCameraZoomRange:animated:))]
#[unsafe(method_family = none)]
pub unsafe fn setCameraZoomRange_animated(
&self,
camera_zoom_range: Option<&MKMapCameraZoomRange>,
animated: bool,
);
#[cfg(feature = "MKMapCameraBoundary")]
#[unsafe(method(cameraBoundary))]
#[unsafe(method_family = none)]
pub unsafe fn cameraBoundary(&self) -> Option<Retained<MKMapCameraBoundary>>;
#[cfg(feature = "MKMapCameraBoundary")]
#[unsafe(method(setCameraBoundary:))]
#[unsafe(method_family = none)]
pub unsafe fn setCameraBoundary(&self, camera_boundary: Option<&MKMapCameraBoundary>);
#[cfg(feature = "MKMapCameraBoundary")]
#[unsafe(method(setCameraBoundary:animated:))]
#[unsafe(method_family = none)]
pub unsafe fn setCameraBoundary_animated(
&self,
camera_boundary: Option<&MKMapCameraBoundary>,
animated: bool,
);
#[cfg(all(feature = "objc2-core-foundation", feature = "objc2-core-location"))]
#[unsafe(method(convertCoordinate:toPointToView:))]
#[unsafe(method_family = none)]
pub unsafe fn convertCoordinate_toPointToView(
&self,
coordinate: CLLocationCoordinate2D,
view: Option<&NSView>,
) -> CGPoint;
#[cfg(all(feature = "objc2-core-foundation", feature = "objc2-core-location"))]
#[unsafe(method(convertPoint:toCoordinateFromView:))]
#[unsafe(method_family = none)]
pub unsafe fn convertPoint_toCoordinateFromView(
&self,
point: CGPoint,
view: Option<&NSView>,
) -> CLLocationCoordinate2D;
#[cfg(all(
feature = "MKGeometry",
feature = "objc2-core-foundation",
feature = "objc2-core-location"
))]
#[unsafe(method(convertRegion:toRectToView:))]
#[unsafe(method_family = none)]
pub unsafe fn convertRegion_toRectToView(
&self,
region: MKCoordinateRegion,
view: Option<&NSView>,
) -> CGRect;
#[cfg(all(
feature = "MKGeometry",
feature = "objc2-core-foundation",
feature = "objc2-core-location"
))]
#[unsafe(method(convertRect:toRegionFromView:))]
#[unsafe(method_family = none)]
pub unsafe fn convertRect_toRegionFromView(
&self,
rect: CGRect,
view: Option<&NSView>,
) -> MKCoordinateRegion;
#[unsafe(method(isZoomEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isZoomEnabled(&self) -> bool;
#[unsafe(method(setZoomEnabled:))]
#[unsafe(method_family = none)]
pub unsafe fn setZoomEnabled(&self, zoom_enabled: bool);
#[unsafe(method(isScrollEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isScrollEnabled(&self) -> bool;
#[unsafe(method(setScrollEnabled:))]
#[unsafe(method_family = none)]
pub unsafe fn setScrollEnabled(&self, scroll_enabled: bool);
#[unsafe(method(isRotateEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isRotateEnabled(&self) -> bool;
#[unsafe(method(setRotateEnabled:))]
#[unsafe(method_family = none)]
pub unsafe fn setRotateEnabled(&self, rotate_enabled: bool);
#[unsafe(method(isPitchEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isPitchEnabled(&self) -> bool;
#[unsafe(method(setPitchEnabled:))]
#[unsafe(method_family = none)]
pub unsafe fn setPitchEnabled(&self, pitch_enabled: bool);
#[unsafe(method(showsUserTrackingButton))]
#[unsafe(method_family = none)]
pub unsafe fn showsUserTrackingButton(&self) -> bool;
#[unsafe(method(setShowsUserTrackingButton:))]
#[unsafe(method_family = none)]
pub unsafe fn setShowsUserTrackingButton(&self, shows_user_tracking_button: bool);
#[cfg(feature = "MKTypes")]
#[unsafe(method(pitchButtonVisibility))]
#[unsafe(method_family = none)]
pub unsafe fn pitchButtonVisibility(&self) -> MKFeatureVisibility;
#[cfg(feature = "MKTypes")]
#[unsafe(method(setPitchButtonVisibility:))]
#[unsafe(method_family = none)]
pub unsafe fn setPitchButtonVisibility(&self, pitch_button_visibility: MKFeatureVisibility);
#[unsafe(method(showsPitchControl))]
#[unsafe(method_family = none)]
pub unsafe fn showsPitchControl(&self) -> bool;
#[unsafe(method(setShowsPitchControl:))]
#[unsafe(method_family = none)]
pub unsafe fn setShowsPitchControl(&self, shows_pitch_control: bool);
#[unsafe(method(showsZoomControls))]
#[unsafe(method_family = none)]
pub unsafe fn showsZoomControls(&self) -> bool;
#[unsafe(method(setShowsZoomControls:))]
#[unsafe(method_family = none)]
pub unsafe fn setShowsZoomControls(&self, shows_zoom_controls: bool);
#[unsafe(method(showsCompass))]
#[unsafe(method_family = none)]
pub unsafe fn showsCompass(&self) -> bool;
#[unsafe(method(setShowsCompass:))]
#[unsafe(method_family = none)]
pub unsafe fn setShowsCompass(&self, shows_compass: bool);
#[unsafe(method(showsScale))]
#[unsafe(method_family = none)]
pub unsafe fn showsScale(&self) -> bool;
#[unsafe(method(setShowsScale:))]
#[unsafe(method_family = none)]
pub unsafe fn setShowsScale(&self, shows_scale: bool);
#[cfg(feature = "MKPointOfInterestFilter")]
#[deprecated = "Use pointOfInterestFilter on respective MKMapConfiguration"]
#[unsafe(method(pointOfInterestFilter))]
#[unsafe(method_family = none)]
pub unsafe fn pointOfInterestFilter(&self) -> Option<Retained<MKPointOfInterestFilter>>;
#[cfg(feature = "MKPointOfInterestFilter")]
#[deprecated = "Use pointOfInterestFilter on respective MKMapConfiguration"]
#[unsafe(method(setPointOfInterestFilter:))]
#[unsafe(method_family = none)]
pub unsafe fn setPointOfInterestFilter(
&self,
point_of_interest_filter: Option<&MKPointOfInterestFilter>,
);
#[deprecated = "Use pointOfInterestFilter"]
#[unsafe(method(showsPointsOfInterest))]
#[unsafe(method_family = none)]
pub unsafe fn showsPointsOfInterest(&self) -> bool;
#[deprecated = "Use pointOfInterestFilter"]
#[unsafe(method(setShowsPointsOfInterest:))]
#[unsafe(method_family = none)]
pub unsafe fn setShowsPointsOfInterest(&self, shows_points_of_interest: bool);
#[deprecated = "None"]
#[unsafe(method(showsBuildings))]
#[unsafe(method_family = none)]
pub unsafe fn showsBuildings(&self) -> bool;
#[deprecated = "None"]
#[unsafe(method(setShowsBuildings:))]
#[unsafe(method_family = none)]
pub unsafe fn setShowsBuildings(&self, shows_buildings: bool);
#[deprecated = "Use showsTraffic on respective MKMapConfiguration"]
#[unsafe(method(showsTraffic))]
#[unsafe(method_family = none)]
pub unsafe fn showsTraffic(&self) -> bool;
#[deprecated = "Use showsTraffic on respective MKMapConfiguration"]
#[unsafe(method(setShowsTraffic:))]
#[unsafe(method_family = none)]
pub unsafe fn setShowsTraffic(&self, shows_traffic: bool);
#[unsafe(method(showsUserLocation))]
#[unsafe(method_family = none)]
pub unsafe fn showsUserLocation(&self) -> bool;
#[unsafe(method(setShowsUserLocation:))]
#[unsafe(method_family = none)]
pub unsafe fn setShowsUserLocation(&self, shows_user_location: bool);
#[cfg(feature = "MKUserLocation")]
#[unsafe(method(userLocation))]
#[unsafe(method_family = none)]
pub unsafe fn userLocation(&self) -> Retained<MKUserLocation>;
#[unsafe(method(userTrackingMode))]
#[unsafe(method_family = none)]
pub unsafe fn userTrackingMode(&self) -> MKUserTrackingMode;
#[unsafe(method(setUserTrackingMode:))]
#[unsafe(method_family = none)]
pub unsafe fn setUserTrackingMode(&self, user_tracking_mode: MKUserTrackingMode);
#[unsafe(method(setUserTrackingMode:animated:))]
#[unsafe(method_family = none)]
pub unsafe fn setUserTrackingMode_animated(&self, mode: MKUserTrackingMode, animated: bool);
#[unsafe(method(isUserLocationVisible))]
#[unsafe(method_family = none)]
pub unsafe fn isUserLocationVisible(&self) -> bool;
#[cfg(feature = "MKAnnotation")]
#[unsafe(method(addAnnotation:))]
#[unsafe(method_family = none)]
pub unsafe fn addAnnotation(&self, annotation: &ProtocolObject<dyn MKAnnotation>);
#[cfg(feature = "MKAnnotation")]
#[unsafe(method(addAnnotations:))]
#[unsafe(method_family = none)]
pub unsafe fn addAnnotations(
&self,
annotations: &NSArray<ProtocolObject<dyn MKAnnotation>>,
);
#[cfg(feature = "MKAnnotation")]
#[unsafe(method(removeAnnotation:))]
#[unsafe(method_family = none)]
pub unsafe fn removeAnnotation(&self, annotation: &ProtocolObject<dyn MKAnnotation>);
#[cfg(feature = "MKAnnotation")]
#[unsafe(method(removeAnnotations:))]
#[unsafe(method_family = none)]
pub unsafe fn removeAnnotations(
&self,
annotations: &NSArray<ProtocolObject<dyn MKAnnotation>>,
);
#[cfg(feature = "MKAnnotation")]
#[unsafe(method(annotations))]
#[unsafe(method_family = none)]
pub unsafe fn annotations(&self) -> Retained<NSArray<ProtocolObject<dyn MKAnnotation>>>;
#[cfg(all(feature = "MKAnnotation", feature = "MKGeometry"))]
#[unsafe(method(annotationsInMapRect:))]
#[unsafe(method_family = none)]
pub unsafe fn annotationsInMapRect(
&self,
map_rect: MKMapRect,
) -> Retained<NSSet<ProtocolObject<dyn MKAnnotation>>>;
#[cfg(all(feature = "MKAnnotation", feature = "MKAnnotationView"))]
#[unsafe(method(viewForAnnotation:))]
#[unsafe(method_family = none)]
pub unsafe fn viewForAnnotation(
&self,
annotation: &ProtocolObject<dyn MKAnnotation>,
) -> Option<Retained<MKAnnotationView>>;
#[cfg(feature = "MKAnnotationView")]
#[unsafe(method(dequeueReusableAnnotationViewWithIdentifier:))]
#[unsafe(method_family = none)]
pub unsafe fn dequeueReusableAnnotationViewWithIdentifier(
&self,
identifier: &NSString,
) -> Option<Retained<MKAnnotationView>>;
#[cfg(all(feature = "MKAnnotation", feature = "MKAnnotationView"))]
#[unsafe(method(dequeueReusableAnnotationViewWithIdentifier:forAnnotation:))]
#[unsafe(method_family = none)]
pub unsafe fn dequeueReusableAnnotationViewWithIdentifier_forAnnotation(
&self,
identifier: &NSString,
annotation: &ProtocolObject<dyn MKAnnotation>,
) -> Retained<MKAnnotationView>;
#[unsafe(method(registerClass:forAnnotationViewWithReuseIdentifier:))]
#[unsafe(method_family = none)]
pub unsafe fn registerClass_forAnnotationViewWithReuseIdentifier(
&self,
view_class: Option<&AnyClass>,
identifier: &NSString,
);
#[cfg(feature = "MKAnnotation")]
#[unsafe(method(selectAnnotation:animated:))]
#[unsafe(method_family = none)]
pub unsafe fn selectAnnotation_animated(
&self,
annotation: &ProtocolObject<dyn MKAnnotation>,
animated: bool,
);
#[cfg(feature = "MKAnnotation")]
#[unsafe(method(deselectAnnotation:animated:))]
#[unsafe(method_family = none)]
pub unsafe fn deselectAnnotation_animated(
&self,
annotation: Option<&ProtocolObject<dyn MKAnnotation>>,
animated: bool,
);
#[cfg(feature = "MKAnnotation")]
#[unsafe(method(selectedAnnotations))]
#[unsafe(method_family = none)]
pub unsafe fn selectedAnnotations(
&self,
) -> Retained<NSArray<ProtocolObject<dyn MKAnnotation>>>;
#[cfg(feature = "MKAnnotation")]
#[unsafe(method(setSelectedAnnotations:))]
#[unsafe(method_family = none)]
pub unsafe fn setSelectedAnnotations(
&self,
selected_annotations: &NSArray<ProtocolObject<dyn MKAnnotation>>,
);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(annotationVisibleRect))]
#[unsafe(method_family = none)]
pub unsafe fn annotationVisibleRect(&self) -> CGRect;
#[cfg(feature = "MKAnnotation")]
#[unsafe(method(showAnnotations:animated:))]
#[unsafe(method_family = none)]
pub unsafe fn showAnnotations_animated(
&self,
annotations: &NSArray<ProtocolObject<dyn MKAnnotation>>,
animated: bool,
);
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl MKMapView {
extern_methods!(
#[unsafe(method(initWithFrame:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl MKMapView {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl MKMapView {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl MKMapView {
extern_methods!(
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(addOverlay:level:))]
#[unsafe(method_family = none)]
pub unsafe fn addOverlay_level(
&self,
overlay: &ProtocolObject<dyn MKOverlay>,
level: MKOverlayLevel,
);
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(addOverlays:level:))]
#[unsafe(method_family = none)]
pub unsafe fn addOverlays_level(
&self,
overlays: &NSArray<ProtocolObject<dyn MKOverlay>>,
level: MKOverlayLevel,
);
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(removeOverlay:))]
#[unsafe(method_family = none)]
pub unsafe fn removeOverlay(&self, overlay: &ProtocolObject<dyn MKOverlay>);
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(removeOverlays:))]
#[unsafe(method_family = none)]
pub unsafe fn removeOverlays(&self, overlays: &NSArray<ProtocolObject<dyn MKOverlay>>);
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(insertOverlay:atIndex:level:))]
#[unsafe(method_family = none)]
pub unsafe fn insertOverlay_atIndex_level(
&self,
overlay: &ProtocolObject<dyn MKOverlay>,
index: NSUInteger,
level: MKOverlayLevel,
);
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(insertOverlay:aboveOverlay:))]
#[unsafe(method_family = none)]
pub unsafe fn insertOverlay_aboveOverlay(
&self,
overlay: &ProtocolObject<dyn MKOverlay>,
sibling: &ProtocolObject<dyn MKOverlay>,
);
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(insertOverlay:belowOverlay:))]
#[unsafe(method_family = none)]
pub unsafe fn insertOverlay_belowOverlay(
&self,
overlay: &ProtocolObject<dyn MKOverlay>,
sibling: &ProtocolObject<dyn MKOverlay>,
);
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(exchangeOverlay:withOverlay:))]
#[unsafe(method_family = none)]
pub unsafe fn exchangeOverlay_withOverlay(
&self,
overlay1: &ProtocolObject<dyn MKOverlay>,
overlay2: &ProtocolObject<dyn MKOverlay>,
);
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(overlays))]
#[unsafe(method_family = none)]
pub unsafe fn overlays(&self) -> Retained<NSArray<ProtocolObject<dyn MKOverlay>>>;
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(overlaysInLevel:))]
#[unsafe(method_family = none)]
pub unsafe fn overlaysInLevel(
&self,
level: MKOverlayLevel,
) -> Retained<NSArray<ProtocolObject<dyn MKOverlay>>>;
#[cfg(all(
feature = "MKAnnotation",
feature = "MKOverlay",
feature = "MKOverlayRenderer"
))]
#[unsafe(method(rendererForOverlay:))]
#[unsafe(method_family = none)]
pub unsafe fn rendererForOverlay(
&self,
overlay: &ProtocolObject<dyn MKOverlay>,
) -> Option<Retained<MKOverlayRenderer>>;
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(addOverlay:))]
#[unsafe(method_family = none)]
pub unsafe fn addOverlay(&self, overlay: &ProtocolObject<dyn MKOverlay>);
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(addOverlays:))]
#[unsafe(method_family = none)]
pub unsafe fn addOverlays(&self, overlays: &NSArray<ProtocolObject<dyn MKOverlay>>);
#[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
#[unsafe(method(insertOverlay:atIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn insertOverlay_atIndex(
&self,
overlay: &ProtocolObject<dyn MKOverlay>,
index: NSUInteger,
);
#[unsafe(method(exchangeOverlayAtIndex:withOverlayAtIndex:))]
#[unsafe(method_family = none)]
pub unsafe fn exchangeOverlayAtIndex_withOverlayAtIndex(
&self,
index1: NSUInteger,
index2: NSUInteger,
);
);
}
extern_protocol!(
pub unsafe trait MKMapViewDelegate: NSObjectProtocol + MainThreadOnly {
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:regionWillChangeAnimated:))]
#[unsafe(method_family = none)]
unsafe fn mapView_regionWillChangeAnimated(&self, map_view: &MKMapView, animated: bool);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:regionDidChangeAnimated:))]
#[unsafe(method_family = none)]
unsafe fn mapView_regionDidChangeAnimated(&self, map_view: &MKMapView, animated: bool);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapViewDidChangeVisibleRegion:))]
#[unsafe(method_family = none)]
unsafe fn mapViewDidChangeVisibleRegion(&self, map_view: &MKMapView);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapViewWillStartLoadingMap:))]
#[unsafe(method_family = none)]
unsafe fn mapViewWillStartLoadingMap(&self, map_view: &MKMapView);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapViewDidFinishLoadingMap:))]
#[unsafe(method_family = none)]
unsafe fn mapViewDidFinishLoadingMap(&self, map_view: &MKMapView);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapViewDidFailLoadingMap:withError:))]
#[unsafe(method_family = none)]
unsafe fn mapViewDidFailLoadingMap_withError(&self, map_view: &MKMapView, error: &NSError);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapViewWillStartRenderingMap:))]
#[unsafe(method_family = none)]
unsafe fn mapViewWillStartRenderingMap(&self, map_view: &MKMapView);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapViewDidFinishRenderingMap:fullyRendered:))]
#[unsafe(method_family = none)]
unsafe fn mapViewDidFinishRenderingMap_fullyRendered(
&self,
map_view: &MKMapView,
fully_rendered: bool,
);
#[cfg(all(
feature = "MKAnnotation",
feature = "MKAnnotationView",
feature = "objc2-app-kit"
))]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:viewForAnnotation:))]
#[unsafe(method_family = none)]
unsafe fn mapView_viewForAnnotation(
&self,
map_view: &MKMapView,
annotation: &ProtocolObject<dyn MKAnnotation>,
) -> Option<Retained<MKAnnotationView>>;
#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:didAddAnnotationViews:))]
#[unsafe(method_family = none)]
unsafe fn mapView_didAddAnnotationViews(
&self,
map_view: &MKMapView,
views: &NSArray<MKAnnotationView>,
);
#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:didSelectAnnotationView:))]
#[unsafe(method_family = none)]
unsafe fn mapView_didSelectAnnotationView(
&self,
map_view: &MKMapView,
view: &MKAnnotationView,
);
#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:didDeselectAnnotationView:))]
#[unsafe(method_family = none)]
unsafe fn mapView_didDeselectAnnotationView(
&self,
map_view: &MKMapView,
view: &MKAnnotationView,
);
#[cfg(all(feature = "MKAnnotation", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:didSelectAnnotation:))]
#[unsafe(method_family = none)]
unsafe fn mapView_didSelectAnnotation(
&self,
map_view: &MKMapView,
annotation: &ProtocolObject<dyn MKAnnotation>,
);
#[cfg(all(feature = "MKAnnotation", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:didDeselectAnnotation:))]
#[unsafe(method_family = none)]
unsafe fn mapView_didDeselectAnnotation(
&self,
map_view: &MKMapView,
annotation: &ProtocolObject<dyn MKAnnotation>,
);
#[cfg(all(
feature = "MKAnnotation",
feature = "MKSelectionAccessory",
feature = "objc2-app-kit"
))]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:selectionAccessoryForAnnotation:))]
#[unsafe(method_family = none)]
unsafe fn mapView_selectionAccessoryForAnnotation(
&self,
map_view: &MKMapView,
annotation: &ProtocolObject<dyn MKAnnotation>,
) -> Option<Retained<MKSelectionAccessory>>;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapViewWillStartLocatingUser:))]
#[unsafe(method_family = none)]
unsafe fn mapViewWillStartLocatingUser(&self, map_view: &MKMapView);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapViewDidStopLocatingUser:))]
#[unsafe(method_family = none)]
unsafe fn mapViewDidStopLocatingUser(&self, map_view: &MKMapView);
#[cfg(all(feature = "MKUserLocation", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:didUpdateUserLocation:))]
#[unsafe(method_family = none)]
unsafe fn mapView_didUpdateUserLocation(
&self,
map_view: &MKMapView,
user_location: &MKUserLocation,
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:didFailToLocateUserWithError:))]
#[unsafe(method_family = none)]
unsafe fn mapView_didFailToLocateUserWithError(
&self,
map_view: &MKMapView,
error: &NSError,
);
#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:annotationView:didChangeDragState:fromOldState:))]
#[unsafe(method_family = none)]
unsafe fn mapView_annotationView_didChangeDragState_fromOldState(
&self,
map_view: &MKMapView,
view: &MKAnnotationView,
new_state: MKAnnotationViewDragState,
old_state: MKAnnotationViewDragState,
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:didChangeUserTrackingMode:animated:))]
#[unsafe(method_family = none)]
unsafe fn mapView_didChangeUserTrackingMode_animated(
&self,
map_view: &MKMapView,
mode: MKUserTrackingMode,
animated: bool,
);
#[cfg(all(
feature = "MKAnnotation",
feature = "MKOverlay",
feature = "MKOverlayRenderer",
feature = "objc2-app-kit"
))]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:rendererForOverlay:))]
#[unsafe(method_family = none)]
unsafe fn mapView_rendererForOverlay(
&self,
map_view: &MKMapView,
overlay: &ProtocolObject<dyn MKOverlay>,
) -> Retained<MKOverlayRenderer>;
#[cfg(all(feature = "MKOverlayRenderer", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:didAddOverlayRenderers:))]
#[unsafe(method_family = none)]
unsafe fn mapView_didAddOverlayRenderers(
&self,
map_view: &MKMapView,
renderers: &NSArray<MKOverlayRenderer>,
);
#[cfg(all(
feature = "MKAnnotation",
feature = "MKClusterAnnotation",
feature = "objc2-app-kit"
))]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(mapView:clusterAnnotationForMemberAnnotations:))]
#[unsafe(method_family = none)]
unsafe fn mapView_clusterAnnotationForMemberAnnotations(
&self,
map_view: &MKMapView,
member_annotations: &NSArray<ProtocolObject<dyn MKAnnotation>>,
) -> Retained<MKClusterAnnotation>;
}
);