1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-07 18:46:35 +01:00

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.
This commit is contained in:
Manuel Argüelles
2013-08-21 16:19:35 -05:00
parent 46b69e6db1
commit 422a89d32d
7 changed files with 66 additions and 23 deletions

View File

@@ -4,9 +4,12 @@
#ifndef _windows_h
#define _windows_h
#define _XOPEN_SOURCE_EXTENDED
#include <curses.h>
#include <stdint.h>
#include <stdbool.h>
#include <wctype.h>
#include <wchar.h>
#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);