objc2_av_foundation/generated/
AVSynchronizedLayer.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::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-quartz-core")]
8#[cfg(not(target_os = "watchos"))]
9use objc2_quartz_core::*;
10
11use crate::*;
12
13extern_class!(
14    /// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avsynchronizedlayer?language=objc)
15    #[unsafe(super(CALayer, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "objc2-quartz-core")]
18    #[cfg(not(target_os = "watchos"))]
19    pub struct AVSynchronizedLayer;
20);
21
22#[cfg(feature = "objc2-quartz-core")]
23#[cfg(not(target_os = "watchos"))]
24unsafe impl CAMediaTiming for AVSynchronizedLayer {}
25
26#[cfg(feature = "objc2-quartz-core")]
27#[cfg(not(target_os = "watchos"))]
28unsafe impl NSCoding for AVSynchronizedLayer {}
29
30#[cfg(feature = "objc2-quartz-core")]
31#[cfg(not(target_os = "watchos"))]
32unsafe impl NSObjectProtocol for AVSynchronizedLayer {}
33
34#[cfg(feature = "objc2-quartz-core")]
35#[cfg(not(target_os = "watchos"))]
36unsafe impl NSSecureCoding for AVSynchronizedLayer {}
37
38#[cfg(feature = "objc2-quartz-core")]
39#[cfg(not(target_os = "watchos"))]
40impl AVSynchronizedLayer {
41    extern_methods!(
42        #[cfg(feature = "AVPlayerItem")]
43        /// Returns an instance of AVSynchronizedLayer with timing synchronized with the specified AVPlayerItem.
44        ///
45        /// Returns: An instance of AVSynchronizedLayer.
46        #[unsafe(method(synchronizedLayerWithPlayerItem:))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn synchronizedLayerWithPlayerItem(
49            player_item: &AVPlayerItem,
50        ) -> Retained<AVSynchronizedLayer>;
51
52        #[cfg(feature = "AVPlayerItem")]
53        /// Indicates the instance of AVPlayerItem to which the timing of the AVSynchronizedLayer is synchronized.
54        ///
55        /// Before macOS 13, iOS 16, tvOS 16, and watchOS 9, this property must be accessed on the main thread/queue.
56        #[unsafe(method(playerItem))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn playerItem(&self, mtm: MainThreadMarker) -> Option<Retained<AVPlayerItem>>;
59
60        #[cfg(feature = "AVPlayerItem")]
61        /// Setter for [`playerItem`][Self::playerItem].
62        #[unsafe(method(setPlayerItem:))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn setPlayerItem(
65            &self,
66            player_item: Option<&AVPlayerItem>,
67            mtm: MainThreadMarker,
68        );
69    );
70}
71
72/// Methods declared on superclass `CALayer`.
73#[cfg(feature = "objc2-quartz-core")]
74#[cfg(not(target_os = "watchos"))]
75impl AVSynchronizedLayer {
76    extern_methods!(
77        /// Layer creation and initialization. *
78        #[unsafe(method(layer))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn layer() -> Retained<Self>;
81
82        #[unsafe(method(init))]
83        #[unsafe(method_family = init)]
84        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
85
86        #[unsafe(method(initWithLayer:))]
87        #[unsafe(method_family = init)]
88        pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
89    );
90}
91
92/// Methods declared on superclass `NSObject`.
93#[cfg(feature = "objc2-quartz-core")]
94#[cfg(not(target_os = "watchos"))]
95impl AVSynchronizedLayer {
96    extern_methods!(
97        #[unsafe(method(new))]
98        #[unsafe(method_family = new)]
99        pub unsafe fn new() -> Retained<Self>;
100    );
101}