| OLD | NEW |
| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 // Retrieves a composition result of the ongoing composition if it exists. | 148 // Retrieves a composition result of the ongoing composition if it exists. |
| 149 // Parameters | 149 // Parameters |
| 150 // * window_handle [in] (HWND) | 150 // * window_handle [in] (HWND) |
| 151 // Represents the window handle of the caller. | 151 // Represents the window handle of the caller. |
| 152 // * lparam [in] (LPARAM) | 152 // * lparam [in] (LPARAM) |
| 153 // Specifies the updated members of the ongoing composition, and must be | 153 // Specifies the updated members of the ongoing composition, and must be |
| 154 // the same parameter of a WM_IME_COMPOSITION message handler. | 154 // the same parameter of a WM_IME_COMPOSITION message handler. |
| 155 // This parameter is used for checking if the ongoing composition has | 155 // This parameter is used for checking if the ongoing composition has |
| 156 // its result string, | 156 // its result string, |
| 157 // * result [out] (string16) | 157 // * result [out] (base::string16) |
| 158 // Represents the object contains the composition result. | 158 // Represents the object contains the composition result. |
| 159 // Return values | 159 // Return values |
| 160 // * true | 160 // * true |
| 161 // The ongoing composition has a composition result. | 161 // The ongoing composition has a composition result. |
| 162 // * false | 162 // * false |
| 163 // The ongoing composition does not have composition results. | 163 // The ongoing composition does not have composition results. |
| 164 // Remarks | 164 // Remarks |
| 165 // This function is designed for being called from WM_IME_COMPOSITION | 165 // This function is designed for being called from WM_IME_COMPOSITION |
| 166 // message handlers. | 166 // message handlers. |
| 167 bool GetResult(HWND window_handle, LPARAM lparam, string16* result); | 167 bool GetResult(HWND window_handle, LPARAM lparam, base::string16* result); |
| 168 | 168 |
| 169 // Retrieves the current composition status of the ongoing composition. | 169 // Retrieves the current composition status of the ongoing composition. |
| 170 // Parameters | 170 // Parameters |
| 171 // * window_handle [in] (HWND) | 171 // * window_handle [in] (HWND) |
| 172 // Represents the window handle of the caller. | 172 // Represents the window handle of the caller. |
| 173 // * lparam [in] (LPARAM) | 173 // * lparam [in] (LPARAM) |
| 174 // Specifies the updated members of the ongoing composition, and must be | 174 // Specifies the updated members of the ongoing composition, and must be |
| 175 // the same parameter of a WM_IME_COMPOSITION message handler. | 175 // the same parameter of a WM_IME_COMPOSITION message handler. |
| 176 // This parameter is used for checking if the ongoing composition has | 176 // This parameter is used for checking if the ongoing composition has |
| 177 // its result string, | 177 // its result string, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 void GetCompositionInfo(HIMC imm_context, LPARAM lparam, | 267 void GetCompositionInfo(HIMC imm_context, LPARAM lparam, |
| 268 CompositionText* composition); | 268 CompositionText* composition); |
| 269 | 269 |
| 270 // Updates the position of the IME windows. | 270 // Updates the position of the IME windows. |
| 271 void MoveImeWindow(HWND window_handle, HIMC imm_context); | 271 void MoveImeWindow(HWND window_handle, HIMC imm_context); |
| 272 | 272 |
| 273 // Completes the ongoing composition if it exists. | 273 // Completes the ongoing composition if it exists. |
| 274 void CompleteComposition(HWND window_handle, HIMC imm_context); | 274 void CompleteComposition(HWND window_handle, HIMC imm_context); |
| 275 | 275 |
| 276 // Retrieves a string from the IMM. | 276 // Retrieves a string from the IMM. |
| 277 bool GetString(HIMC imm_context, WPARAM lparam, int type, string16* result); | 277 bool GetString(HIMC imm_context, |
| 278 WPARAM lparam, |
| 279 int type, |
| 280 base::string16* result); |
| 278 | 281 |
| 279 private: | 282 private: |
| 280 // Represents whether or not there is an ongoing composition in a browser | 283 // 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. | 284 // process, i.e. whether or not a browser process is composing a text. |
| 282 bool is_composing_; | 285 bool is_composing_; |
| 283 | 286 |
| 284 // This value represents whether or not the current input context has IMEs. | 287 // This value represents whether or not the current input context has IMEs. |
| 285 // The following table shows the list of IME status: | 288 // The following table shows the list of IME status: |
| 286 // Value Description | 289 // Value Description |
| 287 // false The current input language does not have IMEs. | 290 // false The current input language does not have IMEs. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 324 |
| 322 // Indicates whether or not we want IME to render composition text. | 325 // Indicates whether or not we want IME to render composition text. |
| 323 bool use_composition_window_; | 326 bool use_composition_window_; |
| 324 | 327 |
| 325 DISALLOW_COPY_AND_ASSIGN(IMM32Manager); | 328 DISALLOW_COPY_AND_ASSIGN(IMM32Manager); |
| 326 }; | 329 }; |
| 327 | 330 |
| 328 } // namespace ui | 331 } // namespace ui |
| 329 | 332 |
| 330 #endif // UI_BASE_IME_WIN_IMM32_MANAGER_H | 333 #endif // UI_BASE_IME_WIN_IMM32_MANAGER_H |
| OLD | NEW |