OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WIN_IME_INPUT_H_ | 5 #ifndef UI_BASE_WIN_IME_INPUT_H_ |
6 #define UI_BASE_WIN_IME_INPUT_H_ | 6 #define UI_BASE_WIN_IME_INPUT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
15 #include "base/i18n/rtl.h" | 15 #include "base/i18n/rtl.h" |
16 #include "base/string16.h" | 16 #include "base/string16.h" |
17 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 18 #include "ui/ui_api.h" |
18 | 19 |
19 namespace ui { | 20 namespace ui { |
20 | 21 |
21 struct CompositionText; | 22 struct CompositionText; |
22 | 23 |
23 // This header file defines a struct and a class used for encapsulating IMM32 | 24 // This header file defines a struct and a class used for encapsulating IMM32 |
24 // APIs, controls IMEs attached to a window, and enables the 'on-the-spot' | 25 // APIs, controls IMEs attached to a window, and enables the 'on-the-spot' |
25 // input without deep knowledge about the APIs, i.e. knowledge about the | 26 // input without deep knowledge about the APIs, i.e. knowledge about the |
26 // language-specific and IME-specific behaviors. | 27 // language-specific and IME-specific behaviors. |
27 // The following items enumerates the simplest steps for an (window) | 28 // The following items enumerates the simplest steps for an (window) |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // Fortunately or unfortunately, TSF (Text Service Framework) and | 67 // Fortunately or unfortunately, TSF (Text Service Framework) and |
67 // CUAS (Cicero Unaware Application Support) allows IMM32 APIs for | 68 // CUAS (Cicero Unaware Application Support) allows IMM32 APIs for |
68 // retrieving not only the inputs from IMEs (Input Method Editors), used | 69 // retrieving not only the inputs from IMEs (Input Method Editors), used |
69 // only for inputting East-Asian language texts, but also the ones from | 70 // only for inputting East-Asian language texts, but also the ones from |
70 // tablets (on Windows XP Tablet PC Edition and Windows Vista), voice | 71 // tablets (on Windows XP Tablet PC Edition and Windows Vista), voice |
71 // recognizers (e.g. ViaVoice and Microsoft Office), etc. | 72 // recognizers (e.g. ViaVoice and Microsoft Office), etc. |
72 // We can disable TSF and CUAS in Windows XP Tablet PC Edition. On the other | 73 // We can disable TSF and CUAS in Windows XP Tablet PC Edition. On the other |
73 // hand, we can NEVER disable either TSF or CUAS in Windows Vista, i.e. | 74 // hand, we can NEVER disable either TSF or CUAS in Windows Vista, i.e. |
74 // THIS CLASS IS NOT ONLY USED ON THE INPUT CONTEXTS OF EAST-ASIAN | 75 // THIS CLASS IS NOT ONLY USED ON THE INPUT CONTEXTS OF EAST-ASIAN |
75 // LANGUAGES BUT ALSO USED ON THE INPUT CONTEXTS OF ALL LANGUAGES. | 76 // LANGUAGES BUT ALSO USED ON THE INPUT CONTEXTS OF ALL LANGUAGES. |
76 class ImeInput { | 77 class UI_API ImeInput { |
77 public: | 78 public: |
78 ImeInput(); | 79 ImeInput(); |
79 ~ImeInput(); | 80 ~ImeInput(); |
80 | 81 |
81 // Retrieves whether or not there is an ongoing composition. | 82 // Retrieves whether or not there is an ongoing composition. |
82 bool is_composing() const { return is_composing_; } | 83 bool is_composing() const { return is_composing_; } |
83 | 84 |
84 // Retrieves the input language from Windows and update it. | 85 // Retrieves the input language from Windows and update it. |
85 // Return values | 86 // Return values |
86 // * true | 87 // * true |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 305 |
305 // The rectangle of the input caret retrieved from a renderer process. | 306 // The rectangle of the input caret retrieved from a renderer process. |
306 gfx::Rect caret_rect_; | 307 gfx::Rect caret_rect_; |
307 | 308 |
308 DISALLOW_COPY_AND_ASSIGN(ImeInput); | 309 DISALLOW_COPY_AND_ASSIGN(ImeInput); |
309 }; | 310 }; |
310 | 311 |
311 } // namespace ui | 312 } // namespace ui |
312 | 313 |
313 #endif // UI_BASE_WIN_IME_INPUT_H_ | 314 #endif // UI_BASE_WIN_IME_INPUT_H_ |
OLD | NEW |