objc2_car_play/generated/
CPGridButton.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-ui-kit")]
8use objc2_ui_kit::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct CPMessageGridItemConfiguration;
19);
20
21extern_conformance!(
22 unsafe impl NSObjectProtocol for CPMessageGridItemConfiguration {}
23);
24
25impl CPMessageGridItemConfiguration {
26 extern_methods!(
27 #[unsafe(method(initWithConversationIdentifier:unread:))]
38 #[unsafe(method_family = init)]
39 pub unsafe fn initWithConversationIdentifier_unread(
40 this: Allocated<Self>,
41 conversation_identifier: &NSString,
42 unread: bool,
43 ) -> Retained<Self>;
44
45 #[unsafe(method(isUnread))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn isUnread(&self) -> bool;
48
49 #[unsafe(method(setUnread:))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn setUnread(&self, unread: bool);
53
54 #[unsafe(method(conversationIdentifier))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn conversationIdentifier(&self) -> Retained<NSString>;
57 );
58}
59
60impl CPMessageGridItemConfiguration {
62 extern_methods!(
63 #[unsafe(method(init))]
64 #[unsafe(method_family = init)]
65 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66
67 #[unsafe(method(new))]
68 #[unsafe(method_family = new)]
69 pub unsafe fn new() -> Retained<Self>;
70 );
71}
72
73extern_class!(
74 #[unsafe(super(NSObject))]
76 #[derive(Debug, PartialEq, Eq, Hash)]
77 pub struct CPGridButton;
78);
79
80extern_conformance!(
81 unsafe impl NSCoding for CPGridButton {}
82);
83
84extern_conformance!(
85 unsafe impl NSObjectProtocol for CPGridButton {}
86);
87
88extern_conformance!(
89 unsafe impl NSSecureCoding for CPGridButton {}
90);
91
92impl CPGridButton {
93 extern_methods!(
94 #[unsafe(method(new))]
95 #[unsafe(method_family = new)]
96 pub unsafe fn new() -> Retained<Self>;
97
98 #[unsafe(method(init))]
99 #[unsafe(method_family = init)]
100 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
101
102 #[cfg(all(feature = "block2", feature = "objc2-ui-kit"))]
103 #[unsafe(method(initWithTitleVariants:image:handler:))]
118 #[unsafe(method_family = init)]
119 pub unsafe fn initWithTitleVariants_image_handler(
120 this: Allocated<Self>,
121 title_variants: &NSArray<NSString>,
122 image: &UIImage,
123 handler: Option<&block2::DynBlock<dyn Fn(NonNull<CPGridButton>)>>,
124 ) -> Retained<Self>;
125
126 #[cfg(all(feature = "block2", feature = "objc2-ui-kit"))]
127 #[unsafe(method(initWithTitleVariants:image:messageConfiguration:handler:))]
129 #[unsafe(method_family = init)]
130 pub unsafe fn initWithTitleVariants_image_messageConfiguration_handler(
131 this: Allocated<Self>,
132 title_variants: &NSArray<NSString>,
133 image: &UIImage,
134 message_configuration: Option<&CPMessageGridItemConfiguration>,
135 handler: Option<&block2::DynBlock<dyn Fn(NonNull<CPGridButton>)>>,
136 ) -> Retained<Self>;
137
138 #[unsafe(method(isEnabled))]
146 #[unsafe(method_family = none)]
147 pub unsafe fn isEnabled(&self) -> bool;
148
149 #[unsafe(method(setEnabled:))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn setEnabled(&self, enabled: bool);
153
154 #[unsafe(method(messageConfiguration))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn messageConfiguration(
157 &self,
158 ) -> Option<Retained<CPMessageGridItemConfiguration>>;
159
160 #[cfg(feature = "objc2-ui-kit")]
161 #[unsafe(method(image))]
168 #[unsafe(method_family = none)]
169 pub unsafe fn image(&self) -> Retained<UIImage>;
170
171 #[cfg(feature = "objc2-ui-kit")]
172 #[unsafe(method(updateImage:))]
173 #[unsafe(method_family = none)]
174 pub unsafe fn updateImage(&self, image: &UIImage);
175
176 #[unsafe(method(titleVariants))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn titleVariants(&self) -> Retained<NSArray<NSString>>;
182
183 #[unsafe(method(updateTitleVariants:))]
184 #[unsafe(method_family = none)]
185 pub unsafe fn updateTitleVariants(&self, title_variants: &NSArray<NSString>);
186 );
187}