objc2_tv_ui_kit/generated/
TVCardView.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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-quartz-core")]
10use objc2_quartz_core::*;
11use objc2_ui_kit::*;
12
13use crate::*;
14
15extern_class!(
16    /// TVCardView is a floating style lockup view.
17    ///
18    /// Clients should add custom subviews to .contentView, which floats and responds to focus interaction with a motion effect that applies to all subviews as one unit.
19    ///
20    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvuikit/tvcardview?language=objc)
21    #[unsafe(super(TVLockupView, UIControl, UIView, UIResponder, NSObject))]
22    #[derive(Debug, PartialEq, Eq, Hash)]
23    #[cfg(feature = "TVLockupView")]
24    pub struct TVCardView;
25);
26
27#[cfg(all(feature = "TVLockupView", feature = "objc2-quartz-core"))]
28extern_conformance!(
29    unsafe impl CALayerDelegate for TVCardView {}
30);
31
32#[cfg(feature = "TVLockupView")]
33extern_conformance!(
34    unsafe impl NSCoding for TVCardView {}
35);
36
37#[cfg(feature = "TVLockupView")]
38extern_conformance!(
39    unsafe impl NSObjectProtocol for TVCardView {}
40);
41
42#[cfg(feature = "TVLockupView")]
43extern_conformance!(
44    unsafe impl UIAppearance for TVCardView {}
45);
46
47#[cfg(feature = "TVLockupView")]
48extern_conformance!(
49    unsafe impl UIAppearanceContainer for TVCardView {}
50);
51
52#[cfg(feature = "TVLockupView")]
53extern_conformance!(
54    unsafe impl UICoordinateSpace for TVCardView {}
55);
56
57#[cfg(feature = "TVLockupView")]
58extern_conformance!(
59    unsafe impl UIDynamicItem for TVCardView {}
60);
61
62#[cfg(feature = "TVLockupView")]
63extern_conformance!(
64    unsafe impl UIFocusEnvironment for TVCardView {}
65);
66
67#[cfg(feature = "TVLockupView")]
68extern_conformance!(
69    unsafe impl UIFocusItem for TVCardView {}
70);
71
72#[cfg(feature = "TVLockupView")]
73extern_conformance!(
74    unsafe impl UIFocusItemContainer for TVCardView {}
75);
76
77#[cfg(feature = "TVLockupView")]
78extern_conformance!(
79    unsafe impl UIResponderStandardEditActions for TVCardView {}
80);
81
82#[cfg(feature = "TVLockupView")]
83extern_conformance!(
84    unsafe impl UITraitEnvironment for TVCardView {}
85);
86
87#[cfg(feature = "TVLockupView")]
88impl TVCardView {
89    extern_methods!(
90        /// The background color of the content view
91        ///
92        /// The system applies alpha for focus and highlighted states
93        #[unsafe(method(cardBackgroundColor))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn cardBackgroundColor(&self) -> Option<Retained<UIColor>>;
96
97        /// Setter for [`cardBackgroundColor`][Self::cardBackgroundColor].
98        #[unsafe(method(setCardBackgroundColor:))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn setCardBackgroundColor(&self, card_background_color: Option<&UIColor>);
101    );
102}
103
104/// Methods declared on superclass `UIControl`.
105#[cfg(feature = "TVLockupView")]
106impl TVCardView {
107    extern_methods!(
108        #[cfg(feature = "objc2-core-foundation")]
109        #[unsafe(method(initWithFrame:))]
110        #[unsafe(method_family = init)]
111        pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
112
113        /// # Safety
114        ///
115        /// `coder` possibly has further requirements.
116        #[unsafe(method(initWithCoder:))]
117        #[unsafe(method_family = init)]
118        pub unsafe fn initWithCoder(
119            this: Allocated<Self>,
120            coder: &NSCoder,
121        ) -> Option<Retained<Self>>;
122
123        #[cfg(feature = "objc2-core-foundation")]
124        /// Initializes the control and adds primaryAction for the UIControlEventPrimaryActionTriggered control event. Subclasses of UIControl may alter or add behaviors around the usage of primaryAction, see subclass documentation of this initializer for additional information.
125        #[unsafe(method(initWithFrame:primaryAction:))]
126        #[unsafe(method_family = init)]
127        pub unsafe fn initWithFrame_primaryAction(
128            this: Allocated<Self>,
129            frame: CGRect,
130            primary_action: Option<&UIAction>,
131        ) -> Retained<Self>;
132    );
133}
134
135/// Methods declared on superclass `UIView`.
136#[cfg(feature = "TVLockupView")]
137impl TVCardView {
138    extern_methods!(
139        #[unsafe(method(init))]
140        #[unsafe(method_family = init)]
141        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
142    );
143}
144
145/// Methods declared on superclass `NSObject`.
146#[cfg(feature = "TVLockupView")]
147impl TVCardView {
148    extern_methods!(
149        #[unsafe(method(new))]
150        #[unsafe(method_family = new)]
151        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
152    );
153}