Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1470)

Side by Side Diff: ui/base/ime/win/imm32_manager.h

Issue 1234193002: Simplify InputMethodWin initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_IME_WIN_IMM32_MANAGER_H 5 #ifndef UI_BASE_IME_WIN_IMM32_MANAGER_H
6 #define UI_BASE_IME_WIN_IMM32_MANAGER_H 6 #define UI_BASE_IME_WIN_IMM32_MANAGER_H
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // LANGUAGES BUT ALSO USED ON THE INPUT CONTEXTS OF ALL LANGUAGES. 76 // LANGUAGES BUT ALSO USED ON THE INPUT CONTEXTS OF ALL LANGUAGES.
77 class UI_BASE_IME_EXPORT IMM32Manager { 77 class UI_BASE_IME_EXPORT IMM32Manager {
78 public: 78 public:
79 IMM32Manager(); 79 IMM32Manager();
80 virtual ~IMM32Manager(); 80 virtual ~IMM32Manager();
81 81
82 // Retrieves whether or not there is an ongoing composition. 82 // Retrieves whether or not there is an ongoing composition.
83 bool is_composing() const { return is_composing_; } 83 bool is_composing() const { return is_composing_; }
84 84
85 // Retrieves the input language from Windows and update it. 85 // Retrieves the input language from Windows and update it.
86 // Return values 86 void SetInputLanguage();
87 // * true
88 // The given input language has IMEs.
89 // * false
90 // The given input language does not have IMEs.
91 bool SetInputLanguage();
92 87
93 // Creates the IME windows, and allocate required resources for them. 88 // Creates the IME windows, and allocate required resources for them.
94 // Parameters 89 // Parameters
95 // * window_handle [in] (HWND) 90 // * window_handle [in] (HWND)
96 // Represents the window handle of the caller. 91 // Represents the window handle of the caller.
97 void CreateImeWindow(HWND window_handle); 92 void CreateImeWindow(HWND window_handle);
98 93
99 // Updates the style of the IME windows. 94 // Updates the style of the IME windows.
100 // Parameters 95 // Parameters
101 // * window_handle [in] (HWND) 96 // * window_handle [in] (HWND)
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 bool GetString(HIMC imm_context, 269 bool GetString(HIMC imm_context,
275 WPARAM lparam, 270 WPARAM lparam,
276 int type, 271 int type,
277 base::string16* result); 272 base::string16* result);
278 273
279 private: 274 private:
280 // Represents whether or not there is an ongoing composition in a browser 275 // Represents whether or not there is an ongoing composition in a browser
281 // process, i.e. whether or not a browser process is composing a text. 276 // process, i.e. whether or not a browser process is composing a text.
282 bool is_composing_; 277 bool is_composing_;
283 278
284 // This value represents whether or not the current input context has IMEs.
285 // The following table shows the list of IME status:
286 // Value Description
287 // false The current input language does not have IMEs.
288 // true The current input language has IMEs.
289 bool ime_status_;
290
291 // The current input Language ID retrieved from Windows, which consists of: 279 // The current input Language ID retrieved from Windows, which consists of:
292 // * Primary Language ID (bit 0 to bit 9), which shows a natunal language 280 // * Primary Language ID (bit 0 to bit 9), which shows a natunal language
293 // (English, Korean, Chinese, Japanese, etc.) and; 281 // (English, Korean, Chinese, Japanese, etc.) and;
294 // * Sub-Language ID (bit 10 to bit 15), which shows a geometrical region 282 // * Sub-Language ID (bit 10 to bit 15), which shows a geometrical region
295 // the language is spoken (For English, United States, United Kingdom, 283 // the language is spoken (For English, United States, United Kingdom,
296 // Australia, Canada, etc.) 284 // Australia, Canada, etc.)
297 // The following list enumerates some examples for the Language ID: 285 // The following list enumerates some examples for the Language ID:
298 // * "en-US" (0x0409) 286 // * "en-US" (0x0409)
299 // MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US); 287 // MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US);
300 // * "ko-KR" (0x0412) 288 // * "ko-KR" (0x0412)
(...skipping 20 matching lines...) Expand all
321 309
322 // Indicates whether or not we want IME to render composition text. 310 // Indicates whether or not we want IME to render composition text.
323 bool use_composition_window_; 311 bool use_composition_window_;
324 312
325 DISALLOW_COPY_AND_ASSIGN(IMM32Manager); 313 DISALLOW_COPY_AND_ASSIGN(IMM32Manager);
326 }; 314 };
327 315
328 } // namespace ui 316 } // namespace ui
329 317
330 #endif // UI_BASE_IME_WIN_IMM32_MANAGER_H 318 #endif // UI_BASE_IME_WIN_IMM32_MANAGER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698