objc2_tv_services/generated/
TVTopShelfSectionedItem.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct TVTopShelfSectionedItemImageShape(pub NSInteger);
17impl TVTopShelfSectionedItemImageShape {
18 #[doc(alias = "TVTopShelfSectionedItemImageShapeSquare")]
20 pub const Square: Self = Self(0);
21 #[doc(alias = "TVTopShelfSectionedItemImageShapePoster")]
23 pub const Poster: Self = Self(1);
24 #[doc(alias = "TVTopShelfSectionedItemImageShapeHDTV")]
26 pub const HDTV: Self = Self(2);
27}
28
29unsafe impl Encode for TVTopShelfSectionedItemImageShape {
30 const ENCODING: Encoding = NSInteger::ENCODING;
31}
32
33unsafe impl RefEncode for TVTopShelfSectionedItemImageShape {
34 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
35}
36
37extern_class!(
38 #[unsafe(super(TVTopShelfItem, TVTopShelfObject, NSObject))]
42 #[derive(Debug, PartialEq, Eq, Hash)]
43 #[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
44 pub struct TVTopShelfSectionedItem;
45);
46
47#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
48extern_conformance!(
49 unsafe impl NSObjectProtocol for TVTopShelfSectionedItem {}
50);
51
52#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
53impl TVTopShelfSectionedItem {
54 extern_methods!(
55 #[unsafe(method(imageShape))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn imageShape(&self) -> TVTopShelfSectionedItemImageShape;
61
62 #[unsafe(method(setImageShape:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn setImageShape(&self, image_shape: TVTopShelfSectionedItemImageShape);
66
67 #[unsafe(method(playbackProgress))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn playbackProgress(&self) -> c_double;
73
74 #[unsafe(method(setPlaybackProgress:))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn setPlaybackProgress(&self, playback_progress: c_double);
78 );
79}
80
81#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
83impl TVTopShelfSectionedItem {
84 extern_methods!(
85 #[unsafe(method(initWithIdentifier:))]
89 #[unsafe(method_family = init)]
90 pub unsafe fn initWithIdentifier(
91 this: Allocated<Self>,
92 identifier: &NSString,
93 ) -> Retained<Self>;
94 );
95}
96
97#[cfg(all(feature = "TVTopShelfItem", feature = "TVTopShelfObject"))]
99impl TVTopShelfSectionedItem {
100 extern_methods!(
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}