objc2_car_play/generated/
CPInformationRatingItem.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/carplay/cpinformationratingitem?language=objc)
11    #[unsafe(super(CPInformationItem, NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[cfg(feature = "CPInformationItem")]
14    pub struct CPInformationRatingItem;
15);
16
17#[cfg(feature = "CPInformationItem")]
18extern_conformance!(
19    unsafe impl NSCoding for CPInformationRatingItem {}
20);
21
22#[cfg(feature = "CPInformationItem")]
23extern_conformance!(
24    unsafe impl NSObjectProtocol for CPInformationRatingItem {}
25);
26
27#[cfg(feature = "CPInformationItem")]
28extern_conformance!(
29    unsafe impl NSSecureCoding for CPInformationRatingItem {}
30);
31
32#[cfg(feature = "CPInformationItem")]
33impl CPInformationRatingItem {
34    extern_methods!(
35        /// Initializes a new  item to be used with
36        /// `CPInformationTemplate.`
37        /// Parameter `rating`: A number incremented by 0.5 intervals between 0 and maximumRating that will be styled by the template as the rating of the item.
38        ///
39        /// Parameter `maximumRating`: A whole number between 1 - 5 that will be styled by the template as the maximum rating of the item.
40        ///
41        /// Parameter `title`: An optional string that will be styled by the template as the title text of the item.
42        ///
43        /// Parameter `detail`: An optional string that will be styled by the template as the detail text of the item.
44        #[unsafe(method(initWithRating:maximumRating:title:detail:))]
45        #[unsafe(method_family = init)]
46        pub unsafe fn initWithRating_maximumRating_title_detail(
47            this: Allocated<Self>,
48            rating: Option<&NSNumber>,
49            maximum_rating: Option<&NSNumber>,
50            title: Option<&NSString>,
51            detail: Option<&NSString>,
52        ) -> Retained<Self>;
53
54        #[unsafe(method(rating))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn rating(&self) -> Option<Retained<NSNumber>>;
57
58        #[unsafe(method(maximumRating))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn maximumRating(&self) -> Option<Retained<NSNumber>>;
61
62        #[unsafe(method(new))]
63        #[unsafe(method_family = new)]
64        pub unsafe fn new() -> Retained<Self>;
65
66        #[unsafe(method(init))]
67        #[unsafe(method_family = init)]
68        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
69    );
70}
71
72/// Methods declared on superclass `CPInformationItem`.
73#[cfg(feature = "CPInformationItem")]
74impl CPInformationRatingItem {
75    extern_methods!(
76        /// Initializes a new  item to be used with
77        /// `CPInformationTemplate.`
78        /// Parameter `title`: An optional string that will be styled by the template as the title text of the item.
79        ///
80        /// Parameter `detail`: An optional string that will be styled by the template as the detail text of the item.
81        #[unsafe(method(initWithTitle:detail:))]
82        #[unsafe(method_family = init)]
83        pub unsafe fn initWithTitle_detail(
84            this: Allocated<Self>,
85            title: Option<&NSString>,
86            detail: Option<&NSString>,
87        ) -> Retained<Self>;
88    );
89}