pango 2.0.2-x86-mingw32 → 2.0.3-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.
Files changed (208) hide show
  1. checksums.yaml +7 -0
  2. data/README +2 -2
  3. data/Rakefile +7 -5
  4. data/ext/pango/extconf.rb +4 -4
  5. data/ext/pango/rbpango.c +0 -9
  6. data/ext/pango/rbpango.h +2 -10
  7. data/ext/pango/rbpangoanalysis.c +0 -4
  8. data/ext/pango/rbpangoattribute.c +1 -26
  9. data/ext/pango/rbpangoattrlist.c +0 -4
  10. data/ext/pango/rbpangocairo.c +13 -12
  11. data/ext/pango/rbpangocairocontext.c +6 -26
  12. data/ext/pango/rbpangocontext.c +2 -14
  13. data/ext/pango/rbpangofont.c +0 -12
  14. data/ext/pango/rbpangofontdescription.c +0 -5
  15. data/ext/pango/rbpangofontface.c +0 -6
  16. data/ext/pango/rbpangofontfamily.c +0 -3
  17. data/ext/pango/rbpangofontmap.c +0 -4
  18. data/ext/pango/rbpangofontmetrics.c +1 -4
  19. data/ext/pango/rbpangofontset.c +0 -4
  20. data/ext/pango/rbpangoglyphitem.c +0 -8
  21. data/ext/pango/rbpangoglyphstring.c +0 -4
  22. data/ext/pango/rbpangoitem.c +0 -16
  23. data/ext/pango/rbpangolanguage.c +0 -5
  24. data/ext/pango/rbpangolayout.c +36 -19
  25. data/ext/pango/rbpangolayoutline.c +0 -33
  26. data/ext/pango/rbpangologattr.c +0 -5
  27. data/ext/pango/rbpangomatrix.c +0 -10
  28. data/ext/pango/rbpangoprivate.h +0 -4
  29. data/ext/pango/rbpangorenderer.c +0 -6
  30. data/ext/pango/rbpangoscript.c +0 -4
  31. data/ext/pango/rbpangoscriptiter.c +0 -5
  32. data/lib/1.9/pango.so +0 -0
  33. data/lib/2.0/pango.so +0 -0
  34. data/test/{test_layout.rb → test-layout.rb} +14 -0
  35. data/vendor/local/bin/hb-ot-shape-closure.exe +0 -0
  36. data/vendor/local/bin/hb-shape.exe +0 -0
  37. data/vendor/local/bin/hb-view.exe +0 -0
  38. data/vendor/local/bin/libharfbuzz-0.dll +0 -0
  39. data/vendor/local/bin/libpango-1.0-0.dll +0 -0
  40. data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
  41. data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
  42. data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
  43. data/vendor/local/bin/libstdc++-6.dll +0 -0
  44. data/vendor/local/bin/pango-querymodules.exe +0 -0
  45. data/vendor/local/bin/pango-view.exe +0 -0
  46. data/vendor/local/include/harfbuzz/hb-buffer.h +10 -10
  47. data/vendor/local/include/harfbuzz/hb-common.h +147 -131
  48. data/vendor/local/include/harfbuzz/{hb-uniscribe.h → hb-deprecated.h} +15 -13
  49. data/vendor/local/include/harfbuzz/hb-face.h +117 -0
  50. data/vendor/local/include/harfbuzz/hb-font.h +130 -77
  51. data/vendor/local/include/harfbuzz/hb-ot-layout.h +6 -0
  52. data/vendor/local/include/harfbuzz/hb-set.h +2 -0
  53. data/vendor/local/include/harfbuzz/hb-unicode.h +97 -9
  54. data/vendor/local/include/harfbuzz/hb-version.h +2 -2
  55. data/vendor/local/include/harfbuzz/hb.h +2 -0
  56. data/vendor/local/include/pango-1.0/pango/pango-attributes.h +213 -4
  57. data/vendor/local/include/pango-1.0/pango/pango-break.h +53 -0
  58. data/vendor/local/include/pango-1.0/pango/pango-coverage.h +21 -0
  59. data/vendor/local/include/pango-1.0/pango/pango-engine.h +46 -0
  60. data/vendor/local/include/pango-1.0/pango/pango-features.h +2 -2
  61. data/vendor/local/include/pango-1.0/pango/pango-font.h +234 -0
  62. data/vendor/local/include/pango-1.0/pango/pango-fontmap.h +68 -0
  63. data/vendor/local/include/pango-1.0/pango/pango-fontset.h +42 -0
  64. data/vendor/local/include/pango-1.0/pango/pango-glyph-item.h +64 -0
  65. data/vendor/local/include/pango-1.0/pango/pango-glyph.h +55 -0
  66. data/vendor/local/include/pango-1.0/pango/pango-item.h +28 -0
  67. data/vendor/local/include/pango-1.0/pango/pango-language.h +5 -0
  68. data/vendor/local/include/pango-1.0/pango/pango-layout.h +43 -0
  69. data/vendor/local/include/pango-1.0/pango/pango-modules.h +11 -0
  70. data/vendor/local/include/pango-1.0/pango/pango-ot.h +149 -0
  71. data/vendor/local/include/pango-1.0/pango/pango-script.h +102 -0
  72. data/vendor/local/include/pango-1.0/pango/pango-tabs.h +11 -0
  73. data/vendor/local/include/pango-1.0/pango/pango-types.h +102 -2
  74. data/vendor/local/include/pango-1.0/pango/pango-utils.h +44 -0
  75. data/vendor/local/include/pango-1.0/pango/pangocairo.h +14 -0
  76. data/vendor/local/include/pango-1.0/pango/pangofc-fontmap.h +2 -2
  77. data/vendor/local/include/pango-1.0/pango/pangoft2.h +13 -0
  78. data/vendor/local/include/pango-1.0/pango/pangowin32.h +6 -0
  79. data/vendor/local/lib/girepository-1.0/Pango-1.0.typelib +0 -0
  80. data/vendor/local/lib/girepository-1.0/PangoCairo-1.0.typelib +0 -0
  81. data/vendor/local/lib/libharfbuzz.dll.a +0 -0
  82. data/vendor/local/lib/libharfbuzz.la +5 -5
  83. data/vendor/local/lib/libpango-1.0.dll.a +0 -0
  84. data/vendor/local/lib/libpango-1.0.la +2 -2
  85. data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
  86. data/vendor/local/lib/libpangocairo-1.0.la +4 -4
  87. data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
  88. data/vendor/local/lib/libpangoft2-1.0.la +3 -3
  89. data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
  90. data/vendor/local/lib/libpangowin32-1.0.la +2 -2
  91. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll +0 -0
  92. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll.a +0 -0
  93. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll +0 -0
  94. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll.a +0 -0
  95. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.la +1 -1
  96. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll +0 -0
  97. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll.a +0 -0
  98. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll +0 -0
  99. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll.a +0 -0
  100. data/vendor/local/lib/pkgconfig/harfbuzz.pc +5 -5
  101. data/vendor/local/lib/pkgconfig/pango.pc +1 -1
  102. data/vendor/local/lib/pkgconfig/pangocairo.pc +1 -1
  103. data/vendor/local/lib/pkgconfig/pangoft2.pc +1 -1
  104. data/vendor/local/lib/pkgconfig/pangowin32.pc +1 -1
  105. data/vendor/local/share/gir-1.0/Pango-1.0.gir +1824 -1434
  106. data/vendor/local/share/gir-1.0/PangoCairo-1.0.gir +109 -103
  107. data/vendor/local/share/gir-1.0/PangoFT2-1.0.gir +18 -15
  108. data/vendor/local/share/gtk-doc/html/harfbuzz/annotation-glossary.html +71 -0
  109. data/vendor/local/share/gtk-doc/html/harfbuzz/api-index-full.html +1419 -0
  110. data/vendor/local/share/gtk-doc/html/harfbuzz/ch01.html +98 -0
  111. data/vendor/local/share/gtk-doc/html/harfbuzz/deprecated-api-index.html +48 -0
  112. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-blob.html +415 -0
  113. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-buffer.html +1045 -0
  114. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-common.html +1073 -0
  115. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-coretext.html +67 -0
  116. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-deprecated.html +90 -0
  117. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-face.html +344 -0
  118. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-font.html +1617 -0
  119. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ft.html +130 -0
  120. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-glib.html +75 -0
  121. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-gobject.html +52 -0
  122. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-graphite2.html +76 -0
  123. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-icu.html +75 -0
  124. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-layout.html +544 -0
  125. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-tag.html +105 -0
  126. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot.html +67 -0
  127. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-set.html +540 -0
  128. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape-plan.html +264 -0
  129. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape.html +194 -0
  130. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-unicode.html +1180 -0
  131. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-uniscribe.html +67 -0
  132. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-version.html +156 -0
  133. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb.html +52 -0
  134. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz.devhelp2 +591 -0
  135. data/vendor/local/share/gtk-doc/html/harfbuzz/home.png +0 -0
  136. data/vendor/local/share/gtk-doc/html/harfbuzz/index.html +105 -0
  137. data/vendor/local/share/gtk-doc/html/harfbuzz/index.sgml +650 -0
  138. data/vendor/local/share/gtk-doc/html/harfbuzz/left-insensitive.png +0 -0
  139. data/vendor/local/share/gtk-doc/html/harfbuzz/left.png +0 -0
  140. data/vendor/local/share/gtk-doc/html/harfbuzz/object-tree.html +32 -0
  141. data/vendor/local/share/gtk-doc/html/harfbuzz/right-insensitive.png +0 -0
  142. data/vendor/local/share/gtk-doc/html/harfbuzz/right.png +0 -0
  143. data/vendor/local/share/gtk-doc/html/harfbuzz/style.css +321 -0
  144. data/vendor/local/share/gtk-doc/html/harfbuzz/up-insensitive.png +0 -0
  145. data/vendor/local/share/gtk-doc/html/harfbuzz/up.png +0 -0
  146. data/vendor/local/share/gtk-doc/html/pango/PangoEngineLang.html +3 -4
  147. data/vendor/local/share/gtk-doc/html/pango/PangoEngineShape.html +3 -4
  148. data/vendor/local/share/gtk-doc/html/pango/PangoFcDecoder.html +2 -2
  149. data/vendor/local/share/gtk-doc/html/pango/PangoFcFont.html +4 -9
  150. data/vendor/local/share/gtk-doc/html/pango/PangoFcFontMap.html +8 -13
  151. data/vendor/local/share/gtk-doc/html/pango/PangoMarkupFormat.html +2 -2
  152. data/vendor/local/share/gtk-doc/html/pango/{pango-pango-renderer.html → PangoRenderer.html} +99 -102
  153. data/vendor/local/share/gtk-doc/html/pango/annotation-glossary.html +20 -29
  154. data/vendor/local/share/gtk-doc/html/pango/api-index-1-10.html +2 -2
  155. data/vendor/local/share/gtk-doc/html/pango/api-index-1-12.html +2 -2
  156. data/vendor/local/share/gtk-doc/html/pango/api-index-1-14.html +2 -2
  157. data/vendor/local/share/gtk-doc/html/pango/api-index-1-16.html +6 -2
  158. data/vendor/local/share/gtk-doc/html/pango/api-index-1-18.html +2 -2
  159. data/vendor/local/share/gtk-doc/html/pango/api-index-1-2.html +2 -2
  160. data/vendor/local/share/gtk-doc/html/pango/api-index-1-20.html +4 -11
  161. data/vendor/local/share/gtk-doc/html/pango/api-index-1-22.html +3 -3
  162. data/vendor/local/share/gtk-doc/html/pango/api-index-1-24.html +15 -4
  163. data/vendor/local/share/gtk-doc/html/pango/api-index-1-26.html +4 -4
  164. data/vendor/local/share/gtk-doc/html/pango/api-index-1-30.html +6 -6
  165. data/vendor/local/share/gtk-doc/html/pango/api-index-1-31-0.html +42 -0
  166. data/vendor/local/share/gtk-doc/html/pango/api-index-1-32-4.html +58 -0
  167. data/vendor/local/share/gtk-doc/html/pango/api-index-1-32.html +6 -5
  168. data/vendor/local/share/gtk-doc/html/pango/api-index-1-34.html +41 -0
  169. data/vendor/local/share/gtk-doc/html/pango/api-index-1-4.html +2 -2
  170. data/vendor/local/share/gtk-doc/html/pango/api-index-1-6.html +2 -2
  171. data/vendor/local/share/gtk-doc/html/pango/api-index-1-8.html +19 -19
  172. data/vendor/local/share/gtk-doc/html/pango/api-index-deprecated.html +2 -2
  173. data/vendor/local/share/gtk-doc/html/pango/api-index-full.html +31 -27
  174. data/vendor/local/share/gtk-doc/html/pango/index.html +7 -5
  175. data/vendor/local/share/gtk-doc/html/pango/index.sgml +38 -38
  176. data/vendor/local/share/gtk-doc/html/pango/lowlevel.html +5 -5
  177. data/vendor/local/share/gtk-doc/html/pango/pango-Bidirectional-Text.html +6 -9
  178. data/vendor/local/share/gtk-doc/html/pango/pango-Cairo-Rendering.html +113 -66
  179. data/vendor/local/share/gtk-doc/html/pango/pango-CoreText-Fonts.html +2 -2
  180. data/vendor/local/share/gtk-doc/html/pango/pango-Coverage-Maps.html +8 -12
  181. data/vendor/local/share/gtk-doc/html/pango/pango-Engines.html +5 -8
  182. data/vendor/local/share/gtk-doc/html/pango/pango-Fonts.html +90 -53
  183. data/vendor/local/share/gtk-doc/html/pango/pango-FreeType-Fonts-and-Rendering.html +10 -10
  184. data/vendor/local/share/gtk-doc/html/pango/pango-Glyph-Storage.html +21 -8
  185. data/vendor/local/share/gtk-doc/html/pango/pango-Layout-Objects.html +44 -15
  186. data/vendor/local/share/gtk-doc/html/pango/pango-Miscellaneous-Utilities.html +2 -2
  187. data/vendor/local/share/gtk-doc/html/pango/pango-Modules.html +2 -2
  188. data/vendor/local/share/gtk-doc/html/pango/pango-OpenType-Font-Handling.html +12 -12
  189. data/vendor/local/share/gtk-doc/html/pango/pango-Scripts-and-Languages.html +87 -90
  190. data/vendor/local/share/gtk-doc/html/pango/pango-Tab-Stops.html +2 -5
  191. data/vendor/local/share/gtk-doc/html/pango/pango-Text-Attributes.html +38 -31
  192. data/vendor/local/share/gtk-doc/html/pango/pango-Text-Processing.html +10 -18
  193. data/vendor/local/share/gtk-doc/html/pango/pango-Version-Checking.html +10 -11
  194. data/vendor/local/share/gtk-doc/html/pango/pango-Vertical-Text.html +4 -6
  195. data/vendor/local/share/gtk-doc/html/pango/pango-Win32-Fonts-and-Rendering.html +3 -4
  196. data/vendor/local/share/gtk-doc/html/pango/pango-Xft-Fonts-and-Rendering.html +12 -12
  197. data/vendor/local/share/gtk-doc/html/pango/pango-hierarchy.html +4 -4
  198. data/vendor/local/share/gtk-doc/html/pango/pango-querymodules.html +2 -2
  199. data/vendor/local/share/gtk-doc/html/pango/pango.devhelp2 +34 -31
  200. data/vendor/local/share/gtk-doc/html/pango/pango.html +2 -2
  201. data/vendor/local/share/gtk-doc/html/pango/rendering.html +2 -2
  202. data/vendor/local/share/gtk-doc/html/pango/tools.html +2 -2
  203. data/vendor/local/share/man/man1/pango-querymodules.1 +2 -2
  204. data/vendor/local/share/man/man1/pango-view.1 +2 -2
  205. metadata +57 -24
  206. data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
  207. data/vendor/local/include/harfbuzz/hb-gobject.h +0 -69
  208. data/vendor/local/share/gtk-doc/html/pango/api-index-1-28.html +0 -31
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c72078a4a63532ef282919527b450bee1d8a0be7
4
+ data.tar.gz: 5e6ad1b0ed983446e0679267eac3b2f14b246d39
5
+ SHA512:
6
+ metadata.gz: 787be7b8a354e339bbf55d0e8b4fe996ef7f8d9e9e23c628410668be4795754f0573ece974beb03a83fe2d620290aeff144213cb81c56831990db5195f6c61f4
7
+ data.tar.gz: 96efce79ee68e11df4a4e4362e3325826d7dcd136d31445403cdbb77a41fe1d6b5ffd21ed3d767ed621e4fe309e8ce019706a68811884911e9610d6b2054075a
data/README CHANGED
@@ -1,6 +1,6 @@
1
1
  Ruby/Pango
