Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /* FriBidi
0002  * fribidi-bidi-types.h - character bidi types
0003  *
0004  * Author:
0005  *   Behdad Esfahbod, 2001, 2002, 2004
0006  *
0007  * Copyright (C) 2004 Sharif FarsiWeb, Inc.
0008  * Copyright (C) 2001,2002 Behdad Esfahbod
0009  * 
0010  * This library is free software; you can redistribute it and/or
0011  * modify it under the terms of the GNU Lesser General Public
0012  * License as published by the Free Software Foundation; either
0013  * version 2.1 of the License, or (at your option) any later version.
0014  * 
0015  * This library is distributed in the hope that it will be useful,
0016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0018  * Lesser General Public License for more details.
0019  * 
0020  * You should have received a copy of the GNU Lesser General Public License
0021  * along with this library, in a file named COPYING; if not, write to the
0022  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0023  * Boston, MA 02110-1301, USA
0024  *
0025  * For licensing issues, contact <fribidi.license@gmail.com>.
0026  */
0027 #ifndef _FRIBIDI_BIDI_TYPES_H
0028 #define _FRIBIDI_BIDI_TYPES_H
0029 
0030 #include "fribidi-common.h"
0031 
0032 #include "fribidi-types.h"
0033 
0034 #include "fribidi-begindecls.h"
0035 
0036 typedef signed char FriBidiLevel;
0037 
0038 /* 
0039  * Define bit masks that bidi types are based on, each mask has
0040  * only one bit set.
0041  */
0042 
0043 /* RTL mask better be the least significant bit. */
0044 #define FRIBIDI_MASK_RTL    0x00000001L /* Is right to left */
0045 #define FRIBIDI_MASK_ARABIC 0x00000002L /* Is arabic */
0046 
0047 /* Each char can be only one of the three following. */
0048 #define FRIBIDI_MASK_STRONG 0x00000010L /* Is strong */
0049 #define FRIBIDI_MASK_WEAK   0x00000020L /* Is weak */
0050 #define FRIBIDI_MASK_NEUTRAL    0x00000040L /* Is neutral */
0051 #define FRIBIDI_MASK_SENTINEL   0x00000080L /* Is sentinel */
0052 /* Sentinels are not valid chars, just identify the start/end of strings. */
0053 
0054 /* Each char can be only one of the six following. */
0055 #define FRIBIDI_MASK_LETTER 0x00000100L /* Is letter: L, R, AL */
0056 #define FRIBIDI_MASK_NUMBER 0x00000200L /* Is number: EN, AN */
0057 #define FRIBIDI_MASK_NUMSEPTER  0x00000400L /* Is separator or terminator: ES, ET, CS */
0058 #define FRIBIDI_MASK_SPACE  0x00000800L /* Is space: BN, BS, SS, WS */
0059 #define FRIBIDI_MASK_EXPLICIT   0x00001000L /* Is explicit mark: LRE, RLE, LRO, RLO, PDF */
0060 #define FRIBIDI_MASK_ISOLATE    0x00008000L     /* Is isolate mark: LRI, RLI, FSI, PDI */
0061 
0062 /* Can be set only if FRIBIDI_MASK_SPACE is also set. */
0063 #define FRIBIDI_MASK_SEPARATOR  0x00002000L /* Is text separator: BS, SS */
0064 /* Can be set only if FRIBIDI_MASK_EXPLICIT is also set. */
0065 #define FRIBIDI_MASK_OVERRIDE   0x00004000L /* Is explicit override: LRO, RLO */
0066 #define FRIBIDI_MASK_FIRST  0x02000000L     /* Whether direction is determined by first strong */
0067 
0068 
0069 /* The following exist to make types pairwise different, some of them can
0070  * be removed but are here because of efficiency (make queries faster). */
0071 
0072 #define FRIBIDI_MASK_ES     0x00010000L
0073 #define FRIBIDI_MASK_ET     0x00020000L
0074 #define FRIBIDI_MASK_CS     0x00040000L
0075 
0076 #define FRIBIDI_MASK_NSM    0x00080000L
0077 #define FRIBIDI_MASK_BN     0x00100000L
0078 
0079 #define FRIBIDI_MASK_BS     0x00200000L
0080 #define FRIBIDI_MASK_SS     0x00400000L
0081 #define FRIBIDI_MASK_WS     0x00800000L
0082 
0083 /* We reserve a single bit for user's private use: we will never use it. */
0084 #define FRIBIDI_MASK_PRIVATE    0x01000000L
0085 
0086 
0087 /*
0088  * Define values for FriBidiCharType
0089  */
0090 
0091 /* Strong types */
0092 
0093 /* Left-To-Right letter */
0094 #define FRIBIDI_TYPE_LTR_VAL    ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER )
0095 /* Right-To-Left letter */
0096 #define FRIBIDI_TYPE_RTL_VAL    ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER \
0097                 | FRIBIDI_MASK_RTL)
0098 /* Arabic Letter */
0099 #define FRIBIDI_TYPE_AL_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER \
0100                 | FRIBIDI_MASK_RTL | FRIBIDI_MASK_ARABIC )
0101 /* Left-to-Right Embedding */
0102 #define FRIBIDI_TYPE_LRE_VAL    ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT)
0103 /* Right-to-Left Embedding */
0104 #define FRIBIDI_TYPE_RLE_VAL    ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \
0105                 | FRIBIDI_MASK_RTL )
0106 /* Left-to-Right Override */
0107 #define FRIBIDI_TYPE_LRO_VAL    ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \
0108                 | FRIBIDI_MASK_OVERRIDE )
0109 /* Right-to-Left Override */
0110 #define FRIBIDI_TYPE_RLO_VAL    ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \
0111                 | FRIBIDI_MASK_RTL | FRIBIDI_MASK_OVERRIDE )
0112 
0113 /* Weak types */
0114 
0115 /* Pop Directional Flag*/
0116 #define FRIBIDI_TYPE_PDF_VAL    ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_EXPLICIT )
0117 /* European Numeral */
0118 #define FRIBIDI_TYPE_EN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMBER )
0119 /* Arabic Numeral */
0120 #define FRIBIDI_TYPE_AN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMBER \
0121                 | FRIBIDI_MASK_ARABIC )
0122 /* European number Separator */
0123 #define FRIBIDI_TYPE_ES_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \
0124                 | FRIBIDI_MASK_ES )
0125 /* European number Terminator */
0126 #define FRIBIDI_TYPE_ET_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \
0127                 | FRIBIDI_MASK_ET )
0128 /* Common Separator */
0129 #define FRIBIDI_TYPE_CS_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \
0130                 | FRIBIDI_MASK_CS )
0131 /* Non Spacing Mark */
0132 #define FRIBIDI_TYPE_NSM_VAL    ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NSM )
0133 /* Boundary Neutral */
0134 #define FRIBIDI_TYPE_BN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_SPACE \
0135                 | FRIBIDI_MASK_BN )
0136 
0137 /* Neutral types */
0138 
0139 /* Block Separator */
0140 #define FRIBIDI_TYPE_BS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \
0141                 | FRIBIDI_MASK_SEPARATOR | FRIBIDI_MASK_BS )
0142 /* Segment Separator */
0143 #define FRIBIDI_TYPE_SS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \
0144                 | FRIBIDI_MASK_SEPARATOR | FRIBIDI_MASK_SS )
0145 /* WhiteSpace */
0146 #define FRIBIDI_TYPE_WS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \
0147                 | FRIBIDI_MASK_WS )
0148 /* Other Neutral */
0149 #define FRIBIDI_TYPE_ON_VAL ( FRIBIDI_MASK_NEUTRAL )
0150 
0151 
0152 /* The following are used in specifying paragraph direction only. */
0153 
0154 /* Weak Left-To-Right */
0155 #define FRIBIDI_TYPE_WLTR_VAL   ( FRIBIDI_MASK_WEAK )
0156 /* Weak Right-To-Left */
0157 #define FRIBIDI_TYPE_WRTL_VAL   ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_RTL )
0158 
0159 /* start or end of text (run list) SENTINEL.  Only used internally */
0160 #define FRIBIDI_TYPE_SENTINEL   ( FRIBIDI_MASK_SENTINEL )
0161 
0162 /* Private types for applications.  More private types can be obtained by
0163  * summing up from this one. */
0164 #define FRIBIDI_TYPE_PRIVATE    ( FRIBIDI_MASK_PRIVATE )
0165 
0166 
0167 /* New types in Unicode 6.3 */
0168 
0169 /* Left-to-Right Isolate */
0170 #define FRIBIDI_TYPE_LRI_VAL    ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_ISOLATE )
0171 /* Right-to-Left Isolate */
0172 #define FRIBIDI_TYPE_RLI_VAL    ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_ISOLATE | FRIBIDI_MASK_RTL )
0173 /* First strong isolate */
0174 #define FRIBIDI_TYPE_FSI_VAL    ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_ISOLATE | FRIBIDI_MASK_FIRST )
0175 
0176 /* Pop Directional Isolate*/
0177 #define FRIBIDI_TYPE_PDI_VAL    ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_WEAK | FRIBIDI_MASK_ISOLATE )
0178 
0179 /* Define Enums only if sizeof(int) == 4 (UTF-32), and not compiling C++.
0180  * The problem with C++ is that then casts between int32 and enum will fail!
0181  */
0182 #if defined(__FRIBIDI_DOC) || (FRIBIDI_SIZEOF_INT+0 == 4 && !defined(__cplusplus))
0183 
0184 typedef enum
0185 {
0186 # define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \
0187     FRIBIDI_TYPE_##TYPE = FRIBIDI_TYPE_##TYPE##_VAL,
0188 # include "fribidi-bidi-types-list.h"
0189 # undef _FRIBIDI_ADD_TYPE
0190   _FRIBIDI_TYPE_SENTINEL = FRIBIDI_TYPE_SENTINEL    /* Don't use this */
0191 } FriBidiCharType;
0192 
0193 typedef enum
0194 {
0195 # define _FRIBIDI_PAR_TYPES
0196 # define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \
0197     FRIBIDI_PAR_##TYPE = FRIBIDI_TYPE_##TYPE##_VAL,
0198 # include "fribidi-bidi-types-list.h"
0199 # undef _FRIBIDI_ADD_TYPE
0200 # undef _FRIBIDI_PAR_TYPES
0201   _FRIBIDI_PAR_SENTINEL = FRIBIDI_TYPE_SENTINEL /* Don't use this */
0202 } FriBidiParType;
0203 
0204 #else
0205 
0206 typedef uint32_t FriBidiCharType;
0207 # define FRIBIDI_TYPE_LTR   FRIBIDI_TYPE_LTR_VAL
0208 # define FRIBIDI_TYPE_RTL   FRIBIDI_TYPE_RTL_VAL
0209 # define FRIBIDI_TYPE_AL    FRIBIDI_TYPE_AL_VAL
0210 # define FRIBIDI_TYPE_EN    FRIBIDI_TYPE_EN_VAL
0211 # define FRIBIDI_TYPE_AN    FRIBIDI_TYPE_AN_VAL
0212 # define FRIBIDI_TYPE_ES    FRIBIDI_TYPE_ES_VAL
0213 # define FRIBIDI_TYPE_ET    FRIBIDI_TYPE_ET_VAL
0214 # define FRIBIDI_TYPE_CS    FRIBIDI_TYPE_CS_VAL
0215 # define FRIBIDI_TYPE_NSM   FRIBIDI_TYPE_NSM_VAL
0216 # define FRIBIDI_TYPE_BN    FRIBIDI_TYPE_BN_VAL
0217 # define FRIBIDI_TYPE_BS    FRIBIDI_TYPE_BS_VAL
0218 # define FRIBIDI_TYPE_SS    FRIBIDI_TYPE_SS_VAL
0219 # define FRIBIDI_TYPE_WS    FRIBIDI_TYPE_WS_VAL
0220 # define FRIBIDI_TYPE_ON    FRIBIDI_TYPE_ON_VAL
0221 # define FRIBIDI_TYPE_LRE   FRIBIDI_TYPE_LRE_VAL
0222 # define FRIBIDI_TYPE_RLE   FRIBIDI_TYPE_RLE_VAL
0223 # define FRIBIDI_TYPE_LRO   FRIBIDI_TYPE_LRO_VAL
0224 # define FRIBIDI_TYPE_RLO   FRIBIDI_TYPE_RLO_VAL
0225 # define FRIBIDI_TYPE_PDF   FRIBIDI_TYPE_PDF_VAL
0226 # define FRIBIDI_TYPE_LRI   FRIBIDI_TYPE_LRI_VAL
0227 # define FRIBIDI_TYPE_RLI   FRIBIDI_TYPE_RLI_VAL
0228 # define FRIBIDI_TYPE_FSI   FRIBIDI_TYPE_FSI_VAL
0229 # define FRIBIDI_TYPE_PDI   FRIBIDI_TYPE_PDI_VAL
0230 
0231 typedef uint32_t FriBidiParType;
0232 # define FRIBIDI_PAR_LTR    FRIBIDI_TYPE_LTR_VAL
0233 # define FRIBIDI_PAR_RTL    FRIBIDI_TYPE_RTL_VAL
0234 # define FRIBIDI_PAR_ON     FRIBIDI_TYPE_ON_VAL
0235 # define FRIBIDI_PAR_WLTR   FRIBIDI_TYPE_WLTR_VAL
0236 # define FRIBIDI_PAR_WRTL   FRIBIDI_TYPE_WRTL_VAL
0237 
0238 #endif
0239 
0240 /* Please don't use these two type names, use FRIBIDI_PAR_* form instead. */
0241 #define FRIBIDI_TYPE_WLTR   FRIBIDI_PAR_WLTR
0242 #define FRIBIDI_TYPE_WRTL   FRIBIDI_PAR_WRTL
0243 
0244 
0245 /*
0246  * Defining macros for needed queries, It is fully dependent on the 
0247  * implementation of FriBidiCharType.
0248  */
0249 
0250 
0251 /* Is right-to-left level? */
0252 #define FRIBIDI_LEVEL_IS_RTL(lev) ((lev) & 1)
0253 
0254 /* Return the bidi type corresponding to the direction of the level number,
0255    FRIBIDI_TYPE_LTR for evens and FRIBIDI_TYPE_RTL for odds. */
0256 #define FRIBIDI_LEVEL_TO_DIR(lev)   \
0257     (FRIBIDI_LEVEL_IS_RTL (lev) ? FRIBIDI_TYPE_RTL : FRIBIDI_TYPE_LTR)
0258 
0259 /* Return the minimum level of the direction, 0 for FRIBIDI_TYPE_LTR and
0260    1 for FRIBIDI_TYPE_RTL and FRIBIDI_TYPE_AL. */
0261 #define FRIBIDI_DIR_TO_LEVEL(dir)   \
0262     ((FriBidiLevel) (FRIBIDI_IS_RTL (dir) ? 1 : 0))
0263 
0264 /* Is right to left: RTL, AL, RLE, RLO? */
0265 #define FRIBIDI_IS_RTL(p)      ((p) & FRIBIDI_MASK_RTL)
0266 /* Is arabic: AL, AN? */
0267 #define FRIBIDI_IS_ARABIC(p)   ((p) & FRIBIDI_MASK_ARABIC)
0268 
0269 /* Is strong? */
0270 #define FRIBIDI_IS_STRONG(p)   ((p) & FRIBIDI_MASK_STRONG)
0271 /* Is weak? */
0272 #define FRIBIDI_IS_WEAK(p)     ((p) & FRIBIDI_MASK_WEAK)
0273 /* Is neutral? */
0274 #define FRIBIDI_IS_NEUTRAL(p)  ((p) & FRIBIDI_MASK_NEUTRAL)
0275 /* Is sentinel? */
0276 #define FRIBIDI_IS_SENTINEL(p) ((p) & FRIBIDI_MASK_SENTINEL)
0277 
0278 /* Is letter: L, R, AL? */
0279 #define FRIBIDI_IS_LETTER(p)   ((p) & FRIBIDI_MASK_LETTER)
0280 /* Is number: EN, AN? */
0281 #define FRIBIDI_IS_NUMBER(p)   ((p) & FRIBIDI_MASK_NUMBER)
0282 /* Is number separator or terminator: ES, ET, CS? */
0283 #define FRIBIDI_IS_NUMBER_SEPARATOR_OR_TERMINATOR(p) \
0284     ((p) & FRIBIDI_MASK_NUMSEPTER)
0285 /* Is space: BN, BS, SS, WS? */
0286 #define FRIBIDI_IS_SPACE(p)    ((p) & FRIBIDI_MASK_SPACE)
0287 /* Is explicit mark: LRE, RLE, LRO, RLO, PDF? */
0288 #define FRIBIDI_IS_EXPLICIT(p) ((p) & FRIBIDI_MASK_EXPLICIT)
0289 /* Is isolator */
0290 #define FRIBIDI_IS_ISOLATE(p)    ((p) & FRIBIDI_MASK_ISOLATE)
0291 
0292 /* Is text separator: BS, SS? */
0293 #define FRIBIDI_IS_SEPARATOR(p) ((p) & FRIBIDI_MASK_SEPARATOR)
0294 
0295 /* Is explicit override: LRO, RLO? */
0296 #define FRIBIDI_IS_OVERRIDE(p) ((p) & FRIBIDI_MASK_OVERRIDE)
0297 
0298 /* Some more: */
0299 
0300 /* Is left to right letter: LTR? */
0301 #define FRIBIDI_IS_LTR_LETTER(p) \
0302     ((p) & (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL) == FRIBIDI_MASK_LETTER)
0303 
0304 /* Is right to left letter: RTL, AL? */
0305 #define FRIBIDI_IS_RTL_LETTER(p) \
0306     ((p) & (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL) \
0307     == (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL))
0308 
0309 /* Is ES or CS: ES, CS? */
0310 #define FRIBIDI_IS_ES_OR_CS(p) \
0311     ((p) & (FRIBIDI_MASK_ES | FRIBIDI_MASK_CS))
0312 
0313 /* Is explicit or BN: LRE, RLE, LRO, RLO, PDF, BN? */
0314 #define FRIBIDI_IS_EXPLICIT_OR_BN(p) \
0315     ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN))
0316 
0317 /* Is explicit or BN or NSM: LRE, RLE, LRO, RLO, PDF, BN, NSM? */
0318 #define FRIBIDI_IS_EXPLICIT_OR_BN_OR_NSM(p) \
0319     ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN | FRIBIDI_MASK_NSM))
0320 
0321 /* Is explicit or BN or NSM: LRE, RLE, LRO, RLO, PDF, BN, NSM? */
0322 #define FRIBIDI_IS_EXPLICIT_OR_ISOLATE_OR_BN_OR_NSM(p) \
0323     ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_ISOLATE | FRIBIDI_MASK_BN | FRIBIDI_MASK_NSM))
0324 
0325 /* Is explicit or BN or WS: LRE, RLE, LRO, RLO, PDF, BN, WS? */
0326 #define FRIBIDI_IS_EXPLICIT_OR_BN_OR_WS(p) \
0327     ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN | FRIBIDI_MASK_WS))
0328 
0329 /* Is explicit or separator or BN or WS: LRE, RLE, LRO, RLO, PDF, BS, SS, BN, WS? */
0330 #define FRIBIDI_IS_EXPLICIT_OR_SEPARATOR_OR_BN_OR_WS(p) \
0331     ((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_SEPARATOR \
0332         | FRIBIDI_MASK_BN | FRIBIDI_MASK_WS))
0333 
0334 /* Is private-use type for application? */
0335 #define FRIBIDI_IS_PRIVATE(p) ((p) & FRIBIDI_MASK_PRIVATE)
0336 
0337 /* Define some conversions. */
0338 
0339 /* Change numbers to RTL: EN,AN -> RTL. */
0340 #define FRIBIDI_CHANGE_NUMBER_TO_RTL(p) \
0341     (FRIBIDI_IS_NUMBER(p) ? FRIBIDI_TYPE_RTL : (p))
0342 
0343 /* Override status of an explicit mark:
0344  * LRO,LRE->LTR, RLO,RLE->RTL, otherwise->ON. */
0345 #define FRIBIDI_EXPLICIT_TO_OVERRIDE_DIR(p) \
0346     (FRIBIDI_IS_OVERRIDE(p) ? FRIBIDI_LEVEL_TO_DIR(FRIBIDI_DIR_TO_LEVEL(p)) \
0347                 : FRIBIDI_TYPE_ON)
0348 
0349 /* Weaken type for paragraph fallback purposes:
0350  * LTR->WLTR, RTL->WRTL. */
0351 #define FRIBIDI_WEAK_PARAGRAPH(p) (FRIBIDI_PAR_WLTR | ((p) & FRIBIDI_MASK_RTL))
0352 
0353 
0354 /* Functions finally */
0355 
0356 
0357 /* fribidi_get_bidi_type - get character bidi type
0358  *
0359  * This function returns the bidi type of a character as defined in Table 3.7
0360  * Bidirectional Character Types of the Unicode Bidirectional Algorithm
0361  * available at
0362  * http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types, using
0363  * data provided in file UnicodeData.txt of the Unicode Character Database
0364  * available at http://www.unicode.org/Public/UNIDATA/UnicodeData.txt.
0365  *
0366  * There are a few macros defined in fribidi-bidi-types.h for querying a bidi
0367  * type.
0368  */
0369 FRIBIDI_ENTRY FriBidiCharType
0370 fribidi_get_bidi_type (
0371   FriBidiChar ch        /* input character */
0372 ) FRIBIDI_GNUC_CONST;
0373 
0374 /* fribidi_get_bidi_types - get bidi types for an string of characters
0375  *
0376  * This function finds the bidi types of an string of characters.  See
0377  * fribidi_get_bidi_type() for more information about the bidi types returned
0378  * by this function.
0379  */
0380 FRIBIDI_ENTRY void fribidi_get_bidi_types (
0381   const FriBidiChar *str,   /* input string */
0382   const FriBidiStrIndex len,    /* input string length */
0383   FriBidiCharType *btypes   /* output bidi types */
0384 );
0385 
0386 /* fribidi_get_bidi_type_name - get bidi type name
0387  *
0388  * This function returns the bidi type name of a character type.  The
0389  * returned string is a static string and should not be freed.
0390  *
0391  * The type names are the same as ones defined in Table 3.7 Bidirectional
0392  * Character Types of the Unicode Bidirectional Algorithm available at
0393  * http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types, with a
0394  * few modifications: L->LTR, R->RTL, B->BS, S->SS.
0395  */
0396      FRIBIDI_ENTRY const char *fribidi_get_bidi_type_name (
0397   FriBidiCharType t     /* input bidi type */
0398 ) FRIBIDI_GNUC_CONST;
0399 
0400 #include "fribidi-enddecls.h"
0401 
0402 #endif /* !_FRIBIDI_BIDI_TYPES_H */
0403 /* Editor directions:
0404  * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
0405  */