1 /*
2  * Distributed under the Boost Software License, Version 1.0.
3  *    (See accompanying file LICENSE_1_0.txt or copy at
4  *          http://www.boost.org/LICENSE_1_0.txt)
5  */
6 module pango.c.bidi_type;
7 
8 import glib;
9 
10 extern (C):
11 
12 
13 /**
14  * PangoBidiType:
15  * @PANGO_BIDI_TYPE_L: Left-to-Right
16  * @PANGO_BIDI_TYPE_LRE: Left-to-Right Embedding
17  * @PANGO_BIDI_TYPE_LRO: Left-to-Right Override
18  * @PANGO_BIDI_TYPE_R: Right-to-Left
19  * @PANGO_BIDI_TYPE_AL: Right-to-Left Arabic
20  * @PANGO_BIDI_TYPE_RLE: Right-to-Left Embedding
21  * @PANGO_BIDI_TYPE_RLO: Right-to-Left Override
22  * @PANGO_BIDI_TYPE_PDF: Pop Directional Format
23  * @PANGO_BIDI_TYPE_EN: European Number
24  * @PANGO_BIDI_TYPE_ES: European Number Separator
25  * @PANGO_BIDI_TYPE_ET: European Number Terminator
26  * @PANGO_BIDI_TYPE_AN: Arabic Number
27  * @PANGO_BIDI_TYPE_CS: Common Number Separator
28  * @PANGO_BIDI_TYPE_NSM: Nonspacing Mark
29  * @PANGO_BIDI_TYPE_BN: Boundary Neutral
30  * @PANGO_BIDI_TYPE_B: Paragraph Separator
31  * @PANGO_BIDI_TYPE_S: Segment Separator
32  * @PANGO_BIDI_TYPE_WS: Whitespace
33  * @PANGO_BIDI_TYPE_ON: Other Neutrals
34  *
35  * The #PangoBidiType type represents the bidirectional character
36  * type of a Unicode character as specified by the
37  * <ulink url="http://www.unicode.org/reports/tr9/">Unicode bidirectional algorithm</ulink>.
38  *
39  * Since: 1.22
40  **/
41 enum PangoBidiType {
42   /* Strong types */
43   PANGO_BIDI_TYPE_L,
44   PANGO_BIDI_TYPE_LRE,
45   PANGO_BIDI_TYPE_LRO,
46   PANGO_BIDI_TYPE_R,
47   PANGO_BIDI_TYPE_AL,
48   PANGO_BIDI_TYPE_RLE,
49   PANGO_BIDI_TYPE_RLO,
50 
51   /* Weak types */
52   PANGO_BIDI_TYPE_PDF,
53   PANGO_BIDI_TYPE_EN,
54   PANGO_BIDI_TYPE_ES,
55   PANGO_BIDI_TYPE_ET,
56   PANGO_BIDI_TYPE_AN,
57   PANGO_BIDI_TYPE_CS,
58   PANGO_BIDI_TYPE_NSM,
59   PANGO_BIDI_TYPE_BN,
60 
61   /* Neutral types */
62   PANGO_BIDI_TYPE_B,
63   PANGO_BIDI_TYPE_S,
64   PANGO_BIDI_TYPE_WS,
65   PANGO_BIDI_TYPE_ON
66 }
67 
68 pure PangoBidiType pango_bidi_type_for_unichar (gunichar ch);
69 
70 /**
71  * PangoDirection:
72  * @PANGO_DIRECTION_LTR: A strong left-to-right direction
73  * @PANGO_DIRECTION_RTL: A strong right-to-left direction
74  * @PANGO_DIRECTION_TTB_LTR: Deprecated value; treated the
75  *   same as %PANGO_DIRECTION_RTL.
76  * @PANGO_DIRECTION_TTB_RTL: Deprecated value; treated the
77  *   same as %PANGO_DIRECTION_LTR
78  * @PANGO_DIRECTION_WEAK_LTR: A weak left-to-right direction
79  * @PANGO_DIRECTION_WEAK_RTL: A weak right-to-left direction
80  * @PANGO_DIRECTION_NEUTRAL: No direction specified
81  *
82  * The #PangoDirection type represents a direction in the
83  * Unicode bidirectional algorithm; not every value in this
84  * enumeration makes sense for every usage of #PangoDirection;
85  * for example, the return value of pango_unichar_direction()
86  * and pango_find_base_dir() cannot be %PANGO_DIRECTION_WEAK_LTR
87  * or %PANGO_DIRECTION_WEAK_RTL, since every character is either
88  * neutral or has a strong direction; on the other hand
89  * %PANGO_DIRECTION_NEUTRAL doesn't make sense to pass
90  * to pango_itemize_with_base_dir().
91  *
92  * The %PANGO_DIRECTION_TTB_LTR, %PANGO_DIRECTION_TTB_RTL
93  * values come from an earlier interpretation of this
94  * enumeration as the writing direction of a block of
95  * text and are no longer used; See #PangoGravity for how
96  * vertical text is handled in Pango.
97  **/
98 enum PangoDirection {
99   PANGO_DIRECTION_LTR,
100   PANGO_DIRECTION_RTL,
101   PANGO_DIRECTION_TTB_LTR,
102   PANGO_DIRECTION_TTB_RTL,
103   PANGO_DIRECTION_WEAK_LTR,
104   PANGO_DIRECTION_WEAK_RTL,
105   PANGO_DIRECTION_NEUTRAL
106 }
107 
108 pure PangoDirection pango_unichar_direction      (gunichar     ch);
109 PangoDirection pango_find_base_dir          (const(gchar) *text,
110 					     gint         length);
111 
112 deprecated("use g_unichar_get_mirror_char")
113 gboolean       pango_get_mirror_char        (gunichar     ch,
114 					     gunichar    *mirrored_ch);
115