2
2
  ==========
3
- Ruby/Pango is a Ruby binding of pango-1.x.
3
+ Ruby/Pango is a Ruby binding of pango-1.14.x.
4
4
 
5
5
  Requirements
6
6
  ------------
@@ -12,7 +12,7 @@ Requirements
12
12
 
13
13
  Install
14
14
  -------
15
- 0. install ruby-1.6.x or later, GLib, Pango, Ruby/GLib2, Ruby/GTK2
15
+ 0. install ruby-1.9.x or later, GLib, Pango-1.14.x or later, Ruby/GLib2, Ruby/GTK2
16
16
  (and cairo/rcairo).
17
17
  1. ruby extconf.rb
18
18
  (To use rcairo on Win32, set CAIRO_PATH as a environment variable first)
data/Rakefile CHANGED
@@ -15,20 +15,21 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
15
15
  :name => "harfbuzz",
16
16
  :download_base_url => "http://www.freedesktop.org/software/harfbuzz/release",
17
17
  :label => "HarfBuzz",
18
- :version => "0.9.17",
18
+ :version => "0.9.25",
19
19
  :compression_method => "bz2",
20
20
  :windows => {
21
+ :configure_args => [
22
+ ],
21
23
  :patches => [
22
- "harfbuzz-0.9.17-disable-uniscribe.diff",
23
24
  ],
24
- :need_autoreconf => true,
25
+ :built_file => "bin/libharfbuzz-0.dll",
25
26
  },
