use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MKLookAroundBadgePosition(pub NSInteger);
impl MKLookAroundBadgePosition {
#[doc(alias = "MKLookAroundBadgePositionTopLeading")]
pub const TopLeading: Self = Self(0);
#[doc(alias = "MKLookAroundBadgePositionTopTrailing")]
pub const TopTrailing: Self = Self(1);
#[doc(alias = "MKLookAroundBadgePositionBottomTrailing")]
pub const BottomTrailing: Self = Self(2);
}
unsafe impl Encode for MKLookAroundBadgePosition {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for MKLookAroundBadgePosition {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSViewController, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
pub struct MKLookAroundViewController;
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSCoding for MKLookAroundViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSEditor for MKLookAroundViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSObjectProtocol for MKLookAroundViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSSecureCoding for MKLookAroundViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSSeguePerforming for MKLookAroundViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for MKLookAroundViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl MKLookAroundViewController {
extern_methods!(
#[cfg(feature = "MKLookAroundScene")]
#[unsafe(method(initWithScene:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithScene(
this: Allocated<Self>,
scene: &MKLookAroundScene,
) -> Retained<Self>;
#[unsafe(method(initWithNibName:bundle:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithNibName_bundle(
this: Allocated<Self>,
nib_name_or_nil: Option<&NSString>,
nib_bundle_or_nil: Option<&NSBundle>,
) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub unsafe fn delegate(
&self,
) -> Option<Retained<ProtocolObject<dyn MKLookAroundViewControllerDelegate>>>;
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn MKLookAroundViewControllerDelegate>>,
);
#[cfg(feature = "MKLookAroundScene")]
#[unsafe(method(scene))]
#[unsafe(method_family = none)]
pub unsafe fn scene(&self) -> Option<Retained<MKLookAroundScene>>;
#[cfg(feature = "MKLookAroundScene")]
#[unsafe(method(setScene:))]
#[unsafe(method_family = none)]
pub unsafe fn setScene(&self, scene: Option<&MKLookAroundScene>);
#[unsafe(method(isNavigationEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isNavigationEnabled(&self) -> bool;
#[unsafe(method(setNavigationEnabled:))]
#[unsafe(method_family = none)]
pub unsafe fn setNavigationEnabled(&self, navigation_enabled: bool);
#[unsafe(method(showsRoadLabels))]
#[unsafe(method_family = none)]
pub unsafe fn showsRoadLabels(&self) -> bool;
#[unsafe(method(setShowsRoadLabels:))]
#[unsafe(method_family = none)]
pub unsafe fn setShowsRoadLabels(&self, shows_road_labels: bool);
#[cfg(feature = "MKPointOfInterestFilter")]
#[unsafe(method(pointOfInterestFilter))]
#[unsafe(method_family = none)]
pub unsafe fn pointOfInterestFilter(&self) -> Option<Retained<MKPointOfInterestFilter>>;
#[cfg(feature = "MKPointOfInterestFilter")]
#[unsafe(method(setPointOfInterestFilter:))]
#[unsafe(method_family = none)]
pub unsafe fn setPointOfInterestFilter(
&self,
point_of_interest_filter: Option<&MKPointOfInterestFilter>,
);
#[unsafe(method(badgePosition))]
#[unsafe(method_family = none)]
pub unsafe fn badgePosition(&self) -> MKLookAroundBadgePosition;
#[unsafe(method(setBadgePosition:))]
#[unsafe(method_family = none)]
pub unsafe fn setBadgePosition(&self, badge_position: MKLookAroundBadgePosition);
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl MKLookAroundViewController {
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 MKLookAroundViewController {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
extern_protocol!(
pub unsafe trait MKLookAroundViewControllerDelegate: NSObjectProtocol {
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(lookAroundViewControllerWillUpdateScene:))]
#[unsafe(method_family = none)]
unsafe fn lookAroundViewControllerWillUpdateScene(
&self,
view_controller: &MKLookAroundViewController,
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(lookAroundViewControllerDidUpdateScene:))]
#[unsafe(method_family = none)]
unsafe fn lookAroundViewControllerDidUpdateScene(
&self,
view_controller: &MKLookAroundViewController,
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(lookAroundViewControllerWillPresentFullScreen:))]
#[unsafe(method_family = none)]
unsafe fn lookAroundViewControllerWillPresentFullScreen(
&self,
view_controller: &MKLookAroundViewController,
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(lookAroundViewControllerDidPresentFullScreen:))]
#[unsafe(method_family = none)]
unsafe fn lookAroundViewControllerDidPresentFullScreen(
&self,
view_controller: &MKLookAroundViewController,
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(lookAroundViewControllerWillDismissFullScreen:))]
#[unsafe(method_family = none)]
unsafe fn lookAroundViewControllerWillDismissFullScreen(
&self,
view_controller: &MKLookAroundViewController,
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[optional]
#[unsafe(method(lookAroundViewControllerDidDismissFullScreen:))]
#[unsafe(method_family = none)]
unsafe fn lookAroundViewControllerDidDismissFullScreen(
&self,
view_controller: &MKLookAroundViewController,
);
}
);