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        #[deprecated]
128        #[unsafe(method(setTitle:))]
129        #[unsafe(method_family = none)]
130        pub unsafe fn setTitle(&self, title: Option<&NSString>);
131
132        /// An optional subtitle.
133        #[deprecated]
134        #[unsafe(method(subtitle))]
135        #[unsafe(method_family = none)]
136        pub unsafe fn subtitle(&self) -> Option<Retained<NSString>>;
137
138        /// Setter for [`subtitle`][Self::subtitle].
139        #[deprecated]
140        #[unsafe(method(setSubtitle:))]
141        #[unsafe(method_family = none)]
142        pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>);
143    );
144}
145
146/// Methods declared on superclass `UIControl`.
147#[cfg(feature = "TVLockupView")]
148impl TVMonogramView {
149    extern_methods!(
150        #[cfg(feature = "objc2-core-foundation")]
151        #[unsafe(method(initWithFrame:))]
152        #[unsafe(method_family = init)]
153        pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
154
155        #[unsafe(method(initWithCoder:))]
156        #[unsafe(method_family = init)]
157        pub unsafe fn initWithCoder(
158            this: Allocated<Self>,
159            coder: &NSCoder,
160        ) -> Option<Retained<Self>>;
161
162        #[cfg(feature = "objc2-core-foundation")]
163        /// 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.
164        #[unsafe(method(initWithFrame:primaryAction:))]
165        #[unsafe(method_family = init)]
166        pub unsafe fn initWithFrame_primaryAction(
167            this: Allocated<Self>,
168            frame: CGRect,
169            primary_action: Option<&UIAction>,
170        ) -> Retained<Self>;
171    );
172}
173
174/// Methods declared on superclass `NSObject`.
175#[cfg(feature = "TVLockupView")]
176impl TVMonogramView {
177    extern_methods!(
178        #[unsafe(method(init))]
179        #[unsafe(method_family = init)]
180        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
181
182        #[unsafe(method(new))]
183        #[unsafe(method_family = new)]
184        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
185    );
186}