pango 2.2.0-x86-mingw32 → 2.2.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (407) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +21 -2
  3. data/lib/2.0/pango.so +0 -0
  4. data/vendor/local/bin/derb.exe +0 -0
  5. data/vendor/local/bin/genbrk.exe +0 -0
  6. data/vendor/local/bin/genccode.exe +0 -0
  7. data/vendor/local/bin/gencfu.exe +0 -0
  8. data/vendor/local/bin/gencmn.exe +0 -0
  9. data/vendor/local/bin/gencnval.exe +0 -0
  10. data/vendor/local/bin/gendict.exe +0 -0
  11. data/vendor/local/bin/gennorm2.exe +0 -0
  12. data/vendor/local/bin/genrb.exe +0 -0
  13. data/vendor/local/bin/gensprep.exe +0 -0
  14. data/vendor/local/bin/hb-ot-shape-closure.exe +0 -0
  15. data/vendor/local/bin/hb-shape.exe +0 -0
  16. data/vendor/local/bin/hb-view.exe +0 -0
  17. data/vendor/local/bin/icu-config +820 -0
  18. data/vendor/local/bin/icuinfo.exe +0 -0
  19. data/vendor/local/bin/icupkg.exe +0 -0
  20. data/vendor/local/bin/libharfbuzz-0.dll +0 -0
  21. data/vendor/local/bin/libpango-1.0-0.dll +0 -0
  22. data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
  23. data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
  24. data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
  25. data/vendor/local/bin/libstdc++-6.dll +0 -0
  26. data/vendor/local/bin/makeconv.exe +0 -0
  27. data/vendor/local/bin/pango-querymodules.exe +0 -0
  28. data/vendor/local/bin/pango-view.exe +0 -0
  29. data/vendor/local/bin/pkgdata.exe +0 -0
  30. data/vendor/local/bin/uconv.exe +0 -0
  31. data/vendor/local/etc/pango/pango.modules +3 -3
  32. data/vendor/local/include/harfbuzz/hb-blob.h +3 -4
  33. data/vendor/local/include/harfbuzz/hb-buffer.h +22 -1
  34. data/vendor/local/include/harfbuzz/hb-common.h +23 -18
  35. data/vendor/local/include/harfbuzz/hb-icu.h +52 -0
  36. data/vendor/local/include/harfbuzz/hb-ot-font.h +41 -0
  37. data/vendor/local/include/harfbuzz/hb-ot-layout.h +11 -3
  38. data/vendor/local/include/harfbuzz/hb-ot-shape.h +10 -11
  39. data/vendor/local/include/harfbuzz/hb-ot.h +1 -0
  40. data/vendor/local/include/harfbuzz/hb-version.h +7 -7
  41. data/vendor/local/include/layout/LEFontInstance.h +550 -0
  42. data/vendor/local/include/layout/LEGlyphFilter.h +45 -0
  43. data/vendor/local/include/layout/LEGlyphStorage.h +546 -0
  44. data/vendor/local/include/layout/LEInsertionList.h +177 -0
  45. data/vendor/local/include/layout/LELanguages.h +112 -0
  46. data/vendor/local/include/layout/LEScripts.h +263 -0
  47. data/vendor/local/include/layout/LESwaps.h +100 -0
  48. data/vendor/local/include/layout/LETableReference.h +418 -0
  49. data/vendor/local/include/layout/LETypes.h +728 -0
  50. data/vendor/local/include/layout/LayoutEngine.h +518 -0
  51. data/vendor/local/include/layout/ParagraphLayout.h +747 -0
  52. data/vendor/local/include/layout/RunArrays.h +676 -0
  53. data/vendor/local/include/layout/loengine.h +225 -0
  54. data/vendor/local/include/layout/playout.h +466 -0
  55. data/vendor/local/include/layout/plruns.h +441 -0
  56. data/vendor/local/include/pango-1.0/pango/pango-features.h +2 -2
  57. data/vendor/local/include/pango-1.0/pango/pango-font.h +3 -1
  58. data/vendor/local/include/pango-1.0/pango/pango-item.h +11 -2
  59. data/vendor/local/include/unicode/alphaindex.h +752 -0
  60. data/vendor/local/include/unicode/appendable.h +232 -0
  61. data/vendor/local/include/unicode/basictz.h +214 -0
  62. data/vendor/local/include/unicode/brkiter.h +655 -0
  63. data/vendor/local/include/unicode/bytestream.h +257 -0
  64. data/vendor/local/include/unicode/bytestrie.h +519 -0
  65. data/vendor/local/include/unicode/bytestriebuilder.h +181 -0
  66. data/vendor/local/include/unicode/calendar.h +2519 -0
  67. data/vendor/local/include/unicode/caniter.h +208 -0
  68. data/vendor/local/include/unicode/chariter.h +722 -0
  69. data/vendor/local/include/unicode/choicfmt.h +594 -0
  70. data/vendor/local/include/unicode/coleitr.h +404 -0
  71. data/vendor/local/include/unicode/coll.h +1267 -0
  72. data/vendor/local/include/unicode/compactdecimalformat.h +330 -0
  73. data/vendor/local/include/unicode/curramt.h +130 -0
  74. data/vendor/local/include/unicode/currpinf.h +258 -0
  75. data/vendor/local/include/unicode/currunit.h +110 -0
  76. data/vendor/local/include/unicode/datefmt.h +883 -0
  77. data/vendor/local/include/unicode/dbbi.h +40 -0
  78. data/vendor/local/include/unicode/dcfmtsym.h +482 -0
  79. data/vendor/local/include/unicode/decimfmt.h +2479 -0
  80. data/vendor/local/include/unicode/docmain.h +215 -0
  81. data/vendor/local/include/unicode/dtfmtsym.h +912 -0
  82. data/vendor/local/include/unicode/dtintrv.h +158 -0
  83. data/vendor/local/include/unicode/dtitvfmt.h +985 -0
  84. data/vendor/local/include/unicode/dtitvinf.h +514 -0
  85. data/vendor/local/include/unicode/dtptngen.h +498 -0
  86. data/vendor/local/include/unicode/dtrule.h +250 -0
  87. data/vendor/local/include/unicode/enumset.h +64 -0
  88. data/vendor/local/include/unicode/errorcode.h +137 -0
  89. data/vendor/local/include/unicode/fieldpos.h +291 -0
  90. data/vendor/local/include/unicode/filteredbrk.h +131 -0
  91. data/vendor/local/include/unicode/fmtable.h +760 -0
  92. data/vendor/local/include/unicode/format.h +305 -0
  93. data/vendor/local/include/unicode/fpositer.h +117 -0
  94. data/vendor/local/include/unicode/gender.h +111 -0
  95. data/vendor/local/include/unicode/gregocal.h +777 -0
  96. data/vendor/local/include/unicode/icudataver.h +41 -0
  97. data/vendor/local/include/unicode/icuplug.h +371 -0
  98. data/vendor/local/include/unicode/idna.h +323 -0
  99. data/vendor/local/include/unicode/listformatter.h +167 -0
  100. data/vendor/local/include/unicode/localpointer.h +304 -0
  101. data/vendor/local/include/unicode/locdspnm.h +204 -0
  102. data/vendor/local/include/unicode/locid.h +815 -0
  103. data/vendor/local/include/unicode/measfmt.h +389 -0
  104. data/vendor/local/include/unicode/measunit.h +1443 -0
  105. data/vendor/local/include/unicode/measure.h +159 -0
  106. data/vendor/local/include/unicode/messagepattern.h +943 -0
  107. data/vendor/local/include/unicode/msgfmt.h +1093 -0
  108. data/vendor/local/include/unicode/normalizer2.h +658 -0
  109. data/vendor/local/include/unicode/normlzr.h +797 -0
  110. data/vendor/local/include/unicode/numfmt.h +1187 -0
  111. data/vendor/local/include/unicode/numsys.h +208 -0
  112. data/vendor/local/include/unicode/parseerr.h +92 -0
  113. data/vendor/local/include/unicode/parsepos.h +230 -0
  114. data/vendor/local/include/unicode/platform.h +751 -0
  115. data/vendor/local/include/unicode/plurfmt.h +615 -0
  116. data/vendor/local/include/unicode/plurrule.h +501 -0
  117. data/vendor/local/include/unicode/ptypes.h +126 -0
  118. data/vendor/local/include/unicode/putil.h +181 -0
  119. data/vendor/local/include/unicode/rbbi.h +782 -0
  120. data/vendor/local/include/unicode/rbnf.h +1032 -0
  121. data/vendor/local/include/unicode/rbtz.h +362 -0
  122. data/vendor/local/include/unicode/regex.h +1857 -0
  123. data/vendor/local/include/unicode/region.h +228 -0
  124. data/vendor/local/include/unicode/reldatefmt.h +498 -0
  125. data/vendor/local/include/unicode/rep.h +261 -0
  126. data/vendor/local/include/unicode/resbund.h +490 -0
  127. data/vendor/local/include/unicode/schriter.h +187 -0
  128. data/vendor/local/include/unicode/scientificformathelper.h +139 -0
  129. data/vendor/local/include/unicode/search.h +575 -0
  130. data/vendor/local/include/unicode/selfmt.h +367 -0
  131. data/vendor/local/include/unicode/simpletz.h +928 -0
  132. data/vendor/local/include/unicode/smpdtfmt.h +1592 -0
  133. data/vendor/local/include/unicode/sortkey.h +338 -0
  134. data/vendor/local/include/unicode/std_string.h +37 -0
  135. data/vendor/local/include/unicode/strenum.h +276 -0
  136. data/vendor/local/include/unicode/stringpiece.h +224 -0
  137. data/vendor/local/include/unicode/stringtriebuilder.h +402 -0
  138. data/vendor/local/include/unicode/stsearch.h +504 -0
  139. data/vendor/local/include/unicode/symtable.h +112 -0
  140. data/vendor/local/include/unicode/tblcoll.h +873 -0
  141. data/vendor/local/include/unicode/timezone.h +948 -0
  142. data/vendor/local/include/unicode/tmunit.h +129 -0
  143. data/vendor/local/include/unicode/tmutamt.h +168 -0
  144. data/vendor/local/include/unicode/tmutfmt.h +243 -0
  145. data/vendor/local/include/unicode/translit.h +1342 -0
  146. data/vendor/local/include/unicode/tzfmt.h +1098 -0
  147. data/vendor/local/include/unicode/tznames.h +404 -0
  148. data/vendor/local/include/unicode/tzrule.h +828 -0
  149. data/vendor/local/include/unicode/tztrans.h +195 -0
  150. data/vendor/local/include/unicode/ubidi.h +2186 -0
  151. data/vendor/local/include/unicode/ubrk.h +540 -0
  152. data/vendor/local/include/unicode/ucal.h +1560 -0
  153. data/vendor/local/include/unicode/ucasemap.h +423 -0
  154. data/vendor/local/include/unicode/ucat.h +158 -0
  155. data/vendor/local/include/unicode/uchar.h +3426 -0
  156. data/vendor/local/include/unicode/ucharstrie.h +576 -0
  157. data/vendor/local/include/unicode/ucharstriebuilder.h +185 -0
  158. data/vendor/local/include/unicode/uchriter.h +381 -0
  159. data/vendor/local/include/unicode/uclean.h +258 -0
  160. data/vendor/local/include/unicode/ucnv.h +2036 -0
  161. data/vendor/local/include/unicode/ucnv_cb.h +162 -0
  162. data/vendor/local/include/unicode/ucnv_err.h +463 -0
  163. data/vendor/local/include/unicode/ucnvsel.h +187 -0
  164. data/vendor/local/include/unicode/ucol.h +1474 -0
  165. data/vendor/local/include/unicode/ucoleitr.h +266 -0
  166. data/vendor/local/include/unicode/uconfig.h +430 -0
  167. data/vendor/local/include/unicode/ucsdet.h +413 -0
  168. data/vendor/local/include/unicode/ucurr.h +424 -0
  169. data/vendor/local/include/unicode/udat.h +1536 -0
  170. data/vendor/local/include/unicode/udata.h +430 -0
  171. data/vendor/local/include/unicode/udateintervalformat.h +181 -0
  172. data/vendor/local/include/unicode/udatpg.h +588 -0
  173. data/vendor/local/include/unicode/udisplaycontext.h +150 -0
  174. data/vendor/local/include/unicode/uenum.h +206 -0
  175. data/vendor/local/include/unicode/uformattable.h +280 -0
  176. data/vendor/local/include/unicode/ugender.h +82 -0
  177. data/vendor/local/include/unicode/uidna.h +762 -0
  178. data/vendor/local/include/unicode/uiter.h +707 -0
  179. data/vendor/local/include/unicode/uldnames.h +302 -0
  180. data/vendor/local/include/unicode/uloc.h +1256 -0
  181. data/vendor/local/include/unicode/ulocdata.h +277 -0
  182. data/vendor/local/include/unicode/umachine.h +356 -0
  183. data/vendor/local/include/unicode/umisc.h +60 -0
  184. data/vendor/local/include/unicode/umsg.h +623 -0
  185. data/vendor/local/include/unicode/unifilt.h +120 -0
  186. data/vendor/local/include/unicode/unifunct.h +125 -0
  187. data/vendor/local/include/unicode/unimatch.h +163 -0
  188. data/vendor/local/include/unicode/unirepl.h +97 -0
  189. data/vendor/local/include/unicode/uniset.h +1691 -0
  190. data/vendor/local/include/unicode/unistr.h +4470 -0
  191. data/vendor/local/include/unicode/unorm.h +561 -0
  192. data/vendor/local/include/unicode/unorm2.h +528 -0
  193. data/vendor/local/include/unicode/unum.h +1328 -0
  194. data/vendor/local/include/unicode/unumsys.h +170 -0
  195. data/vendor/local/include/unicode/uobject.h +320 -0
  196. data/vendor/local/include/unicode/upluralrules.h +145 -0
  197. data/vendor/local/include/unicode/uregex.h +1591 -0
  198. data/vendor/local/include/unicode/uregion.h +248 -0
  199. data/vendor/local/include/unicode/urename.h +1784 -0
  200. data/vendor/local/include/unicode/urep.h +155 -0
  201. data/vendor/local/include/unicode/ures.h +887 -0
  202. data/vendor/local/include/unicode/uscript.h +642 -0
  203. data/vendor/local/include/unicode/usearch.h +885 -0
  204. data/vendor/local/include/unicode/uset.h +1126 -0
  205. data/vendor/local/include/unicode/usetiter.h +318 -0
  206. data/vendor/local/include/unicode/ushape.h +474 -0
  207. data/vendor/local/include/unicode/uspoof.h +1064 -0
  208. data/vendor/local/include/unicode/usprep.h +269 -0
  209. data/vendor/local/include/unicode/ustdio.h +1018 -0
  210. data/vendor/local/include/unicode/ustream.h +68 -0
  211. data/vendor/local/include/unicode/ustring.h +1700 -0
  212. data/vendor/local/include/unicode/ustringtrie.h +95 -0
  213. data/vendor/local/include/unicode/utext.h +1600 -0
  214. data/vendor/local/include/unicode/utf.h +223 -0
  215. data/vendor/local/include/unicode/utf16.h +623 -0
  216. data/vendor/local/include/unicode/utf32.h +23 -0
  217. data/vendor/local/include/unicode/utf8.h +824 -0
  218. data/vendor/local/include/unicode/utf_old.h +1169 -0
  219. data/vendor/local/include/unicode/utmscale.h +481 -0
  220. data/vendor/local/include/unicode/utrace.h +359 -0
  221. data/vendor/local/include/unicode/utrans.h +658 -0
  222. data/vendor/local/include/unicode/utypes.h +723 -0
  223. data/vendor/local/include/unicode/uvernum.h +170 -0
  224. data/vendor/local/include/unicode/uversion.h +193 -0
  225. data/vendor/local/include/unicode/vtzone.h +455 -0
  226. data/vendor/local/lib/girepository-1.0/Pango-1.0.typelib +0 -0
  227. data/vendor/local/lib/girepository-1.0/PangoCairo-1.0.typelib +0 -0
  228. data/vendor/local/lib/girepository-1.0/PangoFT2-1.0.typelib +0 -0
  229. data/vendor/local/lib/icu/54.1/Makefile.inc +293 -0
  230. data/vendor/local/lib/icu/54.1/pkgdata.inc +17 -0
  231. data/vendor/local/lib/icu/Makefile.inc +293 -0
  232. data/vendor/local/lib/icu/pkgdata.inc +17 -0
  233. data/vendor/local/lib/icudt.dll +0 -0
  234. data/vendor/local/lib/icudt54.dll +0 -0
  235. data/vendor/local/lib/icuin.dll +0 -0
  236. data/vendor/local/lib/icuin54.dll +0 -0
  237. data/vendor/local/lib/icuio.dll +0 -0
  238. data/vendor/local/lib/icuio54.dll +0 -0
  239. data/vendor/local/lib/icule.dll +0 -0
  240. data/vendor/local/lib/icule54.dll +0 -0
  241. data/vendor/local/lib/iculx.dll +0 -0
  242. data/vendor/local/lib/iculx54.dll +0 -0
  243. data/vendor/local/lib/icutest.dll +0 -0
  244. data/vendor/local/lib/icutest54.dll +0 -0
  245. data/vendor/local/lib/icutu.dll +0 -0
  246. data/vendor/local/lib/icutu54.dll +0 -0
  247. data/vendor/local/lib/icuuc.dll +0 -0
  248. data/vendor/local/lib/icuuc54.dll +0 -0
  249. data/vendor/local/lib/libharfbuzz-icu.a +0 -0
  250. data/vendor/local/lib/libharfbuzz-icu.la +41 -0
  251. data/vendor/local/lib/libharfbuzz.dll.a +0 -0
  252. data/vendor/local/lib/libharfbuzz.la +3 -3
  253. data/vendor/local/lib/libicudt.dll.a +0 -0
  254. data/vendor/local/lib/libicuin.dll.a +0 -0
  255. data/vendor/local/lib/libicuio.dll.a +0 -0
  256. data/vendor/local/lib/libicule.dll.a +0 -0
  257. data/vendor/local/lib/libiculx.dll.a +0 -0
  258. data/vendor/local/lib/libicutest.dll.a +0 -0
  259. data/vendor/local/lib/libicutu.dll.a +0 -0
  260. data/vendor/local/lib/libicuuc.dll.a +0 -0
  261. data/vendor/local/lib/libpango-1.0.dll.a +0 -0
  262. data/vendor/local/lib/libpango-1.0.la +2 -2
  263. data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
  264. data/vendor/local/lib/libpangocairo-1.0.la +2 -2
  265. data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
  266. data/vendor/local/lib/libpangoft2-1.0.la +2 -2
  267. data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
  268. data/vendor/local/lib/libpangowin32-1.0.la +2 -2
  269. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll +0 -0
  270. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll.a +0 -0
  271. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.la +1 -1
  272. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll +0 -0
  273. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll.a +0 -0
  274. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.la +1 -1
  275. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll +0 -0
  276. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll.a +0 -0
  277. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.la +1 -1
  278. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll +0 -0
  279. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll.a +0 -0
  280. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.la +1 -1
  281. data/vendor/local/lib/pkgconfig/harfbuzz-icu.pc +13 -0
  282. data/vendor/local/lib/pkgconfig/harfbuzz.pc +1 -1
  283. data/vendor/local/lib/pkgconfig/icu-i18n.pc +38 -0
  284. data/vendor/local/lib/pkgconfig/icu-io.pc +38 -0
  285. data/vendor/local/lib/pkgconfig/icu-le.pc +38 -0
  286. data/vendor/local/lib/pkgconfig/icu-lx.pc +38 -0
  287. data/vendor/local/lib/pkgconfig/icu-uc.pc +38 -0
  288. data/vendor/local/lib/pkgconfig/pango.pc +1 -1
  289. data/vendor/local/lib/pkgconfig/pangocairo.pc +1 -1
  290. data/vendor/local/lib/pkgconfig/pangoft2.pc +1 -1
  291. data/vendor/local/lib/pkgconfig/pangowin32.pc +1 -1
  292. data/vendor/local/share/gir-1.0/Pango-1.0.gir +3009 -462
  293. data/vendor/local/share/gir-1.0/PangoCairo-1.0.gir +64 -22
  294. data/vendor/local/share/gir-1.0/PangoFT2-1.0.gir +4 -2
  295. data/vendor/local/share/gtk-doc/html/harfbuzz/annotation-glossary.html +30 -26
  296. data/vendor/local/share/gtk-doc/html/harfbuzz/api-index-full.html +343 -313
  297. data/vendor/local/share/gtk-doc/html/harfbuzz/ch01.html +5 -5
  298. data/vendor/local/share/gtk-doc/html/harfbuzz/deprecated-api-index.html +6 -8
  299. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-blob.html +442 -247
  300. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-buffer.html +1389 -654
  301. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-common.html +954 -698
  302. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-coretext.html +95 -18
  303. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-deprecated.html +36 -27
  304. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-face.html +477 -191
  305. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-font.html +1951 -1039
  306. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ft.html +123 -65
  307. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-glib.html +66 -21
  308. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-gobject.html +11 -13
  309. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-graphite2.html +67 -23
  310. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-icu.html +66 -21
  311. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-layout.html +574 -347
  312. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-tag.html +104 -37
  313. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot.html +10 -27
  314. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-set.html +744 -318
  315. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape-plan.html +294 -153
  316. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape.html +196 -104
  317. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-unicode.html +1100 -757
  318. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-uniscribe.html +51 -18
  319. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-version.html +110 -84
  320. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb.html +11 -13
  321. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz.devhelp2 +289 -503
  322. data/vendor/local/share/gtk-doc/html/harfbuzz/index.html +3 -3
  323. data/vendor/local/share/gtk-doc/html/harfbuzz/index.sgml +161 -316
  324. data/vendor/local/share/gtk-doc/html/harfbuzz/object-tree.html +31 -4
  325. data/vendor/local/share/gtk-doc/html/harfbuzz/style.css +260 -105
  326. data/vendor/local/share/gtk-doc/html/pango/PangoEngineLang.html +143 -105
  327. data/vendor/local/share/gtk-doc/html/pango/PangoEngineShape.html +150 -108
  328. data/vendor/local/share/gtk-doc/html/pango/PangoFcDecoder.html +163 -112
  329. data/vendor/local/share/gtk-doc/html/pango/PangoFcFont.html +348 -229
  330. data/vendor/local/share/gtk-doc/html/pango/PangoFcFontMap.html +746 -514
  331. data/vendor/local/share/gtk-doc/html/pango/PangoMarkupFormat.html +9 -9
  332. data/vendor/local/share/gtk-doc/html/pango/PangoRenderer.html +853 -623
  333. data/vendor/local/share/gtk-doc/html/pango/annotation-glossary.html +29 -13
  334. data/vendor/local/share/gtk-doc/html/pango/api-index-1-10.html +31 -33
  335. data/vendor/local/share/gtk-doc/html/pango/api-index-1-12.html +10 -12
  336. data/vendor/local/share/gtk-doc/html/pango/api-index-1-14.html +12 -14
  337. data/vendor/local/share/gtk-doc/html/pango/api-index-1-16.html +53 -55
  338. data/vendor/local/share/gtk-doc/html/pango/api-index-1-18.html +28 -30
  339. data/vendor/local/share/gtk-doc/html/pango/api-index-1-2.html +29 -31
  340. data/vendor/local/share/gtk-doc/html/pango/api-index-1-20.html +17 -19
  341. data/vendor/local/share/gtk-doc/html/pango/api-index-1-22.html +28 -30
  342. data/vendor/local/share/gtk-doc/html/pango/api-index-1-24.html +17 -19
  343. data/vendor/local/share/gtk-doc/html/pango/api-index-1-26.html +9 -11
  344. data/vendor/local/share/gtk-doc/html/pango/api-index-1-30.html +6 -6
  345. data/vendor/local/share/gtk-doc/html/pango/api-index-1-31-0.html +6 -6
  346. data/vendor/local/share/gtk-doc/html/pango/api-index-1-32-4.html +11 -13
  347. data/vendor/local/share/gtk-doc/html/pango/api-index-1-32.html +7 -9
  348. data/vendor/local/share/gtk-doc/html/pango/api-index-1-34.html +5 -5
  349. data/vendor/local/share/gtk-doc/html/pango/api-index-1-4.html +49 -51
  350. data/vendor/local/share/gtk-doc/html/pango/api-index-1-6.html +36 -38
  351. data/vendor/local/share/gtk-doc/html/pango/api-index-1-8.html +37 -39
  352. data/vendor/local/share/gtk-doc/html/pango/api-index-deprecated.html +68 -70
  353. data/vendor/local/share/gtk-doc/html/pango/api-index-full.html +568 -570
  354. data/vendor/local/share/gtk-doc/html/pango/index.html +3 -3
  355. data/vendor/local/share/gtk-doc/html/pango/index.sgml +229 -399
  356. data/vendor/local/share/gtk-doc/html/pango/lowlevel.html +4 -4
  357. data/vendor/local/share/gtk-doc/html/pango/pango-Bidirectional-Text.html +345 -259
  358. data/vendor/local/share/gtk-doc/html/pango/pango-Cairo-Rendering.html +979 -664
  359. data/vendor/local/share/gtk-doc/html/pango/pango-CoreText-Fonts.html +70 -43
  360. data/vendor/local/share/gtk-doc/html/pango/pango-Coverage-Maps.html +349 -229
  361. data/vendor/local/share/gtk-doc/html/pango/pango-Engines.html +236 -153
  362. data/vendor/local/share/gtk-doc/html/pango/pango-Fonts.html +3100 -2159
  363. data/vendor/local/share/gtk-doc/html/pango/pango-FreeType-Fonts-and-Rendering.html +659 -472
  364. data/vendor/local/share/gtk-doc/html/pango/pango-Glyph-Storage.html +1952 -1384
  365. data/vendor/local/share/gtk-doc/html/pango/pango-Layout-Objects.html +3050 -2135
  366. data/vendor/local/share/gtk-doc/html/pango/pango-Miscellaneous-Utilities.html +676 -463
  367. data/vendor/local/share/gtk-doc/html/pango/pango-Modules.html +223 -146
  368. data/vendor/local/share/gtk-doc/html/pango/pango-OpenType-Font-Handling.html +1589 -1199
  369. data/vendor/local/share/gtk-doc/html/pango/pango-Scripts-and-Languages.html +1072 -842
  370. data/vendor/local/share/gtk-doc/html/pango/pango-Tab-Stops.html +406 -276
  371. data/vendor/local/share/gtk-doc/html/pango/pango-Text-Attributes.html +2541 -1792
  372. data/vendor/local/share/gtk-doc/html/pango/pango-Text-Processing.html +1479 -1033
  373. data/vendor/local/share/gtk-doc/html/pango/pango-Version-Checking.html +214 -154
  374. data/vendor/local/share/gtk-doc/html/pango/pango-Vertical-Text.html +374 -291
  375. data/vendor/local/share/gtk-doc/html/pango/pango-Win32-Fonts-and-Rendering.html +733 -498
  376. data/vendor/local/share/gtk-doc/html/pango/pango-Xft-Fonts-and-Rendering.html +893 -617
  377. data/vendor/local/share/gtk-doc/html/pango/pango-hierarchy.html +59 -59
  378. data/vendor/local/share/gtk-doc/html/pango/pango-querymodules.html +5 -5
  379. data/vendor/local/share/gtk-doc/html/pango/pango.devhelp2 +578 -782
  380. data/vendor/local/share/gtk-doc/html/pango/pango.html +4 -4
  381. data/vendor/local/share/gtk-doc/html/pango/rendering.html +4 -4
  382. data/vendor/local/share/gtk-doc/html/pango/style.css +260 -105
  383. data/vendor/local/share/gtk-doc/html/pango/tools.html +4 -4
  384. data/vendor/local/share/icu/54.1/config/mh-mingw +158 -0
  385. data/vendor/local/share/icu/54.1/install-sh +251 -0
  386. data/vendor/local/share/icu/54.1/license.html +385 -0
  387. data/vendor/local/share/icu/54.1/mkinstalldirs +43 -0
  388. data/vendor/local/share/license/harfbuzz/AUTHORS +1 -0
  389. data/vendor/local/share/man/man1/derb.1 +196 -0
  390. data/vendor/local/share/man/man1/genbrk.1 +112 -0
  391. data/vendor/local/share/man/man1/gencfu.1 +91 -0
  392. data/vendor/local/share/man/man1/gencnval.1 +91 -0
  393. data/vendor/local/share/man/man1/gendict.1 +131 -0
  394. data/vendor/local/share/man/man1/genrb.1 +146 -0
  395. data/vendor/local/share/man/man1/icu-config.1 +288 -0
  396. data/vendor/local/share/man/man1/makeconv.1 +112 -0
  397. data/vendor/local/share/man/man1/pango-querymodules.1 +2 -2
  398. data/vendor/local/share/man/man1/pango-view.1 +1 -118
  399. data/vendor/local/share/man/man1/pkgdata.1 +258 -0
  400. data/vendor/local/share/man/man1/uconv.1 +443 -0
  401. data/vendor/local/share/man/man8/genccode.8 +106 -0
  402. data/vendor/local/share/man/man8/gencmn.8 +129 -0
  403. data/vendor/local/share/man/man8/gensprep.8 +102 -0
  404. data/vendor/local/share/man/man8/icupkg.8 +204 -0
  405. metadata +266 -14
  406. data/lib/1.9/pango.so +0 -0
  407. data/lib/2.1/pango.so +0 -0
