objc2_car_play/generated/
CPGridTemplate.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern "C" {
13 pub static CPGridTemplateMaximumItems: NSUInteger;
15}
16
17extern_class!(
18 #[unsafe(super(CPTemplate, NSObject))]
20 #[thread_kind = MainThreadOnly]
21 #[derive(Debug, PartialEq, Eq, Hash)]
22 #[cfg(feature = "CPTemplate")]
23 pub struct CPGridTemplate;
24);
25
26#[cfg(all(feature = "CPBarButtonProviding", feature = "CPTemplate"))]
27extern_conformance!(
28 unsafe impl CPBarButtonProviding for CPGridTemplate {}
29);
30
31#[cfg(feature = "CPTemplate")]
32extern_conformance!(
33 unsafe impl NSCoding for CPGridTemplate {}
34);
35
36#[cfg(feature = "CPTemplate")]
37extern_conformance!(
38 unsafe impl NSObjectProtocol for CPGridTemplate {}
39);
40
41#[cfg(feature = "CPTemplate")]
42extern_conformance!(
43 unsafe impl NSSecureCoding for CPGridTemplate {}
44);
45
46#[cfg(feature = "CPTemplate")]
47impl CPGridTemplate {
48 extern_methods!(
49 #[cfg(feature = "CPGridButton")]
50 #[unsafe(method(initWithTitle:gridButtons:))]
62 #[unsafe(method_family = init)]
63 pub unsafe fn initWithTitle_gridButtons(
64 this: Allocated<Self>,
65 title: Option<&NSString>,
66 grid_buttons: &NSArray<CPGridButton>,
67 ) -> Retained<Self>;
68
69 #[unsafe(method(init))]
70 #[unsafe(method_family = init)]
71 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
72
73 #[unsafe(method(new))]
74 #[unsafe(method_family = new)]
75 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
76
77 #[cfg(feature = "objc2-core-foundation")]
78 #[unsafe(method(maximumGridButtonImageSize))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn maximumGridButtonImageSize(mtm: MainThreadMarker) -> CGSize;
85
86 #[cfg(feature = "CPGridButton")]
87 #[unsafe(method(gridButtons))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn gridButtons(&self) -> Retained<NSArray<CPGridButton>>;
91
92 #[cfg(feature = "CPGridButton")]
93 #[unsafe(method(updateGridButtons:))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn updateGridButtons(&self, grid_buttons: &NSArray<CPGridButton>);
98
99 #[unsafe(method(title))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn title(&self) -> Retained<NSString>;
103
104 #[unsafe(method(updateTitle:))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn updateTitle(&self, title: &NSString);
108 );
109}