objc2_foundation/generated/
NSOrthography.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9 #[unsafe(super(NSObject))]
11 #[derive(Debug, PartialEq, Eq, Hash)]
12 pub struct NSOrthography;
13);
14
15#[cfg(feature = "NSObject")]
16extern_conformance!(
17 unsafe impl NSCoding for NSOrthography {}
18);
19
20#[cfg(feature = "NSObject")]
21extern_conformance!(
22 unsafe impl NSCopying for NSOrthography {}
23);
24
25#[cfg(feature = "NSObject")]
26unsafe impl CopyingHelper for NSOrthography {
27 type Result = Self;
28}
29
30extern_conformance!(
31 unsafe impl NSObjectProtocol for NSOrthography {}
32);
33
34#[cfg(feature = "NSObject")]
35extern_conformance!(
36 unsafe impl NSSecureCoding for NSOrthography {}
37);
38
39impl NSOrthography {
40 extern_methods!(
41 #[cfg(feature = "NSString")]
42 #[unsafe(method(dominantScript))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn dominantScript(&self) -> Retained<NSString>;
45
46 #[cfg(all(feature = "NSArray", feature = "NSDictionary", feature = "NSString"))]
47 #[unsafe(method(languageMap))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn languageMap(&self) -> Retained<NSDictionary<NSString, NSArray<NSString>>>;
50
51 #[cfg(all(feature = "NSArray", feature = "NSDictionary", feature = "NSString"))]
52 #[unsafe(method(initWithDominantScript:languageMap:))]
53 #[unsafe(method_family = init)]
54 pub unsafe fn initWithDominantScript_languageMap(
55 this: Allocated<Self>,
56 script: &NSString,
57 map: &NSDictionary<NSString, NSArray<NSString>>,
58 ) -> Retained<Self>;
59
60 #[cfg(feature = "NSCoder")]
61 #[unsafe(method(initWithCoder:))]
62 #[unsafe(method_family = init)]
63 pub unsafe fn initWithCoder(
64 this: Allocated<Self>,
65 coder: &NSCoder,
66 ) -> Option<Retained<Self>>;
67 );
68}
69
70impl NSOrthography {
72 extern_methods!(
73 #[unsafe(method(init))]
74 #[unsafe(method_family = init)]
75 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
76
77 #[unsafe(method(new))]
78 #[unsafe(method_family = new)]
79 pub unsafe fn new() -> Retained<Self>;
80 );
81}
82
83impl NSOrthography {
85 extern_methods!(
86 #[cfg(all(feature = "NSArray", feature = "NSString"))]
87 #[unsafe(method(languagesForScript:))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn languagesForScript(
90 &self,
91 script: &NSString,
92 ) -> Option<Retained<NSArray<NSString>>>;
93
94 #[cfg(feature = "NSString")]
95 #[unsafe(method(dominantLanguageForScript:))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn dominantLanguageForScript(
98 &self,
99 script: &NSString,
100 ) -> Option<Retained<NSString>>;
101
102 #[cfg(feature = "NSString")]
103 #[unsafe(method(dominantLanguage))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn dominantLanguage(&self) -> Retained<NSString>;
106
107 #[cfg(all(feature = "NSArray", feature = "NSString"))]
108 #[unsafe(method(allScripts))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn allScripts(&self) -> Retained<NSArray<NSString>>;
111
112 #[cfg(all(feature = "NSArray", feature = "NSString"))]
113 #[unsafe(method(allLanguages))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn allLanguages(&self) -> Retained<NSArray<NSString>>;
116
117 #[cfg(feature = "NSString")]
118 #[unsafe(method(defaultOrthographyForLanguage:))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn defaultOrthographyForLanguage(language: &NSString) -> Retained<Self>;
121 );
122}
123
124impl NSOrthography {
126 extern_methods!(
127 #[cfg(all(feature = "NSArray", feature = "NSDictionary", feature = "NSString"))]
128 #[unsafe(method(orthographyWithDominantScript:languageMap:))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn orthographyWithDominantScript_languageMap(
131 script: &NSString,
132 map: &NSDictionary<NSString, NSArray<NSString>>,
133 ) -> Retained<Self>;
134 );
135}