objc2_car_play/generated/
CPListImageRowItemCondensedElement.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
12#[repr(transparent)]
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
18pub struct CPListImageRowItemCondensedElementShape(pub NSInteger);
19impl CPListImageRowItemCondensedElementShape {
20 #[doc(alias = "CPListImageRowItemCondensedElementShapeCircular")]
22 pub const Circular: Self = Self(0);
23 #[doc(alias = "CPListImageRowItemCondensedElementShapeRoundedRectangle")]
25 pub const RoundedRectangle: Self = Self(1);
26}
27
28unsafe impl Encode for CPListImageRowItemCondensedElementShape {
29 const ENCODING: Encoding = NSInteger::ENCODING;
30}
31
32unsafe impl RefEncode for CPListImageRowItemCondensedElementShape {
33 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
34}
35
36extern_class!(
37 #[unsafe(super(CPListImageRowItemElement, NSObject))]
39 #[thread_kind = MainThreadOnly]
40 #[derive(Debug, PartialEq, Eq, Hash)]
41 #[cfg(feature = "CPListImageRowItemElement")]
42 pub struct CPListImageRowItemCondensedElement;
43);
44
45#[cfg(feature = "CPListImageRowItemElement")]
46extern_conformance!(
47 unsafe impl NSObjectProtocol for CPListImageRowItemCondensedElement {}
48);
49
50#[cfg(feature = "CPListImageRowItemElement")]
51impl CPListImageRowItemCondensedElement {
52 extern_methods!(
53 #[cfg(feature = "objc2-ui-kit")]
54 #[unsafe(method(initWithImage:imageShape:title:subtitle:accessorySymbolName:))]
68 #[unsafe(method_family = init)]
69 pub unsafe fn initWithImage_imageShape_title_subtitle_accessorySymbolName(
70 this: Allocated<Self>,
71 image: &UIImage,
72 image_shape: CPListImageRowItemCondensedElementShape,
73 title: &NSString,
74 subtitle: Option<&NSString>,
75 accessory_symbol_name: Option<&NSString>,
76 ) -> Retained<Self>;
77
78 #[unsafe(method(title))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn title(&self) -> Retained<NSString>;
82
83 #[unsafe(method(setTitle:))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn setTitle(&self, title: &NSString);
89
90 #[unsafe(method(subtitle))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn subtitle(&self) -> Option<Retained<NSString>>;
94
95 #[unsafe(method(setSubtitle:))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>);
101
102 #[unsafe(method(accessorySymbolName))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn accessorySymbolName(&self) -> Option<Retained<NSString>>;
106
107 #[unsafe(method(setAccessorySymbolName:))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn setAccessorySymbolName(&self, accessory_symbol_name: Option<&NSString>);
113
114 #[unsafe(method(imageShape))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn imageShape(&self) -> CPListImageRowItemCondensedElementShape;
118 );
119}
120
121#[cfg(feature = "CPListImageRowItemElement")]
123impl CPListImageRowItemCondensedElement {
124 extern_methods!(
125 #[unsafe(method(init))]
126 #[unsafe(method_family = init)]
127 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
128 );
129}
130
131#[cfg(feature = "CPListImageRowItemElement")]
133impl CPListImageRowItemCondensedElement {
134 extern_methods!(
135 #[unsafe(method(new))]
136 #[unsafe(method_family = new)]
137 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
138 );
139}