objc2-media-player 0.3.2

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

use crate::*;

mod private_AVMediaSelectionOptionMPNowPlayingInfoLanguageOptionAdditions {
    pub trait Sealed {}
}

/// Category "MPNowPlayingInfoLanguageOptionAdditions" on [`AVMediaSelectionOption`].
///
/// Category for creating language options from AV types
#[doc(alias = "MPNowPlayingInfoLanguageOptionAdditions")]
pub unsafe trait AVMediaSelectionOptionMPNowPlayingInfoLanguageOptionAdditions:
    ClassType + Sized + private_AVMediaSelectionOptionMPNowPlayingInfoLanguageOptionAdditions::Sealed
{
    extern_methods!(
        #[cfg(feature = "MPNowPlayingInfoLanguageOption")]
        /// Will create a language option from the AVMediaSelectionOption
        /// Returns nil if the AVMediaSelectionOption does not represent an Audible or Legible selection option.
        #[unsafe(method(makeNowPlayingInfoLanguageOption))]
        #[unsafe(method_family = none)]
        unsafe fn makeNowPlayingInfoLanguageOption(
            &self,
        ) -> Option<Retained<MPNowPlayingInfoLanguageOption>>;
    );
}

#[cfg(feature = "objc2-av-foundation")]
impl private_AVMediaSelectionOptionMPNowPlayingInfoLanguageOptionAdditions::Sealed
    for AVMediaSelectionOption
{
}
#[cfg(feature = "objc2-av-foundation")]
unsafe impl AVMediaSelectionOptionMPNowPlayingInfoLanguageOptionAdditions
    for AVMediaSelectionOption
{
}

mod private_AVMediaSelectionGroupMPNowPlayingInfoLanguageOptionAdditions {
    pub trait Sealed {}
}

/// Category "MPNowPlayingInfoLanguageOptionAdditions" on [`AVMediaSelectionGroup`].
#[doc(alias = "MPNowPlayingInfoLanguageOptionAdditions")]
pub unsafe trait AVMediaSelectionGroupMPNowPlayingInfoLanguageOptionAdditions:
    ClassType + Sized + private_AVMediaSelectionGroupMPNowPlayingInfoLanguageOptionAdditions::Sealed
{
    extern_methods!(
        #[cfg(feature = "MPNowPlayingInfoLanguageOption")]
        /// Will create a language option group from the AVMediaSelectionGroup
        /// Any AVMediaSelectionOptions in the AVMediaSelectionGroup not representing
        /// Audible or Legible selection options will be ignored.
        #[unsafe(method(makeNowPlayingInfoLanguageOptionGroup))]
        #[unsafe(method_family = none)]
        unsafe fn makeNowPlayingInfoLanguageOptionGroup(
            &self,
        ) -> Retained<MPNowPlayingInfoLanguageOptionGroup>;
    );
}

#[cfg(feature = "objc2-av-foundation")]
impl private_AVMediaSelectionGroupMPNowPlayingInfoLanguageOptionAdditions::Sealed
    for AVMediaSelectionGroup
{
}
#[cfg(feature = "objc2-av-foundation")]
unsafe impl AVMediaSelectionGroupMPNowPlayingInfoLanguageOptionAdditions for AVMediaSelectionGroup {}