26
27
  },
27
28
  {
28
29
  :name => "pango",
29
30
  :download_site => :gnome,
30
31
  :label => "pango",
31
- :version => "1.34.1",
32
+ :version => "1.36.1",
32
33
  :compression_method => "xz",
33
34
  :windows => {
34
35
  :configure_args => [
@@ -37,6 +38,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
37
38
  :patches => [
38
39
  "pango-1.34.0-enable-fc-font.diff",
39
40
  ],
41
+ :built_file => "bin/libpango-1.0-0.dll",
40
42
  },
41
43
  },
42
44
  ]
@@ -47,7 +49,7 @@ namespace :gcc do
47
49
  namespace :dll do
48
50
  desc "Bundle GCC related DLLs"
49
51
  task(:bundle) do
50
- dlls = ["libgcc_s_sjlj-1.dll", "libstdc++-6.dll"]
52
+ dlls = ["libstdc++-6.dll"]
51
53
  dlls.each do |dll|
52
54
  host = package_task.windows.build_host
53
55
  binary_dir = package_task.windows.absolute_binary_dir
data/ext/pango/extconf.rb CHANGED
@@ -54,11 +54,13 @@ rcairo_source_dir_names.each do |rcairo_source_dir_name|
54
54
  break
55
55
  end
56
56
  end
