objc2_car_play/generated/
CPDashboardController.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/carplay/cpdashboardcontroller?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct CPDashboardController;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for CPDashboardController {}
19);
20
21impl CPDashboardController {
22    extern_methods!(
23        #[unsafe(method(init))]
24        #[unsafe(method_family = init)]
25        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
26
27        #[unsafe(method(new))]
28        #[unsafe(method_family = new)]
29        pub unsafe fn new() -> Retained<Self>;
30
31        #[cfg(feature = "CPDashboardButton")]
32        /// An array of dashboard buttons to be displayed on the dashboard widget.
33        ///
34        /// Note: The dashboard controller may display a maximum of 2 buttons. Setting more than 2 buttons to this
35        /// property will only display the first 2 buttons. The system will manage hiding and showing these buttons when
36        /// navigation is active or inactive.
37        #[unsafe(method(shortcutButtons))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn shortcutButtons(&self) -> Retained<NSArray<CPDashboardButton>>;
40
41        #[cfg(feature = "CPDashboardButton")]
42        /// Setter for [`shortcutButtons`][Self::shortcutButtons].
43        ///
44        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
45        #[unsafe(method(setShortcutButtons:))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn setShortcutButtons(&self, shortcut_buttons: &NSArray<CPDashboardButton>);
48    );
49}