objc2-av-foundation 0.3.2

Bindings to the AVFoundation framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-media")]
use objc2_core_media::*;
use objc2_foundation::*;

use crate::*;

mod private_NSValueAVFoundationExtensions {
    pub trait Sealed {}
}

/// Category on [`NSValue`].
pub unsafe trait NSValueAVFoundationExtensions:
    ClassType + Sized + private_NSValueAVFoundationExtensions::Sealed
{
    extern_methods!(
        #[cfg(feature = "objc2-core-media")]
        #[unsafe(method(valueWithCMTime:))]
        #[unsafe(method_family = none)]
        unsafe fn valueWithCMTime(time: CMTime) -> Retained<NSValue>;

        #[cfg(feature = "objc2-core-media")]
        #[unsafe(method(CMTimeValue))]
        #[unsafe(method_family = none)]
        unsafe fn CMTimeValue(&self) -> CMTime;

        #[cfg(feature = "objc2-core-media")]
        #[unsafe(method(valueWithCMTimeRange:))]
        #[unsafe(method_family = none)]
        unsafe fn valueWithCMTimeRange(time_range: CMTimeRange) -> Retained<NSValue>;

        #[cfg(feature = "objc2-core-media")]
        #[unsafe(method(CMTimeRangeValue))]
        #[unsafe(method_family = none)]
        unsafe fn CMTimeRangeValue(&self) -> CMTimeRange;

        #[cfg(feature = "objc2-core-media")]
        #[unsafe(method(valueWithCMTimeMapping:))]
        #[unsafe(method_family = none)]
        unsafe fn valueWithCMTimeMapping(time_mapping: CMTimeMapping) -> Retained<NSValue>;

        #[cfg(feature = "objc2-core-media")]
        #[unsafe(method(CMTimeMappingValue))]
        #[unsafe(method_family = none)]
        unsafe fn CMTimeMappingValue(&self) -> CMTimeMapping;
    );
}

impl private_NSValueAVFoundationExtensions::Sealed for NSValue {}
unsafe impl NSValueAVFoundationExtensions for NSValue {}

mod private_NSCoderAVTimeCoding {
    pub trait Sealed {}
}

/// Category "AVTimeCoding" on [`NSCoder`].
#[doc(alias = "AVTimeCoding")]
pub unsafe trait NSCoderAVTimeCoding:
    ClassType + Sized + private_NSCoderAVTimeCoding::Sealed
{
    extern_methods!(
        #[cfg(feature = "objc2-core-media")]
        #[unsafe(method(encodeCMTime:forKey:))]
        #[unsafe(method_family = none)]
        unsafe fn encodeCMTime_forKey(&self, time: CMTime, key: &NSString);

        #[cfg(feature = "objc2-core-media")]
        #[unsafe(method(decodeCMTimeForKey:))]
        #[unsafe(method_family = none)]
        unsafe fn decodeCMTimeForKey(&self, key: &NSString) -> CMTime;

        #[cfg(feature = "objc2-core-media")]
        #[unsafe(method(encodeCMTimeRange:forKey:))]
        #[unsafe(method_family = none)]
        unsafe fn encodeCMTimeRange_forKey(&self, time_range: CMTimeRange, key: &NSString);

        #[cfg(feature = "objc2-core-media")]
        #[unsafe(method(decodeCMTimeRangeForKey:))]
        #[unsafe(method_family = none)]
        unsafe fn decodeCMTimeRangeForKey(&self, key: &NSString) -> CMTimeRange;

        #[cfg(feature = "objc2-core-media")]
        #[unsafe(method(encodeCMTimeMapping:forKey:))]
        #[unsafe(method_family = none)]
        unsafe fn encodeCMTimeMapping_forKey(&self, time_mapping: CMTimeMapping, key: &NSString);

        #[cfg(feature = "objc2-core-media")]
        #[unsafe(method(decodeCMTimeMappingForKey:))]
        #[unsafe(method_family = none)]
        unsafe fn decodeCMTimeMappingForKey(&self, key: &NSString) -> CMTimeMapping;
    );
}

impl private_NSCoderAVTimeCoding::Sealed for NSCoder {}
unsafe impl NSCoderAVTimeCoding for NSCoder {}