57
- check_cairo(rcairo_options)
57
+ unless check_cairo(rcairo_options)
58
+ exit(false)
59
+ end
58
60
 
59
61
  setup_win32(module_name, base_dir)
60
62
 
61
- unless required_pkg_config_package(package_id,
63
+ unless required_pkg_config_package([package_id, 1, 14, 0],
62
64
  :debian => "libpango1.0-dev",
63
65
  :redhat => "pango-devel",
64
66
  :homebrew => "pango",
@@ -76,8 +78,6 @@ end
76
78
 
77
79
  pango_header = "pango/pango.h"
78
80
  have_func("pango_layout_iter_get_type", pango_header)
79
- have_func("pango_layout_set_ellipsize", pango_header)
80
- have_func("pango_layout_get_font_description", pango_header)
81
81
  have_func("pango_render_part_get_type", pango_header)
82
82
  have_func("pango_attr_strikethrough_color_new", pango_header)
83
83
  have_func("pango_attr_underline_color_new", pango_header)
data/ext/pango/rbpango.c CHANGED
@@ -75,7 +75,6 @@ rg_s_reorder_items(G_GNUC_UNUSED VALUE self, VALUE attrs)
75
75
  rpango_reorder_items_ensure, (VALUE)&args);
76
76
  }
77
77
 
