From 93789396b16e0eaef7b0d540b2ff2a39b5a315ec Mon Sep 17 00:00:00 2001 From: Manuel Argüelles Date: Wed, 21 Aug 2013 16:19:35 -0500 Subject: Add wide char support in toxic (issue #440) Set current locale, use of get_wch instead of getch for reading, use wctomb and friends to convert back from wchar_t, link with cursesw. Unicode support is only added to chat windows. --- testing/toxic/windows.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'testing/toxic/windows.h') diff --git a/testing/toxic/windows.h b/testing/toxic/windows.h index 86917dbe..227040b9 100644 --- a/testing/toxic/windows.h +++ b/testing/toxic/windows.h @@ -4,9 +4,12 @@ #ifndef _windows_h #define _windows_h +#define _XOPEN_SOURCE_EXTENDED #include #include #include +#include +#include #include "../../core/Messenger.h" #define MAX_WINDOWS_NUM 32 #define MAX_FRIENDS_NUM 100 @@ -23,7 +26,7 @@ typedef struct ToxWindow_ ToxWindow; struct ToxWindow_ { - void(*onKey)(ToxWindow *, Messenger *, int); + void(*onKey)(ToxWindow *, Messenger *, wint_t); void(*onDraw)(ToxWindow *, Messenger *); void(*onInit)(ToxWindow *, Messenger *); void(*onFriendRequest)(ToxWindow *, uint8_t *, uint8_t *, uint16_t); -- cgit v1.2.3