objc2_car_play/generated/
CPTemplateApplicationInstrumentClusterScene.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/cptemplateapplicationinstrumentclusterscenedelegate?language=objc)
13    #[cfg(feature = "objc2-ui-kit")]
14    pub unsafe trait CPTemplateApplicationInstrumentClusterSceneDelegate:
15        UISceneDelegate + MainThreadOnly
16    {
17        #[cfg(feature = "CPInstrumentClusterController")]
18        /// The instrument cluster navigation scene has connected.
19        #[optional]
20        #[unsafe(method(templateApplicationInstrumentClusterScene:didConnectInstrumentClusterController:))]
21        #[unsafe(method_family = none)]
22        unsafe fn templateApplicationInstrumentClusterScene_didConnectInstrumentClusterController(
23            &self,
24            template_application_instrument_cluster_scene: &CPTemplateApplicationInstrumentClusterScene,
25            instrument_cluster_controller: &CPInstrumentClusterController,
26        );
27
28        #[cfg(feature = "CPInstrumentClusterController")]
29        /// The instrument cluster navigation scene has connected.
30        #[optional]
31        #[unsafe(method(templateApplicationInstrumentClusterScene:didDisconnectInstrumentClusterController:))]
32        #[unsafe(method_family = none)]
33        unsafe fn templateApplicationInstrumentClusterScene_didDisconnectInstrumentClusterController(
34            &self,
35            template_application_instrument_cluster_scene: &CPTemplateApplicationInstrumentClusterScene,
36            instrument_cluster_controller: &CPInstrumentClusterController,
37        );
38
39        /// The CarPlay system suggested content style for this scene has changed.
40        #[optional]
41        #[unsafe(method(contentStyleDidChange:))]
42        #[unsafe(method_family = none)]
43        unsafe fn contentStyleDidChange(&self, content_style: UIUserInterfaceStyle);
44    }
45);
46
47extern_class!(
48    /// [Apple's documentation](https://developer.apple.com/documentation/carplay/cptemplateapplicationinstrumentclusterscene?language=objc)
49    #[unsafe(super(UIScene, UIResponder, NSObject))]
50    #[derive(Debug, PartialEq, Eq, Hash)]
51    #[cfg(feature = "objc2-ui-kit")]
52    pub struct CPTemplateApplicationInstrumentClusterScene;
53);
54
55#[cfg(feature = "objc2-ui-kit")]
56extern_conformance!(
57    unsafe impl NSObjectProtocol for CPTemplateApplicationInstrumentClusterScene {}
58);
59
60#[cfg(feature = "objc2-ui-kit")]
61extern_conformance!(
62    unsafe impl UIResponderStandardEditActions for CPTemplateApplicationInstrumentClusterScene {}
63);
64
65#[cfg(feature = "objc2-ui-kit")]
66impl CPTemplateApplicationInstrumentClusterScene {
67    extern_methods!(
68        /// The delegate for a CPTemplateApplicationInstrumentClusterScene must conform to the CPTemplateApplicationInstrumentClusterSceneDelegate protocol.
69        #[unsafe(method(delegate))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn delegate(
72            &self,
73        ) -> Option<Retained<ProtocolObject<dyn CPTemplateApplicationInstrumentClusterSceneDelegate>>>;
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<
81                &ProtocolObject<dyn CPTemplateApplicationInstrumentClusterSceneDelegate>,
82            >,
83        );
84
85        #[cfg(feature = "CPInstrumentClusterController")]
86        /// The instrumentClusterController object for this scene.
87        #[unsafe(method(instrumentClusterController))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn instrumentClusterController(&self)
90            -> Retained<CPInstrumentClusterController>;
91
92        /// The current content style for this scene suggested by the connected CarPlay system.
93        #[unsafe(method(contentStyle))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn contentStyle(&self) -> UIUserInterfaceStyle;
96    );
97}
98
99/// Methods declared on superclass `UIScene`.
100#[cfg(feature = "objc2-ui-kit")]
101impl CPTemplateApplicationInstrumentClusterScene {
102    extern_methods!(
103        #[unsafe(method(new))]
104        #[unsafe(method_family = new)]
105        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
106
107        #[unsafe(method(init))]
108        #[unsafe(method_family = init)]
109        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
110
111        #[unsafe(method(initWithSession:connectionOptions:))]
112        #[unsafe(method_family = init)]
113        pub unsafe fn initWithSession_connectionOptions(
114            this: Allocated<Self>,
115            session: &UISceneSession,
116            connection_options: &UISceneConnectionOptions,
117        ) -> Retained<Self>;
118    );
119}
120
121extern "C" {
122    /// [Apple's documentation](https://developer.apple.com/documentation/carplay/cptemplateapplicationinstrumentclusterscenesessionroleapplication?language=objc)
123    #[cfg(feature = "objc2-ui-kit")]
124    pub static CPTemplateApplicationInstrumentClusterSceneSessionRoleApplication:
125        &'static UISceneSessionRole;
126}