use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-ui-kit")]
use objc2_ui_kit::*;
use crate::*;
extern_protocol!(
#[cfg(feature = "objc2-ui-kit")]
pub unsafe trait CPTemplateApplicationInstrumentClusterSceneDelegate:
UISceneDelegate + MainThreadOnly
{
#[cfg(feature = "CPInstrumentClusterController")]
#[optional]
#[unsafe(method(templateApplicationInstrumentClusterScene:didConnectInstrumentClusterController:))]
#[unsafe(method_family = none)]
unsafe fn templateApplicationInstrumentClusterScene_didConnectInstrumentClusterController(
&self,
template_application_instrument_cluster_scene: &CPTemplateApplicationInstrumentClusterScene,
instrument_cluster_controller: &CPInstrumentClusterController,
);
#[cfg(feature = "CPInstrumentClusterController")]
#[optional]
#[unsafe(method(templateApplicationInstrumentClusterScene:didDisconnectInstrumentClusterController:))]
#[unsafe(method_family = none)]
unsafe fn templateApplicationInstrumentClusterScene_didDisconnectInstrumentClusterController(
&self,
template_application_instrument_cluster_scene: &CPTemplateApplicationInstrumentClusterScene,
instrument_cluster_controller: &CPInstrumentClusterController,
);
#[optional]
#[unsafe(method(contentStyleDidChange:))]
#[unsafe(method_family = none)]
unsafe fn contentStyleDidChange(&self, content_style: UIUserInterfaceStyle);
}
);
extern_class!(
#[unsafe(super(UIScene, UIResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-ui-kit")]
pub struct CPTemplateApplicationInstrumentClusterScene;
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl NSObjectProtocol for CPTemplateApplicationInstrumentClusterScene {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UIResponderStandardEditActions for CPTemplateApplicationInstrumentClusterScene {}
);
#[cfg(feature = "objc2-ui-kit")]
impl CPTemplateApplicationInstrumentClusterScene {
extern_methods!(
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub unsafe fn delegate(
&self,
) -> Option<Retained<ProtocolObject<dyn CPTemplateApplicationInstrumentClusterSceneDelegate>>>;
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelegate(
&self,
delegate: Option<
&ProtocolObject<dyn CPTemplateApplicationInstrumentClusterSceneDelegate>,
>,
);
#[cfg(feature = "CPInstrumentClusterController")]
#[unsafe(method(instrumentClusterController))]
#[unsafe(method_family = none)]
pub unsafe fn instrumentClusterController(&self)
-> Retained<CPInstrumentClusterController>;
#[unsafe(method(contentStyle))]
#[unsafe(method_family = none)]
pub unsafe fn contentStyle(&self) -> UIUserInterfaceStyle;
);
}
#[cfg(feature = "objc2-ui-kit")]
impl CPTemplateApplicationInstrumentClusterScene {
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>;
#[unsafe(method(initWithSession:connectionOptions:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSession_connectionOptions(
this: Allocated<Self>,
session: &UISceneSession,
connection_options: &UISceneConnectionOptions,
) -> Retained<Self>;
);
}
extern "C" {
#[cfg(feature = "objc2-ui-kit")]
pub static CPTemplateApplicationInstrumentClusterSceneSessionRoleApplication:
&'static UISceneSessionRole;
}