1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// `CPAlertTemplate`represents a modal alert that must be dismissed with a button press
/// before the user may return to using the app.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/carplay/cpalerttemplate?language=objc)
#[unsafe(super(CPTemplate, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "CPTemplate")]
pub struct CPAlertTemplate;
);
#[cfg(feature = "CPTemplate")]
extern_conformance!(
unsafe impl NSCoding for CPAlertTemplate {}
);
#[cfg(feature = "CPTemplate")]
extern_conformance!(
unsafe impl NSObjectProtocol for CPAlertTemplate {}
);
#[cfg(feature = "CPTemplate")]
extern_conformance!(
unsafe impl NSSecureCoding for CPAlertTemplate {}
);
#[cfg(feature = "CPTemplate")]
impl CPAlertTemplate {
extern_methods!(
#[cfg(feature = "CPAlertAction")]
/// Initialize a
/// `CPAlertTemplate`by specifying a list of title variants and at least one action.
///
///
/// Parameter `titleVariants`: An array of strings, ordered longest to shortest. The template will display
/// the longest string that fits in the available space on the current size of the car screen,
/// dropping down to shorter strings as necessary.
///
///
/// Parameter `actions`: An array of alert actions to display in this alert template. You must specify at
/// least one action.
#[unsafe(method(initWithTitleVariants:actions:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithTitleVariants_actions(
this: Allocated<Self>,
title_variants: &NSArray<NSString>,
actions: &NSArray<CPAlertAction>,
) -> Retained<Self>;
#[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(mtm: MainThreadMarker) -> Retained<Self>;
#[unsafe(method(titleVariants))]
#[unsafe(method_family = none)]
pub unsafe fn titleVariants(&self) -> Retained<NSArray<NSString>>;
/// Maximum number of action buttons that may appear in any
/// `CPAlertTemplate.`If you add more than this number of buttons, only the most recently-added buttons
/// (up to this count) will be kept.
#[unsafe(method(maximumActionCount))]
#[unsafe(method_family = none)]
pub unsafe fn maximumActionCount(mtm: MainThreadMarker) -> NSUInteger;
#[cfg(feature = "CPAlertAction")]
#[unsafe(method(actions))]
#[unsafe(method_family = none)]
pub unsafe fn actions(&self) -> Retained<NSArray<CPAlertAction>>;
);
}