From 270d8aa639341f8be7fde9aa6e6f5bb6fa894d4f Mon Sep 17 00:00:00 2001 From: michi_cc Date: Mon, 5 Aug 2013 20:36:32 +0000 Subject: (svn r25670) -Codechange: Pass UCS-4 characters to the edit box key handler. --- src/textbuf.cpp | 2 +- src/textbuf_type.h | 2 +- src/window.cpp | 2 +- src/window_gui.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/textbuf.cpp b/src/textbuf.cpp index c7071565a..58f931f8a 100644 --- a/src/textbuf.cpp +++ b/src/textbuf.cpp @@ -362,7 +362,7 @@ bool Textbuf::HandleCaret() return false; } -HandleKeyPressResult Textbuf::HandleKeyPress(uint16 key, uint16 keycode) +HandleKeyPressResult Textbuf::HandleKeyPress(WChar key, uint16 keycode) { bool edited = false; diff --git a/src/textbuf_type.h b/src/textbuf_type.h index 4d1a926fb..597615990 100644 --- a/src/textbuf_type.h +++ b/src/textbuf_type.h @@ -56,7 +56,7 @@ struct Textbuf { bool DeleteChar(uint16 keycode); bool MovePos(uint16 keycode); - HandleKeyPressResult HandleKeyPress(uint16 key, uint16 keycode); + HandleKeyPressResult HandleKeyPress(WChar key, uint16 keycode); bool HandleCaret(); void UpdateSize(); diff --git a/src/window.cpp b/src/window.cpp index d3d9baadd..bf51fd7ad 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2378,7 +2378,7 @@ static bool MaybeBringWindowToFront(Window *w) * @return #ES_HANDLED if the key press has been handled and no other * window should receive the event. */ -EventState Window::HandleEditBoxKey(int wid, uint16 key, uint16 keycode) +EventState Window::HandleEditBoxKey(int wid, WChar key, uint16 keycode) { QueryString *query = this->GetQueryString(wid); if (query == NULL) return ES_NOT_HANDLED; diff --git a/src/window_gui.h b/src/window_gui.h index 433ed8729..ce9c062c6 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -488,7 +488,7 @@ public: void UnfocusFocusedWidget(); bool SetFocusedWidget(int widget_index); - EventState HandleEditBoxKey(int wid, uint16 key, uint16 keycode); + EventState HandleEditBoxKey(int wid, WChar key, uint16 keycode); void HandleButtonClick(byte widget); int GetRowFromWidget(int clickpos, int widget, int padding, int line_height = -1) const; -- cgit v1.2.3-54-g00ecf