fribidi-unicode.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /* FriBidi
  2. * fribidi-unicode.h - general Unicode definitions
  3. *
  4. * Author:
  5. * Behdad Esfahbod, 2001, 2002, 2004
  6. *
  7. * Copyright (C) 2004 Sharif FarsiWeb, Inc
  8. * Copyright (C) 2001,2002 Behdad Esfahbod
  9. *
  10. * This library is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU Lesser General Public
  12. * License as published by the Free Software Foundation; either
  13. * version 2.1 of the License, or (at your option) any later version.
  14. *
  15. * This library is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public License
  21. * along with this library, in a file named COPYING; if not, write to the
  22. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  23. * Boston, MA 02110-1301, USA
  24. *
  25. * For licensing issues, contact <fribidi.license@gmail.com>.
  26. */
  27. #ifndef _FRIBIDI_UNICODE_H
  28. #define _FRIBIDI_UNICODE_H
  29. #include "fribidi-common.h"
  30. #include "fribidi-types.h"
  31. #include "fribidi-begindecls.h"
  32. /* We do not support surrogates yet */
  33. #define FRIBIDI_UNICODE_CHARS (sizeof(FriBidiChar) >= 4 ? 0x110000 : 0xFFFE)
  34. /* Unicode version - FRIBIDI_UNICODE_VERSION */
  35. #ifdef DONT_HAVE_FRIBIDI_UNICODE_VERSION_H
  36. # define FRIBIDI_UNICODE_VERSION "unknown"
  37. #else /* !DONT_HAVE_FRIBIDI_UNICODE_VERSION_H */
  38. # include "fribidi-unicode-version.h"
  39. #endif /* !DONT_HAVE_FRIBIDI_UNICODE_VERSION_H */
  40. /* An string containing the version the Unicode standard implemented,
  41. * in the form of "x.y.z", or "unknown". */
  42. FRIBIDI_ENTRY const char *fribidi_unicode_version;
  43. /* Unicode Bidirectional Algorithm definitions: */
  44. /* Number of types defined in the bidi algorithm */
  45. #define FRIBIDI_BIDI_NUM_TYPES 19
  46. /* The maximum embedding level value assigned by explicit marks */
  47. #define FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL 125
  48. /* The maximum *number* of different resolved embedding levels: 0-126 */
  49. #define FRIBIDI_BIDI_MAX_RESOLVED_LEVELS 127
  50. /* The maximum *number* of nested brackets: 0-63 */
  51. #define FRIBIDI_BIDI_MAX_NESTED_BRACKET_PAIRS 63
  52. /* A few Unicode characters: */
  53. /* Bidirectional marks */
  54. #define FRIBIDI_CHAR_LRM 0x200E
  55. #define FRIBIDI_CHAR_RLM 0x200F
  56. #define FRIBIDI_CHAR_LRE 0x202A
  57. #define FRIBIDI_CHAR_RLE 0x202B
  58. #define FRIBIDI_CHAR_PDF 0x202C
  59. #define FRIBIDI_CHAR_LRO 0x202D
  60. #define FRIBIDI_CHAR_RLO 0x202E
  61. #define FRIBIDI_CHAR_LRI 0x2066
  62. #define FRIBIDI_CHAR_RLI 0x2067
  63. #define FRIBIDI_CHAR_FSI 0x2068
  64. #define FRIBIDI_CHAR_PDI 0x2069
  65. /* Line and Paragraph Separators */
  66. #define FRIBIDI_CHAR_LS 0x2028
  67. #define FRIBIDI_CHAR_PS 0x2029
  68. /* Arabic Joining marks */
  69. #define FRIBIDI_CHAR_ZWNJ 0x200C
  70. #define FRIBIDI_CHAR_ZWJ 0x200D
  71. /* Hebrew and Arabic */
  72. #define FRIBIDI_CHAR_HEBREW_ALEF 0x05D0
  73. #define FRIBIDI_CHAR_ARABIC_ALEF 0x0627
  74. #define FRIBIDI_CHAR_ARABIC_ZERO 0x0660
  75. #define FRIBIDI_CHAR_PERSIAN_ZERO 0x06F0
  76. /* Misc */
  77. #define FRIBIDI_CHAR_ZWNBSP 0xFEFF
  78. /* Char we place for a deleted slot, to delete later */
  79. #define FRIBIDI_CHAR_FILL FRIBIDI_CHAR_ZWNBSP
  80. #include "fribidi-enddecls.h"
  81. #endif /* !_FRIBIDI_UNICODE_H */
  82. /* Editor directions:
  83. * vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
  84. */