|
SCIMBridge 0.4.x
|
00001 /* 00002 * SCIM Bridge 00003 * 00004 * Copyright (c) 2006 Ryo Dairiki <ryo-dairiki@users.sourceforge.net> 00005 * 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation and 00010 * appearing in the file LICENSE.LGPL included in the package of this file. 00011 * You can also redistribute it and/or modify it under the terms of 00012 * the GNU General Public License as published by the Free Software Foundation and 00013 * appearing in the file LICENSE.GPL included in the package of this file. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00018 */ 00019 00026 #ifndef SCIMBRIDGESTRING_H_ 00027 #define SCIMBRIDGESTRING_H_ 00028 00029 #include <stdint.h> 00030 #include <stdlib.h> 00031 #include <unistd.h> 00032 00033 #include "scim-bridge.h" 00034 00035 #ifdef __cplusplus 00036 extern "C" 00037 { 00038 #endif 00039 00040 #ifndef __STDC_ISO_10646__ 00041 00044 typedef uint32_t wchar; 00045 #else 00046 00049 typedef wchar_t wchar; 00050 #endif 00051 00059 ssize_t scim_bridge_string_to_wstring (wchar **wstr, const char *str); 00060 00068 ssize_t scim_bridge_wstring_to_string (char **str, const wchar *wstr); 00069 00076 ssize_t scim_bridge_string_get_length (const char *str); 00077 00084 ssize_t scim_bridge_wstring_get_length (const wchar *wstr); 00085 00093 retval_t scim_bridge_string_to_uint (unsigned int *dst, const char *str); 00094 00102 retval_t scim_bridge_string_to_int (int *dst, const char *str); 00103 00111 retval_t scim_bridge_string_to_boolean (boolean *dst, const char *str); 00112 00120 size_t scim_bridge_string_from_uint (char **str, unsigned int value); 00121 00129 size_t scim_bridge_string_from_int (char **str, int value); 00130 00138 size_t scim_bridge_string_from_boolean (char **str, boolean value); 00139 00140 #ifdef __cplusplus 00141 } 00142 #endif 00143 #endif /*SCIMBRIDGESTRING_H_*/
1.7.3