objc2_car_play/generated/
CPBarButtonProviding.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_protocol!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/carplay/cpbarbuttonproviding?language=objc)
12    pub unsafe trait CPBarButtonProviding: NSObjectProtocol {
13        #[cfg(feature = "CPBarButton")]
14        /// An array of bar buttons to be displayed on the leading side of the navigation bar.
15        ///
16        ///
17        /// Note: The navigation bar may display a maximum of 2 buttons in the leading space.
18        /// Setting more than 2 buttons to this property will only display the first 2 buttons.
19        #[unsafe(method(leadingNavigationBarButtons))]
20        #[unsafe(method_family = none)]
21        unsafe fn leadingNavigationBarButtons(&self) -> Retained<NSArray<CPBarButton>>;
22
23        #[cfg(feature = "CPBarButton")]
24        /// Setter for [`leadingNavigationBarButtons`][Self::leadingNavigationBarButtons].
25        #[unsafe(method(setLeadingNavigationBarButtons:))]
26        #[unsafe(method_family = none)]
27        unsafe fn setLeadingNavigationBarButtons(
28            &self,
29            leading_navigation_bar_buttons: &NSArray<CPBarButton>,
30        );
31
32        #[cfg(feature = "CPBarButton")]
33        /// An array of bar buttons to be displayed on the trailing side of the navigation bar.
34        ///
35        ///
36        /// Note: The navigation bar may display a maximum of 2 buttons in the trailing space.
37        /// Setting more than 2 buttons to this property will only display the first 2 buttons.
38        #[unsafe(method(trailingNavigationBarButtons))]
39        #[unsafe(method_family = none)]
40        unsafe fn trailingNavigationBarButtons(&self) -> Retained<NSArray<CPBarButton>>;
41
42        #[cfg(feature = "CPBarButton")]
43        /// Setter for [`trailingNavigationBarButtons`][Self::trailingNavigationBarButtons].
44        #[unsafe(method(setTrailingNavigationBarButtons:))]
45        #[unsafe(method_family = none)]
46        unsafe fn setTrailingNavigationBarButtons(
47            &self,
48            trailing_navigation_bar_buttons: &NSArray<CPBarButton>,
49        );
50
51        #[cfg(feature = "CPBarButton")]
52        #[unsafe(method(backButton))]
53        #[unsafe(method_family = none)]
54        unsafe fn backButton(&self) -> Option<Retained<CPBarButton>>;
55
56        #[cfg(feature = "CPBarButton")]
57        /// Setter for [`backButton`][Self::backButton].
58        #[unsafe(method(setBackButton:))]
59        #[unsafe(method_family = none)]
60        unsafe fn setBackButton(&self, back_button: Option<&CPBarButton>);
61    }
62);