icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AppKit::*;
use crate::Contacts::*;
use crate::CoreLocation::*;
use crate::Foundation::*;
use crate::MapKit::*;

ns_enum!(
    #[underlying(NSInteger)]
    pub enum MKLookAroundBadgePosition {
        MKLookAroundBadgePositionTopLeading = 0,
        MKLookAroundBadgePositionTopTrailing = 1,
        MKLookAroundBadgePositionBottomTrailing = 2,
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MapKit_MKLookAroundViewController")]
    pub struct MKLookAroundViewController;

    #[cfg(feature = "MapKit_MKLookAroundViewController")]
    unsafe impl ClassType for MKLookAroundViewController {
        #[inherits(NSResponder, NSObject)]
        type Super = NSViewController;
        type Mutability = MainThreadOnly;
    }
);

#[cfg(feature = "MapKit_MKLookAroundViewController")]
unsafe impl NSCoding for MKLookAroundViewController {}

#[cfg(feature = "MapKit_MKLookAroundViewController")]
unsafe impl NSEditor for MKLookAroundViewController {}

#[cfg(feature = "MapKit_MKLookAroundViewController")]
unsafe impl NSObjectProtocol for MKLookAroundViewController {}

#[cfg(feature = "MapKit_MKLookAroundViewController")]
unsafe impl NSSecureCoding for MKLookAroundViewController {}

#[cfg(feature = "MapKit_MKLookAroundViewController")]
unsafe impl NSSeguePerforming for MKLookAroundViewController {}

#[cfg(feature = "MapKit_MKLookAroundViewController")]
unsafe impl NSUserInterfaceItemIdentification for MKLookAroundViewController {}

extern_methods!(
    #[cfg(feature = "MapKit_MKLookAroundViewController")]
    unsafe impl MKLookAroundViewController {
        #[cfg(feature = "MapKit_MKLookAroundScene")]
        #[method_id(@__retain_semantics Init initWithScene:)]
        pub unsafe fn initWithScene(this: Allocated<Self>, scene: &MKLookAroundScene) -> Id<Self>;

        #[cfg(all(feature = "Foundation_NSBundle", feature = "Foundation_NSString"))]
        #[method_id(@__retain_semantics Init initWithNibName:bundle:)]
        pub unsafe fn initWithNibName_bundle(
            this: Allocated<Self>,
            nib_name_or_nil: Option<&NSString>,
            nib_bundle_or_nil: Option<&NSBundle>,
        ) -> Id<Self>;

        #[cfg(feature = "Foundation_NSCoder")]
        #[method_id(@__retain_semantics Init initWithCoder:)]
        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Option<Id<Self>>;

        #[method_id(@__retain_semantics Other delegate)]
        pub unsafe fn delegate(
            &self,
        ) -> Option<Id<ProtocolObject<dyn MKLookAroundViewControllerDelegate>>>;

        #[method(setDelegate:)]
        pub unsafe fn setDelegate(
            &self,
            delegate: Option<&ProtocolObject<dyn MKLookAroundViewControllerDelegate>>,
        );

        #[cfg(feature = "MapKit_MKLookAroundScene")]
        #[method_id(@__retain_semantics Other scene)]
        pub unsafe fn scene(&self) -> Option<Id<MKLookAroundScene>>;

        #[cfg(feature = "MapKit_MKLookAroundScene")]
        #[method(setScene:)]
        pub unsafe fn setScene(&self, scene: Option<&MKLookAroundScene>);

        #[method(isNavigationEnabled)]
        pub unsafe fn isNavigationEnabled(&self) -> bool;

        #[method(setNavigationEnabled:)]
        pub unsafe fn setNavigationEnabled(&self, navigation_enabled: bool);

        #[method(showsRoadLabels)]
        pub unsafe fn showsRoadLabels(&self) -> bool;

        #[method(setShowsRoadLabels:)]
        pub unsafe fn setShowsRoadLabels(&self, shows_road_labels: bool);

        #[cfg(feature = "MapKit_MKPointOfInterestFilter")]
        #[method_id(@__retain_semantics Other pointOfInterestFilter)]
        pub unsafe fn pointOfInterestFilter(&self) -> Option<Id<MKPointOfInterestFilter>>;

        #[cfg(feature = "MapKit_MKPointOfInterestFilter")]
        #[method(setPointOfInterestFilter:)]
        pub unsafe fn setPointOfInterestFilter(
            &self,
            point_of_interest_filter: Option<&MKPointOfInterestFilter>,
        );

        #[method(badgePosition)]
        pub unsafe fn badgePosition(&self) -> MKLookAroundBadgePosition;

        #[method(setBadgePosition:)]
        pub unsafe fn setBadgePosition(&self, badge_position: MKLookAroundBadgePosition);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSResponder`
    #[cfg(feature = "MapKit_MKLookAroundViewController")]
    unsafe impl MKLookAroundViewController {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "MapKit_MKLookAroundViewController")]
    unsafe impl MKLookAroundViewController {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Id<Self>;
    }
);

extern_protocol!(
    pub unsafe trait MKLookAroundViewControllerDelegate: NSObjectProtocol {
        #[cfg(feature = "MapKit_MKLookAroundViewController")]
        #[optional]
        #[method(lookAroundViewControllerWillUpdateScene:)]
        unsafe fn lookAroundViewControllerWillUpdateScene(
            &self,
            view_controller: &MKLookAroundViewController,
        );

        #[cfg(feature = "MapKit_MKLookAroundViewController")]
        #[optional]
        #[method(lookAroundViewControllerDidUpdateScene:)]
        unsafe fn lookAroundViewControllerDidUpdateScene(
            &self,
            view_controller: &MKLookAroundViewController,
        );

        #[cfg(feature = "MapKit_MKLookAroundViewController")]
        #[optional]
        #[method(lookAroundViewControllerWillPresentFullScreen:)]
        unsafe fn lookAroundViewControllerWillPresentFullScreen(
            &self,
            view_controller: &MKLookAroundViewController,
        );

        #[cfg(feature = "MapKit_MKLookAroundViewController")]
        #[optional]
        #[method(lookAroundViewControllerDidPresentFullScreen:)]
        unsafe fn lookAroundViewControllerDidPresentFullScreen(
            &self,
            view_controller: &MKLookAroundViewController,
        );

        #[cfg(feature = "MapKit_MKLookAroundViewController")]
        #[optional]
        #[method(lookAroundViewControllerWillDismissFullScreen:)]
        unsafe fn lookAroundViewControllerWillDismissFullScreen(
            &self,
            view_controller: &MKLookAroundViewController,
        );

        #[cfg(feature = "MapKit_MKLookAroundViewController")]
        #[optional]
        #[method(lookAroundViewControllerDidDismissFullScreen:)]
        unsafe fn lookAroundViewControllerDidDismissFullScreen(
            &self,
            view_controller: &MKLookAroundViewController,
        );
    }

    unsafe impl ProtocolType for dyn MKLookAroundViewControllerDelegate {}
);