use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
use objc2_quartz_core::*;
use crate::*;
extern_class!(
#[unsafe(super(CALayer, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
pub struct AVSynchronizedLayer;
);
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
extern_conformance!(
unsafe impl CAMediaTiming for AVSynchronizedLayer {}
);
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
extern_conformance!(
unsafe impl NSCoding for AVSynchronizedLayer {}
);
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
extern_conformance!(
unsafe impl NSObjectProtocol for AVSynchronizedLayer {}
);
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
extern_conformance!(
unsafe impl NSSecureCoding for AVSynchronizedLayer {}
);
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
impl AVSynchronizedLayer {
extern_methods!(
#[cfg(feature = "AVPlayerItem")]
#[unsafe(method(synchronizedLayerWithPlayerItem:))]
#[unsafe(method_family = none)]
pub unsafe fn synchronizedLayerWithPlayerItem(
player_item: &AVPlayerItem,
) -> Retained<AVSynchronizedLayer>;
#[cfg(feature = "AVPlayerItem")]
#[unsafe(method(playerItem))]
#[unsafe(method_family = none)]
pub unsafe fn playerItem(&self, mtm: MainThreadMarker) -> Option<Retained<AVPlayerItem>>;
#[cfg(feature = "AVPlayerItem")]
#[unsafe(method(setPlayerItem:))]
#[unsafe(method_family = none)]
pub unsafe fn setPlayerItem(
&self,
player_item: Option<&AVPlayerItem>,
mtm: MainThreadMarker,
);
);
}
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
impl AVSynchronizedLayer {
extern_methods!(
#[unsafe(method(layer))]
#[unsafe(method_family = none)]
pub unsafe fn layer() -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initWithLayer:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
);
}
#[cfg(feature = "objc2-quartz-core")]
#[cfg(not(target_os = "watchos"))]
impl AVSynchronizedLayer {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}