changeset 20695:0d650ab65a85 draft

-Codechange: Pass UCS-4 characters to the edit box key handler.
author Michael Lutz <michi@icosahedron.de>
date Sun, 24 Mar 2013 00:02:46 +0100
parents d12783a922d3
children d6112ef021b2
files src/textbuf.cpp src/textbuf_type.h src/window.cpp src/window_gui.h
diffstat 4 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/textbuf.cpp
+++ b/src/textbuf.cpp
@@ -362,7 +362,7 @@
 	return false;
 }
 
-HandleKeyPressResult Textbuf::HandleKeyPress(uint16 key, uint16 keycode)
+HandleKeyPressResult Textbuf::HandleKeyPress(WChar key, uint16 keycode)
 {
 	bool edited = false;
 
--- a/src/textbuf_type.h
+++ b/src/textbuf_type.h
@@ -56,7 +56,7 @@
 	bool DeleteChar(uint16 keycode);
 	bool MovePos(uint16 keycode);
 
-	HandleKeyPressResult HandleKeyPress(uint16 key, uint16 keycode);
+	HandleKeyPressResult HandleKeyPress(WChar key, uint16 keycode);
 
 	bool HandleCaret();
 	void UpdateSize();
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -2378,7 +2378,7 @@
  * @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;
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -488,7 +488,7 @@
 	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;