libt3window
|
00001 /* Copyright (C) 2011 G.P. Halkes 00002 This program is free software: you can redistribute it and/or modify 00003 it under the terms of the GNU General Public License version 3, as 00004 published by the Free Software Foundation. 00005 00006 This program is distributed in the hope that it will be useful, 00007 but WITHOUT ANY WARRANTY; without even the implied warranty of 00008 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00009 GNU General Public License for more details. 00010 00011 You should have received a copy of the GNU General Public License 00012 along with this program. If not, see <http://www.gnu.org/licenses/>. 00013 */ 00014 #ifndef T3_UTF8_H 00015 #define T3_UTF8_H 00016 00020 #include <stddef.h> 00021 #include <stdint.h> 00022 #include <unictype.h> 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 #include <t3window/window_api.h> 00029 00032 #define T3_UTF8_CONTROL_MASK (UC_CATEGORY_MASK_Cs | UC_CATEGORY_MASK_Cf | UC_CATEGORY_MASK_Co | \ 00033 UC_CATEGORY_MASK_Cc | UC_CATEGORY_MASK_Zl | UC_CATEGORY_MASK_Zp) 00034 00035 T3_WINDOW_API uint32_t t3_utf8_get(const char *src, size_t *size); 00036 T3_WINDOW_API size_t t3_utf8_put(uint32_t c, char *dst); 00037 00038 T3_WINDOW_API int t3_utf8_wcwidth(uint32_t c); 00039 00041 #ifdef __cplusplus 00042 } /* extern "C" */ 00043 #endif 00044 #endif