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

Unified Diff: ui/base/ime/character_composer.h

Issue 15816003: Supports unicode composition(Ctrl+Shift+U) with C-S pressed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a TODO. Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/base/ime/character_composer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/character_composer.h
diff --git a/ui/base/ime/character_composer.h b/ui/base/ime/character_composer.h
index 2a93ee3449f943fa198b7710afcbb81b25d82ee3..621acc016837f492d73eae030fc3e4906d7092c7 100644
--- a/ui/base/ime/character_composer.h
+++ b/ui/base/ime/character_composer.h
@@ -14,9 +14,6 @@ namespace ui {
// A class to recognize compose and dead key sequence.
// Outputs composed character.
-//
-// TODO(hashimoto): support unicode character composition starting with
-// Ctrl-Shift-U. http://crosbug.com/15925
class UI_EXPORT CharacterComposer {
public:
CharacterComposer();
@@ -27,7 +24,8 @@ class UI_EXPORT CharacterComposer {
// Filters keypress.
// Returns true if the keypress is recognized as a part of composition
// sequence.
- // |keyval| must be a GDK_KEY_* constants.
+ // |keyval| must be a GDK_KEY_* constant.
+ // |keycode| must be a X key code.
// |flags| must be a combination of ui::EF_* flags.
//
// composed_character() returns non empty string when there is a character
@@ -36,7 +34,10 @@ class UI_EXPORT CharacterComposer {
// after this method returns true.
// Return values of composed_character() and preedit_string() are empty after
// this method returns false.
- bool FilterKeyPress(unsigned int keyval, unsigned int flags);
+ //
+ // TODO(nona): Actually a X KeySym is passed to |keyval|, so we should use
+ // XK_* rather than GDK_KEY_*.
+ bool FilterKeyPress(unsigned int keyval, unsigned int keycode, int flags);
// Returns a string consisting of composed character.
// Empty string is returned when there is no composition result.
@@ -56,10 +57,12 @@ class UI_EXPORT CharacterComposer {
};
// Filters keypress in key sequence mode.
- bool FilterKeyPressSequenceMode(unsigned int keyval, unsigned int flags);
+ bool FilterKeyPressSequenceMode(unsigned int keyval, unsigned int keycode,
+ int flags);
// Filters keypress in hexadecimal mode.
- bool FilterKeyPressHexMode(unsigned int keyval, unsigned int flags);
+ bool FilterKeyPressHexMode(unsigned int keyval, unsigned int keycode,
+ int flags);
// Commit a character composed from hexadecimal uncode sequence
void CommitHex();
« no previous file with comments | « no previous file | ui/base/ime/character_composer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698