1 /* Pango
2  * pango-bidi-type.h: Bidirectional Character Types
3  *
4  * Copyright (C) 2008 Jürg Billeter <j@bitron.ch>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
22 #ifndef __PANGO_BIDI_TYPE_H__
23 #define __PANGO_BIDI_TYPE_H__
24 
25 #include <glib.h>
26 
27 #include <pango/pango-version-macros.h>
28 #include <pango/pango-direction.h>
29 
30 G_BEGIN_DECLS
31 
32 #ifndef PANGO_DISABLE_DEPRECATED
33 /**
34  * PangoBidiType:
35  * @PANGO_BIDI_TYPE_L: Left-to-Right
36  * @PANGO_BIDI_TYPE_LRE: Left-to-Right Embedding
37  * @PANGO_BIDI_TYPE_LRO: Left-to-Right Override
38  * @PANGO_BIDI_TYPE_R: Right-to-Left
39  * @PANGO_BIDI_TYPE_AL: Right-to-Left Arabic
40  * @PANGO_BIDI_TYPE_RLE: Right-to-Left Embedding
41  * @PANGO_BIDI_TYPE_RLO: Right-to-Left Override
42  * @PANGO_BIDI_TYPE_PDF: Pop Directional Format
43  * @PANGO_BIDI_TYPE_EN: European Number
44  * @PANGO_BIDI_TYPE_ES: European Number Separator
45  * @PANGO_BIDI_TYPE_ET: European Number Terminator
46  * @PANGO_BIDI_TYPE_AN: Arabic Number
47  * @PANGO_BIDI_TYPE_CS: Common Number Separator
48  * @PANGO_BIDI_TYPE_NSM: Nonspacing Mark
49  * @PANGO_BIDI_TYPE_BN: Boundary Neutral
50  * @PANGO_BIDI_TYPE_B: Paragraph Separator
51  * @PANGO_BIDI_TYPE_S: Segment Separator
52  * @PANGO_BIDI_TYPE_WS: Whitespace
53  * @PANGO_BIDI_TYPE_ON: Other Neutrals
54  * @PANGO_BIDI_TYPE_LRI: Left-to-Right isolate. Since 1.48.6
55  * @PANGO_BIDI_TYPE_RLI: Right-to-Left isolate. Since 1.48.6
56  * @PANGO_BIDI_TYPE_FSI: First strong isolate. Since 1.48.6
57  * @PANGO_BIDI_TYPE_PDI: Pop directional isolate. Since 1.48.6
58  *
59  * `PangoBidiType` represents the bidirectional character
60  * type of a Unicode character as specified by the
61  * [Unicode bidirectional algorithm](http://www.unicode.org/reports/tr9/).
62  *
63  * Since: 1.22
64  * Deprecated: 1.44: Use fribidi for this information
65  **/
66 typedef enum {
67   /* Strong types */
68   PANGO_BIDI_TYPE_L,
69   PANGO_BIDI_TYPE_LRE,
70   PANGO_BIDI_TYPE_LRO,
71   PANGO_BIDI_TYPE_R,
72   PANGO_BIDI_TYPE_AL,
73   PANGO_BIDI_TYPE_RLE,
74   PANGO_BIDI_TYPE_RLO,
75 
76   /* Weak types */
77   PANGO_BIDI_TYPE_PDF,
78   PANGO_BIDI_TYPE_EN,
79   PANGO_BIDI_TYPE_ES,
80   PANGO_BIDI_TYPE_ET,
81   PANGO_BIDI_TYPE_AN,
82   PANGO_BIDI_TYPE_CS,
83   PANGO_BIDI_TYPE_NSM,
84   PANGO_BIDI_TYPE_BN,
85 
86   /* Neutral types */
87   PANGO_BIDI_TYPE_B,
88   PANGO_BIDI_TYPE_S,
89   PANGO_BIDI_TYPE_WS,
90   PANGO_BIDI_TYPE_ON,
91 
92   /* Explicit formatting */
93   PANGO_BIDI_TYPE_LRI,
94   PANGO_BIDI_TYPE_RLI,
95   PANGO_BIDI_TYPE_FSI,
96   PANGO_BIDI_TYPE_PDI
97 } PangoBidiType;
98 
99 PANGO_DEPRECATED_IN_1_44
100 PangoBidiType pango_bidi_type_for_unichar (gunichar ch) G_GNUC_CONST;
101 
102 PANGO_DEPRECATED_IN_1_44
103 PangoDirection pango_unichar_direction      (gunichar     ch) G_GNUC_CONST;
104 PANGO_DEPRECATED_IN_1_44
105 PangoDirection pango_find_base_dir          (const gchar *text,
106 					     gint         length);
107 
108 PANGO_DEPRECATED_IN_1_30_FOR(g_unichar_get_mirror_char)
109 gboolean       pango_get_mirror_char        (gunichar     ch,
110 					     gunichar    *mirrored_ch);
111 #endif
112 
113 G_END_DECLS
114 
115 #endif /* __PANGO_BIDI_TYPE_H__ */
116