Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:57:27

0001 /* FriBidi
0002  * fribidi-char-sets.h - character set conversion routines
0003  *
0004  * Authors:
0005  *   Behdad Esfahbod, 2001, 2002, 2004
0006  *   Dov Grobgeld, 1999, 2000
0007  *
0008  * Copyright (C) 2004 Sharif FarsiWeb, Inc
0009  * Copyright (C) 2001,2002 Behdad Esfahbod
0010  * Copyright (C) 1999,2000 Dov Grobgeld
0011  * 
0012  * This library is free software; you can redistribute it and/or
0013  * modify it under the terms of the GNU Lesser General Public
0014  * License as published by the Free Software Foundation; either
0015  * version 2.1 of the License, or (at your option) any later version.
0016  * 
0017  * This library is distributed in the hope that it will be useful,
0018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0020  * Lesser General Public License for more details.
0021  * 
0022  * You should have received a copy of the GNU Lesser General Public License
0023  * along with this library, in a file named COPYING; if not, write to the
0024  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0025  * Boston, MA 02110-1301, USA
0026  * 
0027  * For licensing issues, contact <fribidi.license@gmail.com>.
0028  */
0029 #ifndef _FRIBIDI_CHAR_SETS_H
0030 #define _FRIBIDI_CHAR_SETS_H
0031 
0032 #include "fribidi-common.h"
0033 
0034 #include "fribidi-types.h"
0035 
0036 #include "fribidi-begindecls.h"
0037 
0038 typedef enum
0039 {
0040   _FRIBIDI_CHAR_SET_NOT_FOUND,
0041 # define _FRIBIDI_ADD_CHAR_SET(CHAR_SET, char_set) FRIBIDI_CHAR_SET_##CHAR_SET,
0042 # include "fribidi-char-sets-list.h"
0043 # undef _FRIBIDI_ADD_CHAR_SET
0044   _FRIBIDI_CHAR_SETS_NUM_PLUS_ONE
0045 }
0046 FriBidiCharSet;
0047 
0048 #define FRIBIDI_CHAR_SET_NOT_FOUND _FRIBIDI_CHAR_SET_NOT_FOUND
0049 #define FRIBIDI_CHAR_SETS_NUM (_FRIBIDI_CHAR_SETS_NUM_PLUS_ONE - 1)
0050 
0051 
0052 /* fribidi_charset_to_unicode - convert string to Unicode
0053  *
0054  * This function converts an string from a character set, to a Unicode string.
0055  *
0056  * Returns: The length of the new string.
0057  */
0058 FRIBIDI_ENTRY FriBidiStrIndex fribidi_charset_to_unicode (
0059   FriBidiCharSet char_set,  /* character set to convert from */
0060   const char *s,        /* input string encoded in char_set */
0061   FriBidiStrIndex len,      /* input string length */
0062   FriBidiChar *us       /* output Unicode string */
0063 );
0064 
0065 /* fribidi_unicode_to_charset - convert string from Unicode
0066  *
0067  * This function converts a Unicode string to an string in another character
0068  * set.  It also null-terminates the output string.
0069  *
0070  * Returns: The length of the new string.
0071  */
0072 FRIBIDI_ENTRY FriBidiStrIndex fribidi_unicode_to_charset (
0073   FriBidiCharSet char_set,  /* character set to convert to */
0074   const FriBidiChar *us,    /* input Unicode string */
0075   FriBidiStrIndex len,      /* input string length */
0076   char *s           /* output string encoded in char_set */
0077 );
0078 
0079 /* fribidi_parse_charset - parse character set name
0080  *
0081  * Returns: The character set named s, or FRIBIDI_CHAR_SET_NOT_FOUND if the
0082  * character set is not available.
0083  */
0084 FRIBIDI_ENTRY FriBidiCharSet fribidi_parse_charset (
0085   const char *s         /* input name of the character set */
0086 );
0087 
0088 
0089 FRIBIDI_ENTRY const char *fribidi_char_set_name (
0090   FriBidiCharSet char_set
0091 );
0092 
0093 FRIBIDI_ENTRY const char *fribidi_char_set_title (
0094   FriBidiCharSet char_set
0095 );
0096 
0097 FRIBIDI_ENTRY const char *fribidi_char_set_desc (
0098   FriBidiCharSet char_set
0099 );
0100 
0101 #include "fribidi-enddecls.h"
0102 
0103 #endif /* !_FRIBIDI_CHAR_SETS_H */
0104 /* Editor directions:
0105  * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
0106  */