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 #include "ui/base/ui_export.h" |
19 | 19 |
20 namespace ui { | 20 namespace ui { |
21 | 21 |
22 struct CompositionText; | 22 struct CompositionText; |
23 | 23 |
24 // 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 |
25 // 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' |
26 // 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 |
27 // language-specific and IME-specific behaviors. | 27 // language-specific and IME-specific behaviors. |
28 // 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... |
67 // Fortunately or unfortunately, TSF (Text Service Framework) and | 67 // Fortunately or unfortunately, TSF (Text Service Framework) and |
68 // CUAS (Cicero Unaware Application Support) allows IMM32 APIs for | 68 // CUAS (Cicero Unaware Application Support) allows IMM32 APIs for |
69 // retrieving not only the inputs from IMEs (Input Method Editors), used | 69 // retrieving not only the inputs from IMEs (Input Method Editors), used |
70 // 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 |
71 // tablets (on Windows XP Tablet PC Edition and Windows Vista), voice | 71 // tablets (on Windows XP Tablet PC Edition and Windows Vista), voice |
72 // recognizers (e.g. ViaVoice and Microsoft Office), etc. | 72 // recognizers (e.g. ViaVoice and Microsoft Office), etc. |
73 // 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 |
74 // 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. |
75 // 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 |
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_API ImeInput { | 77 class UI_EXPORT ImeInput { |
78 public: | 78 public: |
79 ImeInput(); | 79 ImeInput(); |
80 ~ImeInput(); | 80 ~ImeInput(); |
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 // Return values |
87 // * true | 87 // * true |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 | 305 |
306 // The rectangle of the input caret retrieved from a renderer process. | 306 // The rectangle of the input caret retrieved from a renderer process. |
307 gfx::Rect caret_rect_; | 307 gfx::Rect caret_rect_; |
308 | 308 |
309 DISALLOW_COPY_AND_ASSIGN(ImeInput); | 309 DISALLOW_COPY_AND_ASSIGN(ImeInput); |
310 }; | 310 }; |
311 | 311 |
312 } // namespace ui | 312 } // namespace ui |
313 | 313 |
314 #endif // UI_BASE_WIN_IME_INPUT_H_ | 314 #endif // UI_BASE_WIN_IME_INPUT_H_ |
OLD | NEW |