objc2_tv_ml_kit/generated/
TVPlayback.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-av-foundation")]
7use objc2_av_foundation::*;
8use objc2_foundation::*;
9#[cfg(feature = "objc2-javascript-core")]
10use objc2_javascript_core::*;
11
12use crate::*;
13
14/// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvplaybackevent?language=objc)
15// NS_TYPED_EXTENSIBLE_ENUM
16pub type TVPlaybackEvent = NSString;
17
18/// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvmediaitemtype?language=objc)
19// NS_TYPED_EXTENSIBLE_ENUM
20pub type TVMediaItemType = NSString;
21
22/// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvplaybackeventproperty?language=objc)
23// NS_TYPED_EXTENSIBLE_ENUM
24pub type TVPlaybackEventProperty = NSString;
25
26extern "C" {
27    /// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvmediaitemtypevideo?language=objc)
28    pub static TVMediaItemTypeVideo: &'static TVMediaItemType;
29}
30
31extern "C" {
32    /// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvmediaitemtypeaudio?language=objc)
33    pub static TVMediaItemTypeAudio: &'static TVMediaItemType;
34}
35
36/// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvmediaitemcontentratingdomain?language=objc)
37// NS_TYPED_EXTENSIBLE_ENUM
38pub type TVMediaItemContentRatingDomain = NSString;
39
40extern "C" {
41    /// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvmediaitemcontentratingdomainmovie?language=objc)
42    pub static TVMediaItemContentRatingDomainMovie: &'static TVMediaItemContentRatingDomain;
43}
44
45extern "C" {
46    /// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvmediaitemcontentratingdomaintvshow?language=objc)
47    pub static TVMediaItemContentRatingDomainTVShow: &'static TVMediaItemContentRatingDomain;
48}
49
50extern "C" {
51    /// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvmediaitemcontentratingdomainmusic?language=objc)
52    pub static TVMediaItemContentRatingDomainMusic: &'static TVMediaItemContentRatingDomain;
53}
54
55/// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvplaybackstate?language=objc)
56// NS_ENUM
57#[deprecated = "Please use SwiftUI or UIKit"]
58#[repr(transparent)]
59#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
60pub struct TVPlaybackState(pub NSInteger);
61impl TVPlaybackState {
62    #[doc(alias = "TVPlaybackStateUndefined")]
63    #[deprecated = "Please use SwiftUI or UIKit"]
64    pub const Undefined: Self = Self(0);
65    #[doc(alias = "TVPlaybackStateBegin")]
66    #[deprecated = "Please use SwiftUI or UIKit"]
67    pub const Begin: Self = Self(1);
68    #[doc(alias = "TVPlaybackStateLoading")]
69    #[deprecated = "Please use SwiftUI or UIKit"]
70    pub const Loading: Self = Self(2);
71    #[doc(alias = "TVPlaybackStatePlaying")]
72    #[deprecated = "Please use SwiftUI or UIKit"]
73    pub const Playing: Self = Self(3);
74    #[doc(alias = "TVPlaybackStatePaused")]
75    #[deprecated = "Please use SwiftUI or UIKit"]
76    pub const Paused: Self = Self(4);
77    #[doc(alias = "TVPlaybackStateScanning")]
78    #[deprecated = "Please use SwiftUI or UIKit"]
79    pub const Scanning: Self = Self(5);
80    #[doc(alias = "TVPlaybackStateFastForwarding")]
81    #[deprecated = "Please use SwiftUI or UIKit"]
82    pub const FastForwarding: Self = Self(6);
83    #[doc(alias = "TVPlaybackStateRewinding")]
84    #[deprecated = "Please use SwiftUI or UIKit"]
85    pub const Rewinding: Self = Self(7);
86    #[doc(alias = "TVPlaybackStateEnd")]
87    #[deprecated = "Please use SwiftUI or UIKit"]
88    pub const End: Self = Self(8);
89}
90
91unsafe impl Encode for TVPlaybackState {
92    const ENCODING: Encoding = NSInteger::ENCODING;
93}
94
95unsafe impl RefEncode for TVPlaybackState {
96    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
97}
98
99/// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvplaylistrepeatmode?language=objc)
100// NS_ENUM
101#[deprecated = "Please use SwiftUI or UIKit"]
102#[repr(transparent)]
103#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
104pub struct TVPlaylistRepeatMode(pub NSInteger);
105impl TVPlaylistRepeatMode {
106    #[doc(alias = "TVPlaylistRepeatModeNone")]
107    #[deprecated = "Please use SwiftUI or UIKit"]
108    pub const None: Self = Self(0);
109    #[doc(alias = "TVPlaylistRepeatModeAll")]
110    #[deprecated = "Please use SwiftUI or UIKit"]
111    pub const All: Self = Self(1);
112    #[doc(alias = "TVPlaylistRepeatModeOne")]
113    #[deprecated = "Please use SwiftUI or UIKit"]
114    pub const One: Self = Self(2);
115}
116
117unsafe impl Encode for TVPlaylistRepeatMode {
118    const ENCODING: Encoding = NSInteger::ENCODING;
119}
120
121unsafe impl RefEncode for TVPlaylistRepeatMode {
122    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
123}
124
125/// [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvplaylistendaction?language=objc)
126// NS_ENUM
127#[deprecated = "Please use SwiftUI or UIKit"]
128#[repr(transparent)]
129#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
130pub struct TVPlaylistEndAction(pub NSInteger);
131impl TVPlaylistEndAction {
132    #[doc(alias = "TVPlaylistEndActionStop")]
133    #[deprecated = "Please use SwiftUI or UIKit"]
134    pub const Stop: Self = Self(0);
135    #[doc(alias = "TVPlaylistEndActionPause")]
136    #[deprecated = "Please use SwiftUI or UIKit"]
137    pub const Pause: Self = Self(1);
138    #[doc(alias = "TVPlaylistEndActionWaitForMoreItems")]
139    #[deprecated = "Please use SwiftUI or UIKit"]
140    pub const WaitForMoreItems: Self = Self(2);
141}
142
143unsafe impl Encode for TVPlaylistEndAction {
144    const ENCODING: Encoding = NSInteger::ENCODING;
145}
146
147unsafe impl RefEncode for TVPlaylistEndAction {
148    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
149}
150
151extern_protocol!(
152    /// An event user info marshaling protocol for sending and receiving
153    /// info to and from JS.
154    ///
155    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvplaybackeventmarshaling?language=objc)
156    #[deprecated = "Please use SwiftUI or UIKit"]
157    pub unsafe trait TVPlaybackEventMarshaling: NSObjectProtocol {
158        #[deprecated = "Please use SwiftUI or UIKit"]
159        #[unsafe(method(properties))]
160        #[unsafe(method_family = none)]
161        unsafe fn properties(
162            &self,
163        ) -> Option<Retained<NSDictionary<TVPlaybackEventProperty, AnyObject>>>;
164
165        #[cfg(feature = "objc2-javascript-core")]
166        #[deprecated = "Please use SwiftUI or UIKit"]
167        #[optional]
168        #[unsafe(method(processReturnJSValue:inContext:))]
169        #[unsafe(method_family = none)]
170        unsafe fn processReturnJSValue_inContext(&self, value: &JSValue, js_context: &JSContext);
171    }
172);
173
174extern_class!(
175    /// Event object that encapsulates its identity and user info for
176    /// custom events.
177    ///
178    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvplaybackcustomeventuserinfo?language=objc)
179    #[unsafe(super(NSObject))]
180    #[derive(Debug, PartialEq, Eq, Hash)]
181    #[deprecated = "Please use SwiftUI or UIKit"]
182    pub struct TVPlaybackCustomEventUserInfo;
183);
184
185extern_conformance!(
186    unsafe impl NSObjectProtocol for TVPlaybackCustomEventUserInfo {}
187);
188
189extern_conformance!(
190    unsafe impl TVPlaybackEventMarshaling for TVPlaybackCustomEventUserInfo {}
191);
192
193impl TVPlaybackCustomEventUserInfo {
194    extern_methods!(
195        #[deprecated = "Please use SwiftUI or UIKit"]
196        #[unsafe(method(initWithProperties:expectsReturnValue:))]
197        #[unsafe(method_family = init)]
198        pub unsafe fn initWithProperties_expectsReturnValue(
199            this: Allocated<Self>,
200            properties: Option<&NSDictionary<TVPlaybackEventProperty, AnyObject>>,
201            expects_return_value: bool,
202        ) -> Retained<Self>;
203
204        #[deprecated = "Please use SwiftUI or UIKit"]
205        #[unsafe(method(expectsReturnValue))]
206        #[unsafe(method_family = none)]
207        pub unsafe fn expectsReturnValue(&self) -> bool;
208
209        /// Setter for [`expectsReturnValue`][Self::expectsReturnValue].
210        #[deprecated = "Please use SwiftUI or UIKit"]
211        #[unsafe(method(setExpectsReturnValue:))]
212        #[unsafe(method_family = none)]
213        pub unsafe fn setExpectsReturnValue(&self, expects_return_value: bool);
214
215        #[deprecated = "Please use SwiftUI or UIKit"]
216        #[unsafe(method(returnValue))]
217        #[unsafe(method_family = none)]
218        pub unsafe fn returnValue(&self) -> Option<Retained<AnyObject>>;
219    );
220}
221
222/// Methods declared on superclass `NSObject`.
223impl TVPlaybackCustomEventUserInfo {
224    extern_methods!(
225        #[unsafe(method(init))]
226        #[unsafe(method_family = init)]
227        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
228
229        #[unsafe(method(new))]
230        #[unsafe(method_family = new)]
231        pub unsafe fn new() -> Retained<Self>;
232    );
233}
234
235extern_class!(
236    /// /////////////////////////////////////////////////////////////////////////////
237    ///
238    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvplaylist?language=objc)
239    #[unsafe(super(NSObject))]
240    #[derive(Debug, PartialEq, Eq, Hash)]
241    #[deprecated = "Please use SwiftUI or UIKit"]
242    pub struct TVPlaylist;
243);
244
245extern_conformance!(
246    unsafe impl NSObjectProtocol for TVPlaylist {}
247);
248
249impl TVPlaylist {
250    extern_methods!(
251        #[deprecated = "Please use SwiftUI or UIKit"]
252        #[unsafe(method(mediaItems))]
253        #[unsafe(method_family = none)]
254        pub unsafe fn mediaItems(&self) -> Retained<NSArray<TVMediaItem>>;
255
256        #[deprecated = "Please use SwiftUI or UIKit"]
257        #[unsafe(method(endAction))]
258        #[unsafe(method_family = none)]
259        pub unsafe fn endAction(&self) -> TVPlaylistEndAction;
260
261        #[deprecated = "Please use SwiftUI or UIKit"]
262        #[unsafe(method(repeatMode))]
263        #[unsafe(method_family = none)]
264        pub unsafe fn repeatMode(&self) -> TVPlaylistRepeatMode;
265
266        #[deprecated = "Please use SwiftUI or UIKit"]
267        #[unsafe(method(userInfo))]
268        #[unsafe(method_family = none)]
269        pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
270    );
271}
272
273/// Methods declared on superclass `NSObject`.
274impl TVPlaylist {
275    extern_methods!(
276        #[unsafe(method(init))]
277        #[unsafe(method_family = init)]
278        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
279
280        #[unsafe(method(new))]
281        #[unsafe(method_family = new)]
282        pub unsafe fn new() -> Retained<Self>;
283    );
284}
285
286extern_class!(
287    /// /////////////////////////////////////////////////////////////////////////////
288    ///
289    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvmediaitem?language=objc)
290    #[unsafe(super(NSObject))]
291    #[derive(Debug, PartialEq, Eq, Hash)]
292    #[deprecated = "Please use SwiftUI or UIKit"]
293    pub struct TVMediaItem;
294);
295
296extern_conformance!(
297    unsafe impl NSObjectProtocol for TVMediaItem {}
298);
299
300impl TVMediaItem {
301    extern_methods!(
302        #[deprecated = "Please use SwiftUI or UIKit"]
303        #[unsafe(method(type))]
304        #[unsafe(method_family = none)]
305        pub unsafe fn r#type(&self) -> Option<Retained<TVMediaItemType>>;
306
307        #[deprecated = "Please use SwiftUI or UIKit"]
308        #[unsafe(method(url))]
309        #[unsafe(method_family = none)]
310        pub unsafe fn url(&self) -> Option<Retained<NSURL>>;
311
312        #[deprecated = "Please use SwiftUI or UIKit"]
313        #[unsafe(method(title))]
314        #[unsafe(method_family = none)]
315        pub unsafe fn title(&self) -> Option<Retained<NSString>>;
316
317        #[deprecated = "Please use SwiftUI or UIKit"]
318        #[unsafe(method(subtitle))]
319        #[unsafe(method_family = none)]
320        pub unsafe fn subtitle(&self) -> Option<Retained<NSString>>;
321
322        #[deprecated = "Please use SwiftUI or UIKit"]
323        #[unsafe(method(itemDescription))]
324        #[unsafe(method_family = none)]
325        pub unsafe fn itemDescription(&self) -> Option<Retained<NSString>>;
326
327        #[deprecated = "Please use SwiftUI or UIKit"]
328        #[unsafe(method(contentRatingDomain))]
329        #[unsafe(method_family = none)]
330        pub unsafe fn contentRatingDomain(
331            &self,
332        ) -> Option<Retained<TVMediaItemContentRatingDomain>>;
333
334        #[deprecated = "Please use SwiftUI or UIKit"]
335        #[unsafe(method(contentRatingRanking))]
336        #[unsafe(method_family = none)]
337        pub unsafe fn contentRatingRanking(&self) -> Option<Retained<NSNumber>>;
338
339        #[deprecated = "Please use SwiftUI or UIKit"]
340        #[unsafe(method(artworkImageURL))]
341        #[unsafe(method_family = none)]
342        pub unsafe fn artworkImageURL(&self) -> Option<Retained<NSURL>>;
343
344        #[deprecated = "Please use SwiftUI or UIKit"]
345        #[unsafe(method(containsExplicitContent))]
346        #[unsafe(method_family = none)]
347        pub unsafe fn containsExplicitContent(&self) -> bool;
348
349        #[deprecated = "Please use SwiftUI or UIKit"]
350        #[unsafe(method(resumeTime))]
351        #[unsafe(method_family = none)]
352        pub unsafe fn resumeTime(&self) -> NSTimeInterval;
353
354        #[deprecated = "Please use SwiftUI or UIKit"]
355        #[unsafe(method(interstitials))]
356        #[unsafe(method_family = none)]
357        pub unsafe fn interstitials(&self) -> Retained<NSArray<TVTimeRange>>;
358
359        #[deprecated = "Please use SwiftUI or UIKit"]
360        #[unsafe(method(highlightGroups))]
361        #[unsafe(method_family = none)]
362        pub unsafe fn highlightGroups(&self) -> Retained<NSArray<TVHighlightGroup>>;
363
364        #[deprecated = "Please use SwiftUI or UIKit"]
365        #[unsafe(method(userInfo))]
366        #[unsafe(method_family = none)]
367        pub unsafe fn userInfo(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
368    );
369}
370
371/// Methods declared on superclass `NSObject`.
372impl TVMediaItem {
373    extern_methods!(
374        #[unsafe(method(init))]
375        #[unsafe(method_family = init)]
376        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
377
378        #[unsafe(method(new))]
379        #[unsafe(method_family = new)]
380        pub unsafe fn new() -> Retained<Self>;
381    );
382}
383
384extern_class!(
385    /// /////////////////////////////////////////////////////////////////////////////
386    ///
387    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvtimerange?language=objc)
388    #[unsafe(super(NSObject))]
389    #[derive(Debug, PartialEq, Eq, Hash)]
390    #[deprecated = "Please use SwiftUI or UIKit"]
391    pub struct TVTimeRange;
392);
393
394extern_conformance!(
395    unsafe impl NSObjectProtocol for TVTimeRange {}
396);
397
398impl TVTimeRange {
399    extern_methods!(
400        #[deprecated = "Please use SwiftUI or UIKit"]
401        #[unsafe(method(startTime))]
402        #[unsafe(method_family = none)]
403        pub unsafe fn startTime(&self) -> NSTimeInterval;
404
405        #[deprecated = "Please use SwiftUI or UIKit"]
406        #[unsafe(method(endTime))]
407        #[unsafe(method_family = none)]
408        pub unsafe fn endTime(&self) -> NSTimeInterval;
409
410        #[deprecated = "Please use SwiftUI or UIKit"]
411        #[unsafe(method(duration))]
412        #[unsafe(method_family = none)]
413        pub unsafe fn duration(&self) -> NSTimeInterval;
414    );
415}
416
417/// Methods declared on superclass `NSObject`.
418impl TVTimeRange {
419    extern_methods!(
420        #[unsafe(method(init))]
421        #[unsafe(method_family = init)]
422        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
423
424        #[unsafe(method(new))]
425        #[unsafe(method_family = new)]
426        pub unsafe fn new() -> Retained<Self>;
427    );
428}
429
430extern_class!(
431    /// /////////////////////////////////////////////////////////////////////////////
432    ///
433    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvhighlightgroup?language=objc)
434    #[unsafe(super(NSObject))]
435    #[derive(Debug, PartialEq, Eq, Hash)]
436    #[deprecated = "Please use SwiftUI or UIKit"]
437    pub struct TVHighlightGroup;
438);
439
440extern_conformance!(
441    unsafe impl NSObjectProtocol for TVHighlightGroup {}
442);
443
444impl TVHighlightGroup {
445    extern_methods!(
446        #[deprecated = "Please use SwiftUI or UIKit"]
447        #[unsafe(method(localizedName))]
448        #[unsafe(method_family = none)]
449        pub unsafe fn localizedName(&self) -> Option<Retained<NSString>>;
450
451        #[deprecated = "Please use SwiftUI or UIKit"]
452        #[unsafe(method(highlights))]
453        #[unsafe(method_family = none)]
454        pub unsafe fn highlights(&self) -> Retained<NSArray<TVHighlight>>;
455    );
456}
457
458/// Methods declared on superclass `NSObject`.
459impl TVHighlightGroup {
460    extern_methods!(
461        #[unsafe(method(init))]
462        #[unsafe(method_family = init)]
463        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
464
465        #[unsafe(method(new))]
466        #[unsafe(method_family = new)]
467        pub unsafe fn new() -> Retained<Self>;
468    );
469}
470
471extern_class!(
472    /// /////////////////////////////////////////////////////////////////////////////
473    ///
474    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvhighlight?language=objc)
475    #[unsafe(super(NSObject))]
476    #[derive(Debug, PartialEq, Eq, Hash)]
477    #[deprecated = "Please use SwiftUI or UIKit"]
478    pub struct TVHighlight;
479);
480
481extern_conformance!(
482    unsafe impl NSObjectProtocol for TVHighlight {}
483);
484
485impl TVHighlight {
486    extern_methods!(
487        #[deprecated = "Please use SwiftUI or UIKit"]
488        #[unsafe(method(localizedName))]
489        #[unsafe(method_family = none)]
490        pub unsafe fn localizedName(&self) -> Option<Retained<NSString>>;
491
492        #[deprecated = "Please use SwiftUI or UIKit"]
493        #[unsafe(method(highlightDescription))]
494        #[unsafe(method_family = none)]
495        pub unsafe fn highlightDescription(&self) -> Option<Retained<NSString>>;
496
497        #[deprecated = "Please use SwiftUI or UIKit"]
498        #[unsafe(method(timeRange))]
499        #[unsafe(method_family = none)]
500        pub unsafe fn timeRange(&self) -> Retained<TVTimeRange>;
501
502        #[deprecated = "Please use SwiftUI or UIKit"]
503        #[unsafe(method(imageURL))]
504        #[unsafe(method_family = none)]
505        pub unsafe fn imageURL(&self) -> Option<Retained<NSURL>>;
506    );
507}
508
509/// Methods declared on superclass `NSObject`.
510impl TVHighlight {
511    extern_methods!(
512        #[unsafe(method(init))]
513        #[unsafe(method_family = init)]
514        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
515
516        #[unsafe(method(new))]
517        #[unsafe(method_family = new)]
518        pub unsafe fn new() -> Retained<Self>;
519    );
520}
521
522extern_class!(
523    /// /////////////////////////////////////////////////////////////////////////////
524    ///
525    /// See also [Apple's documentation](https://developer.apple.com/documentation/tvmlkit/tvplayer?language=objc)
526    #[unsafe(super(NSObject))]
527    #[derive(Debug, PartialEq, Eq, Hash)]
528    #[deprecated = "Please use SwiftUI or UIKit"]
529    pub struct TVPlayer;
530);
531
532extern_conformance!(
533    unsafe impl NSObjectProtocol for TVPlayer {}
534);
535
536impl TVPlayer {
537    extern_methods!(
538        #[cfg(feature = "objc2-av-foundation")]
539        #[deprecated = "Please use SwiftUI or UIKit"]
540        #[unsafe(method(initWithPlayer:))]
541        #[unsafe(method_family = init)]
542        pub unsafe fn initWithPlayer(this: Allocated<Self>, player: &AVPlayer) -> Retained<Self>;
543
544        #[cfg(feature = "objc2-av-foundation")]
545        #[deprecated = "Please use SwiftUI or UIKit"]
546        #[unsafe(method(player))]
547        #[unsafe(method_family = none)]
548        pub unsafe fn player(&self) -> Retained<AVPlayer>;
549
550        #[deprecated = "Please use SwiftUI or UIKit"]
551        #[unsafe(method(playlist))]
552        #[unsafe(method_family = none)]
553        pub unsafe fn playlist(&self) -> Option<Retained<TVPlaylist>>;
554
555        #[deprecated = "Please use SwiftUI or UIKit"]
556        #[unsafe(method(state))]
557        #[unsafe(method_family = none)]
558        pub unsafe fn state(&self) -> TVPlaybackState;
559
560        #[deprecated = "Please use SwiftUI or UIKit"]
561        #[unsafe(method(currentMediaItem))]
562        #[unsafe(method_family = none)]
563        pub unsafe fn currentMediaItem(&self) -> Option<Retained<TVMediaItem>>;
564
565        #[deprecated = "Please use SwiftUI or UIKit"]
566        #[unsafe(method(nextMediaItem))]
567        #[unsafe(method_family = none)]
568        pub unsafe fn nextMediaItem(&self) -> Option<Retained<TVMediaItem>>;
569
570        #[deprecated = "Please use SwiftUI or UIKit"]
571        #[unsafe(method(previousMediaItem))]
572        #[unsafe(method_family = none)]
573        pub unsafe fn previousMediaItem(&self) -> Option<Retained<TVMediaItem>>;
574
575        #[cfg(feature = "block2")]
576        #[deprecated = "Please use SwiftUI or UIKit"]
577        #[unsafe(method(dispatchEvent:userInfo:completion:))]
578        #[unsafe(method_family = none)]
579        pub unsafe fn dispatchEvent_userInfo_completion(
580            &self,
581            event: &TVPlaybackEvent,
582            user_info: Option<&ProtocolObject<dyn TVPlaybackEventMarshaling>>,
583            completion: Option<&block2::DynBlock<dyn Fn(Bool)>>,
584        );
585
586        #[deprecated = "Please use SwiftUI or UIKit"]
587        #[unsafe(method(pause))]
588        #[unsafe(method_family = none)]
589        pub unsafe fn pause(&self);
590
591        #[deprecated = "Please use SwiftUI or UIKit"]
592        #[unsafe(method(next))]
593        #[unsafe(method_family = none)]
594        pub unsafe fn next(&self);
595
596        #[deprecated = "Please use SwiftUI or UIKit"]
597        #[unsafe(method(previous))]
598        #[unsafe(method_family = none)]
599        pub unsafe fn previous(&self);
600
601        #[deprecated = "Please use SwiftUI or UIKit"]
602        #[unsafe(method(presentWithAnimation:))]
603        #[unsafe(method_family = none)]
604        pub unsafe fn presentWithAnimation(&self, animated: bool);
605
606        #[deprecated = "Please use SwiftUI or UIKit"]
607        #[unsafe(method(changeToMediaItemAtIndex:))]
608        #[unsafe(method_family = none)]
609        pub unsafe fn changeToMediaItemAtIndex(&self, index: NSInteger);
610    );
611}
612
613/// Methods declared on superclass `NSObject`.
614impl TVPlayer {
615    extern_methods!(
616        #[unsafe(method(init))]
617        #[unsafe(method_family = init)]
618        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
619
620        #[unsafe(method(new))]
621        #[unsafe(method_family = new)]
622        pub unsafe fn new() -> Retained<Self>;
623    );
624}