pango 2.2.5-x86-mingw32 → 3.0.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +19 -3
  3. data/ext/pango/depend +0 -1
  4. data/ext/pango/extconf.rb +0 -2
  5. data/ext/pango/rbpango.c +44 -6
  6. data/ext/pango/rbpango.h +0 -1
  7. data/ext/pango/rbpangoattribute.c +2 -2
  8. data/ext/pango/rbpangocairo.c +4 -4
  9. data/ext/pango/rbpangocontext.c +2 -2
  10. data/ext/pango/rbpangofontdescription.c +2 -2
  11. data/ext/pango/rbpangogravity.c +2 -2
  12. data/ext/pango/rbpangolanguage.c +8 -0
  13. data/ext/pango/rbpangolayout.c +15 -4
  14. data/ext/pango/rbpangomatrix.c +2 -2
  15. data/ext/pango/rbpangoscript.c +3 -3
  16. data/lib/2.0/pango.so +0 -0
  17. data/lib/2.1/pango.so +0 -0
  18. data/lib/2.2/pango.so +0 -0
  19. data/test/test-language.rb +5 -0
  20. data/test/test-layout.rb +7 -1
  21. data/vendor/local/bin/derb.exe +0 -0
  22. data/vendor/local/bin/genbrk.exe +0 -0
  23. data/vendor/local/bin/genccode.exe +0 -0
  24. data/vendor/local/bin/gencfu.exe +0 -0
  25. data/vendor/local/bin/gencmn.exe +0 -0
  26. data/vendor/local/bin/gencnval.exe +0 -0
  27. data/vendor/local/bin/gendict.exe +0 -0
  28. data/vendor/local/bin/gennorm2.exe +0 -0
  29. data/vendor/local/bin/genrb.exe +0 -0
  30. data/vendor/local/bin/gensprep.exe +0 -0
  31. data/vendor/local/bin/hb-ot-shape-closure.exe +0 -0
  32. data/vendor/local/bin/hb-shape.exe +0 -0
  33. data/vendor/local/bin/hb-view.exe +0 -0
  34. data/vendor/local/bin/icu-config +6 -6
  35. data/vendor/local/bin/icuinfo.exe +0 -0
  36. data/vendor/local/bin/icupkg.exe +0 -0
  37. data/vendor/local/bin/libharfbuzz-0.dll +0 -0
  38. data/vendor/local/bin/libpango-1.0-0.dll +0 -0
  39. data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
  40. data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
  41. data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
  42. data/vendor/local/bin/makeconv.exe +0 -0
  43. data/vendor/local/bin/pango-querymodules.exe +0 -0
  44. data/vendor/local/bin/pango-view.exe +0 -0
  45. data/vendor/local/bin/pkgdata.exe +0 -0
  46. data/vendor/local/bin/uconv.exe +0 -0
  47. data/vendor/local/etc/pango/pango.modules +1 -1
  48. data/vendor/local/include/harfbuzz/hb-buffer.h +26 -1
  49. data/vendor/local/include/harfbuzz/hb-common.h +7 -0
  50. data/vendor/local/include/harfbuzz/hb-font.h +7 -6
  51. data/vendor/local/include/harfbuzz/hb-ft.h +58 -1
  52. data/vendor/local/include/harfbuzz/hb-glib.h +3 -0
  53. data/vendor/local/include/harfbuzz/hb-ot-font.h +4 -0
  54. data/vendor/local/include/harfbuzz/hb-shape.h +0 -3
  55. data/vendor/local/include/harfbuzz/hb-unicode.h +28 -3
  56. data/vendor/local/include/harfbuzz/hb-version.h +4 -4
  57. data/vendor/local/include/layout/LEFontInstance.h +2 -28
  58. data/vendor/local/include/layout/LETableReference.h +7 -2
  59. data/vendor/local/include/unicode/calendar.h +32 -2
  60. data/vendor/local/include/unicode/coll.h +9 -7
  61. data/vendor/local/include/unicode/datefmt.h +102 -13
  62. data/vendor/local/include/unicode/dcfmtsym.h +4 -2
  63. data/vendor/local/include/unicode/decimfmt.h +4 -5
  64. data/vendor/local/include/unicode/dtfmtsym.h +60 -1
  65. data/vendor/local/include/unicode/dtptngen.h +21 -7
  66. data/vendor/local/include/unicode/localpointer.h +49 -1
  67. data/vendor/local/include/unicode/locid.h +2 -3
  68. data/vendor/local/include/unicode/measfmt.h +30 -37
  69. data/vendor/local/include/unicode/measunit.h +65 -152
  70. data/vendor/local/include/unicode/measure.h +3 -3
  71. data/vendor/local/include/unicode/numfmt.h +3 -5
  72. data/vendor/local/include/unicode/platform.h +12 -2
  73. data/vendor/local/include/unicode/plurrule.h +18 -14
  74. data/vendor/local/include/unicode/rbnf.h +3 -4
  75. data/vendor/local/include/unicode/regex.h +42 -26
  76. data/vendor/local/include/unicode/region.h +9 -9
  77. data/vendor/local/include/unicode/reldatefmt.h +50 -45
  78. data/vendor/local/include/unicode/scientificnumberformatter.h +222 -0
  79. data/vendor/local/include/unicode/smpdtfmt.h +30 -24
  80. data/vendor/local/include/unicode/tblcoll.h +5 -4
  81. data/vendor/local/include/unicode/timezone.h +18 -1
  82. data/vendor/local/include/unicode/ucal.h +2 -2
  83. data/vendor/local/include/unicode/ucol.h +22 -18
  84. data/vendor/local/include/unicode/uconfig.h +17 -2
  85. data/vendor/local/include/unicode/udat.h +164 -56
  86. data/vendor/local/include/unicode/udatpg.h +9 -7
  87. data/vendor/local/include/unicode/ufieldpositer.h +121 -0
  88. data/vendor/local/include/unicode/uidna.h +21 -13
  89. data/vendor/local/include/unicode/ulistformatter.h +130 -0
  90. data/vendor/local/include/unicode/ulocdata.h +4 -3
  91. data/vendor/local/include/unicode/unistr.h +101 -53
  92. data/vendor/local/include/unicode/unum.h +7 -10
  93. data/vendor/local/include/unicode/uregex.h +52 -29
  94. data/vendor/local/include/unicode/urename.h +14 -3
  95. data/vendor/local/include/unicode/uscript.h +30 -16
  96. data/vendor/local/include/unicode/uspoof.h +13 -9
  97. data/vendor/local/include/unicode/utrans.h +5 -7
  98. data/vendor/local/include/unicode/utypes.h +9 -3
  99. data/vendor/local/include/unicode/uvernum.h +8 -8
  100. data/vendor/local/lib/icu/{54.1 → 55.1}/Makefile.inc +5 -5
  101. data/vendor/local/lib/icu/{54.1 → 55.1}/pkgdata.inc +1 -1
  102. data/vendor/local/lib/icu/Makefile.inc +5 -5
  103. data/vendor/local/lib/icu/pkgdata.inc +1 -1
  104. data/vendor/local/lib/icudt.dll +0 -0
  105. data/vendor/local/lib/{icudt54.dll → icudt55.dll} +0 -0
  106. data/vendor/local/lib/icuin.dll +0 -0
  107. data/vendor/local/lib/icuin55.dll +0 -0
  108. data/vendor/local/lib/icuio.dll +0 -0
  109. data/vendor/local/lib/icuio55.dll +0 -0
  110. data/vendor/local/lib/icule.dll +0 -0
  111. data/vendor/local/lib/icule55.dll +0 -0
  112. data/vendor/local/lib/iculx.dll +0 -0
  113. data/vendor/local/lib/iculx55.dll +0 -0
  114. data/vendor/local/lib/icutest.dll +0 -0
  115. data/vendor/local/lib/icutest55.dll +0 -0
  116. data/vendor/local/lib/icutu.dll +0 -0
  117. data/vendor/local/lib/icutu55.dll +0 -0
  118. data/vendor/local/lib/icuuc.dll +0 -0
  119. data/vendor/local/lib/icuuc55.dll +0 -0
  120. data/vendor/local/lib/libharfbuzz-icu.a +0 -0
  121. data/vendor/local/lib/libharfbuzz-icu.la +7 -7
  122. data/vendor/local/lib/libharfbuzz.dll.a +0 -0
  123. data/vendor/local/lib/libharfbuzz.la +7 -7
  124. data/vendor/local/lib/libicudt.dll.a +0 -0
  125. data/vendor/local/lib/libicuin.dll.a +0 -0
  126. data/vendor/local/lib/libicuio.dll.a +0 -0
  127. data/vendor/local/lib/libicule.dll.a +0 -0
  128. data/vendor/local/lib/libiculx.dll.a +0 -0
  129. data/vendor/local/lib/libicutest.dll.a +0 -0
  130. data/vendor/local/lib/libicutu.dll.a +0 -0
  131. data/vendor/local/lib/libicuuc.dll.a +0 -0
  132. data/vendor/local/lib/libpango-1.0.dll.a +0 -0
  133. data/vendor/local/lib/libpango-1.0.la +2 -2
  134. data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
  135. data/vendor/local/lib/libpangocairo-1.0.la +1 -1
  136. data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
  137. data/vendor/local/lib/libpangoft2-1.0.la +2 -2
  138. data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
  139. data/vendor/local/lib/libpangowin32-1.0.la +2 -2
  140. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll +0 -0
  141. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll.a +0 -0
  142. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.la +2 -2
  143. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll +0 -0
  144. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll.a +0 -0
  145. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.la +2 -2
  146. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll +0 -0
  147. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll.a +0 -0
  148. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.la +2 -2
  149. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll +0 -0
  150. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll.a +0 -0
  151. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.la +2 -2
  152. data/vendor/local/lib/pkgconfig/harfbuzz-icu.pc +1 -1
  153. data/vendor/local/lib/pkgconfig/harfbuzz.pc +3 -1
  154. data/vendor/local/lib/pkgconfig/icu-i18n.pc +5 -5
  155. data/vendor/local/lib/pkgconfig/icu-io.pc +5 -5
  156. data/vendor/local/lib/pkgconfig/icu-le.pc +5 -5
  157. data/vendor/local/lib/pkgconfig/icu-lx.pc +5 -5
  158. data/vendor/local/lib/pkgconfig/icu-uc.pc +5 -5
  159. data/vendor/local/share/gtk-doc/html/harfbuzz/adding-text-to-the-buffer.html +35 -0
  160. data/vendor/local/share/gtk-doc/html/harfbuzz/annotation-glossary.html +30 -35
  161. data/vendor/local/share/gtk-doc/html/harfbuzz/api-index-full.html +158 -27
  162. data/vendor/local/share/gtk-doc/html/harfbuzz/buffers-language-script-and-direction.html +87 -0
  163. data/vendor/local/share/gtk-doc/html/harfbuzz/{ch01.html → ch06.html} +12 -13
  164. data/vendor/local/share/gtk-doc/html/harfbuzz/customizing-unicode-functions.html +31 -0
  165. data/vendor/local/share/gtk-doc/html/harfbuzz/deprecated-api-index.html +7 -8
  166. data/vendor/local/share/gtk-doc/html/harfbuzz/fonts-and-faces.html +40 -0
  167. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-Shaping.html +352 -0
  168. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-blob.html +88 -47
  169. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-buffer.html +128 -204
  170. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-common.html +290 -304
  171. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-coretext.html +14 -23
  172. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-deprecated.html +14 -17
  173. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-face.html +40 -51
  174. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-font.html +126 -190
  175. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ft.html +19 -24
  176. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-glib.html +14 -29
  177. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-gobject.html +438 -11
  178. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-graphite2.html +14 -25
  179. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-icu.html +14 -29
  180. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-layout.html +19 -160
  181. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-tag.html +21 -36
  182. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot.html +14 -11
  183. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-set.html +70 -81
  184. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape-plan.html +33 -44
  185. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-unicode.html +290 -323
  186. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-uniscribe.html +14 -23
  187. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-version.html +59 -27
  188. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb.html +16 -13
  189. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz.devhelp2 +415 -104
  190. data/vendor/local/share/gtk-doc/html/harfbuzz/hello-harfbuzz.html +181 -0
  191. data/vendor/local/share/gtk-doc/html/harfbuzz/index.html +43 -12
  192. data/vendor/local/share/gtk-doc/html/harfbuzz/object-tree.html +11 -13
  193. data/vendor/local/share/gtk-doc/html/harfbuzz/plans-and-caching.html +31 -0
  194. data/vendor/local/share/gtk-doc/html/harfbuzz/pt01.html +70 -0
  195. data/vendor/local/share/gtk-doc/html/harfbuzz/pt02.html +107 -0
  196. data/vendor/local/share/gtk-doc/html/harfbuzz/setting-buffer-properties.html +31 -0
  197. data/vendor/local/share/gtk-doc/html/harfbuzz/shaping-and-shape-plans.html +39 -0
  198. data/vendor/local/share/gtk-doc/html/harfbuzz/style.css +9 -6
  199. data/vendor/local/share/gtk-doc/html/harfbuzz/using-harfbuzzs-native-opentype-implementation.html +31 -0
  200. data/vendor/local/share/gtk-doc/html/harfbuzz/using-your-own-font-functions.html +31 -0
  201. data/vendor/local/share/gtk-doc/html/harfbuzz/what-about-the-other-scripts.html +31 -0
  202. data/vendor/local/share/gtk-doc/html/harfbuzz/what-is-harfbuzz.html +124 -0
  203. data/vendor/local/share/gtk-doc/html/harfbuzz/why-is-it-called-harfbuzz.html +38 -0
  204. data/vendor/local/share/icu/{54.1 → 55.1}/config/mh-mingw +0 -0
  205. data/vendor/local/share/icu/{54.1 → 55.1}/install-sh +0 -0
  206. data/vendor/local/share/icu/{54.1 → 55.1}/license.html +3 -4
  207. data/vendor/local/share/icu/{54.1 → 55.1}/mkinstalldirs +0 -0
  208. data/vendor/local/share/man/man1/derb.1 +2 -2
  209. data/vendor/local/share/man/man1/genbrk.1 +2 -2
  210. data/vendor/local/share/man/man1/gencfu.1 +1 -1
  211. data/vendor/local/share/man/man1/gencnval.1 +3 -3
  212. data/vendor/local/share/man/man1/gendict.1 +2 -2
  213. data/vendor/local/share/man/man1/genrb.1 +3 -3
  214. data/vendor/local/share/man/man1/icu-config.1 +2 -2
  215. data/vendor/local/share/man/man1/makeconv.1 +3 -3
  216. data/vendor/local/share/man/man1/pkgdata.1 +2 -2
  217. data/vendor/local/share/man/man1/uconv.1 +2 -2
  218. data/vendor/local/share/man/man8/genccode.8 +2 -2
  219. data/vendor/local/share/man/man8/gencmn.8 +3 -3
  220. data/vendor/local/share/man/man8/gensprep.8 +3 -3
  221. data/vendor/local/share/man/man8/icupkg.8 +1 -1
  222. metadata +38 -22
  223. data/vendor/local/include/unicode/scientificformathelper.h +0 -139
  224. data/vendor/local/lib/icuin54.dll +0 -0
  225. data/vendor/local/lib/icuio54.dll +0 -0
  226. data/vendor/local/lib/icule54.dll +0 -0
  227. data/vendor/local/lib/iculx54.dll +0 -0
  228. data/vendor/local/lib/icutest54.dll +0 -0
  229. data/vendor/local/lib/icutu54.dll +0 -0
  230. data/vendor/local/lib/icuuc54.dll +0 -0
  231. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape.html +0 -286
  232. data/vendor/local/share/gtk-doc/html/harfbuzz/index.sgml +0 -496
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  *****************************************************************************
3
- * Copyright (C) 2014, International Business Machines Corporation and
3
+ * Copyright (C) 2014-2015, International Business Machines Corporation and
4
4
  * others.