78
- #if PANGO_CHECK_VERSION(1,4,0)
79
78
  static VALUE
80
79
  rg_s_unichar_direction(G_GNUC_UNUSED VALUE self, VALUE ch)
81
80
  {
@@ -88,7 +87,6 @@ rg_s_find_base_dir(G_GNUC_UNUSED VALUE self, VALUE text)
88
87
  StringValue(text);
89
88
  return PANGODIRECTION2RVAL(pango_find_base_dir(RSTRING_PTR(text), RSTRING_LEN(text)));
90
89
  }
91
- #endif
92
90
 
93
91
  struct rbg_pangologattrs2rval_free_args {
94
92
  PangoLogAttr *attrs;
@@ -255,11 +253,7 @@ rg_s_pixels(G_GNUC_UNUSED VALUE self, VALUE pixels)
255
253
  static VALUE
256
254
  rg_s_cairo_available_p(G_GNUC_UNUSED VALUE self)
257
255
  {
258
- #ifdef CAIRO_AVAILABLE
259
256
  return Qtrue;
260
- #else
261
- return Qfalse;
262
- #endif
263
257
  }
264
258
 
265
259
  void
@@ -274,11 +268,8 @@ Init_pango(void)
274
268
  INT2FIX(PANGO_MICRO_VERSION)));
275
269
 
276
270
  RG_DEF_SMETHOD(reorder_items, 1);
277
-
278
- #if PANGO_CHECK_VERSION(1,4,0)
279
271
  RG_DEF_SMETHOD(unichar_direction, 1);
280
272
  RG_DEF_SMETHOD(find_base_dir, 1);
281
- #endif
282
273
  RG_DEF_SMETHOD(break, 2);
283
274
  RG_DEF_SMETHOD(get_log_attrs, 3);
284
275
  RG_DEF_SMETHOD(find_paragraph_boundary, 1);
data/ext/pango/rbpango.h CHANGED
@@ -31,12 +31,10 @@
31
31
  #include "rbgobject.h"
32
32
  #include "rbpangoversion.h"
33
33
  #include "rbpangoconversions.h"
34
-
35
- #if PANGO_CHECK_VERSION(1,10,0)
36
34
  #include <pango/pangocairo.h>
37
- # ifdef HAVE_RB_CAIRO_H
35
+
36
+ #ifdef HAVE_RB_CAIRO_H
38
37
  #include <rb_cairo.h>
39
- # endif
40
38
  #endif
41
39
 
42
40
  #if defined(G_PLATFORM_WIN32) && !defined(RUBY_PANGO_STATIC_COMPILATION)
@@ -70,10 +68,7 @@ RUBY_PANGO_VAR VALUE mPango;
70
68
  #ifndef PANGO_TYPE_GLYPH_ITEM
71
69
  # define PANGO_TYPE_GLYPH_ITEM (pango_glyph_item_get_type())
72
70
  #endif
73
-
74
- #if PANGO_CHECK_VERSION(1,4,0)
75
71
  #define PANGO_TYPE_SCRIPT_ITER (pango_script_iter_get_type())
76
- #endif
77
72
 
78
73
  #define ATTR2RVAL(attr) (pango_make_attribute(attr))
79
74
  #define RVAL2ATTR(attr) (pango_get_attribute(attr))
@@ -95,10 +90,7 @@ extern GType pango_glyph_info_get_type(void);
95
90
  #ifndef HAVE_PANGO_GLYPH_ITEM_GET_TYPE
96
91
  extern GType pango_glyph_item_get_type(void);
97
92
  #endif
98
-
99
- #if PANGO_CHECK_VERSION(1,4,0)
100
93
  extern GType pango_script_iter_get_type(void);
101
- #endif
102
94
 
103
95
  extern VALUE pango_get_attribute_klass(VALUE attr_type);
104
96
  extern void pango_add_attribute(int attr_type, VALUE klass);
@@ -56,7 +56,6 @@ rg_initialize(VALUE self)
56
56
  return Qnil;
57
57
  }
58
58
 
59
- #if PANGO_CHECK_VERSION(1,4,0)
60
59
  static VALUE
61
60
  rg_set_shape_engine(VALUE self, VALUE engine)
62
61
  {
@@ -100,7 +99,6 @@ rg_lang_engine(VALUE self)
100
99
  }
101
100
  return ret;
102
101
  }
103
- #endif
104
102
 
105
103
  static VALUE
106
104
  rg_set_font(VALUE self, VALUE font)
@@ -204,12 +202,10 @@ Init_pango_analysis(VALUE mPango)
204
202
  VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_ANALYSIS, "Analysis", mPango);
205
203
 
206
204
  RG_DEF_METHOD(initialize, 0);
207
- #if PANGO_CHECK_VERSION(1,4,0)
208
205
  RG_DEF_METHOD(set_shape_engine, 1);
209
206
  RG_DEF_METHOD(shape_engine, 0);
210
207
  RG_DEF_METHOD(set_lang_engine, 1);
211
208
  RG_DEF_METHOD(lang_engine, 0);
212
- #endif
213
209
  RG_DEF_METHOD(set_font, 1);
214
210
  RG_DEF_METHOD(font, 0);
215
211
  RG_DEF_METHOD(set_level, 1);
