pango-direction.h 2.6 KB

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