objc2-car-play 0.3.2

Bindings to the CarPlay framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/carplay/cpdashboardcontroller?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct CPDashboardController;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for CPDashboardController {}
);

impl CPDashboardController {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        #[cfg(feature = "CPDashboardButton")]
        /// An array of dashboard buttons to be displayed on the dashboard widget.
        ///
        /// Note: The dashboard controller may display a maximum of 2 buttons. Setting more than 2 buttons to this
        /// property will only display the first 2 buttons. The system will manage hiding and showing these buttons when
        /// navigation is active or inactive.
        #[unsafe(method(shortcutButtons))]
        #[unsafe(method_family = none)]
        pub unsafe fn shortcutButtons(&self) -> Retained<NSArray<CPDashboardButton>>;

        #[cfg(feature = "CPDashboardButton")]
        /// Setter for [`shortcutButtons`][Self::shortcutButtons].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setShortcutButtons:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setShortcutButtons(&self, shortcut_buttons: &NSArray<CPDashboardButton>);
    );
}