@@ -274,14 +274,13 @@ attr_AttrSize_initialize(VALUE self, VALUE size)
274
274
  DATA_PTR(self) = pango_attr_size_new(NUM2INT(size));
275
275
  return Qnil;
276
276
  }
277
- #if PANGO_CHECK_VERSION(1,8,1)
277
+
278
278
  static VALUE
279
279
  attr_AttrAbsoluteSize_initialize(VALUE self, VALUE size)
280
280
  {
281
281
  DATA_PTR(self) = pango_attr_size_new_absolute(NUM2INT(size));
282
282
  return Qnil;
283
283
  }
284
- #endif
285
284
 
286
285
  #if PANGO_CHECK_VERSION(1,16,0)
287
286
  static VALUE
@@ -357,18 +356,11 @@ attr_AttrShape_initialize(int argc, VALUE *argv, VALUE self)
357
356
  RVAL2PANGORECTANGLE(ink_rect),
358
357
  RVAL2PANGORECTANGLE(logical_rect));
359
358
  } else {
360
- #if PANGO_CHECK_VERSION(1,8,0)
361
359
  G_RELATIVE(self, data);
362
360
  DATA_PTR(self) = pango_attr_shape_new_with_data(
363
361
  RVAL2PANGORECTANGLE(ink_rect),
364
362
  RVAL2PANGORECTANGLE(logical_rect),
365
363
  (gpointer)data, NULL, NULL);
366
- #else
367
- rb_warning("not supported in Pango-1.6.x. the 3rd parameter was ignored.");
368
- DATA_PTR(self) = pango_attr_shape_new(
369
- RVAL2PANGORECTANGLE(ink_rect),
370
- RVAL2PANGORECTANGLE(logical_rect));
371
- #endif
372
364
  }
373
365
 
374
366
  return Qnil;
@@ -381,20 +373,15 @@ attr_AttrScale_initialize(VALUE self, VALUE scale)
381
373
  return Qnil;
382
374
  }
383
375
 
384
- #if PANGO_CHECK_VERSION(1,4,0)
385
376
  static VALUE
386
377
  attr_AttrFallback_initialize(VALUE self, VALUE enable_fallback)
387
378
  {
388
379
  DATA_PTR(self) = pango_attr_fallback_new(RVAL2CBOOL(enable_fallback));
389
380
  return Qnil;
390
381
  }
391
- #endif
392
382
 
393
383
  MAKE_ATTRINT_INIT(AttrRise, rise);
394
-
395
- #if PANGO_CHECK_VERSION(1,6,0)
396
384
  MAKE_ATTRINT_INIT(AttrLetterSpacing, letter_spacing);
397
- #endif
398
385
 
399
386
  #define MAKE_ATTR(gtype, name, parent, num)\
400
387
  tmpklass = rb_define_class_under(mPango, #name, parent);\
@@ -450,9 +437,7 @@ Init_pango_attribute(VALUE mPango)
450
437
  MAKE_ATTR(PANGO_ATTR_VARIANT, AttrVariant, pattrint, 1);
451
438
  MAKE_ATTR(PANGO_ATTR_STRETCH, AttrStretch, pattrint, 1);
452
439
  MAKE_ATTR(PANGO_ATTR_SIZE, AttrSize, pattrint, 1);
453
- #if PANGO_CHECK_VERSION(1,8,1)
454
440
  MAKE_ATTR(PANGO_ATTR_ABSOLUTE_SIZE, AttrAbsoluteSize, pattrint, 1);
455
- #endif
456
441
  #if PANGO_CHECK_VERSION(1,16,0)
457
442
  MAKE_ATTR(PANGO_ATTR_GRAVITY, AttrGravity, pattrint, 1);
458
443
  MAKE_ATTR(PANGO_ATTR_GRAVITY_HINT, AttrGravityHint, pattrint, 1);
@@ -474,9 +459,7 @@ Init_pango_attribute(VALUE mPango)
474
459
  MAKE_ATTR(PANGO_ATTR_STRIKETHROUGH_COLOR, AttrStrikethroughColor, pattrcolor, 3);
475
460
  #endif
476
461
  MAKE_ATTR(PANGO_ATTR_RISE, AttrRise, pattrint, 1);
477
- #if PANGO_CHECK_VERSION(1,6,0)
478
462
  MAKE_ATTR(PANGO_ATTR_LETTER_SPACING, AttrLetterSpacing, pattrint, 1);
479
- #endif
480
463
  MAKE_ATTR(PANGO_ATTR_SHAPE, AttrShape, RG_TARGET_NAMESPACE, -1);
481
464
  rbg_define_method(tmpklass, "ink_rect", attr_shape_ink_rect, 0);
482
465
  rbg_define_method(tmpklass, "logical_rect", attr_shape_logical_rect, 0);
@@ -490,9 +473,7 @@ Init_pango_attribute(VALUE mPango)
490
473
  rb_define_const(tmpklass, "LARGE", rb_float_new(PANGO_SCALE_LARGE));
491
474
  rb_define_const(tmpklass, "X_LARGE", rb_float_new(PANGO_SCALE_X_LARGE));
492
475
  rb_define_const(tmpklass, "XX_LARGE", rb_float_new(PANGO_SCALE_XX_LARGE));
493
- #if PANGO_CHECK_VERSION(1,4,0)
494
476
  MAKE_ATTR(PANGO_ATTR_FALLBACK, AttrFallback, pattrbool, 1);
495
- #endif
496
477
  /* PangoAttrType */
497
478
  G_DEF_CLASS(PANGO_TYPE_ATTR_TYPE, "Type", RG_TARGET_NAMESPACE);
498
479
  #define INT2ATTRTYPE(x) rbgobj_make_enum((x), PANGO_TYPE_ATTR_TYPE)
@@ -509,16 +490,10 @@ Init_pango_attribute(VALUE mPango)
509
490
  rb_define_const(RG_TARGET_NAMESPACE, "TYPE_BACKGROUND", INT2ATTRTYPE(PANGO_ATTR_BACKGROUND));
510
491
  rb_define_const(RG_TARGET_NAMESPACE, "TYPE_UNDERLINE", INT2ATTRTYPE(PANGO_ATTR_UNDERLINE));
511
492
  rb_define_const(RG_TARGET_NAMESPACE, "TYPE_STRIKETHROUGH", INT2ATTRTYPE(PANGO_ATTR_STRIKETHROUGH));
512
- #if PANGO_CHECK_VERSION(1,8,0)
513
493
  rb_define_const(RG_TARGET_NAMESPACE, "TYPE_STRIKETHROUGH_COLOR", INT2ATTRTYPE(PANGO_ATTR_STRIKETHROUGH_COLOR));
514
- #endif
515
494
  rb_define_const(RG_TARGET_NAMESPACE, "TYPE_RISE", INT2ATTRTYPE(PANGO_ATTR_RISE));
516
495
  rb_define_const(RG_TARGET_NAMESPACE, "TYPE_SHAPE", INT2ATTRTYPE(PANGO_ATTR_SHAPE));
517
496
  rb_define_const(RG_TARGET_NAMESPACE, "TYPE_SCALE", INT2ATTRTYPE(PANGO_ATTR_SCALE));
518
- #if PANGO_CHECK_VERSION(1,8,0)
519
497
  rb_define_const(RG_TARGET_NAMESPACE, "TYPE_FALLBACK", INT2ATTRTYPE(PANGO_ATTR_FALLBACK));
520
- #endif
521
- #if PANGO_CHECK_VERSION(1,6,0)
522
498
  rb_define_const(RG_TARGET_NAMESPACE, "TYPE_LETTER_SPACING", INT2ATTRTYPE(PANGO_ATTR_LETTER_SPACING));
523
- #endif
524
499
  }
