icrate/generated/Foundation/
NSOrthography.rs1use crate::common::*;
4use crate::Foundation::*;
5
6extern_class!(
7 #[derive(Debug, PartialEq, Eq, Hash)]
8 #[cfg(feature = "Foundation_NSOrthography")]
9 pub struct NSOrthography;
10
11 #[cfg(feature = "Foundation_NSOrthography")]
12 unsafe impl ClassType for NSOrthography {
13 type Super = NSObject;
14 type Mutability = InteriorMutable;
15 }
16);
17
18#[cfg(feature = "Foundation_NSOrthography")]
19unsafe impl NSCoding for NSOrthography {}
20
21#[cfg(feature = "Foundation_NSOrthography")]
22unsafe impl NSCopying for NSOrthography {}
23
24#[cfg(feature = "Foundation_NSOrthography")]
25unsafe impl NSObjectProtocol for NSOrthography {}
26
27#[cfg(feature = "Foundation_NSOrthography")]
28unsafe impl NSSecureCoding for NSOrthography {}
29
30extern_methods!(
31 #[cfg(feature = "Foundation_NSOrthography")]
32 unsafe impl NSOrthography {
33 #[cfg(feature = "Foundation_NSString")]
34 #[method_id(@__retain_semantics Other dominantScript)]
35 pub unsafe fn dominantScript(&self) -> Id<NSString>;
36
37 #[cfg(all(
38 feature = "Foundation_NSArray",
39 feature = "Foundation_NSDictionary",
40 feature = "Foundation_NSString"
41 ))]
42 #[method_id(@__retain_semantics Other languageMap)]
43 pub unsafe fn languageMap(&self) -> Id<NSDictionary<NSString, NSArray<NSString>>>;
44
45 #[cfg(all(
46 feature = "Foundation_NSArray",
47 feature = "Foundation_NSDictionary",
48 feature = "Foundation_NSString"
49 ))]
50 #[method_id(@__retain_semantics Init initWithDominantScript:languageMap:)]
51 pub unsafe fn initWithDominantScript_languageMap(
52 this: Allocated<Self>,
53 script: &NSString,
54 map: &NSDictionary<NSString, NSArray<NSString>>,
55 ) -> Id<Self>;
56
57 #[cfg(feature = "Foundation_NSCoder")]
58 #[method_id(@__retain_semantics Init initWithCoder:)]
59 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Option<Id<Self>>;
60 }
61);
62
63extern_methods!(
64 #[cfg(feature = "Foundation_NSOrthography")]
66 unsafe impl NSOrthography {
67 #[method_id(@__retain_semantics Init init)]
68 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
69
70 #[method_id(@__retain_semantics New new)]
71 pub unsafe fn new() -> Id<Self>;
72 }
73);
74
75extern_methods!(
76 #[cfg(feature = "Foundation_NSOrthography")]
78 unsafe impl NSOrthography {
79 #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
80 #[method_id(@__retain_semantics Other languagesForScript:)]
81 pub unsafe fn languagesForScript(&self, script: &NSString)
82 -> Option<Id<NSArray<NSString>>>;
83
84 #[cfg(feature = "Foundation_NSString")]
85 #[method_id(@__retain_semantics Other dominantLanguageForScript:)]
86 pub unsafe fn dominantLanguageForScript(&self, script: &NSString) -> Option<Id<NSString>>;
87
88 #[cfg(feature = "Foundation_NSString")]
89 #[method_id(@__retain_semantics Other dominantLanguage)]
90 pub unsafe fn dominantLanguage(&self) -> Id<NSString>;
91
92 #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
93 #[method_id(@__retain_semantics Other allScripts)]
94 pub unsafe fn allScripts(&self) -> Id<NSArray<NSString>>;
95
96 #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
97 #[method_id(@__retain_semantics Other allLanguages)]
98 pub unsafe fn allLanguages(&self) -> Id<NSArray<NSString>>;
99
100 #[cfg(feature = "Foundation_NSString")]
101 #[method_id(@__retain_semantics Other defaultOrthographyForLanguage:)]
102 pub unsafe fn defaultOrthographyForLanguage(language: &NSString) -> Id<Self>;
103 }
104);
105
106extern_methods!(
107 #[cfg(feature = "Foundation_NSOrthography")]
109 unsafe impl NSOrthography {
110 #[cfg(all(
111 feature = "Foundation_NSArray",
112 feature = "Foundation_NSDictionary",
113 feature = "Foundation_NSString"
114 ))]
115 #[method_id(@__retain_semantics Other orthographyWithDominantScript:languageMap:)]
116 pub unsafe fn orthographyWithDominantScript_languageMap(
117 script: &NSString,
118 map: &NSDictionary<NSString, NSArray<NSString>>,
119 ) -> Id<Self>;
120 }
121);