use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSOrthography;
);
#[cfg(feature = "NSObject")]
extern_conformance!(
unsafe impl NSCoding for NSOrthography {}
);
#[cfg(feature = "NSObject")]
extern_conformance!(
unsafe impl NSCopying for NSOrthography {}
);
#[cfg(feature = "NSObject")]
unsafe impl CopyingHelper for NSOrthography {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for NSOrthography {}
);
#[cfg(feature = "NSObject")]
extern_conformance!(
unsafe impl NSSecureCoding for NSOrthography {}
);
impl NSOrthography {
extern_methods!(
#[cfg(feature = "NSString")]
#[unsafe(method(dominantScript))]
#[unsafe(method_family = none)]
pub unsafe fn dominantScript(&self) -> Retained<NSString>;
#[cfg(all(feature = "NSArray", feature = "NSDictionary", feature = "NSString"))]
#[unsafe(method(languageMap))]
#[unsafe(method_family = none)]
pub unsafe fn languageMap(&self) -> Retained<NSDictionary<NSString, NSArray<NSString>>>;
#[cfg(all(feature = "NSArray", feature = "NSDictionary", feature = "NSString"))]
#[unsafe(method(initWithDominantScript:languageMap:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithDominantScript_languageMap(
this: Allocated<Self>,
script: &NSString,
map: &NSDictionary<NSString, NSArray<NSString>>,
) -> Retained<Self>;
#[cfg(feature = "NSCoder")]
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
impl NSOrthography {
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>;
);
}
impl NSOrthography {
extern_methods!(
#[cfg(all(feature = "NSArray", feature = "NSString"))]
#[unsafe(method(languagesForScript:))]
#[unsafe(method_family = none)]
pub unsafe fn languagesForScript(
&self,
script: &NSString,
) -> Option<Retained<NSArray<NSString>>>;
#[cfg(feature = "NSString")]
#[unsafe(method(dominantLanguageForScript:))]
#[unsafe(method_family = none)]
pub unsafe fn dominantLanguageForScript(
&self,
script: &NSString,
) -> Option<Retained<NSString>>;
#[cfg(feature = "NSString")]
#[unsafe(method(dominantLanguage))]
#[unsafe(method_family = none)]
pub unsafe fn dominantLanguage(&self) -> Retained<NSString>;
#[cfg(all(feature = "NSArray", feature = "NSString"))]
#[unsafe(method(allScripts))]
#[unsafe(method_family = none)]
pub unsafe fn allScripts(&self) -> Retained<NSArray<NSString>>;
#[cfg(all(feature = "NSArray", feature = "NSString"))]
#[unsafe(method(allLanguages))]
#[unsafe(method_family = none)]
pub unsafe fn allLanguages(&self) -> Retained<NSArray<NSString>>;
#[cfg(feature = "NSString")]
#[unsafe(method(defaultOrthographyForLanguage:))]
#[unsafe(method_family = none)]
pub unsafe fn defaultOrthographyForLanguage(language: &NSString) -> Retained<Self>;
);
}
impl NSOrthography {
extern_methods!(
#[cfg(all(feature = "NSArray", feature = "NSDictionary", feature = "NSString"))]
#[unsafe(method(orthographyWithDominantScript:languageMap:))]
#[unsafe(method_family = none)]
pub unsafe fn orthographyWithDominantScript_languageMap(
script: &NSString,
map: &NSDictionary<NSString, NSArray<NSString>>,
) -> Retained<Self>;
);
}