diff options
author | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-06 07:40:53 +0000 |
---|---|---|
committer | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-06 07:40:53 +0000 |
commit | 34f6bc1937fe617875e8f5e95485904569cca582 (patch) | |
tree | 94f201b6bb78ff601a8a97783f4ac0134423af48 /chrome/browser/ime_input.h | |
parent | 576d8bff4e6778c6de60b8a7269a78c5e8bf602a (diff) | |
download | chromium_src-34f6bc1937fe617875e8f5e95485904569cca582.zip chromium_src-34f6bc1937fe617875e8f5e95485904569cca582.tar.gz chromium_src-34f6bc1937fe617875e8f5e95485904569cca582.tar.bz2 |
Changes parameters used by IME code to fix several issues caused by Japanese IMEs.
Recent Japanese IMEs (ATOK2008 and MSIME 2007) display a suggestion window (a window which contains suggestions) above a composition string. To fix this issue, we do not only send the lower-left corner of a composition string but also send its upper-left corner and its upper-right corner. So, this change changes IPC parameters used by IME from a tuple of integers to gfx::Rect.
Also, this change fixes cursor positions for Japanese IMEs.
BUG=2770 "IME: Candidate window of Japanese IME follows the end of composition"
BUG=2771 "ATOK 2008 IME pop-ups are displayed below the main Chrome window."
BUG=2775 "IME: Caret is always displayed at the last of IME composition."
Review URL: http://codereview.chromium.org/7385
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4872 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ime_input.h')
-rw-r--r-- | chrome/browser/ime_input.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/chrome/browser/ime_input.h b/chrome/browser/ime_input.h index 4064f02..8175887 100644 --- a/chrome/browser/ime_input.h +++ b/chrome/browser/ime_input.h @@ -10,6 +10,7 @@ #include <string> #include "base/basictypes.h" +#include "base/gfx/Rect.h" // This header file defines a struct and a class used for encapsulating IMM32 // APIs, controls IMEs attached to a window, and enables the 'on-the-spot' @@ -209,9 +210,9 @@ class ImeInput { // Parameters // * window_handle [in] (HWND) // Represents the window handle of the caller. - // * x [in] (int) - // * y [in] (int) - // Represent the position of the upper-left corner of IME windows. + // * caret_rect [in] (const gfx::Rect&) + // Represent the rectangle of the input caret. + // This rectangle is used for controlling the positions of IME windows. // * complete [in] (bool) // Represents whether or not to complete the ongoing composition. // + true @@ -221,7 +222,9 @@ class ImeInput { // + false // Just move the IME windows of the ongoing composition to the given // position without finishing it. - void EnableIME(HWND window_handle, int x, int y, bool complete); + void EnableIME(HWND window_handle, + const gfx::Rect& caret_rect, + bool complete); // Disable the IME attached to the given window, i.e. prohibits any user-input // events from being dispatched to the IME. @@ -294,9 +297,8 @@ class ImeInput { // * false: it does not create a system caret. bool system_caret_; - // The position of the input caret retrieved from a renderer process. - int caret_x_; - int caret_y_; + // The rectangle of the input caret retrieved from a renderer process. + gfx::Rect caret_rect_; DISALLOW_EVIL_CONSTRUCTORS(ImeInput); }; |