@@ -61,7 +61,6 @@ rg_splice(VALUE self, VALUE other, VALUE pos, VALUE len)
61
61
  return self;
62
62
  }
63
63
 
64
- #if PANGO_CHECK_VERSION(1,4,0)
65
64
  static gboolean
66
65
  filter_func(PangoAttribute *attr, gpointer data)
67
66
  {
@@ -77,7 +76,6 @@ rg_filter(VALUE self)
77
76
  (PangoAttrFilterFunc)filter_func,
78
77
  (gpointer)func));
79
78
  }
80
- #endif
81
79
 
82
80
  static VALUE
83
81
  rg_iterator(VALUE self)
@@ -97,9 +95,7 @@ Init_pango_attrlist(VALUE mPango)
97
95
  RG_DEF_METHOD(insert_before, 1);
98
96
  RG_DEF_METHOD(change, 1);
99
97
  RG_DEF_METHOD(splice, 3);
100
- #if PANGO_CHECK_VERSION(1,4,0)
101
98
  RG_DEF_METHOD(filter, 0);
102
- #endif
103
99
  RG_DEF_METHOD(iterator, 0);
104
100
 
105
101
  }
@@ -1,7 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
- * Copyright (C) 2006 Ruby-GNOME2 Project Team
3
+ * Copyright (C) 2006-2013 Ruby-GNOME2 Project Team
5
4
  * Copyright (C) 2005 Kouhei Sutou
6
5
  *
7
6
  * This library is free software; you can redistribute it and/or
@@ -22,8 +21,6 @@
22
21
 
23
22
  #include "rbpangoprivate.h"
24
23
 
25
- #ifdef CAIRO_AVAILABLE
26
-
27
24
  #define RG_TARGET_NAMESPACE cCairoFontMap
28
25
  #define _SELF(self) (RVAL2PANGOCAIROFONTMAP(self))
29
26
 
@@ -63,14 +60,14 @@ rg_s_default(G_GNUC_UNUSED VALUE klass)
63
60
  return GOBJ2RVAL(pango_cairo_font_map_get_default());
64
61
  }
65
62
 
66
- # if PANGO_CHECK_VERSION(1, 22, 0)
63
+ #if PANGO_CHECK_VERSION(1, 22, 0)
67
64
  static VALUE
68
65
  rg_s_set_default(VALUE klass, VALUE font_map)
69
66
  {
70
67
  pango_cairo_font_map_set_default(RVAL2GOBJ(font_map));
71
68
  return klass;
72
69
  }
73
- # endif
70
+ #endif
74
71
 
75
72
  static VALUE
76
73
  rg_set_resolution(VALUE self, VALUE dpi)
@@ -88,15 +85,20 @@ rg_resolution(VALUE self)
88
85
  static VALUE
89
86
  rg_create_context(VALUE self)
