objc2_car_play/generated/CPListImageRowItemGridElement.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-ui-kit")]
6use objc2_ui_kit::*;
7
8use crate::*;
9
10extern_class!(
11 /// [Apple's documentation](https://developer.apple.com/documentation/carplay/cplistimagerowitemgridelement?language=objc)
12 #[unsafe(super(CPListImageRowItemElement, NSObject))]
13 #[thread_kind = MainThreadOnly]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(feature = "CPListImageRowItemElement")]
16 pub struct CPListImageRowItemGridElement;
17);
18
19#[cfg(feature = "CPListImageRowItemElement")]
20extern_conformance!(
21 unsafe impl NSObjectProtocol for CPListImageRowItemGridElement {}
22);
23
24#[cfg(feature = "CPListImageRowItemElement")]
25impl CPListImageRowItemGridElement {
26 extern_methods!(
27 #[cfg(feature = "objc2-ui-kit")]
28 /// Initialize an element that is constituted of an image.
29 ///
30 /// When providing an image, your app should provide a
31 /// `UIImage`that is display-ready. If necessary for the image, provide
32 /// light and dark styles by using an asset from your asset catalog, prepared with light and dark styles
33 /// or by using
34 /// `UIImageAsset`to combine two
35 /// `UIImage`instances into a single image with
36 /// both styles.
37 ///
38 /// UIImageAsset is used to combine multiple UIImages with different trait collections into a single UIImage.
39 ///
40 ///
41 /// Note: The expected image size is given by +[CPListImageRowItemGridElement maximumImageSize]. Images provided will be resized to this size if necessary.
42 ///
43 ///
44 /// To properly size your images, your app should size them to the display scale of the car screen.
45 /// See -[CPInterfaceController carTraitCollection].
46 ///
47 ///
48 /// Parameter `image`: The image associated to the element.
49 #[unsafe(method(initWithImage:))]
50 #[unsafe(method_family = init)]
51 pub unsafe fn initWithImage(this: Allocated<Self>, image: &UIImage) -> Retained<Self>;
52 );
53}
54
55/// Methods declared on superclass `CPListImageRowItemElement`.
56#[cfg(feature = "CPListImageRowItemElement")]
57impl CPListImageRowItemGridElement {
58 extern_methods!(
59 #[unsafe(method(init))]
60 #[unsafe(method_family = init)]
61 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
62 );
63}
64
65/// Methods declared on superclass `NSObject`.
66#[cfg(feature = "CPListImageRowItemElement")]
67impl CPListImageRowItemGridElement {
68 extern_methods!(
69 #[unsafe(method(new))]
70 #[unsafe(method_family = new)]
71 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
72 );
73}