common/scim-bridge-string.h

Go to the documentation of this file.
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; either
00010  * version 2 of the License, or (at your option) any later version.*
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
00014  * GNU Lesser General Public License for more details.*
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this program; if not, write to the
00017  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
00018  * Boston, MA  02111-1307  USA
00019  */
00020 
00027 #ifndef SCIMBRIDGESTRING_H_
00028 #define SCIMBRIDGESTRING_H_
00029 
00030 #include <stdint.h>
00031 #include <stdlib.h>
00032 #include <unistd.h>
00033 
00034 #include "scim-bridge.h"
00035 
00036 #ifdef __cplusplus
00037 extern "C"
00038 {
00039 #endif
00040 
00041 #ifndef __STDC_ISO_10646__
00042 
00045     typedef uint32 wchar;
00046 #else
00047 
00050     typedef wchar_t wchar;
00051 #endif
00052 
00060     ssize_t scim_bridge_string_to_wstring (wchar **wstr, const char *str);
00061 
00069     ssize_t scim_bridge_wstring_to_string (char **str, const wchar *wstr);
00070 
00077     ssize_t scim_bridge_string_get_length (const char *str);
00078 
00085     ssize_t scim_bridge_wstring_get_length (const wchar *wstr);
00086 
00094     retval_t scim_bridge_string_to_uint (unsigned int *dst, const char *str);
00095 
00103     retval_t scim_bridge_string_to_int (int *dst, const char *str);
00104 
00112     retval_t scim_bridge_string_to_boolean (boolean *dst, const char *str);
00113 
00121     size_t scim_bridge_string_from_uint (char **str, unsigned int value);
00122 
00130     size_t scim_bridge_string_from_int (char **str, int value);
00131 
00139     size_t scim_bridge_string_from_boolean (char **str, boolean value);
00140 
00141 #ifdef __cplusplus
00142 }
00143 #endif
00144 #endif                                            /*SCIMBRIDGESTRING_H_*/

Generated on Tue Sep 26 21:53:28 2006 for ScimBridge by  doxygen 1.4.6