90
87
  {
91
- return GOBJ2RVAL_UNREF(pango_cairo_font_map_create_context(_SELF(self)));
92
- }
88
+ PangoContext *pango_context;
93
89
 
90
+ #if PANGO_CHECK_VERSION(1, 22, 0)
91
+ pango_context = pango_font_map_create_context(PANGO_FONT_MAP(_SELF(self)));
92
+ #else
93
+ pango_context = pango_cairo_font_map_create_context(_SELF(self));
94
94
  #endif
95
95
 
96
+ return GOBJ2RVAL_UNREF(pango_context);
97
+ }
98
+
96
99
  void
97
100
  Init_pango_cairo(VALUE mPango)
98
101
  {
99
- #ifdef CAIRO_AVAILABLE
100
102
  VALUE RG_TARGET_NAMESPACE;
101
103
 
102
104
  /* Pango::CairoFontMap */
@@ -104,12 +106,11 @@ Init_pango_cairo(VALUE mPango)
104
106
 
105
107
  RG_DEF_SMETHOD(create, -1);
106
108
  RG_DEF_SMETHOD(default, 0);
107
- # if PANGO_CHECK_VERSION(1, 22, 0)
109
+ #if PANGO_CHECK_VERSION(1, 22, 0)
108
110
  RG_DEF_SMETHOD(set_default, 1);
109
- # endif
111
+ #endif
110
112
 
111
113
  RG_DEF_METHOD(set_resolution, 1);
112
114
  RG_DEF_METHOD(resolution, 0);
113
115
  RG_DEF_METHOD(create_context, 0);
114
- #endif
115
116
  }
@@ -1,7 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
- * Copyright (C) 2006 Ruby-GNOME2 Project Team
3
+ * Copyright (C) 2006-2013 Ruby-GNOME2 Project Team
5
4
  * Copyright (C) 2005 Kouhei Sutou
6
5
  *
7
6
  * This library is free software; you can redistribute it and/or
@@ -22,12 +21,6 @@
22
21
 
23
22
  #include "rbpangoprivate.h"
24
23
 
25
- #if PANGO_CHECK_VERSION(1,10,0) && defined(HAVE_RB_CAIRO_H)
26
- # define CAIRO_AVAILABLE 1
27
- #endif
28
-
29
- #ifdef CAIRO_AVAILABLE
30
-
31
24
  #define RG_TARGET_NAMESPACE rb_cCairo_Context
32
25
 
33
26
  static VALUE
@@ -75,16 +68,14 @@ rg_show_pango_layout(VALUE self, VALUE layout)
75
68
  return self;
76
69
  }
77
70
 
78
- #if PANGO_CHECK_VERSION(1,14,0)
79
71
  static VALUE
80
72
  rg_show_pango_error_underline(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
81
73
  {
82
- pango_cairo_show_error_underline(RVAL2CRCONTEXT(self),
83
- NUM2DBL(x), NUM2DBL(y),
74
+ pango_cairo_show_error_underline(RVAL2CRCONTEXT(self),
75
+ NUM2DBL(x), NUM2DBL(y),
84
76
  NUM2DBL(width), NUM2DBL(height));
85
77
  return self;
86
78
  }
87
- #endif
88
79
 
89
80
  /* Rendering to a path */
90
81
  static VALUE
@@ -110,23 +101,18 @@ rg_pango_layout_path(VALUE self, VALUE layout)
110
101
  return self;
111
102
  }
112
103
 
113
- #if PANGO_CHECK_VERSION(1,14,0)
114
104
  static VALUE
115
105
  rg_pango_error_underline_path(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
116
106
  {
117
- pango_cairo_error_underline_path(RVAL2CRCONTEXT(self),
118
- NUM2DBL(x), NUM2DBL(y),
107
+ pango_cairo_error_underline_path(RVAL2CRCONTEXT(self),
108
+ NUM2DBL(x), NUM2DBL(y),
119
109
  NUM2DBL(width), NUM2DBL(height));
120
110
  return self;
121
111
  }
122
- #endif
123
-
124
- #endif
125
112
 
126
113
  void
127
- Init_pango_cairo_context(VALUE mPango)
114
+ Init_pango_cairo_context(G_GNUC_UNUSED VALUE mPango)
128
115
  {
129
- #ifdef CAIRO_AVAILABLE
130
116
  /* Cairo::Context */
131
117
  RG_DEF_METHOD(update_pango_context, 1);
132
118
  /* Convenience */
@@ -136,16 +122,10 @@ Init_pango_cairo_context(VALUE mPango)
136
122
  RG_DEF_METHOD(show_pango_glyph_string, 2);
137
123
  RG_DEF_METHOD(show_pango_layout_line, 1);
138
124
  RG_DEF_METHOD(show_pango_layout, 1);
139
- #if PANGO_CHECK_VERSION(1,14,0)
140
125
  RG_DEF_METHOD(show_pango_error_underline, 4);
141
- #endif
142
126
  /* Rendering to a path */
143
127
  RG_DEF_METHOD(pango_glyph_string_path, 2);
144
128
  RG_DEF_METHOD(pango_layout_line_path, 1);
145
129
  RG_DEF_METHOD(pango_layout_path, 1);
146
-
147
- #if PANGO_CHECK_VERSION(1,14,0)
148
130
  RG_DEF_METHOD(pango_error_underline_path, 4);
149
- #endif
150
- #endif
151
131
  }