1/* Pango
2 * pango-direction.h: Unicode text direction
3 *
4 * Copyright (C) 2018 Matthias Clasen
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_DIRECTION_H__
23#define __PANGO_DIRECTION_H__
24
25#include <glib.h>
26
27G_BEGIN_DECLS
28
29/**
30 * PangoDirection:
31 * @PANGO_DIRECTION_LTR: A strong left-to-right direction
32 * @PANGO_DIRECTION_RTL: A strong right-to-left direction
33 * @PANGO_DIRECTION_TTB_LTR: Deprecated value; treated the
34 * same as `PANGO_DIRECTION_RTL`.
35 * @PANGO_DIRECTION_TTB_RTL: Deprecated value; treated the
36 * same as `PANGO_DIRECTION_LTR`
37 * @PANGO_DIRECTION_WEAK_LTR: A weak left-to-right direction
38 * @PANGO_DIRECTION_WEAK_RTL: A weak right-to-left direction
39 * @PANGO_DIRECTION_NEUTRAL: No direction specified
40 *
41 * `PangoDirection` represents a direction in the Unicode bidirectional
42 * algorithm.
43 *
44 * Not every value in this enumeration makes sense for every usage of
45 * `PangoDirection`; for example, the return value of [func@unichar_direction]
46 * and [func@find_base_dir] cannot be `PANGO_DIRECTION_WEAK_LTR` or
47 * `PANGO_DIRECTION_WEAK_RTL`, since every character is either neutral
48 * or has a strong direction; on the other hand `PANGO_DIRECTION_NEUTRAL`
49 * doesn't make sense to pass to [func@itemize_with_base_dir].
50 *
51 * The `PANGO_DIRECTION_TTB_LTR`, `PANGO_DIRECTION_TTB_RTL` values come from
52 * an earlier interpretation of this enumeration as the writing direction
53 * of a block of text and are no longer used. See `PangoGravity` for how
54 * vertical text is handled in Pango.
55 *
56 * If you are interested in text direction, you should really use fribidi
57 * directly. `PangoDirection` is only retained because it is used in some
58 * public apis.
59 */
60typedef enum {
61 PANGO_DIRECTION_LTR,
62 PANGO_DIRECTION_RTL,
63 PANGO_DIRECTION_TTB_LTR,
64 PANGO_DIRECTION_TTB_RTL,
65 PANGO_DIRECTION_WEAK_LTR,
66 PANGO_DIRECTION_WEAK_RTL,
67 PANGO_DIRECTION_NEUTRAL
68} PangoDirection;
69
70G_END_DECLS
71
72#endif /* __PANGO_DIRECTION_H__ */
73

source code of gtk/subprojects/pango/pango/pango-direction.h