objc2_car_play/generated/
CPListSection.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#[cfg(feature = "objc2-ui-kit")]
10use objc2_ui_kit::*;
11
12use crate::*;
13
14extern "C" {
15 #[cfg(feature = "objc2-core-foundation")]
21 pub static CPMaximumListSectionImageSize: CGSize;
22}
23
24extern_class!(
25 #[unsafe(super(NSObject))]
30 #[derive(Debug, PartialEq, Eq, Hash)]
31 pub struct CPListSection;
32);
33
34extern_conformance!(
35 unsafe impl NSCoding for CPListSection {}
36);
37
38extern_conformance!(
39 unsafe impl NSObjectProtocol for CPListSection {}
40);
41
42extern_conformance!(
43 unsafe impl NSSecureCoding for CPListSection {}
44);
45
46impl CPListSection {
47 extern_methods!(
48 #[cfg(feature = "CPListItemTypes")]
49 #[unsafe(method(initWithItems:header:sectionIndexTitle:))]
50 #[unsafe(method_family = init)]
51 pub unsafe fn initWithItems_header_sectionIndexTitle(
52 this: Allocated<Self>,
53 items: &NSArray<ProtocolObject<dyn CPListTemplateItem>>,
54 header: Option<&NSString>,
55 section_index_title: Option<&NSString>,
56 ) -> Retained<Self>;
57
58 #[cfg(all(
59 feature = "CPButton",
60 feature = "CPListItemTypes",
61 feature = "objc2-ui-kit"
62 ))]
63 #[unsafe(method(initWithItems:header:headerSubtitle:headerImage:headerButton:sectionIndexTitle:))]
82 #[unsafe(method_family = init)]
83 pub unsafe fn initWithItems_header_headerSubtitle_headerImage_headerButton_sectionIndexTitle(
84 this: Allocated<Self>,
85 items: &NSArray<ProtocolObject<dyn CPListTemplateItem>>,
86 header: &NSString,
87 header_subtitle: Option<&NSString>,
88 header_image: Option<&UIImage>,
89 header_button: Option<&CPButton>,
90 section_index_title: Option<&NSString>,
91 ) -> Retained<Self>;
92
93 #[cfg(feature = "CPListItemTypes")]
94 #[unsafe(method(initWithItems:))]
95 #[unsafe(method_family = init)]
96 pub unsafe fn initWithItems(
97 this: Allocated<Self>,
98 items: &NSArray<ProtocolObject<dyn CPListTemplateItem>>,
99 ) -> Retained<Self>;
100
101 #[unsafe(method(init))]
102 #[unsafe(method_family = init)]
103 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
104
105 #[unsafe(method(new))]
106 #[unsafe(method_family = new)]
107 pub unsafe fn new() -> Retained<Self>;
108
109 #[unsafe(method(header))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn header(&self) -> Option<Retained<NSString>>;
113
114 #[unsafe(method(headerSubtitle))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn headerSubtitle(&self) -> Option<Retained<NSString>>;
118
119 #[cfg(feature = "objc2-ui-kit")]
120 #[unsafe(method(headerImage))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn headerImage(&self) -> Option<Retained<UIImage>>;
123
124 #[cfg(feature = "objc2-ui-kit")]
125 #[unsafe(method(setHeaderImage:))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn setHeaderImage(&self, header_image: Option<&UIImage>);
131
132 #[cfg(feature = "CPButton")]
133 #[unsafe(method(headerButton))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn headerButton(&self) -> Option<Retained<CPButton>>;
136
137 #[unsafe(method(sectionIndexTitle))]
141 #[unsafe(method_family = none)]
142 pub unsafe fn sectionIndexTitle(&self) -> Option<Retained<NSString>>;
143
144 #[cfg(feature = "CPListItemTypes")]
145 #[unsafe(method(items))]
147 #[unsafe(method_family = none)]
148 pub unsafe fn items(&self) -> Retained<NSArray<ProtocolObject<dyn CPListTemplateItem>>>;
149
150 #[cfg(feature = "CPListItemTypes")]
151 #[unsafe(method(indexOfItem:))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn indexOfItem(
157 &self,
158 item: &ProtocolObject<dyn CPListTemplateItem>,
159 ) -> NSUInteger;
160
161 #[cfg(feature = "CPListItemTypes")]
162 #[unsafe(method(itemAtIndex:))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn itemAtIndex(
166 &self,
167 index: NSUInteger,
168 ) -> Retained<ProtocolObject<dyn CPListTemplateItem>>;
169 );
170}