summaryrefslogtreecommitdiffstats
path: root/ui/base/keycodes
diff options
context:
space:
mode:
authoryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-08 10:31:58 +0000
committeryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-08 10:31:58 +0000
commit369b9b8143564392e9ff3d57e7360017368d2256 (patch)
tree19403eeff8b34e2f835456e80724d357db5a2c38 /ui/base/keycodes
parent5115912b027d48cb06a9413cad848c820962b22c (diff)
downloadchromium_src-369b9b8143564392e9ff3d57e7360017368d2256.zip
chromium_src-369b9b8143564392e9ff3d57e7360017368d2256.tar.gz
chromium_src-369b9b8143564392e9ff3d57e7360017368d2256.tar.bz2
Rename ui::DefaultSymbolFromXEvent to ui::GetCharacterFromXEvent following suzhe's suggestion.
The new name would be more consistent since other functions that return a Unicode code point use ui::GetCharacterXXX. For example, keyboard_code_conversion.h has ui::GetCharacterFromKeyCode. BUG=None TEST=ran try Review URL: http://codereview.chromium.org/8802002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113586 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/keycodes')
-rw-r--r--ui/base/keycodes/keyboard_code_conversion_x.cc2
-rw-r--r--ui/base/keycodes/keyboard_code_conversion_x.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/ui/base/keycodes/keyboard_code_conversion_x.cc b/ui/base/keycodes/keyboard_code_conversion_x.cc
index d7f8372..df5bf68 100644
--- a/ui/base/keycodes/keyboard_code_conversion_x.cc
+++ b/ui/base/keycodes/keyboard_code_conversion_x.cc
@@ -319,7 +319,7 @@ KeyboardCode KeyboardCodeFromXKeysym(unsigned int keysym) {
return VKEY_UNKNOWN;
}
-unsigned int DefaultSymbolFromXEvent(XEvent* xev) {
+uint16 GetCharacterFromXEvent(XEvent* xev) {
char buf[6];
int bytes_written = XLookupString(&xev->xkey, buf, 6, NULL, NULL);
DCHECK_LE(bytes_written, 6);
diff --git a/ui/base/keycodes/keyboard_code_conversion_x.h b/ui/base/keycodes/keyboard_code_conversion_x.h
index 7779483..f394de1 100644
--- a/ui/base/keycodes/keyboard_code_conversion_x.h
+++ b/ui/base/keycodes/keyboard_code_conversion_x.h
@@ -5,6 +5,7 @@
#ifndef UI_BASE_KEYCODES_KEYBOARD_CODE_CONVERSION_X_H_
#define UI_BASE_KEYCODES_KEYBOARD_CODE_CONVERSION_X_H_
+#include "base/basictypes.h"
#include "ui/base/keycodes/keyboard_codes_posix.h"
#include "ui/base/ui_export.h"
@@ -16,8 +17,8 @@ UI_EXPORT KeyboardCode KeyboardCodeFromXKeyEvent(XEvent* xev);
UI_EXPORT KeyboardCode KeyboardCodeFromXKeysym(unsigned int keysym);
-// Returns a key symbol on a standard US PC keyboard from an XEvent.
-UI_EXPORT unsigned int DefaultSymbolFromXEvent(XEvent* xev);
+// Returns a character on a standard US PC keyboard from an XEvent.
+UI_EXPORT uint16 GetCharacterFromXEvent(XEvent* xev);
// Converts a KeyboardCode into an X KeySym.
UI_EXPORT int XKeysymForWindowsKeyCode(KeyboardCode keycode, bool shift);