comparison dwt/internal/cocoa/NSSpellChecker.d @ 1:8b48be5454ce

The internal cocoa classes compile now
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Tue, 19 Aug 2008 17:35:17 +0200
parents 380af2bdd8e5
children f565d3a95c0a
comparison
equal deleted inserted replaced
0:380af2bdd8e5 1:8b48be5454ce
37 super(id); 37 super(id);
38 } 38 }
39 39
40 public NSView accessoryView () 40 public NSView accessoryView ()
41 { 41 {
42 objc.id result = OS.objc_msgSend(this.id, OS.sel_accessoryView); 42 objc.id result = OS.objc_msgSend(this.id_, OS.sel_accessoryView);
43 return result !is null ? new NSView(result) : null; 43 return result !is null ? new NSView(result) : null;
44 } 44 }
45 45
46 public NSArray availableLanguages () 46 public NSArray availableLanguages ()
47 { 47 {
48 objc.id result = OS.objc_msgSend(this.id, OS.sel_availableLanguages); 48 objc.id result = OS.objc_msgSend(this.id_, OS.sel_availableLanguages);
49 return result !is null ? new NSArray(result) : null; 49 return result !is null ? new NSArray(result) : null;
50 } 50 }
51 51
52 public NSRange checkGrammarOfString (NSString stringToCheck, NSInteger startingOffset, NSString language, bool wrapFlag, NSInteger tag, /*NSArray** */objc.id** details) 52 public NSRange checkGrammarOfString (NSString stringToCheck, NSInteger startingOffset, NSString language, bool wrapFlag, NSInteger tag, /*NSArray** */objc.id** details)
53 { 53 {
54 NSRange result; 54 NSRange result;
55 OS.objc_msgSend_stret(result, this.id, OS.sel_checkGrammarOfString_1startingAt_1language_1wrap_1inSpellDocumentWithTag_1details_1, 55 OS.objc_msgSend_stret(&result, this.id_, OS.sel_checkGrammarOfString_1startingAt_1language_1wrap_1inSpellDocumentWithTag_1details_1,
56 stringToCheck !is null ? stringToCheck.id : null, startingOffset, language !is null ? language.id : null, wrapFlag, tag, details); 56 stringToCheck !is null ? stringToCheck.id_ : null, startingOffset, language !is null ? language.id_ : null, wrapFlag, tag, details);
57 return result; 57 return result;
58 } 58 }
59 59
60 public NSRange checkSpellingOfString_startingAt_ (NSString stringToCheck, NSInteger startingOffset) 60 public NSRange checkSpellingOfString_startingAt_ (NSString stringToCheck, NSInteger startingOffset)
61 { 61 {
62 NSRange result; 62 NSRange result;
63 OS.objc_msgSend_stret(result, this.id, OS.sel_checkSpellingOfString_1startingAt_1, stringToCheck !is null ? stringToCheck.id : null, 63 OS.objc_msgSend_stret(&result, this.id_, OS.sel_checkSpellingOfString_1startingAt_1, stringToCheck !is null ? stringToCheck.id_ : null,
64 startingOffset); 64 startingOffset);
65 return result; 65 return result;
66 } 66 }
67 67
68 public NSRange checkSpellingOfString_startingAt_language_wrap_inSpellDocumentWithTag_wordCount_ (NSString stringToCheck, NSInteger startingOffset, 68 public NSRange checkSpellingOfString_startingAt_language_wrap_inSpellDocumentWithTag_wordCount_ (NSString stringToCheck, NSInteger startingOffset,
69 NSString language, bool wrapFlag, NSInteger tag, NSInteger* wordCount) 69 NSString language, bool wrapFlag, NSInteger tag, NSInteger* wordCount)
70 { 70 {
71 NSRange result; 71 NSRange result;
72 OS.objc_msgSend_stret(result, this.id, OS.sel_checkSpellingOfString_1startingAt_1language_1wrap_1inSpellDocumentWithTag_1wordCount_1, 72 OS.objc_msgSend_stret(&result, this.id_, OS.sel_checkSpellingOfString_1startingAt_1language_1wrap_1inSpellDocumentWithTag_1wordCount_1,
73 stringToCheck !is null ? stringToCheck.id : null, startingOffset, language !is null ? language.id : null, wrapFlag, tag, wordCount); 73 stringToCheck !is null ? stringToCheck.id_ : null, startingOffset, language !is null ? language.id_ : null, wrapFlag, tag, wordCount);
74 return result; 74 return result;
75 } 75 }
76 76
77 public void closeSpellDocumentWithTag (NSInteger tag) 77 public void closeSpellDocumentWithTag (NSInteger tag)
78 { 78 {
79 OS.objc_msgSend(this.id, OS.sel_closeSpellDocumentWithTag_1, tag); 79 OS.objc_msgSend(this.id_, OS.sel_closeSpellDocumentWithTag_1, tag);
80 } 80 }
81 81
82 public NSArray completionsForPartialWordRange (NSRange range, NSString string, NSString language, NSInteger tag) 82 public NSArray completionsForPartialWordRange (NSRange range, NSString string, NSString language, NSInteger tag)
83 { 83 {
84 objc.id result = OS.objc_msgSend(this.id, OS.sel_completionsForPartialWordRange_1inString_1language_1inSpellDocumentWithTag_1, range, 84 objc.id result = OS.objc_msgSend(this.id_, OS.sel_completionsForPartialWordRange_1inString_1language_1inSpellDocumentWithTag_1, range,
85 string !is null ? string.id : null, language !is null ? language.id : null, tag); 85 string !is null ? string.id_ : null, language !is null ? language.id_ : null, tag);
86 return result !is null ? new NSArray(result) : null; 86 return result !is null ? new NSArray(result) : null;
87 } 87 }
88 88
89 public NSInteger countWordsInString (NSString stringToCount, NSString language) 89 public NSInteger countWordsInString (NSString stringToCount, NSString language)
90 { 90 {
91 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_countWordsInString_1language_1, stringToCount !is null ? stringToCount.id : null, 91 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_countWordsInString_1language_1, stringToCount !is null ? stringToCount.id_ : null,
92 language !is null ? language.id : null); 92 language !is null ? language.id_ : null);
93 } 93 }
94 94
95 public void forgetWord (NSString word) 95 public void forgetWord (NSString word)
96 { 96 {
97 OS.objc_msgSend(this.id, OS.sel_forgetWord_1, word !is null ? word.id : null); 97 OS.objc_msgSend(this.id_, OS.sel_forgetWord_1, word !is null ? word.id_ : null);
98 } 98 }
99 99
100 public NSArray guessesForWord (NSString word) 100 public NSArray guessesForWord (NSString word)
101 { 101 {
102 objc.id result = OS.objc_msgSend(this.id, OS.sel_guessesForWord_1, word !is null ? word.id : null); 102 objc.id result = OS.objc_msgSend(this.id_, OS.sel_guessesForWord_1, word !is null ? word.id_ : null);
103 return result !is null ? new NSArray(result) : null; 103 return result !is null ? new NSArray(result) : null;
104 } 104 }
105 105
106 public bool hasLearnedWord (NSString word) 106 public bool hasLearnedWord (NSString word)
107 { 107 {
108 return OS.objc_msgSend(this.id, OS.sel_hasLearnedWord_1, word !is null ? word.id : null) !is null; 108 return OS.objc_msgSend(this.id_, OS.sel_hasLearnedWord_1, word !is null ? word.id_ : null) !is null;
109 } 109 }
110 110
111 public void ignoreWord (NSString wordToIgnore, NSInteger tag) 111 public void ignoreWord (NSString wordToIgnore, NSInteger tag)
112 { 112 {
113 OS.objc_msgSend(this.id, OS.sel_ignoreWord_1inSpellDocumentWithTag_1, wordToIgnore !is null ? wordToIgnore.id : null, tag); 113 OS.objc_msgSend(this.id_, OS.sel_ignoreWord_1inSpellDocumentWithTag_1, wordToIgnore !is null ? wordToIgnore.id_ : null, tag);
114 } 114 }
115 115
116 public NSArray ignoredWordsInSpellDocumentWithTag (NSInteger tag) 116 public NSArray ignoredWordsInSpellDocumentWithTag (NSInteger tag)
117 { 117 {
118 objc.id result = OS.objc_msgSend(this.id, OS.sel_ignoredWordsInSpellDocumentWithTag_1, tag); 118 objc.id result = OS.objc_msgSend(this.id_, OS.sel_ignoredWordsInSpellDocumentWithTag_1, tag);
119 return result !is null ? new NSArray(result) : null; 119 return result !is null ? new NSArray(result) : null;
120 } 120 }
121 121
122 public NSString language () 122 public NSString language ()
123 { 123 {
124 objc.id result = OS.objc_msgSend(this.id, OS.sel_language); 124 objc.id result = OS.objc_msgSend(this.id_, OS.sel_language);
125 return result !is null ? new NSString(result) : null; 125 return result !is null ? new NSString(result) : null;
126 } 126 }
127 127
128 public void learnWord (NSString word) 128 public void learnWord (NSString word)
129 { 129 {
130 OS.objc_msgSend(this.id, OS.sel_learnWord_1, word !is null ? word.id : null); 130 OS.objc_msgSend(this.id_, OS.sel_learnWord_1, word !is null ? word.id_ : null);
131 } 131 }
132 132
133 public void setAccessoryView (NSView aView) 133 public void setAccessoryView (NSView aView)
134 { 134 {
135 OS.objc_msgSend(this.id, OS.sel_setAccessoryView_1, aView !is null ? aView.id : null); 135 OS.objc_msgSend(this.id_, OS.sel_setAccessoryView_1, aView !is null ? aView.id_ : null);
136 } 136 }
137 137
138 public void setIgnoredWords (NSArray words, NSInteger tag) 138 public void setIgnoredWords (NSArray words, NSInteger tag)
139 { 139 {
140 OS.objc_msgSend(this.id, OS.sel_setIgnoredWords_1inSpellDocumentWithTag_1, words !is null ? words.id : null, tag); 140 OS.objc_msgSend(this.id_, OS.sel_setIgnoredWords_1inSpellDocumentWithTag_1, words !is null ? words.id_ : null, tag);
141 } 141 }
142 142
143 public bool setLanguage (NSString language) 143 public bool setLanguage (NSString language)
144 { 144 {
145 return OS.objc_msgSend(this.id, OS.sel_setLanguage_1, language !is null ? language.id : null) !is null; 145 return OS.objc_msgSend(this.id_, OS.sel_setLanguage_1, language !is null ? language.id_ : null) !is null;
146 } 146 }
147 147
148 public void setWordFieldStringValue (NSString aString) 148 public void setWordFieldStringValue (NSString aString)
149 { 149 {
150 OS.objc_msgSend(this.id, OS.sel_setWordFieldStringValue_1, aString !is null ? aString.id : null); 150 OS.objc_msgSend(this.id_, OS.sel_setWordFieldStringValue_1, aString !is null ? aString.id_ : null);
151 } 151 }
152 152
153 public static NSSpellChecker sharedSpellChecker () 153 public static NSSpellChecker sharedSpellChecker ()
154 { 154 {
155 objc.id result = OS.objc_msgSend(OS.class_NSSpellChecker, OS.sel_sharedSpellChecker); 155 objc.id result = OS.objc_msgSend(OS.class_NSSpellChecker, OS.sel_sharedSpellChecker);
161 return OS.objc_msgSend(OS.class_NSSpellChecker, OS.sel_sharedSpellCheckerExists) !is null; 161 return OS.objc_msgSend(OS.class_NSSpellChecker, OS.sel_sharedSpellCheckerExists) !is null;
162 } 162 }
163 163
164 public NSPanel spellingPanel () 164 public NSPanel spellingPanel ()
165 { 165 {
166 objc.id result = OS.objc_msgSend(this.id, OS.sel_spellingPanel); 166 objc.id result = OS.objc_msgSend(this.id_, OS.sel_spellingPanel);
167 return result !is null ? new NSPanel(result) : null; 167 return result !is null ? new NSPanel(result) : null;
168 } 168 }
169 169
170 public static NSInteger uniqueSpellDocumentTag () 170 public static NSInteger uniqueSpellDocumentTag ()
171 { 171 {
172 return cast(NSInteger) OS.objc_msgSend(OS.class_NSSpellChecker, OS.sel_uniqueSpellDocumentTag); 172 return cast(NSInteger) OS.objc_msgSend(OS.class_NSSpellChecker, OS.sel_uniqueSpellDocumentTag);
173 } 173 }
174 174
175 public void unlearnWord (NSString word) 175 public void unlearnWord (NSString word)
176 { 176 {
177 OS.objc_msgSend(this.id, OS.sel_unlearnWord_1, word !is null ? word.id : null); 177 OS.objc_msgSend(this.id_, OS.sel_unlearnWord_1, word !is null ? word.id_ : null);
178 } 178 }
179 179
180 public void updateSpellingPanelWithGrammarString (NSString string, NSDictionary detail) 180 public void updateSpellingPanelWithGrammarString (NSString string, NSDictionary detail)
181 { 181 {
182 OS.objc_msgSend(this.id, OS.sel_updateSpellingPanelWithGrammarString_1detail_1, string !is null ? string.id : null, 182 OS.objc_msgSend(this.id_, OS.sel_updateSpellingPanelWithGrammarString_1detail_1, string !is null ? string.id_ : null,
183 detail !is null ? detail.id : null); 183 detail !is null ? detail.id_ : null);
184 } 184 }
185 185
186 public void updateSpellingPanelWithMisspelledWord (NSString word) 186 public void updateSpellingPanelWithMisspelledWord (NSString word)
187 { 187 {
188 OS.objc_msgSend(this.id, OS.sel_updateSpellingPanelWithMisspelledWord_1, word !is null ? word.id : null); 188 OS.objc_msgSend(this.id_, OS.sel_updateSpellingPanelWithMisspelledWord_1, word !is null ? word.id_ : null);
189 } 189 }
190 190
191 } 191 }