5
5
  * All Rights Reserved.
6
6
  *****************************************************************************
@@ -57,65 +57,67 @@ typedef enum UDateRelativeDateTimeFormatterStyle {
57
57
  UDAT_STYLE_COUNT
58
58
  } UDateRelativeDateTimeFormatterStyle;
59
59
 
60
+ #endif /* U_HIDE_DRAFT_API */
61
+
60
62
  /**
61
63
  * Represents the unit for formatting a relative date. e.g "in 5 days"
62
64
  * or "in 3 months"
63
- * @draft ICU 53
65
+ * @stable ICU 53
64
66
  */
65
67
  typedef enum UDateRelativeUnit {
66
68
 
67
69
  /**
68
70
  * Seconds
69
- * @draft ICU 53
71
+ * @stable ICU 53
70
72
  */
71
73
  UDAT_RELATIVE_SECONDS,
72
74
 
73
75
  /**
74
76
  * Minutes
75
- * @draft ICU 53
77
+ * @stable ICU 53
76
78
  */
77
79
  UDAT_RELATIVE_MINUTES,
78
80
 
79
81
  /**
80
82
  * Hours
81
- * @draft ICU 53
83
+ * @stable ICU 53
82
84
  */
83
85
  UDAT_RELATIVE_HOURS,
84
86
 
85
87
  /**
86
88
  * Days
87
- * @draft ICU 53
89
+ * @stable ICU 53
88
90
  */
89
91
  UDAT_RELATIVE_DAYS,
90
92
 
91
93
  /**
92
94
  * Weeks
93
- * @draft ICU 53
95
+ * @stable ICU 53
94
96
  */
95
97
  UDAT_RELATIVE_WEEKS,
96
98
 
97
99
  /**
98
100
  * Months
99
- * @draft ICU 53
101
+ * @stable ICU 53
100
102
  */
101
103
  UDAT_RELATIVE_MONTHS,
102
104
 
103
105
  /**
104
106
  * Years
105
- * @draft ICU 53
107
+ * @stable ICU 53
106
108
  */
107
109
  UDAT_RELATIVE_YEARS,
108
110
 
109
111
  /**
110
112
  * Count of items in this enum.
111
- * @draft ICU 53
113
+ * @stable ICU 53
112
114
  */
113
115
  UDAT_RELATIVE_UNIT_COUNT
114
116
  } UDateRelativeUnit;
