Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

fl_utf8.h

00001 /*
00002  * $Id: fl_utf8.h,v 1.11 2003/03/15 16:09:56 laza2000 Exp $
00003  *
00004  * Extended Fast Light Toolkit (EFLTK)
00005  * Copyright (C) 2002-2003 by EDE-Team
00006  * WWW: http://www.sourceforge.net/projects/ede
00007  *
00008  * Fast Light Toolkit (FLTK)
00009  * Copyright (C) 1998-2003 by Bill Spitzak and others.
00010  * WWW: http://www.fltk.org
00011  *
00012  * This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00013  * version 2. See COPYING for details.
00014  *
00015  * Author : Mikko Lahteenmaki
00016  * Email  : mikko@fltk.net
00017  *
00018  * Please report all bugs and problems to "efltk-bugs@fltk.net"
00019  *
00020  */
00021 
00022 #ifndef _FL_UTF8_H_
00023 #define _FL_UTF8_H_
00024 
00025 #include "Fl_Export.h"
00026 #include <stdio.h> //For FILE
00027 
00028 /*** NOTE : all functions are LIMITED to 24 bits Unicode values !!! ***/
00029 
00034 extern FL_API int fl_utf2ucs( const unsigned char *buf, int len, unsigned int *ucs);
00037 extern FL_API int fl_fast_utf2ucs(const unsigned char *buf, int len, unsigned int *ucs);
00038 
00040 extern FL_API int fl_utf_charlen(char c);
00041 
00045 extern FL_API int fl_ucs2utf(unsigned int ucs, char *buf);
00046 
00050 extern FL_API int fl_utflen(const unsigned char *buf, int len);
00051 
00054 extern FL_API int fl_utf_nb_char(const unsigned char *buf, int len);
00055 
00061 extern FL_API int fl_utf_strncasecmp(const char *s1, const char *s2, int n);
00062 
00067 extern FL_API int fl_utf_strcasecmp(const char *s1, const char *s2);
00068 
00073 extern FL_API int fl_utf_strcasecmp(const char *s1, int s1_len, const char *s2, int s2_len);
00074 
00076 extern FL_API int fl_tolower(unsigned int ucs);
00077 /* Return the Unicode upper case value of ucs */
00078 extern FL_API int fl_toupper(unsigned int ucs);
00079 
00082 extern FL_API int fl_utf_tolower(const unsigned char *str, int len, char *buf);
00083 
00086 extern FL_API int fl_utf_toupper(const unsigned char *str, int len, char *buf);
00087 
00090 extern FL_API int fl_utf2unicode(const unsigned char *str, int len, unsigned short *buf);
00091 
00094 extern FL_API int fl_unicode2utf(unsigned short *str, int len, char *buf);
00095 
00098 extern FL_API int fl_utf2latin1(const unsigned char *str, int len, char *buf);
00099 
00102 extern FL_API int fl_latin12utf(const unsigned char *str, int len, char *buf);
00103 
00105 extern FL_API unsigned short fl_nonspacing(unsigned int ucs);
00106 
00107 /*
00108  * Following functions are only usable in WIN32!
00109  * But it's highly recommended to use these functions
00110  * in your application, cause of portability issues.
00111  */
00112 extern FL_API char* fl_utf2mbcs(const char * s);
00113 extern FL_API char* fl_mbcs2utf(const char *s);
00114 extern FL_API int fl_chmod(const char* f, int mode);
00115 extern FL_API int fl_access(const char* f, int mode);
00116 extern FL_API int fl_stat( const char *path, struct stat *buffer );
00117 extern FL_API char* fl_getcwd( char *buf, int maxlen);
00118 extern FL_API FILE* fl_fopen(const char *f, const char *mode);
00119 extern FL_API int fl_open(const char* f, int o, int p = -1);
00120 extern FL_API int fl_unlink(const char *f);
00121 extern FL_API char* fl_getenv(const char *name);
00122 
00123 extern FL_API int fl_is_nt4(void);
00124 extern FL_API int fl_is_ce(void);
00125 
00128 extern FL_API int fl_find_converter(const char *from_codeset);
00129 
00133 extern FL_API int fl_convert2utf(int conv_index,
00134                    const unsigned char *inbuf, int &inlen,
00135                    char *outbuf, int outlen);
00136 
00140 extern FL_API int fl_convert2utf(const char *from_codeset,
00141                           const unsigned char *inbuf, int &inlen,
00142                           char *outbuf, int outlen);
00143 
00144 #endif

Generated on Thu Jul 31 15:33:45 2003 for eFLTK by doxygen1.2.15