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 CPTemplateApplicationDashboardSceneDelegate: UISceneDelegate {
#[cfg(feature = "CPDashboardController")]
#[optional]
#[unsafe(method(templateApplicationDashboardScene:didConnectDashboardController:toWindow:))]
#[unsafe(method_family = none)]
unsafe fn templateApplicationDashboardScene_didConnectDashboardController_toWindow(
&self,
template_application_dashboard_scene: &CPTemplateApplicationDashboardScene,
dashboard_controller: &CPDashboardController,
window: &UIWindow,
);
#[cfg(feature = "CPDashboardController")]
#[optional]
#[unsafe(method(templateApplicationDashboardScene:didDisconnectDashboardController:fromWindow:))]
#[unsafe(method_family = none)]
unsafe fn templateApplicationDashboardScene_didDisconnectDashboardController_fromWindow(
&self,
template_application_dashboard_scene: &CPTemplateApplicationDashboardScene,
dashboard_controller: &CPDashboardController,
window: &UIWindow,
);
}
);
extern_class!(
#[unsafe(super(UIScene, UIResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-ui-kit")]
pub struct CPTemplateApplicationDashboardScene;
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl NSObjectProtocol for CPTemplateApplicationDashboardScene {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UIResponderStandardEditActions for CPTemplateApplicationDashboardScene {}
);
#[cfg(feature = "objc2-ui-kit")]
impl CPTemplateApplicationDashboardScene {
extern_methods!(
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub unsafe fn delegate(
&self,
) -> Option<Retained<ProtocolObject<dyn CPTemplateApplicationDashboardSceneDelegate>>>;
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn CPTemplateApplicationDashboardSceneDelegate>>,
);
#[cfg(feature = "CPDashboardController")]
#[unsafe(method(dashboardController))]
#[unsafe(method_family = none)]
pub unsafe fn dashboardController(&self) -> Retained<CPDashboardController>;
#[unsafe(method(dashboardWindow))]
#[unsafe(method_family = none)]
pub unsafe fn dashboardWindow(&self) -> Retained<UIWindow>;
);
}
#[cfg(feature = "objc2-ui-kit")]
impl CPTemplateApplicationDashboardScene {
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 CPTemplateApplicationDashboardSceneSessionRoleApplication:
&'static UISceneSessionRole;
}