//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;

use crate::*;

extern_class!(
    /// The context menu system.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uicontextmenusystem?language=objc)
    #[unsafe(super(UIMenuSystem, NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "UIMenuSystem")]
    pub struct UIContextMenuSystem;
);

#[cfg(feature = "UIMenuSystem")]
extern_conformance!(
    unsafe impl NSObjectProtocol for UIContextMenuSystem {}
);

#[cfg(feature = "UIMenuSystem")]
impl UIContextMenuSystem {
    extern_methods!(
        /// The shared context menu system.
        #[unsafe(method(sharedSystem))]
        #[unsafe(method_family = none)]
        pub fn sharedSystem(mtm: MainThreadMarker) -> Retained<UIContextMenuSystem>;

        #[unsafe(method(mainSystem))]
        #[unsafe(method_family = none)]
        pub unsafe fn mainSystem(mtm: MainThreadMarker) -> Retained<UIMenuSystem>;

        #[unsafe(method(contextSystem))]
        #[unsafe(method_family = none)]
        pub unsafe fn contextSystem(mtm: MainThreadMarker) -> Retained<UIMenuSystem>;
    );
}

/// Methods declared on superclass `UIMenuSystem`.
#[cfg(feature = "UIMenuSystem")]
impl UIContextMenuSystem {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}
