//! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT use core::ptr::NonNull; use objc2::__framework_prelude::*; use crate::*; extern_class!( /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsorthography?language=objc) #[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 fn dominantScript(&self) -> Retained; #[cfg(all(feature = "NSArray", feature = "NSDictionary", feature = "NSString"))] #[unsafe(method(languageMap))] #[unsafe(method_family = none)] pub fn languageMap(&self) -> Retained>>; #[cfg(all(feature = "NSArray", feature = "NSDictionary", feature = "NSString"))] #[unsafe(method(initWithDominantScript:languageMap:))] #[unsafe(method_family = init)] pub fn initWithDominantScript_languageMap( this: Allocated, script: &NSString, map: &NSDictionary>, ) -> Retained; #[cfg(feature = "NSCoder")] /// # Safety /// /// `coder` possibly has further requirements. #[unsafe(method(initWithCoder:))] #[unsafe(method_family = init)] pub unsafe fn initWithCoder( this: Allocated, coder: &NSCoder, ) -> Option>; ); } /// Methods declared on superclass `NSObject`. impl NSOrthography { extern_methods!( #[unsafe(method(init))] #[unsafe(method_family = init)] pub fn init(this: Allocated) -> Retained; #[unsafe(method(new))] #[unsafe(method_family = new)] pub fn new() -> Retained; ); } impl DefaultRetained for NSOrthography { #[inline] fn default_retained() -> Retained { Self::new() } } /// NSOrthographyExtended. impl NSOrthography { extern_methods!( #[cfg(all(feature = "NSArray", feature = "NSString"))] #[unsafe(method(languagesForScript:))] #[unsafe(method_family = none)] pub fn languagesForScript(&self, script: &NSString) -> Option>>; #[cfg(feature = "NSString")] #[unsafe(method(dominantLanguageForScript:))] #[unsafe(method_family = none)] pub fn dominantLanguageForScript(&self, script: &NSString) -> Option>; #[cfg(feature = "NSString")] #[unsafe(method(dominantLanguage))] #[unsafe(method_family = none)] pub fn dominantLanguage(&self) -> Retained; #[cfg(all(feature = "NSArray", feature = "NSString"))] #[unsafe(method(allScripts))] #[unsafe(method_family = none)] pub fn allScripts(&self) -> Retained>; #[cfg(all(feature = "NSArray", feature = "NSString"))] #[unsafe(method(allLanguages))] #[unsafe(method_family = none)] pub fn allLanguages(&self) -> Retained>; #[cfg(feature = "NSString")] #[unsafe(method(defaultOrthographyForLanguage:))] #[unsafe(method_family = none)] pub fn defaultOrthographyForLanguage(language: &NSString) -> Retained; ); } /// NSOrthographyCreation. impl NSOrthography { extern_methods!( #[cfg(all(feature = "NSArray", feature = "NSDictionary", feature = "NSString"))] #[unsafe(method(orthographyWithDominantScript:languageMap:))] #[unsafe(method_family = none)] pub fn orthographyWithDominantScript_languageMap( script: &NSString, map: &NSDictionary>, ) -> Retained; ); }