use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static MPLanguageOptionCharacteristicIsMainProgramContent: &'static NSString;
}
extern "C" {
pub static MPLanguageOptionCharacteristicIsAuxiliaryContent: &'static NSString;
}
extern "C" {
pub static MPLanguageOptionCharacteristicContainsOnlyForcedSubtitles: &'static NSString;
}
extern "C" {
pub static MPLanguageOptionCharacteristicTranscribesSpokenDialog: &'static NSString;
}
extern "C" {
pub static MPLanguageOptionCharacteristicDescribesMusicAndSound: &'static NSString;
}
extern "C" {
pub static MPLanguageOptionCharacteristicEasyToRead: &'static NSString;
}
extern "C" {
pub static MPLanguageOptionCharacteristicDescribesVideo: &'static NSString;
}
extern "C" {
pub static MPLanguageOptionCharacteristicLanguageTranslation: &'static NSString;
}
extern "C" {
pub static MPLanguageOptionCharacteristicDubbedTranslation: &'static NSString;
}
extern "C" {
pub static MPLanguageOptionCharacteristicVoiceOverTranslation: &'static NSString;
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MPNowPlayingInfoLanguageOptionType(pub NSUInteger);
impl MPNowPlayingInfoLanguageOptionType {
#[doc(alias = "MPNowPlayingInfoLanguageOptionTypeAudible")]
pub const Audible: Self = Self(0);
#[doc(alias = "MPNowPlayingInfoLanguageOptionTypeLegible")]
pub const Legible: Self = Self(1);
}
unsafe impl Encode for MPNowPlayingInfoLanguageOptionType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MPNowPlayingInfoLanguageOptionType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPNowPlayingInfoLanguageOption;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPNowPlayingInfoLanguageOption {}
);
impl MPNowPlayingInfoLanguageOption {
extern_methods!(
#[unsafe(method(initWithType:languageTag:characteristics:displayName:identifier:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithType_languageTag_characteristics_displayName_identifier(
this: Allocated<Self>,
language_option_type: MPNowPlayingInfoLanguageOptionType,
language_tag: &NSString,
language_option_characteristics: Option<&NSArray<NSString>>,
display_name: &NSString,
identifier: &NSString,
) -> Retained<Self>;
#[unsafe(method(isAutomaticLegibleLanguageOption))]
#[unsafe(method_family = none)]
pub unsafe fn isAutomaticLegibleLanguageOption(&self) -> bool;
#[unsafe(method(isAutomaticAudibleLanguageOption))]
#[unsafe(method_family = none)]
pub unsafe fn isAutomaticAudibleLanguageOption(&self) -> bool;
#[unsafe(method(languageOptionType))]
#[unsafe(method_family = none)]
pub unsafe fn languageOptionType(&self) -> MPNowPlayingInfoLanguageOptionType;
#[unsafe(method(languageTag))]
#[unsafe(method_family = none)]
pub unsafe fn languageTag(&self) -> Option<Retained<NSString>>;
#[unsafe(method(languageOptionCharacteristics))]
#[unsafe(method_family = none)]
pub unsafe fn languageOptionCharacteristics(&self) -> Option<Retained<NSArray<NSString>>>;
#[unsafe(method(displayName))]
#[unsafe(method_family = none)]
pub unsafe fn displayName(&self) -> Option<Retained<NSString>>;
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub unsafe fn identifier(&self) -> Option<Retained<NSString>>;
);
}
impl MPNowPlayingInfoLanguageOption {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPNowPlayingInfoLanguageOptionGroup;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPNowPlayingInfoLanguageOptionGroup {}
);
impl MPNowPlayingInfoLanguageOptionGroup {
extern_methods!(
#[unsafe(method(initWithLanguageOptions:defaultLanguageOption:allowEmptySelection:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLanguageOptions_defaultLanguageOption_allowEmptySelection(
this: Allocated<Self>,
language_options: &NSArray<MPNowPlayingInfoLanguageOption>,
default_language_option: Option<&MPNowPlayingInfoLanguageOption>,
allow_empty_selection: bool,
) -> Retained<Self>;
#[unsafe(method(languageOptions))]
#[unsafe(method_family = none)]
pub unsafe fn languageOptions(&self) -> Retained<NSArray<MPNowPlayingInfoLanguageOption>>;
#[unsafe(method(defaultLanguageOption))]
#[unsafe(method_family = none)]
pub unsafe fn defaultLanguageOption(
&self,
) -> Option<Retained<MPNowPlayingInfoLanguageOption>>;
#[unsafe(method(allowEmptySelection))]
#[unsafe(method_family = none)]
pub unsafe fn allowEmptySelection(&self) -> bool;
);
}
impl MPNowPlayingInfoLanguageOptionGroup {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}