115
117
 
116
118
  /**
117
119
  * Represents an absolute unit.
118
- * @draft ICU 53
120
+ * @stable ICU 53
119
121
  */
120
122
  typedef enum UDateAbsoluteUnit {
121
123
 
@@ -123,79 +125,79 @@ typedef enum UDateAbsoluteUnit {
123
125
  // Saturday.
124
126
  /**
125
127
  * Sunday
126
- * @draft ICU 53
128
+ * @stable ICU 53
127
129
  */
128
130
  UDAT_ABSOLUTE_SUNDAY,
129
131
 
130
132
  /**
131
133
  * Monday
132
- * @draft ICU 53
134
+ * @stable ICU 53
133
135
  */
134
136
  UDAT_ABSOLUTE_MONDAY,
135
137
 
136
138
  /**
137
139
  * Tuesday
138
- * @draft ICU 53
140
+ * @stable ICU 53
139
141
  */
140
142
  UDAT_ABSOLUTE_TUESDAY,
141
143
 
142
144
  /**
143
145
  * Wednesday
144
- * @draft ICU 53
146
+ * @stable ICU 53
145
147
  */
146
148
  UDAT_ABSOLUTE_WEDNESDAY,
147
149
 
148
150
  /**
149
151
  * Thursday
150
- * @draft ICU 53
152
+ * @stable ICU 53
151
153
  */
152
154
  UDAT_ABSOLUTE_THURSDAY,
153
155
 
154
156
  /**
155
157
  * Friday
156
- * @draft ICU 53
158
+ * @stable ICU 53
157
159
  */
158
160
  UDAT_ABSOLUTE_FRIDAY,
159
161
 
160
162
  /**
161
163
  * Saturday
162
- * @draft ICU 53
164
+ * @stable ICU 53
163
165
  */
164
166
  UDAT_ABSOLUTE_SATURDAY,
165
167
 
166
168
  /**
167
169
  * Day
168
- * @draft ICU 53
170
+ * @stable ICU 53
169
171
  */
170
172
  UDAT_ABSOLUTE_DAY,
171
173
 
172
174
  /**
173
175
  * Week
174
- * @draft ICU 53
176
+ * @stable ICU 53
175
177
  */
176
178
  UDAT_ABSOLUTE_WEEK,
177
179
 
178
180
  /**
179
181
  * Month
180
- * @draft ICU 53
182
+ * @stable ICU 53
181
183
  */
182
184
  UDAT_ABSOLUTE_MONTH,
183
185
 
184
186
  /**
185
187
  * Year
186
- * @draft ICU 53
188
+ * @stable ICU 53
187
189
  */
188
190
  UDAT_ABSOLUTE_YEAR,
189
191
 
190
192
  /**
191
193
  * Now
192
- * @draft ICU 53
194
+ * @stable ICU 53
193
195
  */
194
196
  UDAT_ABSOLUTE_NOW,
195
197
 
196
198
  /**
197
199
  * Count of items in this enum.
198
- * @draft ICU 53
200
+ * @stable ICU 53
199
201
  */
200
202
  UDAT_ABSOLUTE_UNIT_COUNT
201
203
  } UDateAbsoluteUnit;
@@ -203,49 +205,49 @@ typedef enum UDateAbsoluteUnit {
203
205
  /**
204
206
  * Represents a direction for an absolute unit e.g "Next Tuesday"
205
207
  * or "Last Tuesday"
206
- * @draft ICU 53
208
+ * @stable ICU 53
207
209
  */
208
210
  typedef enum UDateDirection {
209
211
 
210
212
  /**
211
213
  * Two before. Not fully supported in every locale.
212
- * @draft ICU 53
214
+ * @stable ICU 53
213
215
  */
214
216
  UDAT_DIRECTION_LAST_2,
215
217
 
216
218
  /**
217
219
  * Last
218
- * @draft ICU 53
220
+ * @stable ICU 53
219
221
  */
220
222
  UDAT_DIRECTION_LAST,
221
223
 
222
224
  /**
223
225
  * This
224
- * @draft ICU 53
226
+ * @stable ICU 53
225
227
  */
226
228
  UDAT_DIRECTION_THIS,
227
229
 
228
230
  /**
229
231
  * Next
230
- * @draft ICU 53
232
+ * @stable ICU 53
231
233
  */
232
234
  UDAT_DIRECTION_NEXT,
233
235
 
234
236
  /**
235
237
  * Two after. Not fully supported in every locale.
236
- * @draft ICU 53
238
+ * @stable ICU 53
237
239
  */
238
240
  UDAT_DIRECTION_NEXT_2,
239
241
 
240
242
  /**
241
243
  * Plain, which means the absence of a qualifier.
242
- * @draft ICU 53
244
+ * @stable ICU 53
243
245
  */
244
246
  UDAT_DIRECTION_PLAIN,
245
247
 
246
248
  /**
247
249
  * Count of items in this enum.
248
- * @draft ICU 53
250
+ * @stable ICU 53
249
251
  */
250
252
  UDAT_DIRECTION_COUNT
251
253
  } UDateDirection;
@@ -326,20 +328,20 @@ class UnicodeString;
326
328
  *
327
329
  * The RelativeDateTimeFormatter class is not intended for public subclassing.
328
330
  *
329
- * @draft ICU 53
331
+ * @stable ICU 53
330
332
  */
331
333
  class U_I18N_API RelativeDateTimeFormatter : public UObject {
332
334
  public:
333
335
 
334
336
  /**
335
337
  * Create RelativeDateTimeFormatter with default locale.
336
- * @draft ICU 53
338
+ * @stable ICU 53
337
339
  */
338
340
  RelativeDateTimeFormatter(UErrorCode& status);
339
341
 
340
342
  /**
341
343
  * Create RelativeDateTimeFormatter with given locale.
342
- * @draft ICU 53
344
+ * @stable ICU 53
343
345
  */
344
346
  RelativeDateTimeFormatter(const Locale& locale, UErrorCode& status);
345
347
 
@@ -351,11 +353,12 @@ public:
351
353
  * It is an error for caller to delete this pointer or change its
352
354
  * contents after calling this constructor.
353
355
  * @status Any error is returned here.
354
- * @draft ICU 53
356
+ * @stable ICU 53
355
357
  */
356
358
  RelativeDateTimeFormatter(
357
359
  const Locale& locale, NumberFormat *nfToAdopt, UErrorCode& status);
358
360
 
361
+ #ifndef U_HIDE_DRAFT_API
359
362
  /**
360
363
  * Create RelativeDateTimeFormatter with given locale, NumberFormat,
361
364
  * and capitalization context.
@@ -377,23 +380,24 @@ public:
377
380
  UDateRelativeDateTimeFormatterStyle style,
378
381
  UDisplayContext capitalizationContext,
379
382
  UErrorCode& status);
383
+ #endif /* U_HIDE_DRAFT_API */
380
384
 
381
385
  /**
382
386
  * Copy constructor.
383
- * @draft ICU 53
387
+ * @stable ICU 53
384
388
  */
385
389
  RelativeDateTimeFormatter(const RelativeDateTimeFormatter& other);
386
390
 
387
391
  /**
388
392
  * Assignment operator.
389
- * @draft ICU 53
393
+ * @stable ICU 53
390
394
  */
391
395
  RelativeDateTimeFormatter& operator=(
392
396
  const RelativeDateTimeFormatter& other);
393
397
 
394
398
  /**
395
399
  * Destructor.
396
- * @draft ICU 53
400
+ * @stable ICU 53
397
401
  */
398
402
  virtual ~RelativeDateTimeFormatter();
399
403
 
@@ -410,7 +414,7 @@ public:
410
414
  * appended
411
415
  * @param status ICU error code returned here.
412
416
  * @return appendTo
413
- * @draft ICU 53
417
+ * @stable ICU 53
414
418
  */
415
419
  UnicodeString& format(
416
420
  double quantity,
@@ -429,7 +433,7 @@ public:
429
433
  * no format string is available.
430
434
  * @param status ICU error code returned here.
431
435
  * @return appendTo
432
- * @draft ICU 53
436
+ * @stable ICU 53
433
437
  */
434
438
  UnicodeString& format(
435
439
  UDateDirection direction,
@@ -447,7 +451,7 @@ public:
447
451
  * @param appendTo concatenated date and time appended here
448
452
  * @param status ICU error code returned here.
449
453
  * @return appendTo
450
- * @draft ICU 53
454
+ * @stable ICU 53
451
455
  */
452
456
  UnicodeString& combineDateAndTime(
453
457
  const UnicodeString& relativeDateString,
@@ -458,10 +462,11 @@ public:
458
462
  /**
459
463
  * Returns the NumberFormat this object is using.
460
464
  *
461
- * @draft ICU 53
465
+ * @stable ICU 53
462
466
  */
463
467
  const NumberFormat& getNumberFormat() const;
464
468
 
469
+ #ifndef U_HIDE_DRAFT_API
465
470
  /**
466
471
  * Returns the capitalization context.
467
472
  *
@@ -475,6 +480,8 @@ public:
475
480
  * @draft ICU 54
476
481
  */
477
482
  UDateRelativeDateTimeFormatterStyle getFormatStyle() const;
483
+ #endif /* U_HIDE_DRAFT_API */
484
+
478
485
  private:
479
486
  const RelativeDateTimeCacheData* fCache;
480
487
  const SharedNumberFormat *fNumberFormat;
@@ -492,7 +499,5 @@ private:
492
499
 
493
500
  U_NAMESPACE_END
494
501
 
495
- #endif /* U_HIDE_DRAFT_API */
496
-
497
502
  #endif /* !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION*/
498
503
  #endif
@@ -0,0 +1,222 @@
1
+ /*
2
+ **********************************************************************
3
+ * Copyright (c) 2014, International Business Machines
4
+ * Corporation and others. All Rights Reserved.
5
+ **********************************************************************
6
+ */
7
+ #ifndef SCINUMBERFORMATTER_H
8
+ #define SCINUMBERFORMATTER_H
9
+
10
+ #include "unicode/utypes.h"
11
+
12
+ #if !UCONFIG_NO_FORMATTING
13
+
14
+ #ifndef U_HIDE_DRAFT_API
15
+
16
+ #include "unicode/unistr.h"
17
+
18
+ /**
19
+ * \file
20
+ * \brief C++ API: Formats in scientific notation.
21
+ */
22
+
23
+ U_NAMESPACE_BEGIN
24
+
25
+ class FieldPositionIterator;
26
+ class DecimalFormatStaticSets;
27
+ class DecimalFormatSymbols;
28
+ class DecimalFormat;
29
+ class Formattable;
30
+
31
+ /**
32
+ * A formatter that formats numbers in user-friendly scientific notation.
33
+ *
34
+ * Sample code:
35
+ * <pre>
36
+ * UErrorCode status = U_ZERO_ERROR;
37
+ * LocalPointer<ScientificNumberFormatter> fmt(
38
+ * ScientificNumberFormatter::createMarkupInstance(
39
+ * "en", "<sup>", "</sup>", status));
40
+ * if (U_FAILURE(status)) {
41
+ * return;
42
+ * }
43
+ * UnicodeString appendTo;
44
+ * // appendTo = "1.23456x10<sup>-78</sup>"
45
+ * fmt->format(1.23456e-78, appendTo, status);
46
+ * </pre>
47
+ *
48
+ * @draft ICU 55
49
+ */
50
+ class U_I18N_API ScientificNumberFormatter : public UObject {
51
+ public:
52
+
53
+ /**
54
+ * Creates a ScientificNumberFormatter instance that uses
55
+ * superscript characters for exponents.
56
+ * @param fmtToAdopt The DecimalFormat which must be configured for
57
+ * scientific notation.
58
+ * @param status error returned here.
59
+ * @return The new ScientificNumberFormatter instance.
60
+ *
61
+ * @draft ICU 55
62
+ */
63
+ static ScientificNumberFormatter *createSuperscriptInstance(
64
+ DecimalFormat *fmtToAdopt, UErrorCode &status);
65
+
66
+ /**
67
+ * Creates a ScientificNumberFormatter instance that uses
68
+ * superscript characters for exponents for this locale.
69
+ * @param locale The locale
70
+ * @param status error returned here.
71
+ * @return The ScientificNumberFormatter instance.
72
+ *
73
+ * @draft ICU 55
74
+ */
75
+ static ScientificNumberFormatter *createSuperscriptInstance(
76
+ const Locale &locale, UErrorCode &status);
77
+
78
+
79
+ /**
80
+ * Creates a ScientificNumberFormatter instance that uses
81
+ * markup for exponents.
82
+ * @param fmtToAdopt The DecimalFormat which must be configured for
83
+ * scientific notation.
84
+ * @param beginMarkup the markup to start superscript.
85
+ * @param endMarkup the markup to end superscript.
86
+ * @param status error returned here.
87
+ * @return The new ScientificNumberFormatter instance.
88
+ *
89
+ * @draft ICU 55
90
+ */
91
+ static ScientificNumberFormatter *createMarkupInstance(
92
+ DecimalFormat *fmtToAdopt,
93
+ const UnicodeString &beginMarkup,
94
+ const UnicodeString &endMarkup,
95
+ UErrorCode &status);
96
+
97
+ /**
98
+ * Creates a ScientificNumberFormatter instance that uses
99
+ * markup for exponents for this locale.
100
+ * @param locale The locale
101
+ * @param beginMarkup the markup to start superscript.
102
+ * @param endMarkup the markup to end superscript.
103
+ * @param status error returned here.
104
+ * @return The ScientificNumberFormatter instance.
105
+ *
106
+ * @draft ICU 55
107
+ */
108
+ static ScientificNumberFormatter *createMarkupInstance(
109
+ const Locale &locale,
110
+ const UnicodeString &beginMarkup,
111
+ const UnicodeString &endMarkup,
112
+ UErrorCode &status);
113
+
114
+
115
+ /**
116
+ * Returns a copy of this object. Caller must free returned copy.
117
+ * @draft ICU 55
118
+ */
119
+ ScientificNumberFormatter *clone() const {
120
+ return new ScientificNumberFormatter(*this);
121
+ }
122
+
123
+ /**
124
+ * Destructor.
125
+ * @draft ICU 55
126
+ */
127
+ virtual ~ScientificNumberFormatter();
128
+
129
+ /**
130
+ * Formats a number into user friendly scientific notation.
131
+ *
132
+ * @param number the number to format.
133
+ * @param appendTo formatted string appended here.
134
+ * @param status any error returned here.
135
+ * @return appendTo
136
+ *
137
+ * @draft ICU 55
138
+ */
139
+ UnicodeString &format(
140
+ const Formattable &number,
141
+ UnicodeString &appendTo,
142
+ UErrorCode &status) const;
143
+ private:
144
+ class U_I18N_API Style : public UObject {
145
+ public:
146
+ virtual Style *clone() const = 0;
147
+ protected:
148
+ virtual UnicodeString &format(
149
+ const UnicodeString &original,
150
+ FieldPositionIterator &fpi,
151
+ const UnicodeString &preExponent,
152
+ const DecimalFormatStaticSets &decimalFormatSets,
153
+ UnicodeString &appendTo,
154
+ UErrorCode &status) const = 0;
155
+ private:
156
+ friend class ScientificNumberFormatter;
157
+ };
158
+
159
+ class U_I18N_API SuperscriptStyle : public Style {
160
+ public:
161
+ virtual Style *clone() const;
162
+ protected:
163
+ virtual UnicodeString &format(
164
+ const UnicodeString &original,
165
+ FieldPositionIterator &fpi,
166
+ const UnicodeString &preExponent,
167
+ const DecimalFormatStaticSets &decimalFormatSets,
168
+ UnicodeString &appendTo,
169
+ UErrorCode &status) const;
170
+ };
171
+
172
+ class U_I18N_API MarkupStyle : public Style {
173
+ public:
174
+ MarkupStyle(
175
+ const UnicodeString &beginMarkup,
176
+ const UnicodeString &endMarkup)
177
+ : Style(),
178
+ fBeginMarkup(beginMarkup),
179
+ fEndMarkup(endMarkup) { }
180
+ virtual Style *clone() const;
181
+ protected:
182
+ virtual UnicodeString &format(
183
+ const UnicodeString &original,
184
+ FieldPositionIterator &fpi,
185
+ const UnicodeString &preExponent,
186
+ const DecimalFormatStaticSets &decimalFormatSets,
187
+ UnicodeString &appendTo,
188
+ UErrorCode &status) const;
189
+ private:
190
+ UnicodeString fBeginMarkup;
191
+ UnicodeString fEndMarkup;
192
+ };
193
+
194
+ ScientificNumberFormatter(
195
+ DecimalFormat *fmtToAdopt,
196
+ Style *styleToAdopt,
197
+ UErrorCode &status);
198
+
199
+ ScientificNumberFormatter(const ScientificNumberFormatter &other);
200
+ ScientificNumberFormatter &operator=(const ScientificNumberFormatter &);
201
+
202
+ static void getPreExponent(
203
+ const DecimalFormatSymbols &dfs, UnicodeString &preExponent);
204
+
205
+ static ScientificNumberFormatter *createInstance(
206
+ DecimalFormat *fmtToAdopt,
207
+ Style *styleToAdopt,
208
+ UErrorCode &status);
209
+
210
+ UnicodeString fPreExponent;
211
+ DecimalFormat *fDecimalFormat;
212
+ Style *fStyle;
213
+ const DecimalFormatStaticSets *fStaticSets;
214
+
215
+ };
216
+
217
+ U_NAMESPACE_END
218
+
219
+ #endif /* U_HIDE_DRAFT_API */
220
+
221
+ #endif /* !UCONFIG_NO_FORMATTING */
222
+ #endif
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (C) 1997-2014, International Business Machines Corporation and
2
+ * Copyright (C) 1997-2015, International Business Machines Corporation and
3
3
  * others. All Rights Reserved.
4
4
  *******************************************************************************
5
5
  *
@@ -45,6 +45,8 @@ class DateFormat;
45
45
  class MessageFormat;
46
46
  class FieldPositionHandler;
47
47
  class TimeZoneFormat;
48
+ class SharedNumberFormat;
49
+ class SimpleDateFormatMutableNFs;
48
50
 
49
51
  /**
50
52
  *
@@ -1117,7 +1119,6 @@ public:
1117
1119
  */
1118
1120
  virtual const TimeZoneFormat* getTimeZoneFormat(void) const;
1119
1121
 
1120
- /* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */
1121
1122
  /**
1122
1123
  * Set a particular UDisplayContext value in the formatter, such as
1123
1124
  * UDISPCTX_CAPITALIZATION_FOR_STANDALONE. Note: For getContext, see
@@ -1126,7 +1127,7 @@ public:
1126
1127
  * @param status Input/output status. If at entry this indicates a failure
1127
1128
  * status, the function will do nothing; otherwise this will be
1128
1129
  * updated with any new status from the function.
1129
- * @draft ICU 53
1130
+ * @stable ICU 53
1130
1131
  */
1131
1132
  virtual void setContext(UDisplayContext value, UErrorCode& status);
1132
1133
 
@@ -1261,6 +1262,7 @@ private:
1261
1262
  int32_t fieldNum,
1262
1263
  FieldPositionHandler& handler,
1263
1264
  Calendar& cal,
1265
+ SimpleDateFormatMutableNFs &mutableNFs,
1264
1266
  UErrorCode& status) const; // in case of illegal argument
1265
1267
 
1266
1268
  /**
@@ -1307,14 +1309,6 @@ private:
1307
1309
  */
1308
1310
  Calendar *initializeCalendar(TimeZone* adoptZone, const Locale& locale, UErrorCode& status);
1309
1311
 
1310
- /**
1311
- * initializes fSymbols from parameters.
1312
- * @param locale Locale of the symbols
1313
- * @param calendar Alias to Calendar that will be used.
1314
- * @param status Error code
1315
- */
1316
- void initializeSymbols(const Locale& locale, Calendar* calendar, UErrorCode& status);
1317
-
1318
1312
  /**
1319
1313
  * Called by several of the constructors to load pattern data and formatting symbols
1320
1314
  * out of a resource bundle and initialize the locale based on it.
@@ -1407,7 +1401,7 @@ private:
1407
1401
  */
1408
1402
  int32_t subParse(const UnicodeString& text, int32_t& start, UChar ch, int32_t count,
1409
1403
  UBool obeyCount, UBool allowNegative, UBool ambiguousYear[], int32_t& saveHebrewMonth, Calendar& cal,
1410
- int32_t patLoc, MessageFormat * numericLeapMonthFormatter, UTimeZoneFormatTimeType *tzTimeType) const;
1404
+ int32_t patLoc, MessageFormat * numericLeapMonthFormatter, UTimeZoneFormatTimeType *tzTimeType, SimpleDateFormatMutableNFs &mutableNFs) const;
1411
1405
 
1412
1406
  void parseInt(const UnicodeString& text,
1413
1407
  Formattable& number,
@@ -1482,11 +1476,6 @@ private:
1482
1476
  */
1483
1477
  void initNumberFormatters(const Locale &locale,UErrorCode &status);
1484
1478
 
1485
- /**
1486
- * Get the numbering system to be used for a particular field.
1487
- */
1488
- NumberFormat * getNumberFormatByIndex(UDateFormatField index) const;
1489
-
1490
1479
  /**
1491
1480
  * Parse the given override string and set up structures for number formats
1492
1481
  */
@@ -1507,6 +1496,8 @@ private:
1507
1496
  */
1508
1497
  TimeZoneFormat *tzFormat() const;
1509
1498
 
1499
+ const NumberFormat* getNumberFormatByIndex(UDateFormatField index) const;
1500
+
1510
1501
  /**
1511
1502
  * Used to map Calendar field to field level.
1512
1503
  * The larger the level, the smaller the field unit.
@@ -1514,7 +1505,16 @@ private:
1514
1505
  * UCAL_MONTH level is 20.
1515
1506
  */
1516
1507
  static const int32_t fgCalendarFieldToLevel[];
1517
- static const int32_t fgPatternCharToLevel[];
1508
+
1509
+ /**
1510
+ * Map calendar field letter into calendar field level.
1511
+ */
1512
+ static int32_t getLevelFromChar(UChar ch);
1513
+
1514
+ /**
1515
+ * Tell if a character can be used to define a field in a format string.
1516
+ */
1517
+ static UBool isSyntaxChar(UChar ch);
1518
1518
 
1519
1519
  /**
1520
1520
  * The formatting pattern for this formatter.
@@ -1563,15 +1563,21 @@ private:
1563
1563
  */
1564
1564
  /*transient*/ int32_t fDefaultCenturyStartYear;
1565
1565
 
1566
- typedef struct NSOverride {
1567
- NumberFormat *nf;
1566
+ struct NSOverride : public UMemory {
1567
+ const SharedNumberFormat *snf;
1568
1568
  int32_t hash;
1569
1569
  NSOverride *next;
1570
- } NSOverride;
1571
-
1572
- NumberFormat **fNumberFormatters;
1570
+ void free();
1571
+ NSOverride() : snf(NULL), hash(0), next(NULL) {
1572
+ }
1573
+ ~NSOverride();
1574
+ };
1573
1575
 
1574
- NSOverride *fOverrideList;
1576
+ /**
1577
+ * The number format in use for each date field. NULL means fall back
1578
+ * to fNumberFormat in DateFormat.
1579
+ */
1580
+ const SharedNumberFormat **fSharedNumberFormatters;
1575
1581
 
1576
1582
  UBool fHaveDefaultCentury;
1577
1583