Imported Upstream version 1.0.5
[platform/upstream/fribidi.git] / lib / fribidi-bidi-types-list.h
1 #ifndef __FRIBIDI_DOC
2 /* FriBidi
3  * fribidi-bidi-types-list.h - list of bidi types
4  *
5  * Author:
6  *   Behdad Esfahbod, 2001, 2002, 2004
7  *
8  * Copyright (C) 2004 Sharif FarsiWeb, Inc.
9  * Copyright (C) 2001,2002 Behdad Esfahbod
10  * 
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  * 
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Lesser General Public License for more details.
20  * 
21  * You should have received a copy of the GNU Lesser General Public License
22  * along with this library, in a file named COPYING; if not, write to the
23  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24  * Boston, MA 02110-1301, USA
25  *
26  * For licensing issues, contact <fribidi.license@gmail.com>.
27  */
28 /* *INDENT-OFF* */
29 #endif /* !__FRIBIDI_DOC */
30 #ifndef _FRIBIDI_ADD_TYPE
31 # define _FRIBIDI_ADD_TYPE(x,y)
32 #endif
33 #ifndef _FRIBIDI_ADD_ALIAS
34 # define _FRIBIDI_ADD_ALIAS(x1,x2)
35 #endif
36
37 #if !defined(_FRIBIDI_PAR_TYPES) || defined(_FRIBIDI_ALL_TYPES)
38
39 _FRIBIDI_ADD_TYPE (LTR, 'L')    /* Left-To-Right letter */
40 _FRIBIDI_ADD_TYPE (RTL, 'R')    /* Right-To-Left letter */
41 _FRIBIDI_ADD_TYPE (AL, 'A')     /* Arabic Letter */
42 _FRIBIDI_ADD_TYPE (EN, '1')     /* European Numeral */
43 _FRIBIDI_ADD_TYPE (AN, '9')     /* Arabic Numeral */
44 _FRIBIDI_ADD_TYPE (ES, 'w')     /* European number Separator */
45 _FRIBIDI_ADD_TYPE (ET, 'w')     /* European number Terminator */
46 _FRIBIDI_ADD_TYPE (CS, 'w')     /* Common Separator */
47 _FRIBIDI_ADD_TYPE (NSM, '`')    /* Non Spacing Mark */
48 _FRIBIDI_ADD_TYPE (BN, 'b')     /* Boundary Neutral */
49 _FRIBIDI_ADD_TYPE (BS, 'B')     /* Block Separator */
50 _FRIBIDI_ADD_TYPE (SS, 'S')     /* Segment Separator */
51 _FRIBIDI_ADD_TYPE (WS, '_')     /* WhiteSpace */
52 _FRIBIDI_ADD_TYPE (ON, 'n')     /* Other Neutral */
53 _FRIBIDI_ADD_TYPE (LRE, '+')    /* Left-to-Right Embedding */
54 _FRIBIDI_ADD_TYPE (RLE, '+')    /* Right-to-Left Embedding */
55 _FRIBIDI_ADD_TYPE (LRO, '+')    /* Left-to-Right Override */
56 _FRIBIDI_ADD_TYPE (RLO, '+')    /* Right-to-Left Override */
57 _FRIBIDI_ADD_TYPE (PDF, '-')    /* Pop Directional Flag */
58 _FRIBIDI_ADD_TYPE (LRI, '+')    /* Left-to-Right Isolate */
59 _FRIBIDI_ADD_TYPE (RLI, '+')    /* Right-to-Left Isolate */
60 _FRIBIDI_ADD_TYPE (FSI, '+')    /* First-Strong Isolate */
61 _FRIBIDI_ADD_TYPE (PDI, '-')    /* Pop Directional Isolate */
62
63 #if defined(_FRIBIDI_ADD_ALIAS)
64 _FRIBIDI_ADD_ALIAS (L, LTR)
65 _FRIBIDI_ADD_ALIAS (R, RTL)
66 _FRIBIDI_ADD_ALIAS (B, BS)
67 _FRIBIDI_ADD_ALIAS (S, SS)
68 #endif /* _FRIBIDI_ADD_ALIAS */
69
70 #if defined(_FRIBIDI_SENTINEL_TYPE) || defined(_FRIBIDI_ALL_TYPES)
71 _FRIBIDI_ADD_TYPE (SENTINEL, '$')       /* SENTINEL */
72 #endif /* _FRIBIDI_SENTINEL_TYPES || _FRIBIDI_ALL_TYPES*/
73 #endif /* !_FRIBIDI_PAR_TYPES || _FRIBIDI_ALL_TYPES */
74
75 #if defined(_FRIBIDI_PAR_TYPES) || defined(_FRIBIDI_ALL_TYPES)
76 # if !defined(_FRIBIDI_ALL_TYPES)
77 _FRIBIDI_ADD_TYPE (LTR, 'L')    /* Left-To-Right paragraph */
78 _FRIBIDI_ADD_TYPE (RTL, 'R')    /* Right-To-Left paragraph */
79 _FRIBIDI_ADD_TYPE (ON, 'n')     /* directiOn-Neutral paragraph */
80 # endif /* !_FRIBIDI_ALL_TYPES */
81 _FRIBIDI_ADD_TYPE (WLTR, 'l')   /* Weak Left To Right paragraph */
82 _FRIBIDI_ADD_TYPE (WRTL, 'r')   /* Weak Right To Left paragraph */
83 #endif /* _FRIBIDI_PAR_TYPES || _FRIBIDI_ALL_TYPES*/
84
85 #if defined(_FRIBIDI_ENUM_TYPES)
86 typedef enum {
87 # define _FRIBIDI_ADD_TYPE _FRIBIDI_ENUM_ADD_TYPE
88 # include "fribidi-bidi-types-list.h"
89 # undef _FRIBIDI_ADD_TYPE
90   _FRIBIDI_TYPES_MAX
91 } _FRIBIDI_ENUM_TYPES
92 #endif /* _FRIBIDI_ENUM_TYPES */
93
94 #ifndef __FRIBIDI_DOC
95 /* *INDENT-ON* */
96 #endif /* !__FRIBIDI_DOC */