@@ -0,0 +1,367 @@
1
+ /********************************************************************
2
+ * COPYRIGHT:
3
+ * Copyright (c) 1997-2011, International Business Machines Corporation and
4
+ * others. All Rights Reserved.
5
+ * Copyright (C) 2010 , Yahoo! Inc.
6
+ ********************************************************************
7
+ *
8
+ * File SELFMT.H
9
+ *
10
+ * Modification History:
11
+ *
12
+ * Date Name Description
13
+ * 11/11/09 kirtig Finished first cut of implementation.
14
+ ********************************************************************/
15
+
16
+ #ifndef SELFMT
17
+ #define SELFMT
18
+
19
+ #include "unicode/messagepattern.h"
20
+ #include "unicode/numfmt.h"
21
+ #include "unicode/utypes.h"
22
+
23
+ /**
24
+ * \file
25
+ * \brief C++ API: SelectFormat object
26
+ */
27
+
28
+ #if !UCONFIG_NO_FORMATTING
29
+
30
+ U_NAMESPACE_BEGIN
31
+
32
+ class MessageFormat;
33
+
34
+ /**
35
+ * <p><code>SelectFormat</code> supports the creation of internationalized
36
+ * messages by selecting phrases based on keywords. The pattern specifies
37
+ * how to map keywords to phrases and provides a default phrase. The
38
+ * object provided to the format method is a string that's matched
39
+ * against the keywords. If there is a match, the corresponding phrase
40
+ * is selected; otherwise, the default phrase is used.</p>
41
+ *
42
+ * <h4>Using <code>SelectFormat</code> for Gender Agreement</h4>
43
+ *
44
+ * <p>Note: Typically, select formatting is done via <code>MessageFormat</code>
45
+ * with a <code>select</code> argument type,
46
+ * rather than using a stand-alone <code>SelectFormat</code>.</p>
47
+ *
48
+ * <p>The main use case for the select format is gender based inflection.
49
+ * When names or nouns are inserted into sentences, their gender can affect pronouns,
50
+ * verb forms, articles, and adjectives. Special care needs to be
51
+ * taken for the case where the gender cannot be determined.
52
+ * The impact varies between languages:</p>
53
+ * \htmlonly
54
+ * <ul>
55
+ * <li>English has three genders, and unknown gender is handled as a special
56
+ * case. Names use the gender of the named person (if known), nouns referring
57
+ * to people use natural gender, and inanimate objects are usually neutral.
58
+ * The gender only affects pronouns: "he", "she", "it", "they".
59
+ *
60
+ * <li>German differs from English in that the gender of nouns is rather
61
+ * arbitrary, even for nouns referring to people ("M&#x00E4;dchen", girl, is neutral).
62
+ * The gender affects pronouns ("er", "sie", "es"), articles ("der", "die",
63
+ * "das"), and adjective forms ("guter Mann", "gute Frau", "gutes M&#x00E4;dchen").
64
+ *
65
+ * <li>French has only two genders; as in German the gender of nouns
66
+ * is rather arbitrary - for sun and moon, the genders
67
+ * are the opposite of those in German. The gender affects
68
+ * pronouns ("il", "elle"), articles ("le", "la"),
69
+ * adjective forms ("bon", "bonne"), and sometimes
70
+ * verb forms ("all&#x00E9;", "all&#x00E9;e").
71
+ *
72
+ * <li>Polish distinguishes five genders (or noun classes),
73
+ * human masculine, animate non-human masculine, inanimate masculine,
74
+ * feminine, and neuter.
75
+ * </ul>
76
+ * \endhtmlonly
77
+ * <p>Some other languages have noun classes that are not related to gender,
78
+ * but similar in grammatical use.
79
+ * Some African languages have around 20 noun classes.</p>
80
+ *
81
+ * <p><b>Note:</b>For the gender of a <i>person</i> in a given sentence,
82
+ * we usually need to distinguish only between female, male and other/unknown.</p>
83
+ *
84
+ * <p>To enable localizers to create sentence patterns that take their
85
+ * language's gender dependencies into consideration, software has to provide
86
+ * information about the gender associated with a noun or name to
87
+ * <code>MessageFormat</code>.
88
+ * Two main cases can be distinguished:</p>
89
+ *
90
+ * <ul>
91
+ * <li>For people, natural gender information should be maintained for each person.
92
+ * Keywords like "male", "female", "mixed" (for groups of people)
93
+ * and "unknown" could be used.
94
+ *
95
+ * <li>For nouns, grammatical gender information should be maintained for
96
+ * each noun and per language, e.g., in resource bundles.
97
+ * The keywords "masculine", "feminine", and "neuter" are commonly used,
98
+ * but some languages may require other keywords.
99
+ * </ul>
100
+ *
101
+ * <p>The resulting keyword is provided to <code>MessageFormat</code> as a
102
+ * parameter separate from the name or noun it's associated with. For example,
103
+ * to generate a message such as "Jean went to Paris", three separate arguments
104
+ * would be provided: The name of the person as argument 0, the gender of
105
+ * the person as argument 1, and the name of the city as argument 2.
106
+ * The sentence pattern for English, where the gender of the person has
107
+ * no impact on this simple sentence, would not refer to argument 1 at all:</p>
108
+ *
109
+ * <pre>{0} went to {2}.</pre>
110
+ *
111
+ * <p><b>Note:</b> The entire sentence should be included (and partially repeated)
112
+ * inside each phrase. Otherwise translators would have to be trained on how to
113
+ * move bits of the sentence in and out of the select argument of a message.
114
+ * (The examples below do not follow this recommendation!)</p>
115
+ *
116
+ * <p>The sentence pattern for French, where the gender of the person affects
117
+ * the form of the participle, uses a select format based on argument 1:</p>
118
+ *
119
+ * \htmlonly<pre>{0} est {1, select, female {all&#x00E9;e} other {all&#x00E9;}} &#x00E0; {2}.</pre>\endhtmlonly
120
+ *
121
+ * <p>Patterns can be nested, so that it's possible to handle interactions of
122
+ * number and gender where necessary. For example, if the above sentence should
123
+ * allow for the names of several people to be inserted, the following sentence
124
+ * pattern can be used (with argument 0 the list of people's names,
125
+ * argument 1 the number of people, argument 2 their combined gender, and
126
+ * argument 3 the city name):</p>
127
+ *
128
+ * \htmlonly
129
+ * <pre>{0} {1, plural,
130
+ * one {est {2, select, female {all&#x00E9;e} other {all&#x00E9;}}}
131
+ * other {sont {2, select, female {all&#x00E9;es} other {all&#x00E9;s}}}
132
+ * }&#x00E0; {3}.</pre>
133
+ * \endhtmlonly
134
+ *
135
+ * <h4>Patterns and Their Interpretation</h4>
136
+ *
137
+ * <p>The <code>SelectFormat</code> pattern string defines the phrase output
138
+ * for each user-defined keyword.
139
+ * The pattern is a sequence of (keyword, message) pairs.
140
+ * A keyword is a "pattern identifier": [^[[:Pattern_Syntax:][:Pattern_White_Space:]]]+</p>
141
+ *
142
+ * <p>Each message is a MessageFormat pattern string enclosed in {curly braces}.</p>
143
+ *
144
+ * <p>You always have to define a phrase for the default keyword
145
+ * <code>other</code>; this phrase is returned when the keyword
146
+ * provided to
147
+ * the <code>format</code> method matches no other keyword.
148
+ * If a pattern does not provide a phrase for <code>other</code>, the method
149
+ * it's provided to returns the error <code>U_DEFAULT_KEYWORD_MISSING</code>.
150
+ * <br>
151
+ * Pattern_White_Space between keywords and messages is ignored.
152
+ * Pattern_White_Space within a message is preserved and output.</p>
153
+ *
154
+ * <p><pre>Example:
155
+ * \htmlonly
156
+ *
157
+ * UErrorCode status = U_ZERO_ERROR;
158
+ * MessageFormat *msgFmt = new MessageFormat(UnicodeString("{0} est {1, select, female {all&#x00E9;e} other {all&#x00E9;}} &#x00E0; Paris."), Locale("fr"), status);
159
+ * if (U_FAILURE(status)) {
160
+ * return;
161
+ * }
162
+ * FieldPosition ignore(FieldPosition::DONT_CARE);
163
+ * UnicodeString result;
164
+ *
165
+ * char* str1= "Kirti,female";
166
+ * Formattable args1[] = {"Kirti","female"};
167
+ * msgFmt->format(args1, 2, result, ignore, status);
168
+ * cout << "Input is " << str1 << " and result is: " << result << endl;
169
+ * delete msgFmt;
170
+ *
171
+ * \endhtmlonly
172
+ * </pre>
173
+ * </p>
174
+ *
175
+ * Produces the output:<br>
176
+ * \htmlonly
177
+ * <code>Kirti est all&#x00E9;e &#x00E0; Paris.</code>
178
+ * \endhtmlonly
179
+ *
180
+ * @stable ICU 4.4
181
+ */
182
+
183
+ class U_I18N_API SelectFormat : public Format {
184
+ public:
185
+
186
+ /**
187
+ * Creates a new <code>SelectFormat</code> for a given pattern string.
188
+ * @param pattern the pattern for this <code>SelectFormat</code>.
189
+ * errors are returned to status if the pattern is invalid.
190
+ * @param status output param set to success/failure code on exit, which
191
+ * must not indicate a failure before the function call.
192
+ * @stable ICU 4.4
193
+ */
194
+ SelectFormat(const UnicodeString& pattern, UErrorCode& status);
195
+
196
+ /**
197
+ * copy constructor.
198
+ * @stable ICU 4.4
199
+ */
200
+ SelectFormat(const SelectFormat& other);
201
+
202
+ /**
203
+ * Destructor.
204
+ * @stable ICU 4.4
205
+ */
206
+ virtual ~SelectFormat();
207
+
208
+ /**
209
+ * Sets the pattern used by this select format.
210
+ * for the keyword rules.
211
+ * Patterns and their interpretation are specified in the class description.
212
+ *
213
+ * @param pattern the pattern for this select format
214
+ * errors are returned to status if the pattern is invalid.
215
+ * @param status output param set to success/failure code on exit, which
216
+ * must not indicate a failure before the function call.
217
+ * @stable ICU 4.4
218
+ */
219
+ void applyPattern(const UnicodeString& pattern, UErrorCode& status);
220
+
221
+
222
+ using Format::format;
223
+
224
+ /**
225
+ * Selects the phrase for the given keyword
226
+ *
227
+ * @param keyword The keyword that is used to select an alternative.
228
+ * @param appendTo output parameter to receive result.
229
+ * result is appended to existing contents.
230
+ * @param pos On input: an alignment field, if desired.
231
+ * On output: the offsets of the alignment field.
232
+ * @param status output param set to success/failure code on exit, which
233
+ * must not indicate a failure before the function call.
234
+ * @return Reference to 'appendTo' parameter.
235
+ * @stable ICU 4.4
236
+ */
237
+ UnicodeString& format(const UnicodeString& keyword,
238
+ UnicodeString& appendTo,
239
+ FieldPosition& pos,
240
+ UErrorCode& status) const;
241
+
242
+ /**
243
+ * Assignment operator
244
+ *
245
+ * @param other the SelectFormat object to copy from.
246
+ * @stable ICU 4.4
247
+ */
248
+ SelectFormat& operator=(const SelectFormat& other);
249
+
250
+ /**
251
+ * Return true if another object is semantically equal to this one.
252
+ *
253
+ * @param other the SelectFormat object to be compared with.
254
+ * @return true if other is semantically equal to this.
255
+ * @stable ICU 4.4
256
+ */
257
+ virtual UBool operator==(const Format& other) const;
258
+
259
+ /**
260
+ * Return true if another object is semantically unequal to this one.
261
+ *
262
+ * @param other the SelectFormat object to be compared with.
263
+ * @return true if other is semantically unequal to this.
264
+ * @stable ICU 4.4
265
+ */
266
+ virtual UBool operator!=(const Format& other) const;
267
+
268
+ /**
269
+ * Clones this Format object polymorphically. The caller owns the
270
+ * result and should delete it when done.
271
+ * @stable ICU 4.4
272
+ */
273
+ virtual Format* clone(void) const;
274
+
275
+ /**
276
+ * Format an object to produce a string.
277
+ * This method handles keyword strings.
278
+ * If the Formattable object is not a <code>UnicodeString</code>,
279
+ * then it returns a failing UErrorCode.
280
+ *
281
+ * @param obj A keyword string that is used to select an alternative.
282
+ * @param appendTo output parameter to receive result.
283
+ * Result is appended to existing contents.
284
+ * @param pos On input: an alignment field, if desired.
285
+ * On output: the offsets of the alignment field.
286
+ * @param status output param filled with success/failure status.
287
+ * @return Reference to 'appendTo' parameter.
288
+ * @stable ICU 4.4
289
+ */
290
+ UnicodeString& format(const Formattable& obj,
291
+ UnicodeString& appendTo,
292
+ FieldPosition& pos,
293
+ UErrorCode& status) const;
294
+
295
+ /**
296
+ * Returns the pattern from applyPattern() or constructor.
297
+ *
298
+ * @param appendTo output parameter to receive result.
299
+ * Result is appended to existing contents.
300
+ * @return the UnicodeString with inserted pattern.
301
+ * @stable ICU 4.4
302
+ */
303
+ UnicodeString& toPattern(UnicodeString& appendTo);
304
+
305
+ /**
306
+ * This method is not yet supported by <code>SelectFormat</code>.
307
+ * <P>
308
+ * Before calling, set parse_pos.index to the offset you want to start
309
+ * parsing at in the source. After calling, parse_pos.index is the end of
310
+ * the text you parsed. If error occurs, index is unchanged.
311
+ * <P>
312
+ * When parsing, leading whitespace is discarded (with a successful parse),
313
+ * while trailing whitespace is left as is.
314
+ * <P>
315
+ * See Format::parseObject() for more.
316
+ *
317
+ * @param source The string to be parsed into an object.
318
+ * @param result Formattable to be set to the parse result.
319
+ * If parse fails, return contents are undefined.
320
+ * @param parse_pos The position to start parsing at. Upon return
321
+ * this param is set to the position after the
322
+ * last character successfully parsed. If the
323
+ * source is not parsed successfully, this param
324
+ * will remain unchanged.
325
+ * @stable ICU 4.4
326
+ */
327
+ virtual void parseObject(const UnicodeString& source,
328
+ Formattable& result,
329
+ ParsePosition& parse_pos) const;
330
+
331
+ /**
332
+ * ICU "poor man's RTTI", returns a UClassID for this class.
333
+ * @stable ICU 4.4
334
+ */
335
+ static UClassID U_EXPORT2 getStaticClassID(void);
336
+
337
+ /**
338
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
339
+ * @stable ICU 4.4
340
+ */
341
+ virtual UClassID getDynamicClassID() const;
342
+
343
+ private:
344
+ friend class MessageFormat;
345
+
346
+ SelectFormat(); // default constructor not implemented.
347
+
348
+ /**
349
+ * Finds the SelectFormat sub-message for the given keyword, or the "other" sub-message.
350
+ * @param pattern A MessagePattern.
351
+ * @param partIndex the index of the first SelectFormat argument style part.
352
+ * @param keyword a keyword to be matched to one of the SelectFormat argument's keywords.
353
+ * @param ec Error code.
354
+ * @return the sub-message start part index.
355
+ */
356
+ static int32_t findSubMessage(const MessagePattern& pattern, int32_t partIndex,
357
+ const UnicodeString& keyword, UErrorCode& ec);
358
+
359
+ MessagePattern msgPattern;
360
+ };
361
+
362
+ U_NAMESPACE_END
363
+
364
+ #endif /* #if !UCONFIG_NO_FORMATTING */
365
+
366
+ #endif // _SELFMT
367
+ //eof
@@ -0,0 +1,928 @@
1
+ /*
2
+ ********************************************************************************
3
+ * Copyright (C) 1997-2013, International Business Machines *
4
+ * Corporation and others. All Rights Reserved. *
5
+ ********************************************************************************
6
+ *
7
+ * File SIMPLETZ.H
8
+ *
9
+ * Modification History:
10
+ *
11
+ * Date Name Description
12
+ * 04/21/97 aliu Overhauled header.
13
+ * 08/10/98 stephen JDK 1.2 sync
14
+ * Added setStartRule() / setEndRule() overloads
15
+ * Added hasSameRules()
16
+ * 09/02/98 stephen Added getOffset(monthLen)
17
+ * Changed getOffset() to take UErrorCode
18
+ * 07/09/99 stephen Removed millisPerHour (unused, for HP compiler)
19
+ * 12/02/99 aliu Added TimeMode and constructor and setStart/EndRule
20
+ * methods that take TimeMode. Added to docs.
21
+ ********************************************************************************
22
+ */
23
+
24
+ #ifndef SIMPLETZ_H
25
+ #define SIMPLETZ_H
26
+
27
+ #include "unicode/utypes.h"
28
+
29
+ /**
30
+ * \file
31
+ * \brief C++ API: SimpleTimeZone is a concrete subclass of TimeZone.
32
+ */
33
+
34
+ #if !UCONFIG_NO_FORMATTING
35
+
36
+ #include "unicode/basictz.h"
37
+
38
+ U_NAMESPACE_BEGIN
39
+
40
+ // forward declaration
41
+ class InitialTimeZoneRule;
42
+ class TimeZoneTransition;
43
+ class AnnualTimeZoneRule;
44
+
45
+ /**
46
+ * <code>SimpleTimeZone</code> is a concrete subclass of <code>TimeZone</code>
47
+ * that represents a time zone for use with a Gregorian calendar. This
48
+ * class does not handle historical changes.
49
+ * <P>
50
+ * When specifying daylight-savings-time begin and end dates, use a negative value for
51
+ * <code>dayOfWeekInMonth</code> to indicate that <code>SimpleTimeZone</code> should
52
+ * count from the end of the month backwards. For example, if Daylight Savings
53
+ * Time starts or ends at the last Sunday a month, use <code>dayOfWeekInMonth = -1</code>
54
+ * along with <code>dayOfWeek = UCAL_SUNDAY</code> to specify the rule.
55
+ *
56
+ * @see Calendar
57
+ * @see GregorianCalendar
58
+ * @see TimeZone
59
+ * @author D. Goldsmith, Mark Davis, Chen-Lieh Huang, Alan Liu
60
+ */
61
+ class U_I18N_API SimpleTimeZone: public BasicTimeZone {
62
+ public:
63
+
64
+ /**
65
+ * TimeMode is used, together with a millisecond offset after
66
+ * midnight, to specify a rule transition time. Most rules
67
+ * transition at a local wall time, that is, according to the
68
+ * current time in effect, either standard, or DST. However, some
69
+ * rules transition at local standard time, and some at a specific
70
+ * UTC time. Although it might seem that all times could be
71
+ * converted to wall time, thus eliminating the need for this
72
+ * parameter, this is not the case.
73
+ * @stable ICU 2.0
74
+ */
75
+ enum TimeMode {
76
+ WALL_TIME = 0,
77
+ STANDARD_TIME,
78
+ UTC_TIME
79
+ };
80
+
81
+ /**
82
+ * Copy constructor
83
+ * @param source the object to be copied.
84
+ * @stable ICU 2.0
85
+ */
86
+ SimpleTimeZone(const SimpleTimeZone& source);
87
+
88
+ /**
89
+ * Default assignment operator
90
+ * @param right the object to be copied.
91
+ * @stable ICU 2.0
92
+ */
93
+ SimpleTimeZone& operator=(const SimpleTimeZone& right);
94
+
95
+ /**
96
+ * Destructor
97
+ * @stable ICU 2.0
98
+ */
99
+ virtual ~SimpleTimeZone();
100
+
101
+ /**
102
+ * Returns true if the two TimeZone objects are equal; that is, they have
103
+ * the same ID, raw GMT offset, and DST rules.
104
+ *
105
+ * @param that The SimpleTimeZone object to be compared with.
106
+ * @return True if the given time zone is equal to this time zone; false
107
+ * otherwise.
108
+ * @stable ICU 2.0
109
+ */
110
+ virtual UBool operator==(const TimeZone& that) const;
111
+
112
+ /**
113
+ * Constructs a SimpleTimeZone with the given raw GMT offset and time zone ID,
114
+ * and which doesn't observe daylight savings time. Normally you should use
115
+ * TimeZone::createInstance() to create a TimeZone instead of creating a
116
+ * SimpleTimeZone directly with this constructor.
117
+ *
118
+ * @param rawOffsetGMT The given base time zone offset to GMT.
119
+ * @param ID The timezone ID which is obtained from
120
+ * TimeZone.getAvailableIDs.
121
+ * @stable ICU 2.0
122
+ */
123
+ SimpleTimeZone(int32_t rawOffsetGMT, const UnicodeString& ID);
124
+
125
+ /**
126
+ * Construct a SimpleTimeZone with the given raw GMT offset, time zone ID,
127
+ * and times to start and end daylight savings time. To create a TimeZone that
128
+ * doesn't observe daylight savings time, don't use this constructor; use
129
+ * SimpleTimeZone(rawOffset, ID) instead. Normally, you should use
130
+ * TimeZone.createInstance() to create a TimeZone instead of creating a
131
+ * SimpleTimeZone directly with this constructor.
132
+ * <P>
133
+ * Various types of daylight-savings time rules can be specfied by using different
134
+ * values for startDay and startDayOfWeek and endDay and endDayOfWeek. For a
135
+ * complete explanation of how these parameters work, see the documentation for
136
+ * setStartRule().
137
+ *
138
+ * @param rawOffsetGMT The new SimpleTimeZone's raw GMT offset
139
+ * @param ID The new SimpleTimeZone's time zone ID.
140
+ * @param savingsStartMonth The daylight savings starting month. Month is
141
+ * 0-based. eg, 0 for January.
142
+ * @param savingsStartDayOfWeekInMonth The daylight savings starting
143
+ * day-of-week-in-month. See setStartRule() for a
144
+ * complete explanation.
145
+ * @param savingsStartDayOfWeek The daylight savings starting day-of-week.
146
+ * See setStartRule() for a complete explanation.
147
+ * @param savingsStartTime The daylight savings starting time, expressed as the
148
+ * number of milliseconds after midnight.
149
+ * @param savingsEndMonth The daylight savings ending month. Month is
150
+ * 0-based. eg, 0 for January.
151
+ * @param savingsEndDayOfWeekInMonth The daylight savings ending day-of-week-in-month.
152
+ * See setStartRule() for a complete explanation.
153
+ * @param savingsEndDayOfWeek The daylight savings ending day-of-week.
154
+ * See setStartRule() for a complete explanation.
155
+ * @param savingsEndTime The daylight savings ending time, expressed as the
156
+ * number of milliseconds after midnight.
157
+ * @param status An UErrorCode to receive the status.
158
+ * @stable ICU 2.0
159
+ */
160
+ SimpleTimeZone(int32_t rawOffsetGMT, const UnicodeString& ID,
161
+ int8_t savingsStartMonth, int8_t savingsStartDayOfWeekInMonth,
162
+ int8_t savingsStartDayOfWeek, int32_t savingsStartTime,
163
+ int8_t savingsEndMonth, int8_t savingsEndDayOfWeekInMonth,
164
+ int8_t savingsEndDayOfWeek, int32_t savingsEndTime,
165
+ UErrorCode& status);
166
+ /**
167
+ * Construct a SimpleTimeZone with the given raw GMT offset, time zone ID,
168
+ * and times to start and end daylight savings time. To create a TimeZone that
169
+ * doesn't observe daylight savings time, don't use this constructor; use
170
+ * SimpleTimeZone(rawOffset, ID) instead. Normally, you should use
171
+ * TimeZone.createInstance() to create a TimeZone instead of creating a
172
+ * SimpleTimeZone directly with this constructor.
173
+ * <P>
174
+ * Various types of daylight-savings time rules can be specfied by using different
175
+ * values for startDay and startDayOfWeek and endDay and endDayOfWeek. For a
176
+ * complete explanation of how these parameters work, see the documentation for
177
+ * setStartRule().
178
+ *
179
+ * @param rawOffsetGMT The new SimpleTimeZone's raw GMT offset
180
+ * @param ID The new SimpleTimeZone's time zone ID.
181
+ * @param savingsStartMonth The daylight savings starting month. Month is
182
+ * 0-based. eg, 0 for January.
183
+ * @param savingsStartDayOfWeekInMonth The daylight savings starting
184
+ * day-of-week-in-month. See setStartRule() for a
185
+ * complete explanation.
186
+ * @param savingsStartDayOfWeek The daylight savings starting day-of-week.
187
+ * See setStartRule() for a complete explanation.
188
+ * @param savingsStartTime The daylight savings starting time, expressed as the
189
+ * number of milliseconds after midnight.
190
+ * @param savingsEndMonth The daylight savings ending month. Month is
191
+ * 0-based. eg, 0 for January.
192
+ * @param savingsEndDayOfWeekInMonth The daylight savings ending day-of-week-in-month.
193
+ * See setStartRule() for a complete explanation.
194
+ * @param savingsEndDayOfWeek The daylight savings ending day-of-week.
195
+ * See setStartRule() for a complete explanation.
196
+ * @param savingsEndTime The daylight savings ending time, expressed as the
197
+ * number of milliseconds after midnight.
198
+ * @param savingsDST The number of milliseconds added to standard time
199
+ * to get DST time. Default is one hour.
200
+ * @param status An UErrorCode to receive the status.
201
+ * @stable ICU 2.0
202
+ */
203
+ SimpleTimeZone(int32_t rawOffsetGMT, const UnicodeString& ID,
204
+ int8_t savingsStartMonth, int8_t savingsStartDayOfWeekInMonth,
205
+ int8_t savingsStartDayOfWeek, int32_t savingsStartTime,
206
+ int8_t savingsEndMonth, int8_t savingsEndDayOfWeekInMonth,
207
+ int8_t savingsEndDayOfWeek, int32_t savingsEndTime,
208
+ int32_t savingsDST, UErrorCode& status);
209
+
210
+ /**
211
+ * Construct a SimpleTimeZone with the given raw GMT offset, time zone ID,
212
+ * and times to start and end daylight savings time. To create a TimeZone that
213
+ * doesn't observe daylight savings time, don't use this constructor; use
214
+ * SimpleTimeZone(rawOffset, ID) instead. Normally, you should use
215
+ * TimeZone.createInstance() to create a TimeZone instead of creating a
216
+ * SimpleTimeZone directly with this constructor.
217
+ * <P>
218
+ * Various types of daylight-savings time rules can be specfied by using different
219
+ * values for startDay and startDayOfWeek and endDay and endDayOfWeek. For a
220
+ * complete explanation of how these parameters work, see the documentation for
221
+ * setStartRule().
222
+ *
223
+ * @param rawOffsetGMT The new SimpleTimeZone's raw GMT offset
224
+ * @param ID The new SimpleTimeZone's time zone ID.
225
+ * @param savingsStartMonth The daylight savings starting month. Month is
226
+ * 0-based. eg, 0 for January.
227
+ * @param savingsStartDayOfWeekInMonth The daylight savings starting
228
+ * day-of-week-in-month. See setStartRule() for a
229
+ * complete explanation.
230
+ * @param savingsStartDayOfWeek The daylight savings starting day-of-week.
231
+ * See setStartRule() for a complete explanation.
232
+ * @param savingsStartTime The daylight savings starting time, expressed as the
233
+ * number of milliseconds after midnight.
234
+ * @param savingsStartTimeMode Whether the start time is local wall time, local
235
+ * standard time, or UTC time. Default is local wall time.
236
+ * @param savingsEndMonth The daylight savings ending month. Month is
237
+ * 0-based. eg, 0 for January.
238
+ * @param savingsEndDayOfWeekInMonth The daylight savings ending day-of-week-in-month.
239
+ * See setStartRule() for a complete explanation.
240
+ * @param savingsEndDayOfWeek The daylight savings ending day-of-week.
241
+ * See setStartRule() for a complete explanation.
242
+ * @param savingsEndTime The daylight savings ending time, expressed as the
243
+ * number of milliseconds after midnight.
244
+ * @param savingsEndTimeMode Whether the end time is local wall time, local
245
+ * standard time, or UTC time. Default is local wall time.
246
+ * @param savingsDST The number of milliseconds added to standard time
247
+ * to get DST time. Default is one hour.
248
+ * @param status An UErrorCode to receive the status.
249
+ * @stable ICU 2.0
250
+ */
251
+ SimpleTimeZone(int32_t rawOffsetGMT, const UnicodeString& ID,
252
+ int8_t savingsStartMonth, int8_t savingsStartDayOfWeekInMonth,
253
+ int8_t savingsStartDayOfWeek, int32_t savingsStartTime,
254
+ TimeMode savingsStartTimeMode,
255
+ int8_t savingsEndMonth, int8_t savingsEndDayOfWeekInMonth,
256
+ int8_t savingsEndDayOfWeek, int32_t savingsEndTime, TimeMode savingsEndTimeMode,
257
+ int32_t savingsDST, UErrorCode& status);
258
+
259
+ /**
260
+ * Sets the daylight savings starting year, that is, the year this time zone began
261
+ * observing its specified daylight savings time rules. The time zone is considered
262
+ * not to observe daylight savings time prior to that year; SimpleTimeZone doesn't
263
+ * support historical daylight-savings-time rules.
264
+ * @param year the daylight savings starting year.
265
+ * @stable ICU 2.0
266
+ */
267
+ void setStartYear(int32_t year);
268
+
269
+ /**
270
+ * Sets the daylight savings starting rule. For example, in the U.S., Daylight Savings
271
+ * Time starts at the second Sunday in March, at 2 AM in standard time.
272
+ * Therefore, you can set the start rule by calling:
273
+ * setStartRule(UCAL_MARCH, 2, UCAL_SUNDAY, 2*60*60*1000);
274
+ * The dayOfWeekInMonth and dayOfWeek parameters together specify how to calculate
275
+ * the exact starting date. Their exact meaning depend on their respective signs,
276
+ * allowing various types of rules to be constructed, as follows:
277
+ * <ul>
278
+ * <li>If both dayOfWeekInMonth and dayOfWeek are positive, they specify the
279
+ * day of week in the month (e.g., (2, WEDNESDAY) is the second Wednesday
280
+ * of the month).</li>
281
+ * <li>If dayOfWeek is positive and dayOfWeekInMonth is negative, they specify
282
+ * the day of week in the month counting backward from the end of the month.
283
+ * (e.g., (-1, MONDAY) is the last Monday in the month)</li>
284
+ * <li>If dayOfWeek is zero and dayOfWeekInMonth is positive, dayOfWeekInMonth
285
+ * specifies the day of the month, regardless of what day of the week it is.
286
+ * (e.g., (10, 0) is the tenth day of the month)</li>
287
+ * <li>If dayOfWeek is zero and dayOfWeekInMonth is negative, dayOfWeekInMonth
288
+ * specifies the day of the month counting backward from the end of the
289
+ * month, regardless of what day of the week it is (e.g., (-2, 0) is the
290
+ * next-to-last day of the month).</li>
291
+ * <li>If dayOfWeek is negative and dayOfWeekInMonth is positive, they specify the
292
+ * first specified day of the week on or after the specfied day of the month.
293
+ * (e.g., (15, -SUNDAY) is the first Sunday after the 15th of the month
294
+ * [or the 15th itself if the 15th is a Sunday].)</li>
295
+ * <li>If dayOfWeek and DayOfWeekInMonth are both negative, they specify the
296
+ * last specified day of the week on or before the specified day of the month.
297
+ * (e.g., (-20, -TUESDAY) is the last Tuesday before the 20th of the month
298
+ * [or the 20th itself if the 20th is a Tuesday].)</li>
299
+ * </ul>
300
+ * @param month the daylight savings starting month. Month is 0-based.
301
+ * eg, 0 for January.
302
+ * @param dayOfWeekInMonth the daylight savings starting
303
+ * day-of-week-in-month. Please see the member description for an example.
304
+ * @param dayOfWeek the daylight savings starting day-of-week. Please see
305
+ * the member description for an example.
306
+ * @param time the daylight savings starting time. Please see the member
307
+ * description for an example.
308
+ * @param status An UErrorCode
309
+ * @stable ICU 2.0
310
+ */
311
+ void setStartRule(int32_t month, int32_t dayOfWeekInMonth, int32_t dayOfWeek,
312
+ int32_t time, UErrorCode& status);
313
+ /**
314
+ * Sets the daylight savings starting rule. For example, in the U.S., Daylight Savings
315
+ * Time starts at the second Sunday in March, at 2 AM in standard time.
316
+ * Therefore, you can set the start rule by calling:
317
+ * setStartRule(UCAL_MARCH, 2, UCAL_SUNDAY, 2*60*60*1000);
318
+ * The dayOfWeekInMonth and dayOfWeek parameters together specify how to calculate
319
+ * the exact starting date. Their exact meaning depend on their respective signs,
320
+ * allowing various types of rules to be constructed, as follows:
321
+ * <ul>
322
+ * <li>If both dayOfWeekInMonth and dayOfWeek are positive, they specify the
323
+ * day of week in the month (e.g., (2, WEDNESDAY) is the second Wednesday
324
+ * of the month).</li>
325
+ * <li>If dayOfWeek is positive and dayOfWeekInMonth is negative, they specify
326
+ * the day of week in the month counting backward from the end of the month.
327
+ * (e.g., (-1, MONDAY) is the last Monday in the month)</li>
328
+ * <li>If dayOfWeek is zero and dayOfWeekInMonth is positive, dayOfWeekInMonth
329
+ * specifies the day of the month, regardless of what day of the week it is.
330
+ * (e.g., (10, 0) is the tenth day of the month)</li>
331
+ * <li>If dayOfWeek is zero and dayOfWeekInMonth is negative, dayOfWeekInMonth
332
+ * specifies the day of the month counting backward from the end of the
333
+ * month, regardless of what day of the week it is (e.g., (-2, 0) is the
334
+ * next-to-last day of the month).</li>
335
+ * <li>If dayOfWeek is negative and dayOfWeekInMonth is positive, they specify the
336
+ * first specified day of the week on or after the specfied day of the month.
337
+ * (e.g., (15, -SUNDAY) is the first Sunday after the 15th of the month
338
+ * [or the 15th itself if the 15th is a Sunday].)</li>
339
+ * <li>If dayOfWeek and DayOfWeekInMonth are both negative, they specify the
340
+ * last specified day of the week on or before the specified day of the month.
341
+ * (e.g., (-20, -TUESDAY) is the last Tuesday before the 20th of the month
342
+ * [or the 20th itself if the 20th is a Tuesday].)</li>
343
+ * </ul>
344
+ * @param month the daylight savings starting month. Month is 0-based.
345
+ * eg, 0 for January.
346
+ * @param dayOfWeekInMonth the daylight savings starting
347
+ * day-of-week-in-month. Please see the member description for an example.
348
+ * @param dayOfWeek the daylight savings starting day-of-week. Please see
349
+ * the member description for an example.
350
+ * @param time the daylight savings starting time. Please see the member
351
+ * description for an example.
352
+ * @param mode whether the time is local wall time, local standard time,
353
+ * or UTC time. Default is local wall time.
354
+ * @param status An UErrorCode
355
+ * @stable ICU 2.0
356
+ */
357
+ void setStartRule(int32_t month, int32_t dayOfWeekInMonth, int32_t dayOfWeek,
358
+ int32_t time, TimeMode mode, UErrorCode& status);
359
+
360
+ /**
361
+ * Sets the DST start rule to a fixed date within a month.
362
+ *
363
+ * @param month The month in which this rule occurs (0-based).
364
+ * @param dayOfMonth The date in that month (1-based).
365
+ * @param time The time of that day (number of millis after midnight)
366
+ * when DST takes effect in local wall time, which is
367
+ * standard time in this case.
368
+ * @param status An UErrorCode
369
+ * @stable ICU 2.0
370
+ */
371
+ void setStartRule(int32_t month, int32_t dayOfMonth, int32_t time,
372
+ UErrorCode& status);
373
+ /**
374
+ * Sets the DST start rule to a fixed date within a month.
375
+ *
376
+ * @param month The month in which this rule occurs (0-based).
377
+ * @param dayOfMonth The date in that month (1-based).
378
+ * @param time The time of that day (number of millis after midnight)
379
+ * when DST takes effect in local wall time, which is
380
+ * standard time in this case.
381
+ * @param mode whether the time is local wall time, local standard time,
382
+ * or UTC time. Default is local wall time.
383
+ * @param status An UErrorCode
384
+ * @stable ICU 2.0
385
+ */
386
+ void setStartRule(int32_t month, int32_t dayOfMonth, int32_t time,
387
+ TimeMode mode, UErrorCode& status);
388
+
389
+ /**
390
+ * Sets the DST start rule to a weekday before or after a give date within
391
+ * a month, e.g., the first Monday on or after the 8th.
392
+ *
393
+ * @param month The month in which this rule occurs (0-based).
394
+ * @param dayOfMonth A date within that month (1-based).
395
+ * @param dayOfWeek The day of the week on which this rule occurs.
396
+ * @param time The time of that day (number of millis after midnight)
397
+ * when DST takes effect in local wall time, which is
398
+ * standard time in this case.
399
+ * @param after If true, this rule selects the first dayOfWeek on
400
+ * or after dayOfMonth. If false, this rule selects
401
+ * the last dayOfWeek on or before dayOfMonth.
402
+ * @param status An UErrorCode
403
+ * @stable ICU 2.0
404
+ */
405
+ void setStartRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek,
406
+ int32_t time, UBool after, UErrorCode& status);
407
+ /**
408
+ * Sets the DST start rule to a weekday before or after a give date within
409
+ * a month, e.g., the first Monday on or after the 8th.
410
+ *
411
+ * @param month The month in which this rule occurs (0-based).
412
+ * @param dayOfMonth A date within that month (1-based).
413
+ * @param dayOfWeek The day of the week on which this rule occurs.
414
+ * @param time The time of that day (number of millis after midnight)
415
+ * when DST takes effect in local wall time, which is
416
+ * standard time in this case.
417
+ * @param mode whether the time is local wall time, local standard time,
418
+ * or UTC time. Default is local wall time.
419
+ * @param after If true, this rule selects the first dayOfWeek on
420
+ * or after dayOfMonth. If false, this rule selects
421
+ * the last dayOfWeek on or before dayOfMonth.
422
+ * @param status An UErrorCode
423
+ * @stable ICU 2.0
424
+ */
425
+ void setStartRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek,
426
+ int32_t time, TimeMode mode, UBool after, UErrorCode& status);
427
+
428
+ /**
429
+ * Sets the daylight savings ending rule. For example, if Daylight
430
+ * Savings Time ends at the last (-1) Sunday in October, at 2 AM in standard time.
431
+ * Therefore, you can set the end rule by calling:
432
+ * <pre>
433
+ * setEndRule(UCAL_OCTOBER, -1, UCAL_SUNDAY, 2*60*60*1000);
434
+ * </pre>
435
+ * Various other types of rules can be specified by manipulating the dayOfWeek
436
+ * and dayOfWeekInMonth parameters. For complete details, see the documentation
437
+ * for setStartRule().
438
+ *
439
+ * @param month the daylight savings ending month. Month is 0-based.
440
+ * eg, 0 for January.
441
+ * @param dayOfWeekInMonth the daylight savings ending
442
+ * day-of-week-in-month. See setStartRule() for a complete explanation.
443
+ * @param dayOfWeek the daylight savings ending day-of-week. See setStartRule()
444
+ * for a complete explanation.
445
+ * @param time the daylight savings ending time. Please see the member
446
+ * description for an example.
447
+ * @param status An UErrorCode
448
+ * @stable ICU 2.0
449
+ */
450
+ void setEndRule(int32_t month, int32_t dayOfWeekInMonth, int32_t dayOfWeek,
451
+ int32_t time, UErrorCode& status);
452
+
453
+ /**
454
+ * Sets the daylight savings ending rule. For example, if Daylight
455
+ * Savings Time ends at the last (-1) Sunday in October, at 2 AM in standard time.
456
+ * Therefore, you can set the end rule by calling:
457
+ * <pre>
458
+ * setEndRule(UCAL_OCTOBER, -1, UCAL_SUNDAY, 2*60*60*1000);
459
+ * </pre>
460
+ * Various other types of rules can be specified by manipulating the dayOfWeek
461
+ * and dayOfWeekInMonth parameters. For complete details, see the documentation
462
+ * for setStartRule().
463
+ *
464
+ * @param month the daylight savings ending month. Month is 0-based.
465
+ * eg, 0 for January.
466
+ * @param dayOfWeekInMonth the daylight savings ending
467
+ * day-of-week-in-month. See setStartRule() for a complete explanation.
468
+ * @param dayOfWeek the daylight savings ending day-of-week. See setStartRule()
469
+ * for a complete explanation.
470
+ * @param time the daylight savings ending time. Please see the member
471
+ * description for an example.
472
+ * @param mode whether the time is local wall time, local standard time,
473
+ * or UTC time. Default is local wall time.
474
+ * @param status An UErrorCode
475
+ * @stable ICU 2.0
476
+ */
477
+ void setEndRule(int32_t month, int32_t dayOfWeekInMonth, int32_t dayOfWeek,
478
+ int32_t time, TimeMode mode, UErrorCode& status);
479
+
480
+ /**
481
+ * Sets the DST end rule to a fixed date within a month.
482
+ *
483
+ * @param month The month in which this rule occurs (0-based).
484
+ * @param dayOfMonth The date in that month (1-based).
485
+ * @param time The time of that day (number of millis after midnight)
486
+ * when DST ends in local wall time, which is daylight
487
+ * time in this case.
488
+ * @param status An UErrorCode
489
+ * @stable ICU 2.0
490
+ */
491
+ void setEndRule(int32_t month, int32_t dayOfMonth, int32_t time, UErrorCode& status);
492
+
493
+ /**
494
+ * Sets the DST end rule to a fixed date within a month.
495
+ *
496
+ * @param month The month in which this rule occurs (0-based).
497
+ * @param dayOfMonth The date in that month (1-based).
498
+ * @param time The time of that day (number of millis after midnight)
499
+ * when DST ends in local wall time, which is daylight
500
+ * time in this case.
501
+ * @param mode whether the time is local wall time, local standard time,
502
+ * or UTC time. Default is local wall time.
503
+ * @param status An UErrorCode
504
+ * @stable ICU 2.0
505
+ */
506
+ void setEndRule(int32_t month, int32_t dayOfMonth, int32_t time,
507
+ TimeMode mode, UErrorCode& status);
508
+
509
+ /**
510
+ * Sets the DST end rule to a weekday before or after a give date within
511
+ * a month, e.g., the first Monday on or after the 8th.
512
+ *
513
+ * @param month The month in which this rule occurs (0-based).
514
+ * @param dayOfMonth A date within that month (1-based).
515
+ * @param dayOfWeek The day of the week on which this rule occurs.
516
+ * @param time The time of that day (number of millis after midnight)
517
+ * when DST ends in local wall time, which is daylight
518
+ * time in this case.
519
+ * @param after If true, this rule selects the first dayOfWeek on
520
+ * or after dayOfMonth. If false, this rule selects
521
+ * the last dayOfWeek on or before dayOfMonth.
522
+ * @param status An UErrorCode
523
+ * @stable ICU 2.0
524
+ */
525
+ void setEndRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek,
526
+ int32_t time, UBool after, UErrorCode& status);
527
+
528
+ /**
529
+ * Sets the DST end rule to a weekday before or after a give date within
530
+ * a month, e.g., the first Monday on or after the 8th.
531
+ *
532
+ * @param month The month in which this rule occurs (0-based).
533
+ * @param dayOfMonth A date within that month (1-based).
534
+ * @param dayOfWeek The day of the week on which this rule occurs.
535
+ * @param time The time of that day (number of millis after midnight)
536
+ * when DST ends in local wall time, which is daylight
537
+ * time in this case.
538
+ * @param mode whether the time is local wall time, local standard time,
539
+ * or UTC time. Default is local wall time.
540
+ * @param after If true, this rule selects the first dayOfWeek on
541
+ * or after dayOfMonth. If false, this rule selects
542
+ * the last dayOfWeek on or before dayOfMonth.
543
+ * @param status An UErrorCode
544
+ * @stable ICU 2.0
545
+ */
546
+ void setEndRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek,
547
+ int32_t time, TimeMode mode, UBool after, UErrorCode& status);
548
+
549
+ /**
550
+ * Returns the TimeZone's adjusted GMT offset (i.e., the number of milliseconds to add
551
+ * to GMT to get local time in this time zone, taking daylight savings time into
552
+ * account) as of a particular reference date. The reference date is used to determine
553
+ * whether daylight savings time is in effect and needs to be figured into the offset
554
+ * that is returned (in other words, what is the adjusted GMT offset in this time zone
555
+ * at this particular date and time?). For the time zones produced by createTimeZone(),
556
+ * the reference data is specified according to the Gregorian calendar, and the date
557
+ * and time fields are in GMT, NOT local time.
558
+ *
559
+ * @param era The reference date's era
560
+ * @param year The reference date's year
561
+ * @param month The reference date's month (0-based; 0 is January)
562
+ * @param day The reference date's day-in-month (1-based)
563
+ * @param dayOfWeek The reference date's day-of-week (1-based; 1 is Sunday)
564
+ * @param millis The reference date's milliseconds in day, UTT (NOT local time).
565
+ * @param status An UErrorCode to receive the status.
566
+ * @return The offset in milliseconds to add to GMT to get local time.
567
+ * @stable ICU 2.0
568
+ */
569
+ virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
570
+ uint8_t dayOfWeek, int32_t millis, UErrorCode& status) const;
571
+
572
+ /**
573
+ * Gets the time zone offset, for current date, modified in case of
574
+ * daylight savings. This is the offset to add *to* UTC to get local time.
575
+ * @param era the era of the given date.
576
+ * @param year the year in the given date.
577
+ * @param month the month in the given date.
578
+ * Month is 0-based. e.g., 0 for January.
579
+ * @param day the day-in-month of the given date.
580
+ * @param dayOfWeek the day-of-week of the given date.
581
+ * @param milliseconds the millis in day in <em>standard</em> local time.
582
+ * @param monthLength the length of the given month in days.
583
+ * @param status An UErrorCode to receive the status.
584
+ * @return the offset to add *to* GMT to get local time.
585
+ * @stable ICU 2.0
586
+ */
587
+ virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
588
+ uint8_t dayOfWeek, int32_t milliseconds,
589
+ int32_t monthLength, UErrorCode& status) const;
590
+ /**
591
+ * Gets the time zone offset, for current date, modified in case of
592
+ * daylight savings. This is the offset to add *to* UTC to get local time.
593
+ * @param era the era of the given date.
594
+ * @param year the year in the given date.
595
+ * @param month the month in the given date.
596
+ * Month is 0-based. e.g., 0 for January.
597
+ * @param day the day-in-month of the given date.
598
+ * @param dayOfWeek the day-of-week of the given date.
599
+ * @param milliseconds the millis in day in <em>standard</em> local time.
600
+ * @param monthLength the length of the given month in days.
601
+ * @param prevMonthLength length of the previous month in days.
602
+ * @param status An UErrorCode to receive the status.
603
+ * @return the offset to add *to* GMT to get local time.
604
+ * @stable ICU 2.0
605
+ */
606
+ virtual int32_t getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
607
+ uint8_t dayOfWeek, int32_t milliseconds,
608
+ int32_t monthLength, int32_t prevMonthLength,
609
+ UErrorCode& status) const;
610
+
611
+ /**
612
+ * Redeclared TimeZone method. This implementation simply calls
613
+ * the base class method, which otherwise would be hidden.
614
+ * @stable ICU 2.8
615
+ */
616
+ virtual void getOffset(UDate date, UBool local, int32_t& rawOffset,
617
+ int32_t& dstOffset, UErrorCode& ec) const;
618
+
619
+ /**
620
+ * Get time zone offsets from local wall time.
621
+ * @internal
622
+ */
623
+ virtual void getOffsetFromLocal(UDate date, int32_t nonExistingTimeOpt, int32_t duplicatedTimeOpt,
624
+ int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const;
625
+
626
+ /**
627
+ * Returns the TimeZone's raw GMT offset (i.e., the number of milliseconds to add
628
+ * to GMT to get local time, before taking daylight savings time into account).
629
+ *
630
+ * @return The TimeZone's raw GMT offset.
631
+ * @stable ICU 2.0
632
+ */
633
+ virtual int32_t getRawOffset(void) const;
634
+
635
+ /**
636
+ * Sets the TimeZone's raw GMT offset (i.e., the number of milliseconds to add
637
+ * to GMT to get local time, before taking daylight savings time into account).
638
+ *
639
+ * @param offsetMillis The new raw GMT offset for this time zone.
640
+ * @stable ICU 2.0
641
+ */
642
+ virtual void setRawOffset(int32_t offsetMillis);
643
+
644
+ /**
645
+ * Sets the amount of time in ms that the clock is advanced during DST.
646
+ * @param millisSavedDuringDST the number of milliseconds the time is
647
+ * advanced with respect to standard time when the daylight savings rules
648
+ * are in effect. A positive number, typically one hour (3600000).
649
+ * @param status An UErrorCode to receive the status.
650
+ * @stable ICU 2.0
651
+ */
652
+ void setDSTSavings(int32_t millisSavedDuringDST, UErrorCode& status);
653
+
654
+ /**
655
+ * Returns the amount of time in ms that the clock is advanced during DST.
656
+ * @return the number of milliseconds the time is
657
+ * advanced with respect to standard time when the daylight savings rules
658
+ * are in effect. A positive number, typically one hour (3600000).
659
+ * @stable ICU 2.0
660
+ */
661
+ virtual int32_t getDSTSavings(void) const;
662
+
663
+ /**
664
+ * Queries if this TimeZone uses Daylight Savings Time.
665
+ *
666
+ * @return True if this TimeZone uses Daylight Savings Time; false otherwise.
667
+ * @stable ICU 2.0
668
+ */
669
+ virtual UBool useDaylightTime(void) const;
670
+
671
+ /**
672
+ * Returns true if the given date is within the period when daylight savings time
673
+ * is in effect; false otherwise. If the TimeZone doesn't observe daylight savings
674
+ * time, this functions always returns false.
675
+ * This method is wasteful since it creates a new GregorianCalendar and
676
+ * deletes it each time it is called. This is a deprecated method
677
+ * and provided only for Java compatibility.
678
+ *
679
+ * @param date The date to test.
680
+ * @param status An UErrorCode to receive the status.
681
+ * @return true if the given date is in Daylight Savings Time;
682
+ * false otherwise.
683
+ * @deprecated ICU 2.4. Use Calendar::inDaylightTime() instead.
684
+ */
685
+ virtual UBool inDaylightTime(UDate date, UErrorCode& status) const;
686
+
687
+ /**
688
+ * Return true if this zone has the same rules and offset as another zone.
689
+ * @param other the TimeZone object to be compared with
690
+ * @return true if the given zone has the same rules and offset as this one
691
+ * @stable ICU 2.0
692
+ */
693
+ UBool hasSameRules(const TimeZone& other) const;
694
+
695
+ /**
696
+ * Clones TimeZone objects polymorphically. Clients are responsible for deleting
697
+ * the TimeZone object cloned.
698
+ *
699
+ * @return A new copy of this TimeZone object.
700
+ * @stable ICU 2.0
701
+ */
702
+ virtual TimeZone* clone(void) const;
703
+
704
+ /**
705
+ * Gets the first time zone transition after the base time.
706
+ * @param base The base time.
707
+ * @param inclusive Whether the base time is inclusive or not.
708
+ * @param result Receives the first transition after the base time.
709
+ * @return TRUE if the transition is found.
710
+ * @stable ICU 3.8
711
+ */
712
+ virtual UBool getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const;
713
+
714
+ /**
715
+ * Gets the most recent time zone transition before the base time.
716
+ * @param base The base time.
717
+ * @param inclusive Whether the base time is inclusive or not.
718
+ * @param result Receives the most recent transition before the base time.
719
+ * @return TRUE if the transition is found.
720
+ * @stable ICU 3.8
721
+ */
722
+ virtual UBool getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const;
723
+
724
+ /**
725
+ * Returns the number of <code>TimeZoneRule</code>s which represents time transitions,
726
+ * for this time zone, that is, all <code>TimeZoneRule</code>s for this time zone except
727
+ * <code>InitialTimeZoneRule</code>. The return value range is 0 or any positive value.
728
+ * @param status Receives error status code.
729
+ * @return The number of <code>TimeZoneRule</code>s representing time transitions.
730
+ * @stable ICU 3.8
731
+ */
732
+ virtual int32_t countTransitionRules(UErrorCode& status) const;
733
+
734
+ /**
735
+ * Gets the <code>InitialTimeZoneRule</code> and the set of <code>TimeZoneRule</code>
736
+ * which represent time transitions for this time zone. On successful return,
737
+ * the argument initial points to non-NULL <code>InitialTimeZoneRule</code> and
738
+ * the array trsrules is filled with 0 or multiple <code>TimeZoneRule</code>
739
+ * instances up to the size specified by trscount. The results are referencing the
740
+ * rule instance held by this time zone instance. Therefore, after this time zone
741
+ * is destructed, they are no longer available.
742
+ * @param initial Receives the initial timezone rule
743
+ * @param trsrules Receives the timezone transition rules
744
+ * @param trscount On input, specify the size of the array 'transitions' receiving
745
+ * the timezone transition rules. On output, actual number of
746
+ * rules filled in the array will be set.
747
+ * @param status Receives error status code.
748
+ * @stable ICU 3.8
749
+ */
750
+ virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial,
751
+ const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const;
752
+
753
+
754
+ public:
755
+
756
+ /**
757
+ * Override TimeZone Returns a unique class ID POLYMORPHICALLY. Pure virtual
758
+ * override. This method is to implement a simple version of RTTI, since not all C++
759
+ * compilers support genuine RTTI. Polymorphic operator==() and clone() methods call
760
+ * this method.
761
+ *
762
+ * @return The class ID for this object. All objects of a given class have the
763
+ * same class ID. Objects of other classes have different class IDs.
764
+ * @stable ICU 2.0
765
+ */
766
+ virtual UClassID getDynamicClassID(void) const;
767
+
768
+ /**
769
+ * Return the class ID for this class. This is useful only for comparing to a return
770
+ * value from getDynamicClassID(). For example:
771
+ * <pre>
772
+ * . Base* polymorphic_pointer = createPolymorphicObject();
773
+ * . if (polymorphic_pointer->getDynamicClassID() ==
774
+ * . Derived::getStaticClassID()) ...
775
+ * </pre>
776
+ * @return The class ID for all objects of this class.
777
+ * @stable ICU 2.0
778
+ */
779
+ static UClassID U_EXPORT2 getStaticClassID(void);
780
+
781
+ private:
782
+ /**
783
+ * Constants specifying values of startMode and endMode.
784
+ */
785
+ enum EMode
786
+ {
787
+ DOM_MODE = 1,
788
+ DOW_IN_MONTH_MODE,
789
+ DOW_GE_DOM_MODE,
790
+ DOW_LE_DOM_MODE
791
+ };
792
+
793
+ SimpleTimeZone(); // default constructor not implemented
794
+
795
+ /**
796
+ * Internal construction method.
797
+ * @param rawOffsetGMT The new SimpleTimeZone's raw GMT offset
798
+ * @param startMonth the month DST starts
799
+ * @param startDay the day DST starts
800
+ * @param startDayOfWeek the DOW DST starts
801
+ * @param startTime the time DST starts
802
+ * @param startTimeMode Whether the start time is local wall time, local
803
+ * standard time, or UTC time. Default is local wall time.
804
+ * @param endMonth the month DST ends
805
+ * @param endDay the day DST ends
806
+ * @param endDayOfWeek the DOW DST ends
807
+ * @param endTime the time DST ends
808
+ * @param endTimeMode Whether the end time is local wall time, local
809
+ * standard time, or UTC time. Default is local wall time.
810
+ * @param dstSavings The number of milliseconds added to standard time
811
+ * to get DST time. Default is one hour.
812
+ * @param status An UErrorCode to receive the status.
813
+ */
814
+ void construct(int32_t rawOffsetGMT,
815
+ int8_t startMonth, int8_t startDay, int8_t startDayOfWeek,
816
+ int32_t startTime, TimeMode startTimeMode,
817
+ int8_t endMonth, int8_t endDay, int8_t endDayOfWeek,
818
+ int32_t endTime, TimeMode endTimeMode,
819
+ int32_t dstSavings, UErrorCode& status);
820
+
821
+ /**
822
+ * Compare a given date in the year to a rule. Return 1, 0, or -1, depending
823
+ * on whether the date is after, equal to, or before the rule date. The
824
+ * millis are compared directly against the ruleMillis, so any
825
+ * standard-daylight adjustments must be handled by the caller.
826
+ *
827
+ * @return 1 if the date is after the rule date, -1 if the date is before
828
+ * the rule date, or 0 if the date is equal to the rule date.
829
+ */
830
+ static int32_t compareToRule(int8_t month, int8_t monthLen, int8_t prevMonthLen,
831
+ int8_t dayOfMonth,
832
+ int8_t dayOfWeek, int32_t millis, int32_t millisDelta,
833
+ EMode ruleMode, int8_t ruleMonth, int8_t ruleDayOfWeek,
834
+ int8_t ruleDay, int32_t ruleMillis);
835
+
836
+ /**
837
+ * Given a set of encoded rules in startDay and startDayOfMonth, decode
838
+ * them and set the startMode appropriately. Do the same for endDay and
839
+ * endDayOfMonth.
840
+ * <P>
841
+ * Upon entry, the day of week variables may be zero or
842
+ * negative, in order to indicate special modes. The day of month
843
+ * variables may also be negative.
844
+ * <P>
845
+ * Upon exit, the mode variables will be
846
+ * set, and the day of week and day of month variables will be positive.
847
+ * <P>
848
+ * This method also recognizes a startDay or endDay of zero as indicating
849
+ * no DST.
850
+ */
851
+ void decodeRules(UErrorCode& status);
852
+ void decodeStartRule(UErrorCode& status);
853
+ void decodeEndRule(UErrorCode& status);
854
+
855
+ int8_t startMonth, startDay, startDayOfWeek; // the month, day, DOW, and time DST starts
856
+ int32_t startTime;
857
+ TimeMode startTimeMode, endTimeMode; // Mode for startTime, endTime; see TimeMode
858
+ int8_t endMonth, endDay, endDayOfWeek; // the month, day, DOW, and time DST ends
859
+ int32_t endTime;
860
+ int32_t startYear; // the year these DST rules took effect
861
+ int32_t rawOffset; // the TimeZone's raw GMT offset
862
+ UBool useDaylight; // flag indicating whether this TimeZone uses DST
863
+ static const int8_t STATICMONTHLENGTH[12]; // lengths of the months
864
+ EMode startMode, endMode; // flags indicating what kind of rules the DST rules are
865
+
866
+ /**
867
+ * A positive value indicating the amount of time saved during DST in ms.
868
+ * Typically one hour; sometimes 30 minutes.
869
+ */
870
+ int32_t dstSavings;
871
+
872
+ /* Private for BasicTimeZone implementation */
873
+ void checkTransitionRules(UErrorCode& status) const;
874
+ void initTransitionRules(UErrorCode& status);
875
+ void clearTransitionRules(void);
876
+ void deleteTransitionRules(void);
877
+ UBool transitionRulesInitialized;
878
+ InitialTimeZoneRule* initialRule;
879
+ TimeZoneTransition* firstTransition;
880
+ AnnualTimeZoneRule* stdRule;
881
+ AnnualTimeZoneRule* dstRule;
882
+ };
883
+
884
+ inline void SimpleTimeZone::setStartRule(int32_t month, int32_t dayOfWeekInMonth,
885
+ int32_t dayOfWeek,
886
+ int32_t time, UErrorCode& status) {
887
+ setStartRule(month, dayOfWeekInMonth, dayOfWeek, time, WALL_TIME, status);
888
+ }
889
+
890
+ inline void SimpleTimeZone::setStartRule(int32_t month, int32_t dayOfMonth,
891
+ int32_t time,
892
+ UErrorCode& status) {
893
+ setStartRule(month, dayOfMonth, time, WALL_TIME, status);
894
+ }
895
+
896
+ inline void SimpleTimeZone::setStartRule(int32_t month, int32_t dayOfMonth,
897
+ int32_t dayOfWeek,
898
+ int32_t time, UBool after, UErrorCode& status) {
899
+ setStartRule(month, dayOfMonth, dayOfWeek, time, WALL_TIME, after, status);
900
+ }
901
+
902
+ inline void SimpleTimeZone::setEndRule(int32_t month, int32_t dayOfWeekInMonth,
903
+ int32_t dayOfWeek,
904
+ int32_t time, UErrorCode& status) {
905
+ setEndRule(month, dayOfWeekInMonth, dayOfWeek, time, WALL_TIME, status);
906
+ }
907
+
908
+ inline void SimpleTimeZone::setEndRule(int32_t month, int32_t dayOfMonth,
909
+ int32_t time, UErrorCode& status) {
910
+ setEndRule(month, dayOfMonth, time, WALL_TIME, status);
911
+ }
912
+
913
+ inline void SimpleTimeZone::setEndRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek,
914
+ int32_t time, UBool after, UErrorCode& status) {
915
+ setEndRule(month, dayOfMonth, dayOfWeek, time, WALL_TIME, after, status);
916
+ }
917
+
918
+ inline void
919
+ SimpleTimeZone::getOffset(UDate date, UBool local, int32_t& rawOffsetRef,
920
+ int32_t& dstOffsetRef, UErrorCode& ec) const {
921
+ TimeZone::getOffset(date, local, rawOffsetRef, dstOffsetRef, ec);
922
+ }
923
+
924
+ U_NAMESPACE_END
925
+
926
+ #endif /* #if !UCONFIG_NO_FORMATTING */
927
+
928
+ #endif // _SIMPLETZ