objc2_av_foundation/generated/
AVSynchronizedLayer.rs1use 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 #[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"))]
24extern_conformance!(
25 unsafe impl CAMediaTiming for AVSynchronizedLayer {}
26);
27
28#[cfg(feature = "objc2-quartz-core")]
29#[cfg(not(target_os = "watchos"))]
30extern_conformance!(
31 unsafe impl NSCoding for AVSynchronizedLayer {}
32);
33
34#[cfg(feature = "objc2-quartz-core")]
35#[cfg(not(target_os = "watchos"))]
36extern_conformance!(
37 unsafe impl NSObjectProtocol for AVSynchronizedLayer {}
38);
39
40#[cfg(feature = "objc2-quartz-core")]
41#[cfg(not(target_os = "watchos"))]
42extern_conformance!(
43 unsafe impl NSSecureCoding for AVSynchronizedLayer {}
44);
45
46#[cfg(feature = "objc2-quartz-core")]
47#[cfg(not(target_os = "watchos"))]
48impl AVSynchronizedLayer {
49 extern_methods!(
50 #[cfg(feature = "AVPlayerItem")]
51 #[unsafe(method(synchronizedLayerWithPlayerItem:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn synchronizedLayerWithPlayerItem(
57 player_item: &AVPlayerItem,
58 ) -> Retained<AVSynchronizedLayer>;
59
60 #[cfg(feature = "AVPlayerItem")]
61 #[unsafe(method(playerItem))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn playerItem(&self, mtm: MainThreadMarker) -> Option<Retained<AVPlayerItem>>;
67
68 #[cfg(feature = "AVPlayerItem")]
69 #[unsafe(method(setPlayerItem:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn setPlayerItem(
73 &self,
74 player_item: Option<&AVPlayerItem>,
75 mtm: MainThreadMarker,
76 );
77 );
78}
79
80#[cfg(feature = "objc2-quartz-core")]
82#[cfg(not(target_os = "watchos"))]
83impl AVSynchronizedLayer {
84 extern_methods!(
85 #[unsafe(method(layer))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn layer() -> Retained<Self>;
89
90 #[unsafe(method(init))]
91 #[unsafe(method_family = init)]
92 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
93
94 #[unsafe(method(initWithLayer:))]
98 #[unsafe(method_family = init)]
99 pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
100 );
101}
102
103#[cfg(feature = "objc2-quartz-core")]
105#[cfg(not(target_os = "watchos"))]
106impl AVSynchronizedLayer {
107 extern_methods!(
108 #[unsafe(method(new))]
109 #[unsafe(method_family = new)]
110 pub unsafe fn new() -> Retained<Self>;
111 );
112}