objc2_tv_ui_kit/generated/
TVMonogramView.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    /// TVMonogramView is a lockup view specializing in presenting monograms.
17    ///
18    /// The system provides a generic silhouette placeholder image. If personNameComponents is set, the system composes an appropriate 'monogram' image with the initials. When an 'image' is set, the system uses it instead. When no frame or contentSize is explicitly set, the system uses a default size.
19    ///
20    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvuikit/tvmonogramview?language=objc)
21    #[unsafe(super(TVLockupView, UIControl, UIView, UIResponder, NSObject))]
22    #[derive(Debug, PartialEq, Eq, Hash)]
23    #[cfg(feature = "TVLockupView")]
24    #[deprecated]
25    pub struct TVMonogramView;
26);
27
28#[cfg(all(feature = "TVLockupView", feature = "objc2-quartz-core"))]
29extern_conformance!(
30    unsafe impl CALayerDelegate for TVMonogramView {}
31);
32
33#[cfg(feature = "TVLockupView")]
34extern_conformance!(
35    unsafe impl NSCoding for TVMonogramView {}
36);
37
38#[cfg(feature = "TVLockupView")]
39extern_conformance!(
40    unsafe impl NSObjectProtocol for TVMonogramView {}
41);
42
43#[cfg(feature = "TVLockupView")]
44extern_conformance!(
45    unsafe impl UIAppearance for TVMonogramView {}
46);
47
48#[cfg(feature = "TVLockupView")]
49extern_conformance!(
50    unsafe impl UIAppearanceContainer for TVMonogramView {}
51);
52
53#[cfg(feature = "TVLockupView")]
54extern_conformance!(
55    unsafe impl UICoordinateSpace for TVMonogramView {}
56);
57
58#[cfg(feature = "TVLockupView")]
59extern_conformance!(
60    unsafe impl UIDynamicItem for TVMonogramView {}
61);
62
63#[cfg(feature = "TVLockupView")]
64extern_conformance!(
65    unsafe impl UIFocusEnvironment for TVMonogramView {}
66);
67
68#[cfg(feature = "TVLockupView")]
69extern_conformance!(
70    unsafe impl UIFocusItem for TVMonogramView {}
71);
72
73#[cfg(feature = "TVLockupView")]
74extern_conformance!(
75    unsafe impl UIFocusItemContainer for TVMonogramView {}
76);
77
78#[cfg(feature = "TVLockupView")]
79extern_conformance!(
80    unsafe impl UIResponderStandardEditActions for TVMonogramView {}
81);
82
83#[cfg(feature = "TVLockupView")]
84extern_conformance!(
85    unsafe impl UITraitEnvironment for TVMonogramView {}
86);
87
88#[cfg(feature = "TVLockupView")]
89impl TVMonogramView {
90    extern_methods!(
91        /// The name to be monogrammed
92        #[deprecated]
93        #[unsafe(method(personNameComponents))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn personNameComponents(&self) -> Option<Retained<NSPersonNameComponents>>;
96
97        /// Setter for [`personNameComponents`][Self::personNameComponents].
98        #[deprecated]
99        #[unsafe(method(setPersonNameComponents:))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn setPersonNameComponents(
102            &self,
103            person_name_components: Option<&NSPersonNameComponents>,
104        );
105
106        /// An optional image
107        ///
108        /// If provided, the system uses this image instead of the generated monogram image
109        #[deprecated]
110        #[unsafe(method(image))]
111        #[unsafe(method_family = none)]
112        pub unsafe fn image(&self) -> Option<Retained<UIImage>>;
113
114        /// Setter for [`image`][Self::image].
115        #[deprecated]
116        #[unsafe(method(setImage:))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn setImage(&self, image: Option<&UIImage>);
119
120        /// An optional title.
121        #[deprecated]
122        #[unsafe(method(title))]
123        #[unsafe(method_family = none)]
124        pub unsafe fn title(&self) -> Option<Retained<NSString>>;
125
126        /// Setter for [`title`][Self::title].
127        ///
128        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
129        #[deprecated]
130        #[unsafe(method(setTitle:))]
131        #[unsafe(method_family = none)]
132        pub unsafe fn setTitle(&self, title: Option<&NSString>);
133
134        /// An optional subtitle.
135        #[deprecated]
136        #[unsafe(method(subtitle))]
137        #[unsafe(method_family = none)]
138        pub unsafe fn subtitle(&self) -> Option<Retained<NSString>>;
139
140        /// Setter for [`subtitle`][Self::subtitle].
141        ///
142        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
143        #[deprecated]
144        #[unsafe(method(setSubtitle:))]
145        #[unsafe(method_family = none)]
146        pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>);
147    );
148}
149
150/// Methods declared on superclass `UIControl`.
151#[cfg(feature = "TVLockupView")]
152impl TVMonogramView {
153    extern_methods!(
154        #[cfg(feature = "objc2-core-foundation")]
155        #[unsafe(method(initWithFrame:))]
156        #[unsafe(method_family = init)]
157        pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
158
159        /// # Safety
160        ///
161        /// `coder` possibly has further requirements.
162        #[unsafe(method(initWithCoder:))]
163        #[unsafe(method_family = init)]
164        pub unsafe fn initWithCoder(
165            this: Allocated<Self>,
166            coder: &NSCoder,
167        ) -> Option<Retained<Self>>;
168
169        #[cfg(feature = "objc2-core-foundation")]
170        /// 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.
171        #[unsafe(method(initWithFrame:primaryAction:))]
172        #[unsafe(method_family = init)]
173        pub unsafe fn initWithFrame_primaryAction(
174            this: Allocated<Self>,
175            frame: CGRect,
176            primary_action: Option<&UIAction>,
177        ) -> Retained<Self>;
178    );
179}
180
181/// Methods declared on superclass `UIView`.
182#[cfg(feature = "TVLockupView")]
183impl TVMonogramView {
184    extern_methods!(
185        #[unsafe(method(init))]
186        #[unsafe(method_family = init)]
187        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
188    );
189}
190
191/// Methods declared on superclass `NSObject`.
192#[cfg(feature = "TVLockupView")]
193impl TVMonogramView {
194    extern_methods!(
195        #[unsafe(method(new))]
196        #[unsafe(method_family = new)]
197        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
198    );
199}