objc2_car_play/generated/
CPTemplateApplicationDashboardScene.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-ui-kit")]
7use objc2_ui_kit::*;
8
9use crate::*;
10
11extern_protocol!(
12    /// [Apple's documentation](https://developer.apple.com/documentation/carplay/cptemplateapplicationdashboardscenedelegate?language=objc)
13    #[cfg(feature = "objc2-ui-kit")]
14    pub unsafe trait CPTemplateApplicationDashboardSceneDelegate: UISceneDelegate {
15        #[cfg(feature = "CPDashboardController")]
16        /// The Dashboard navigation widget has connected and is ready to present content.
17        ///
18        /// Your app should create its view controller and assign it to the
19        /// `rootViewController`property
20        /// of this window.
21        ///
22        /// Note: The dashboardController object will be strongly retained by the CPTemplateApplicationDashboardScene, the delegate does not need to retain it.
23        #[optional]
24        #[unsafe(method(templateApplicationDashboardScene:didConnectDashboardController:toWindow:))]
25        #[unsafe(method_family = none)]
26        unsafe fn templateApplicationDashboardScene_didConnectDashboardController_toWindow(
27            &self,
28            template_application_dashboard_scene: &CPTemplateApplicationDashboardScene,
29            dashboard_controller: &CPDashboardController,
30            window: &UIWindow,
31        );
32
33        #[cfg(feature = "CPDashboardController")]
34        /// The Dashboard navigation widget has disconnected.
35        #[optional]
36        #[unsafe(method(templateApplicationDashboardScene:didDisconnectDashboardController:fromWindow:))]
37        #[unsafe(method_family = none)]
38        unsafe fn templateApplicationDashboardScene_didDisconnectDashboardController_fromWindow(
39            &self,
40            template_application_dashboard_scene: &CPTemplateApplicationDashboardScene,
41            dashboard_controller: &CPDashboardController,
42            window: &UIWindow,
43        );
44    }
45);
46
47extern_class!(
48    /// [Apple's documentation](https://developer.apple.com/documentation/carplay/cptemplateapplicationdashboardscene?language=objc)
49    #[unsafe(super(UIScene, UIResponder, NSObject))]
50    #[derive(Debug, PartialEq, Eq, Hash)]
51    #[cfg(feature = "objc2-ui-kit")]
52    pub struct CPTemplateApplicationDashboardScene;
53);
54
55#[cfg(feature = "objc2-ui-kit")]
56extern_conformance!(
57    unsafe impl NSObjectProtocol for CPTemplateApplicationDashboardScene {}
58);
59
60#[cfg(feature = "objc2-ui-kit")]
61extern_conformance!(
62    unsafe impl UIResponderStandardEditActions for CPTemplateApplicationDashboardScene {}
63);
64
65#[cfg(feature = "objc2-ui-kit")]
66impl CPTemplateApplicationDashboardScene {
67    extern_methods!(
68        /// The delegate for a CPTemplateApplicationDashboardScene must conform to the CPTemplateApplicationDashboardSceneDelegate protocol.
69        #[unsafe(method(delegate))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn delegate(
72            &self,
73        ) -> Option<Retained<ProtocolObject<dyn CPTemplateApplicationDashboardSceneDelegate>>>;
74
75        /// Setter for [`delegate`][Self::delegate].
76        #[unsafe(method(setDelegate:))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn setDelegate(
79            &self,
80            delegate: Option<&ProtocolObject<dyn CPTemplateApplicationDashboardSceneDelegate>>,
81        );
82
83        #[cfg(feature = "CPDashboardController")]
84        /// The dashboardController object for this scene.
85        #[unsafe(method(dashboardController))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn dashboardController(&self) -> Retained<CPDashboardController>;
88
89        /// The UIWindow created for this CPTemplateApplicationDashboardScene
90        #[unsafe(method(dashboardWindow))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn dashboardWindow(&self) -> Retained<UIWindow>;
93    );
94}
95
96/// Methods declared on superclass `UIScene`.
97#[cfg(feature = "objc2-ui-kit")]
98impl CPTemplateApplicationDashboardScene {
99    extern_methods!(
100        #[unsafe(method(new))]
101        #[unsafe(method_family = new)]
102        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
103
104        #[unsafe(method(init))]
105        #[unsafe(method_family = init)]
106        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
107
108        #[unsafe(method(initWithSession:connectionOptions:))]
109        #[unsafe(method_family = init)]
110        pub unsafe fn initWithSession_connectionOptions(
111            this: Allocated<Self>,
112            session: &UISceneSession,
113            connection_options: &UISceneConnectionOptions,
114        ) -> Retained<Self>;
115    );
116}
117
118extern "C" {
119    /// [Apple's documentation](https://developer.apple.com/documentation/carplay/cptemplateapplicationdashboardscenesessionroleapplication?language=objc)
120    #[cfg(feature = "objc2-ui-kit")]
121    pub static CPTemplateApplicationDashboardSceneSessionRoleApplication:
122        &'static UISceneSessionRole;
123}