pango 2.2.5-x86-mingw32 → 3.0.0-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +19 -3
- data/ext/pango/depend +0 -1
- data/ext/pango/extconf.rb +0 -2
- data/ext/pango/rbpango.c +44 -6
- data/ext/pango/rbpango.h +0 -1
- data/ext/pango/rbpangoattribute.c +2 -2
- data/ext/pango/rbpangocairo.c +4 -4
- data/ext/pango/rbpangocontext.c +2 -2
- data/ext/pango/rbpangofontdescription.c +2 -2
- data/ext/pango/rbpangogravity.c +2 -2
- data/ext/pango/rbpangolanguage.c +8 -0
- data/ext/pango/rbpangolayout.c +15 -4
- data/ext/pango/rbpangomatrix.c +2 -2
- data/ext/pango/rbpangoscript.c +3 -3
- data/lib/2.0/pango.so +0 -0
- data/lib/2.1/pango.so +0 -0
- data/lib/2.2/pango.so +0 -0
- data/test/test-language.rb +5 -0
- data/test/test-layout.rb +7 -1
- data/vendor/local/bin/derb.exe +0 -0
- data/vendor/local/bin/genbrk.exe +0 -0
- data/vendor/local/bin/genccode.exe +0 -0
- data/vendor/local/bin/gencfu.exe +0 -0
- data/vendor/local/bin/gencmn.exe +0 -0
- data/vendor/local/bin/gencnval.exe +0 -0
- data/vendor/local/bin/gendict.exe +0 -0
- data/vendor/local/bin/gennorm2.exe +0 -0
- data/vendor/local/bin/genrb.exe +0 -0
- data/vendor/local/bin/gensprep.exe +0 -0
- data/vendor/local/bin/hb-ot-shape-closure.exe +0 -0
- data/vendor/local/bin/hb-shape.exe +0 -0
- data/vendor/local/bin/hb-view.exe +0 -0
- data/vendor/local/bin/icu-config +6 -6
- data/vendor/local/bin/icuinfo.exe +0 -0
- data/vendor/local/bin/icupkg.exe +0 -0
- data/vendor/local/bin/libharfbuzz-0.dll +0 -0
- data/vendor/local/bin/libpango-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
- data/vendor/local/bin/makeconv.exe +0 -0
- data/vendor/local/bin/pango-querymodules.exe +0 -0
- data/vendor/local/bin/pango-view.exe +0 -0
- data/vendor/local/bin/pkgdata.exe +0 -0
- data/vendor/local/bin/uconv.exe +0 -0
- data/vendor/local/etc/pango/pango.modules +1 -1
- data/vendor/local/include/harfbuzz/hb-buffer.h +26 -1
- data/vendor/local/include/harfbuzz/hb-common.h +7 -0
- data/vendor/local/include/harfbuzz/hb-font.h +7 -6
- data/vendor/local/include/harfbuzz/hb-ft.h +58 -1
- data/vendor/local/include/harfbuzz/hb-glib.h +3 -0
- data/vendor/local/include/harfbuzz/hb-ot-font.h +4 -0
- data/vendor/local/include/harfbuzz/hb-shape.h +0 -3
- data/vendor/local/include/harfbuzz/hb-unicode.h +28 -3
- data/vendor/local/include/harfbuzz/hb-version.h +4 -4
- data/vendor/local/include/layout/LEFontInstance.h +2 -28
- data/vendor/local/include/layout/LETableReference.h +7 -2
- data/vendor/local/include/unicode/calendar.h +32 -2
- data/vendor/local/include/unicode/coll.h +9 -7
- data/vendor/local/include/unicode/datefmt.h +102 -13
- data/vendor/local/include/unicode/dcfmtsym.h +4 -2
- data/vendor/local/include/unicode/decimfmt.h +4 -5
- data/vendor/local/include/unicode/dtfmtsym.h +60 -1
- data/vendor/local/include/unicode/dtptngen.h +21 -7
- data/vendor/local/include/unicode/localpointer.h +49 -1
- data/vendor/local/include/unicode/locid.h +2 -3
- data/vendor/local/include/unicode/measfmt.h +30 -37
- data/vendor/local/include/unicode/measunit.h +65 -152
- data/vendor/local/include/unicode/measure.h +3 -3
- data/vendor/local/include/unicode/numfmt.h +3 -5
- data/vendor/local/include/unicode/platform.h +12 -2
- data/vendor/local/include/unicode/plurrule.h +18 -14
- data/vendor/local/include/unicode/rbnf.h +3 -4
- data/vendor/local/include/unicode/regex.h +42 -26
- data/vendor/local/include/unicode/region.h +9 -9
- data/vendor/local/include/unicode/reldatefmt.h +50 -45
- data/vendor/local/include/unicode/scientificnumberformatter.h +222 -0
- data/vendor/local/include/unicode/smpdtfmt.h +30 -24
- data/vendor/local/include/unicode/tblcoll.h +5 -4
- data/vendor/local/include/unicode/timezone.h +18 -1
- data/vendor/local/include/unicode/ucal.h +2 -2
- data/vendor/local/include/unicode/ucol.h +22 -18
- data/vendor/local/include/unicode/uconfig.h +17 -2
- data/vendor/local/include/unicode/udat.h +164 -56
- data/vendor/local/include/unicode/udatpg.h +9 -7
- data/vendor/local/include/unicode/ufieldpositer.h +121 -0
- data/vendor/local/include/unicode/uidna.h +21 -13
- data/vendor/local/include/unicode/ulistformatter.h +130 -0
- data/vendor/local/include/unicode/ulocdata.h +4 -3
- data/vendor/local/include/unicode/unistr.h +101 -53
- data/vendor/local/include/unicode/unum.h +7 -10
- data/vendor/local/include/unicode/uregex.h +52 -29
- data/vendor/local/include/unicode/urename.h +14 -3
- data/vendor/local/include/unicode/uscript.h +30 -16
- data/vendor/local/include/unicode/uspoof.h +13 -9
- data/vendor/local/include/unicode/utrans.h +5 -7
- data/vendor/local/include/unicode/utypes.h +9 -3
- data/vendor/local/include/unicode/uvernum.h +8 -8
- data/vendor/local/lib/icu/{54.1 → 55.1}/Makefile.inc +5 -5
- data/vendor/local/lib/icu/{54.1 → 55.1}/pkgdata.inc +1 -1
- data/vendor/local/lib/icu/Makefile.inc +5 -5
- data/vendor/local/lib/icu/pkgdata.inc +1 -1
- data/vendor/local/lib/icudt.dll +0 -0
- data/vendor/local/lib/{icudt54.dll → icudt55.dll} +0 -0
- data/vendor/local/lib/icuin.dll +0 -0
- data/vendor/local/lib/icuin55.dll +0 -0
- data/vendor/local/lib/icuio.dll +0 -0
- data/vendor/local/lib/icuio55.dll +0 -0
- data/vendor/local/lib/icule.dll +0 -0
- data/vendor/local/lib/icule55.dll +0 -0
- data/vendor/local/lib/iculx.dll +0 -0
- data/vendor/local/lib/iculx55.dll +0 -0
- data/vendor/local/lib/icutest.dll +0 -0
- data/vendor/local/lib/icutest55.dll +0 -0
- data/vendor/local/lib/icutu.dll +0 -0
- data/vendor/local/lib/icutu55.dll +0 -0
- data/vendor/local/lib/icuuc.dll +0 -0
- data/vendor/local/lib/icuuc55.dll +0 -0
- data/vendor/local/lib/libharfbuzz-icu.a +0 -0
- data/vendor/local/lib/libharfbuzz-icu.la +7 -7
- data/vendor/local/lib/libharfbuzz.dll.a +0 -0
- data/vendor/local/lib/libharfbuzz.la +7 -7
- data/vendor/local/lib/libicudt.dll.a +0 -0
- data/vendor/local/lib/libicuin.dll.a +0 -0
- data/vendor/local/lib/libicuio.dll.a +0 -0
- data/vendor/local/lib/libicule.dll.a +0 -0
- data/vendor/local/lib/libiculx.dll.a +0 -0
- data/vendor/local/lib/libicutest.dll.a +0 -0
- data/vendor/local/lib/libicutu.dll.a +0 -0
- data/vendor/local/lib/libicuuc.dll.a +0 -0
- data/vendor/local/lib/libpango-1.0.dll.a +0 -0
- data/vendor/local/lib/libpango-1.0.la +2 -2
- data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangocairo-1.0.la +1 -1
- data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangoft2-1.0.la +2 -2
- data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangowin32-1.0.la +2 -2
- data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll.a +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.la +2 -2
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll.a +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.la +2 -2
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll.a +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.la +2 -2
- data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll.a +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.la +2 -2
- data/vendor/local/lib/pkgconfig/harfbuzz-icu.pc +1 -1
- data/vendor/local/lib/pkgconfig/harfbuzz.pc +3 -1
- data/vendor/local/lib/pkgconfig/icu-i18n.pc +5 -5
- data/vendor/local/lib/pkgconfig/icu-io.pc +5 -5
- data/vendor/local/lib/pkgconfig/icu-le.pc +5 -5
- data/vendor/local/lib/pkgconfig/icu-lx.pc +5 -5
- data/vendor/local/lib/pkgconfig/icu-uc.pc +5 -5
- data/vendor/local/share/gtk-doc/html/harfbuzz/adding-text-to-the-buffer.html +35 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/annotation-glossary.html +30 -35
- data/vendor/local/share/gtk-doc/html/harfbuzz/api-index-full.html +158 -27
- data/vendor/local/share/gtk-doc/html/harfbuzz/buffers-language-script-and-direction.html +87 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/{ch01.html → ch06.html} +12 -13
- data/vendor/local/share/gtk-doc/html/harfbuzz/customizing-unicode-functions.html +31 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/deprecated-api-index.html +7 -8
- data/vendor/local/share/gtk-doc/html/harfbuzz/fonts-and-faces.html +40 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-Shaping.html +352 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-blob.html +88 -47
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-buffer.html +128 -204
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-common.html +290 -304
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-coretext.html +14 -23
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-deprecated.html +14 -17
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-face.html +40 -51
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-font.html +126 -190
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ft.html +19 -24
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-glib.html +14 -29
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-gobject.html +438 -11
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-graphite2.html +14 -25
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-icu.html +14 -29
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-layout.html +19 -160
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-tag.html +21 -36
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot.html +14 -11
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-set.html +70 -81
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape-plan.html +33 -44
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-unicode.html +290 -323
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-uniscribe.html +14 -23
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-version.html +59 -27
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb.html +16 -13
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz.devhelp2 +415 -104
- data/vendor/local/share/gtk-doc/html/harfbuzz/hello-harfbuzz.html +181 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/index.html +43 -12
- data/vendor/local/share/gtk-doc/html/harfbuzz/object-tree.html +11 -13
- data/vendor/local/share/gtk-doc/html/harfbuzz/plans-and-caching.html +31 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/pt01.html +70 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/pt02.html +107 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/setting-buffer-properties.html +31 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/shaping-and-shape-plans.html +39 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/style.css +9 -6
- data/vendor/local/share/gtk-doc/html/harfbuzz/using-harfbuzzs-native-opentype-implementation.html +31 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/using-your-own-font-functions.html +31 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/what-about-the-other-scripts.html +31 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/what-is-harfbuzz.html +124 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/why-is-it-called-harfbuzz.html +38 -0
- data/vendor/local/share/icu/{54.1 → 55.1}/config/mh-mingw +0 -0
- data/vendor/local/share/icu/{54.1 → 55.1}/install-sh +0 -0
- data/vendor/local/share/icu/{54.1 → 55.1}/license.html +3 -4
- data/vendor/local/share/icu/{54.1 → 55.1}/mkinstalldirs +0 -0
- data/vendor/local/share/man/man1/derb.1 +2 -2
- data/vendor/local/share/man/man1/genbrk.1 +2 -2
- data/vendor/local/share/man/man1/gencfu.1 +1 -1
- data/vendor/local/share/man/man1/gencnval.1 +3 -3
- data/vendor/local/share/man/man1/gendict.1 +2 -2
- data/vendor/local/share/man/man1/genrb.1 +3 -3
- data/vendor/local/share/man/man1/icu-config.1 +2 -2
- data/vendor/local/share/man/man1/makeconv.1 +3 -3
- data/vendor/local/share/man/man1/pkgdata.1 +2 -2
- data/vendor/local/share/man/man1/uconv.1 +2 -2
- data/vendor/local/share/man/man8/genccode.8 +2 -2
- data/vendor/local/share/man/man8/gencmn.8 +3 -3
- data/vendor/local/share/man/man8/gensprep.8 +3 -3
- data/vendor/local/share/man/man8/icupkg.8 +1 -1
- metadata +38 -22
- data/vendor/local/include/unicode/scientificformathelper.h +0 -139
- data/vendor/local/lib/icuin54.dll +0 -0
- data/vendor/local/lib/icuio54.dll +0 -0
- data/vendor/local/lib/icule54.dll +0 -0
- data/vendor/local/lib/iculx54.dll +0 -0
- data/vendor/local/lib/icutest54.dll +0 -0
- data/vendor/local/lib/icutu54.dll +0 -0
- data/vendor/local/lib/icuuc54.dll +0 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape.html +0 -286
- 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
|
-
* @
|
65
|
+
* @stable ICU 53
|
64
66
|
*/
|
65
67
|
typedef enum UDateRelativeUnit {
|
66
68
|
|
67
69
|
/**
|
68
70
|
* Seconds
|
69
|
-
* @
|
71
|
+
* @stable ICU 53
|
70
72
|
*/
|
71
73
|
UDAT_RELATIVE_SECONDS,
|
72
74
|
|
73
75
|
/**
|
74
76
|
* Minutes
|
75
|
-
* @
|
77
|
+
* @stable ICU 53
|
76
78
|
*/
|
77
79
|
UDAT_RELATIVE_MINUTES,
|
78
80
|
|
79
81
|
/**
|
80
82
|
* Hours
|
81
|
-
* @
|
83
|
+
* @stable ICU 53
|
82
84
|
*/
|
83
85
|
UDAT_RELATIVE_HOURS,
|
84
86
|
|
85
87
|
/**
|
86
88
|
* Days
|
87
|
-
* @
|
89
|
+
* @stable ICU 53
|
88
90
|
*/
|
89
91
|
UDAT_RELATIVE_DAYS,
|
90
92
|
|
91
93
|
/**
|
92
94
|
* Weeks
|
93
|
-
* @
|
95
|
+
* @stable ICU 53
|
94
96
|
*/
|
95
97
|
UDAT_RELATIVE_WEEKS,
|
96
98
|
|
97
99
|
/**
|
98
100
|
* Months
|
99
|
-
* @
|
101
|
+
* @stable ICU 53
|
100
102
|
*/
|
101
103
|
UDAT_RELATIVE_MONTHS,
|
102
104
|
|
103
105
|
/**
|
104
106
|
* Years
|
105
|
-
* @
|
107
|
+
* @stable ICU 53
|
106
108
|
*/
|
107
109
|
UDAT_RELATIVE_YEARS,
|
108
110
|
|
109
111
|
/**
|
110
112
|
* Count of items in this enum.
|
111
|
-
* @
|
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
|
-
* @
|
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
|
-
* @
|
128
|
+
* @stable ICU 53
|
127
129
|
*/
|
128
130
|
UDAT_ABSOLUTE_SUNDAY,
|
129
131
|
|
130
132
|
/**
|
131
133
|
* Monday
|
132
|
-
* @
|
134
|
+
* @stable ICU 53
|
133
135
|
*/
|
134
136
|
UDAT_ABSOLUTE_MONDAY,
|
135
137
|
|
136
138
|
/**
|
137
139
|
* Tuesday
|
138
|
-
* @
|
140
|
+
* @stable ICU 53
|
139
141
|
*/
|
140
142
|
UDAT_ABSOLUTE_TUESDAY,
|
141
143
|
|
142
144
|
/**
|
143
145
|
* Wednesday
|
144
|
-
* @
|
146
|
+
* @stable ICU 53
|
145
147
|
*/
|
146
148
|
UDAT_ABSOLUTE_WEDNESDAY,
|
147
149
|
|
148
150
|
/**
|
149
151
|
* Thursday
|
150
|
-
* @
|
152
|
+
* @stable ICU 53
|
151
153
|
*/
|
152
154
|
UDAT_ABSOLUTE_THURSDAY,
|
153
155
|
|
154
156
|
/**
|
155
157
|
* Friday
|
156
|
-
* @
|
158
|
+
* @stable ICU 53
|
157
159
|
*/
|
158
160
|
UDAT_ABSOLUTE_FRIDAY,
|
159
161
|
|
160
162
|
/**
|
161
163
|
* Saturday
|
162
|
-
* @
|
164
|
+
* @stable ICU 53
|
163
165
|
*/
|
164
166
|
UDAT_ABSOLUTE_SATURDAY,
|
165
167
|
|
166
168
|
/**
|
167
169
|
* Day
|
168
|
-
* @
|
170
|
+
* @stable ICU 53
|
169
171
|
*/
|
170
172
|
UDAT_ABSOLUTE_DAY,
|
171
173
|
|
172
174
|
/**
|
173
175
|
* Week
|
174
|
-
* @
|
176
|
+
* @stable ICU 53
|
175
177
|
*/
|
176
178
|
UDAT_ABSOLUTE_WEEK,
|
177
179
|
|
178
180
|
/**
|
179
181
|
* Month
|
180
|
-
* @
|
182
|
+
* @stable ICU 53
|
181
183
|
*/
|
182
184
|
UDAT_ABSOLUTE_MONTH,
|
183
185
|
|
184
186
|
/**
|
185
187
|
* Year
|
186
|
-
* @
|
188
|
+
* @stable ICU 53
|
187
189
|
*/
|
188
190
|
UDAT_ABSOLUTE_YEAR,
|
189
191
|
|
190
192
|
/**
|
191
193
|
* Now
|
192
|
-
* @
|
194
|
+
* @stable ICU 53
|
193
195
|
*/
|
194
196
|
UDAT_ABSOLUTE_NOW,
|
195
197
|
|
196
198
|
/**
|
197
199
|
* Count of items in this enum.
|
198
|
-
* @
|
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
|
-
* @
|
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
|
-
* @
|
214
|
+
* @stable ICU 53
|
213
215
|
*/
|
214
216
|
UDAT_DIRECTION_LAST_2,
|
215
217
|
|
216
218
|
/**
|
217
219
|
* Last
|
218
|
-
* @
|
220
|
+
* @stable ICU 53
|
219
221
|
*/
|
220
222
|
UDAT_DIRECTION_LAST,
|
221
223
|
|
222
224
|
/**
|
223
225
|
* This
|
224
|
-
* @
|
226
|
+
* @stable ICU 53
|
225
227
|
*/
|
226
228
|
UDAT_DIRECTION_THIS,
|
227
229
|
|
228
230
|
/**
|
229
231
|
* Next
|
230
|
-
* @
|
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
|
-
* @
|
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
|
-
* @
|
244
|
+
* @stable ICU 53
|
243
245
|
*/
|
244
246
|
UDAT_DIRECTION_PLAIN,
|
245
247
|
|
246
248
|
/**
|
247
249
|
* Count of items in this enum.
|
248
|
-
* @
|
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
|
-
* @
|
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
|
-
* @
|
338
|
+
* @stable ICU 53
|
337
339
|
*/
|
338
340
|
RelativeDateTimeFormatter(UErrorCode& status);
|
339
341
|
|
340
342
|
/**
|
341
343
|
* Create RelativeDateTimeFormatter with given locale.
|
342
|
-
* @
|
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
|
-
* @
|
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
|
-
* @
|
387
|
+
* @stable ICU 53
|
384
388
|
*/
|
385
389
|
RelativeDateTimeFormatter(const RelativeDateTimeFormatter& other);
|
386
390
|
|
387
391
|
/**
|
388
392
|
* Assignment operator.
|
389
|
-
* @
|
393
|
+
* @stable ICU 53
|
390
394
|
*/
|
391
395
|
RelativeDateTimeFormatter& operator=(
|
392
396
|
const RelativeDateTimeFormatter& other);
|
393
397
|
|
394
398
|
/**
|
395
399
|
* Destructor.
|
396
|
-
* @
|
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
|
-
* @
|
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
|
-
* @
|
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
|
-
* @
|
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
|
-
* @
|
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-
|
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
|
-
* @
|
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
|
-
|
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
|
-
|
1567
|
-
|
1566
|
+
struct NSOverride : public UMemory {
|
1567
|
+
const SharedNumberFormat *snf;
|
1568
1568
|
int32_t hash;
|
1569
1569
|
NSOverride *next;
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1570
|
+
void free();
|
1571
|
+
NSOverride() : snf(NULL), hash(0), next(NULL) {
|
1572
|
+
}
|
1573
|
+
~NSOverride();
|
1574
|
+
};
|
1573
1575
|
|
1574
|
-
|
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
|
|