pango 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. data/ext/pango/extconf.rb +3 -0
  2. data/ext/pango/rbpango.c +312 -12
  3. data/ext/pango/rbpango.h +33 -22
  4. data/ext/pango/rbpangoanalysis.c +98 -58
  5. data/ext/pango/rbpangoattribute.c +94 -85
  6. data/ext/pango/rbpangoattriterator.c +39 -28
  7. data/ext/pango/rbpangoattrlist.c +42 -32
  8. data/ext/pango/rbpangocairo.c +38 -172
  9. data/ext/pango/rbpangocairocontext.c +151 -0
  10. data/ext/pango/rbpangocolor.c +49 -38
  11. data/ext/pango/rbpangocontext.c +109 -102
  12. data/ext/pango/rbpangoconversions.h +111 -0
  13. data/ext/pango/rbpangocoverage.c +45 -37
  14. data/ext/pango/rbpangoengine.c +22 -12
  15. data/ext/pango/rbpangofont.c +52 -43
  16. data/ext/pango/rbpangofontdescription.c +102 -91
  17. data/ext/pango/rbpangofontface.c +32 -21
  18. data/ext/pango/rbpangofontfamily.c +31 -20
  19. data/ext/pango/rbpangofontmap.c +44 -36
  20. data/ext/pango/rbpangofontmetrics.c +41 -30
  21. data/ext/pango/rbpangofontset.c +32 -21
  22. data/ext/pango/rbpangofontsetsimple.c +34 -24
  23. data/ext/pango/rbpangoglyphinfo.c +48 -35
  24. data/ext/pango/rbpangoglyphitem.c +43 -33
  25. data/ext/pango/rbpangoglyphstring.c +59 -59
  26. data/ext/pango/rbpangogravity.c +34 -23
  27. data/ext/pango/rbpangoitem.c +43 -34
  28. data/ext/pango/rbpangolanguage.c +44 -34
  29. data/ext/pango/rbpangolayout.c +167 -160
  30. data/ext/pango/rbpangolayoutiter.c +70 -59
  31. data/ext/pango/rbpangolayoutline.c +106 -71
  32. data/ext/pango/rbpangologattr.c +42 -31
  33. data/ext/pango/rbpangomatrix.c +47 -35
  34. data/ext/pango/rbpangoprivate.h +53 -0
  35. data/ext/pango/rbpangorectangle.c +58 -49
  36. data/ext/pango/rbpangorenderer.c +81 -70
  37. data/ext/pango/rbpangoscript.c +37 -27
  38. data/ext/pango/rbpangoscriptiter.c +32 -22
  39. data/ext/pango/rbpangotabarray.c +48 -37
  40. data/lib/1.8/pango.so +0 -0
  41. data/lib/1.9/pango.so +0 -0
  42. data/vendor/local/bin/libpango-1.0-0.dll +0 -0
  43. data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
  44. data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
  45. data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
  46. data/vendor/local/bin/pango-querymodules.exe +0 -0
  47. data/vendor/local/bin/pango-view.exe +0 -0
  48. data/vendor/local/etc/pango/pango.modules +1 -1
  49. data/vendor/local/include/pango-1.0/pango/pango-attributes.h +1 -1
  50. data/vendor/local/include/pango-1.0/pango/pango-context.h +3 -3
  51. data/vendor/local/include/pango-1.0/pango/pango-features.h +3 -3
  52. data/vendor/local/include/pango-1.0/pango/pango-font.h +3 -3
  53. data/vendor/local/include/pango-1.0/pango/pango-language.h +3 -3
  54. data/vendor/local/include/pango-1.0/pango/pango-layout.h +6 -1
  55. data/vendor/local/include/pango-1.0/pango/pango-renderer.h +1 -1
  56. data/vendor/local/include/pango-1.0/pango/pango-script.h +6 -6
  57. data/vendor/local/include/pango-1.0/pango/pango-utils.h +6 -6
  58. data/vendor/local/lib/libpango-1.0.dll.a +0 -0
  59. data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
  60. data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
  61. data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
  62. data/vendor/local/lib/pango-1.0.def +2 -0
  63. data/vendor/local/lib/pango-1.0.lib +0 -0
  64. data/vendor/local/lib/pangocairo-1.0.lib +0 -0
  65. data/vendor/local/lib/pangoft2-1.0.lib +0 -0
  66. data/vendor/local/lib/pangowin32-1.0.def +1 -1
  67. data/vendor/local/lib/pangowin32-1.0.lib +0 -0
  68. data/vendor/local/lib/pkgconfig/pango.pc +1 -1
  69. data/vendor/local/lib/pkgconfig/pangocairo.pc +1 -1
  70. data/vendor/local/lib/pkgconfig/pangoft2.pc +1 -1
  71. data/vendor/local/lib/pkgconfig/pangowin32.pc +1 -1
  72. data/vendor/local/manifest/{pango-dev_1.28.3-1_win32.mft → pango-dev_1.29.4-1_win32.mft} +5 -5
  73. data/vendor/local/manifest/{pango_1.28.3-1_win32.mft → pango_1.29.4-1_win32.mft} +2 -2
  74. data/vendor/local/share/doc/{pango-1.28.3 → pango-1.29.4}/COPYING +0 -0
  75. data/vendor/local/share/doc/{pango-dev-1.28.3 → pango-dev-1.29.4}/COPYING +0 -0
  76. data/vendor/local/share/gtk-doc/html/pango/PangoEngineLang.html +9 -10
  77. data/vendor/local/share/gtk-doc/html/pango/PangoEngineShape.html +25 -27
  78. data/vendor/local/share/gtk-doc/html/pango/PangoFcDecoder.html +19 -28
  79. data/vendor/local/share/gtk-doc/html/pango/PangoFcFont.html +42 -60
  80. data/vendor/local/share/gtk-doc/html/pango/PangoFcFontMap.html +97 -147
  81. data/vendor/local/share/gtk-doc/html/pango/PangoMarkupFormat.html +6 -6
  82. data/vendor/local/share/gtk-doc/html/pango/index-1.10.html +3 -3
  83. data/vendor/local/share/gtk-doc/html/pango/index-1.12.html +3 -3
  84. data/vendor/local/share/gtk-doc/html/pango/index-1.14.html +3 -3
  85. data/vendor/local/share/gtk-doc/html/pango/index-1.16.html +5 -5
  86. data/vendor/local/share/gtk-doc/html/pango/index-1.18.html +3 -5
  87. data/vendor/local/share/gtk-doc/html/pango/index-1.2.html +3 -3
  88. data/vendor/local/share/gtk-doc/html/pango/index-1.20.html +3 -3
  89. data/vendor/local/share/gtk-doc/html/pango/index-1.22.html +5 -5
  90. data/vendor/local/share/gtk-doc/html/pango/index-1.24.html +3 -3
  91. data/vendor/local/share/gtk-doc/html/pango/index-1.26.html +4 -4
  92. data/vendor/local/share/gtk-doc/html/pango/index-1.28.html +8 -11
  93. data/vendor/local/share/gtk-doc/html/pango/index-1.30.html +38 -0
  94. data/vendor/local/share/gtk-doc/html/pango/index-1.4.html +3 -3
  95. data/vendor/local/share/gtk-doc/html/pango/index-1.6.html +4 -4
  96. data/vendor/local/share/gtk-doc/html/pango/index-1.8.html +4 -4
  97. data/vendor/local/share/gtk-doc/html/pango/index-all.html +38 -40
  98. data/vendor/local/share/gtk-doc/html/pango/index-deprecated.html +3 -3
  99. data/vendor/local/share/gtk-doc/html/pango/index.html +6 -5
  100. data/vendor/local/share/gtk-doc/html/pango/index.sgml +71 -34
  101. data/vendor/local/share/gtk-doc/html/pango/lowlevel.html +3 -3
  102. data/vendor/local/share/gtk-doc/html/pango/pango-ATSUI-Fonts.html +4 -66
  103. data/vendor/local/share/gtk-doc/html/pango/pango-Bidirectional-Text.html +52 -50
  104. data/vendor/local/share/gtk-doc/html/pango/pango-Cairo-Rendering.html +217 -278
  105. data/vendor/local/share/gtk-doc/html/pango/pango-Coverage-Maps.html +40 -41
  106. data/vendor/local/share/gtk-doc/html/pango/pango-Engines.html +37 -49
  107. data/vendor/local/share/gtk-doc/html/pango/pango-Fonts.html +481 -628
  108. data/vendor/local/share/gtk-doc/html/pango/pango-FreeType-Fonts-and-Rendering.html +76 -118
  109. data/vendor/local/share/gtk-doc/html/pango/pango-Glyph-Storage.html +302 -452
  110. data/vendor/local/share/gtk-doc/html/pango/pango-Layout-Objects.html +492 -517
  111. data/vendor/local/share/gtk-doc/html/pango/pango-Miscellaneous-Utilities.html +134 -164
  112. data/vendor/local/share/gtk-doc/html/pango/pango-Modules.html +34 -45
  113. data/vendor/local/share/gtk-doc/html/pango/pango-OpenType-Font-Handling.html +244 -359
  114. data/vendor/local/share/gtk-doc/html/pango/pango-Scripts-and-Languages.html +117 -122
  115. data/vendor/local/share/gtk-doc/html/pango/pango-Tab-Stops.html +112 -120
  116. data/vendor/local/share/gtk-doc/html/pango/pango-Text-Attributes.html +394 -523
  117. data/vendor/local/share/gtk-doc/html/pango/pango-Text-Processing.html +269 -364
  118. data/vendor/local/share/gtk-doc/html/pango/pango-Version-Checking.html +26 -40
  119. data/vendor/local/share/gtk-doc/html/pango/pango-Vertical-Text.html +72 -75
  120. data/vendor/local/share/gtk-doc/html/pango/pango-Win32-Fonts-and-Rendering.html +97 -145
  121. data/vendor/local/share/gtk-doc/html/pango/pango-X-Fonts-and-Rendering.html +114 -188
  122. data/vendor/local/share/gtk-doc/html/pango/pango-Xft-Fonts-and-Rendering.html +114 -176
  123. data/vendor/local/share/gtk-doc/html/pango/pango-hierarchy.html +42 -8
  124. data/vendor/local/share/gtk-doc/html/pango/pango-pango-renderer.html +106 -150
  125. data/vendor/local/share/gtk-doc/html/pango/pango-querymodules.html +3 -3
  126. data/vendor/local/share/gtk-doc/html/pango/pango.devhelp2 +35 -35
  127. data/vendor/local/share/gtk-doc/html/pango/pango.html +3 -3
  128. data/vendor/local/share/gtk-doc/html/pango/rendering.html +3 -3
  129. data/vendor/local/share/gtk-doc/html/pango/style.css +2 -1
  130. data/vendor/local/share/gtk-doc/html/pango/tools.html +3 -3
  131. data/vendor/local/share/man/man1/pango-querymodules.1 +12 -3
  132. data/vendor/local/share/man/man1/pango-view.1 +2 -2
  133. data/vendor/local/src/dieterv/packaging/pango_1.29.4-1_win32.log +806 -0
  134. data/vendor/local/src/{tml/packaging/pango_1.28.3-1_win32.sh → dieterv/packaging/pango_1.29.4-1_win32.sh} +7 -7
  135. metadata +19 -19
  136. data/ChangeLog +0 -721
  137. data/ext/pango/rbpangoinits.c +0 -72
  138. data/ext/pango/rbpangomain.c +0 -202
  139. data/vendor/local/share/gtk-doc/html/pango/pango.devhelp +0 -799
  140. data/vendor/local/src/tml/packaging/pango_1.28.3-1_win32.log +0 -950
@@ -1,33 +1,44 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2002,2003 Masao Mutoh <mutoh@highway.ne.jp>
5
+ *
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
+ *
11
+ * This library is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with this library; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ * MA 02110-1301 USA
20
+ */
3
21
 
4
- rbpangofontface.c -
22
+ #include "rbpangoprivate.h"
5
23
 
6
- $Author: mutoh $
7
- $Date: 2006/12/10 15:13:10 $
8
-
9
- Copyright (C) 2002,2003 Masao Mutoh <mutoh@highway.ne.jp>
10
- ************************************************/
11
-
12
- #include "rbpango.h"
13
-
14
- #define _SELF(self) (PANGO_FONT_FACE(RVAL2GOBJ(self)))
24
+ #define RG_TARGET_NAMESPACE cFontFace
25
+ #define _SELF(self) (RVAL2PANGOFONTFACE(self))
15
26
 
16
27
  static VALUE
17
- font_face_get_face_name(VALUE self)
28
+ rg_name(VALUE self)
18
29
  {
19
30
  return CSTR2RVAL(pango_font_face_get_face_name(_SELF(self)));
20
31
  }
21
32
 
22
33
  static VALUE
23
- font_face_describe(VALUE self)
34
+ rg_describe(VALUE self)
24
35
  {
25
- return BOXED2RVAL(pango_font_face_describe(_SELF(self)), PANGO_TYPE_FONT_DESCRIPTION);
36
+ return PANGOFONTDESCRIPTION2RVAL(pango_font_face_describe(_SELF(self)));
26
37
  }
27
38
 
28
39
  #if PANGO_CHECK_VERSION(1,4,0)
29
40
  static VALUE
30
- font_face_list_sizes(VALUE self)
41
+ rg_sizes(VALUE self)
31
42
  {
32
43
  int n_sizes;
33
44
  int* sizes;
@@ -48,14 +59,14 @@ font_face_list_sizes(VALUE self)
48
59
  #endif
49
60
 
50
61
  void
51
- Init_pango_font_face()
62
+ Init_pango_font_face(VALUE mPango)
52
63
  {
53
- VALUE pFace = G_DEF_CLASS(PANGO_TYPE_FONT_FACE, "FontFace", mPango);
54
-
55
- rb_define_method(pFace, "name", font_face_get_face_name, 0);
56
- rb_define_method(pFace, "describe", font_face_describe, 0);
64
+ VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_FONT_FACE, "FontFace", mPango);
65
+
66
+ RG_DEF_METHOD(name, 0);
67
+ RG_DEF_METHOD(describe, 0);
57
68
  #if PANGO_CHECK_VERSION(1,4,0)
58
- rb_define_method(pFace, "sizes", font_face_list_sizes, 0);
69
+ RG_DEF_METHOD(sizes, 0);
59
70
  #endif
60
71
  G_DEF_CLASS3("PangoFcFace", "FcFace", mPango);
61
72
  G_DEF_CLASS3("PangoFT2Face", "FT2Face", mPango);
@@ -1,34 +1,45 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2002-2005 Masao Mutoh
5
+ *
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
+ *
11
+ * This library is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with this library; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ * MA 02110-1301 USA
20
+ */
3
21
 
4
- rbpangofontfamily.c -
22
+ #include "rbpangoprivate.h"
5
23
 
6
- $Author: mutoh $
7
- $Date: 2006/12/10 15:13:10 $
8
-
9
- Copyright (C) 2002-2005 Masao Mutoh
10
- ************************************************/
11
-
12
- #include "rbpango.h"
13
-
14
- #define _SELF(self) (PANGO_FONT_FAMILY(RVAL2GOBJ(self)))
24
+ #define RG_TARGET_NAMESPACE cFontFamily
25
+ #define _SELF(self) (RVAL2PANGOFONTFAMILY(self))
15
26
 
16
27
  static VALUE
17
- font_family_get_name(VALUE self)
28
+ rg_name(VALUE self)
18
29
  {
19
30
  return CSTR2RVAL(pango_font_family_get_name(_SELF(self)));
20
31
  }
21
32
 
22
33
  #ifdef HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE
23
34
  static VALUE
24
- font_family_is_monospace(VALUE self)
35
+ rg_monospace_p(VALUE self)
25
36
  {
26
37
  return CBOOL2RVAL(pango_font_family_is_monospace(_SELF(self)));
27
38
  }
28
39
  #endif
29
40
 
30
41
  static VALUE
31
- font_family_list_faces(VALUE self)
42
+ rg_faces(VALUE self)
32
43
  {
33
44
  int n_faces;
34
45
  PangoFontFace** faces;
@@ -49,15 +60,15 @@ font_family_list_faces(VALUE self)
49
60
  }
50
61
 
51
62
  void
52
- Init_pango_font_family()
63
+ Init_pango_font_family(VALUE mPango)
53
64
  {
54
- VALUE pFamily = G_DEF_CLASS(PANGO_TYPE_FONT_FAMILY, "FontFamily", mPango);
55
-
56
- rb_define_method(pFamily, "name", font_family_get_name, 0);
65
+ VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_FONT_FAMILY, "FontFamily", mPango);
66
+
67
+ RG_DEF_METHOD(name, 0);
57
68
  #ifdef HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE
58
- rb_define_method(pFamily, "monospace?", font_family_is_monospace, 0);
69
+ RG_DEF_METHOD_P(monospace, 0);
59
70
  #endif
60
- rb_define_method(pFamily, "faces", font_family_list_faces, 0);
71
+ RG_DEF_METHOD(faces, 0);
61
72
 
62
73
  G_DEF_CLASS3("PangoFcFamily", "FcFamily", mPango);
63
74
  G_DEF_CLASS3("PangoFT2Family", "FT2Family", mPango);
@@ -1,23 +1,32 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
3
-
4
- rbpangofontmap.c -
5
-
6
- $Author: mutoh $
7
- $Date: 2006/12/10 15:13:10 $
8
-
9
- Copyright (C) 2002-2005 Masao Mutoh
10
- ************************************************/
11
-
12
- #include "rbpango.h"
13
-
14
- #define _SELF(self) (PANGO_FONT_MAP(RVAL2GOBJ(self)))
15
- #define RVAL2DESC(d) ((PangoFontDescription*)RVAL2BOXED(d, PANGO_TYPE_FONT_DESCRIPTION))
16
- #define RVAL2LANG(l) ((PangoLanguage*)RVAL2BOXED(l, PANGO_TYPE_LANGUAGE))
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2002-2005 Masao Mutoh
5
+ *
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
+ *
11
+ * This library is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with this library; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ * MA 02110-1301 USA
20
+ */
21
+
22
+ #include "rbpangoprivate.h"
23
+
24
+ #define RG_TARGET_NAMESPACE cFontMap
25
+ #define _SELF(self) (RVAL2PANGOFONTMAP(self))
17
26
 
18
27
  /*
19
28
  static VALUE
20
- font_map_initialize(VALUE self)
29
+ rg_initialize(VALUE self)
21
30
  {
22
31
  G_INITIALIZE(self, pango_ft2_font_map_new());
23
32
  return Qnil;
@@ -25,24 +34,24 @@ font_map_initialize(VALUE self)
25
34
  */
26
35
 
27
36
  static VALUE
28
- font_map_load_font(VALUE self, VALUE context, VALUE desc)
37
+ rg_load_font(VALUE self, VALUE context, VALUE desc)
29
38
  {
30
39
  return GOBJ2RVAL(pango_font_map_load_font(_SELF(self),
31
- PANGO_CONTEXT(RVAL2GOBJ(context)),
32
- RVAL2DESC(desc)));
40
+ RVAL2PANGOCONTEXT(context),
41
+ RVAL2PANGOFONTDESCRIPTION(desc)));
33
42
  }
34
43
 
35
44
  static VALUE
36
- font_map_load_fontset(VALUE self, VALUE context, VALUE desc, VALUE lang)
45
+ rg_load_fontset(VALUE self, VALUE context, VALUE desc, VALUE lang)
37
46
  {
38
47
  return GOBJ2RVAL(pango_font_map_load_fontset(_SELF(self),
39
- PANGO_CONTEXT(RVAL2GOBJ(context)),
40
- RVAL2DESC(desc),
41
- RVAL2LANG(lang)));
48
+ RVAL2PANGOCONTEXT(context),
49
+ RVAL2PANGOFONTDESCRIPTION(desc),
50
+ RVAL2PANGOLANGUAGE(lang)));
42
51
  }
43
52
 
44
53
  static VALUE
45
- font_map_list_families(VALUE self)
54
+ rg_families(VALUE self)
46
55
  {
47
56
  int n_families;
48
57
  PangoFontFamily** families;
@@ -64,25 +73,25 @@ font_map_list_families(VALUE self)
64
73
 
65
74
  #if PANGO_CHECK_VERSION(1,4,0)
66
75
  static VALUE
67
- font_map_get_shape_engine_type(VALUE self)
76
+ rg_shape_engine_type(VALUE self)
68
77
  {
69
78
  return CSTR2RVAL(pango_font_map_get_shape_engine_type(_SELF(self)));
70
79
  }
71
80
  #endif
72
81
 
73
82
  void
74
- Init_pango_font_map()
83
+ Init_pango_font_map(VALUE mPango)
75
84
  {
76
- VALUE pMap = G_DEF_CLASS(PANGO_TYPE_FONT_MAP, "FontMap", mPango);
77
-
78
- /*
79
- rb_define_method(pMap, "initialize", font_map_initialize, 0);
80
- */
81
- rb_define_method(pMap, "load_font", font_map_load_font, 2);
82
- rb_define_method(pMap, "load_fontset", font_map_load_fontset, 3);
83
- rb_define_method(pMap, "families", font_map_list_families, 0);
85
+ VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_FONT_MAP, "FontMap", mPango);
86
+
87
+ /*
88
+ RG_DEF_METHOD(initialize, 0);
89
+ */
90
+ RG_DEF_METHOD(load_font, 2);
91
+ RG_DEF_METHOD(load_fontset, 3);
92
+ RG_DEF_METHOD(families, 0);
84
93
  #if PANGO_CHECK_VERSION(1,4,0)
85
- rb_define_method(pMap, "shape_engine_type", font_map_get_shape_engine_type, 0);
94
+ RG_DEF_METHOD(shape_engine_type, 0);
86
95
  #endif
87
96
 
88
97
  G_DEF_CLASS3("PangoFcFontMap", "FcFontMap", mPango);
@@ -96,4 +105,3 @@ Init_pango_font_map()
96
105
  G_DEF_CLASS3("PangoATSUIFontMap", "ATSUIFontMap", mPango);
97
106
  #endif
98
107
  }
99
-
@@ -1,77 +1,88 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2002-2005 Masao Mutoh
5
+ *
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
+ *
11
+ * This library is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with this library; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ * MA 02110-1301 USA
20
+ */
3
21
 
4
- rbpangofontmetrics.c -
22
+ #include "rbpangoprivate.h"
5
23
 
6
- $Author: mutoh $
7
- $Date: 2005/02/13 17:31:33 $
8
-
9
- Copyright (C) 2002-2005 Masao Mutoh
10
- ************************************************/
11
-
12
- #include "rbpango.h"
13
-
14
- #define _SELF(self) ((PangoFontMetrics*)RVAL2BOXED(self, PANGO_TYPE_FONT_METRICS))
24
+ #define RG_TARGET_NAMESPACE cFontMetrics
25
+ #define _SELF(self) (RVAL2PANGOFONTMETRICS(self))
15
26
 
16
27
  static VALUE
17
- font_metrics_get_ascent(VALUE self)
28
+ rg_ascent(VALUE self)
18
29
  {
19
30
  return INT2NUM(pango_font_metrics_get_ascent(_SELF(self)));
20
31
  }
21
32
 
22
33
  static VALUE
23
- font_metrics_get_descent(VALUE self)
34
+ rg_descent(VALUE self)
24
35
  {
25
36
  return INT2NUM(pango_font_metrics_get_descent(_SELF(self)));
26
37
  }
27
38
 
28
39
  static VALUE
29
- font_metrics_get_approximate_char_width(VALUE self)
40
+ rg_approximate_char_width(VALUE self)
30
41
  {
31
42
  return INT2NUM(pango_font_metrics_get_approximate_char_width(_SELF(self)));
32
43
  }
33
44
 
34
45
  static VALUE
35
- font_metrics_get_approximate_digit_width(VALUE self)
46
+ rg_approximate_digit_width(VALUE self)
36
47
  {
37
48
  return INT2NUM(pango_font_metrics_get_approximate_digit_width(_SELF(self)));
38
49
  }
39
50
 
40
51
  #if PANGO_CHECK_VERSION(1,6,0)
41
52
  static VALUE
42
- font_metrics_get_underline_thickness(VALUE self)
53
+ rg_underline_thickness(VALUE self)
43
54
  {
44
55
  return INT2NUM(pango_font_metrics_get_underline_thickness(_SELF(self)));
45
56
  }
46
57
  static VALUE
47
- font_metrics_get_underline_position(VALUE self)
58
+ rg_underline_position(VALUE self)
48
59
  {
49
60
  return INT2NUM(pango_font_metrics_get_underline_position(_SELF(self)));
50
61
  }
51
62
  static VALUE
52
- font_metrics_get_strikethrough_thickness(VALUE self)
63
+ rg_strikethrough_thickness(VALUE self)
53
64
  {
54
65
  return INT2NUM(pango_font_metrics_get_strikethrough_thickness(_SELF(self)));
55
66
  }
56
67
  static VALUE
57
- font_metrics_get_strikethrough_position(VALUE self)
68
+ rg_strikethrough_position(VALUE self)
58
69
  {
59
70
  return INT2NUM(pango_font_metrics_get_strikethrough_position(_SELF(self)));
60
71
  }
61
72
  #endif
62
73
  void
63
- Init_pango_font_metrics()
74
+ Init_pango_font_metrics(VALUE mPango)
64
75
  {
65
- VALUE pMetrics = G_DEF_CLASS(PANGO_TYPE_FONT_METRICS, "FontMetrics", mPango);
66
-
67
- rb_define_method(pMetrics, "ascent", font_metrics_get_ascent, 0);
68
- rb_define_method(pMetrics, "descent", font_metrics_get_descent, 0);
69
- rb_define_method(pMetrics, "approximate_char_width", font_metrics_get_approximate_char_width, 0);
70
- rb_define_method(pMetrics, "approximate_digit_width", font_metrics_get_approximate_digit_width, 0);
76
+ VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_FONT_METRICS, "FontMetrics", mPango);
77
+
78
+ RG_DEF_METHOD(ascent, 0);
79
+ RG_DEF_METHOD(descent, 0);
80
+ RG_DEF_METHOD(approximate_char_width, 0);
81
+ RG_DEF_METHOD(approximate_digit_width, 0);
71
82
  #if PANGO_CHECK_VERSION(1,6,0)
72
- rb_define_method(pMetrics, "underline_thickness", font_metrics_get_underline_thickness, 0);
73
- rb_define_method(pMetrics, "underline_position", font_metrics_get_underline_position, 0);
74
- rb_define_method(pMetrics, "strikethrough_thickness", font_metrics_get_strikethrough_thickness, 0);
75
- rb_define_method(pMetrics, "strikethrough_position", font_metrics_get_strikethrough_position, 0);
83
+ RG_DEF_METHOD(underline_thickness, 0);
84
+ RG_DEF_METHOD(underline_position, 0);
85
+ RG_DEF_METHOD(strikethrough_thickness, 0);
86
+ RG_DEF_METHOD(strikethrough_position, 0);
76
87
  #endif
77
88
  }
@@ -1,30 +1,41 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2002-2005 Masao Mutoh
5
+ *
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
+ *
11
+ * This library is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with this library; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ * MA 02110-1301 USA
20
+ */
3
21
 
4
- rbpangofontset.c -
22
+ #include "rbpangoprivate.h"
5
23
 
6
- $Author: ggc $
7
- $Date: 2007/07/13 16:07:33 $
8
-
9
- Copyright (C) 2002-2005 Masao Mutoh
10
- ************************************************/
11
-
12
- #include "rbpango.h"
13
-
14
- #define _SELF(self) (PANGO_FONTSET(RVAL2GOBJ(self)))
24
+ #define RG_TARGET_NAMESPACE cFontset
25
+ #define _SELF(self) (RVAL2PANGOFONTSET(self))
15
26
 
16
27
  static ID id_call;
17
28
 
18
29
  static VALUE
19
- fontset_get_font(VALUE self, VALUE wc)
30
+ rg_get_font(VALUE self, VALUE wc)
20
31
  {
21
32
  return GOBJ2RVAL(pango_fontset_get_font(_SELF(self), NUM2UINT(wc)));
22
33
  }
23
34
 
24
35
  static VALUE
25
- fontset_get_metrics(VALUE self)
36
+ rg_metrics(VALUE self)
26
37
  {
27
- return BOXED2RVAL(pango_fontset_get_metrics(_SELF(self)), PANGO_TYPE_FONT_METRICS);
38
+ return PANGOFONTMETRICS2RVAL(pango_fontset_get_metrics(_SELF(self)));
28
39
  }
29
40
 
30
41
  #if PANGO_CHECK_VERSION(1,4,0)
@@ -36,7 +47,7 @@ fontset_each(PangoFontset *fontset, PangoFont *font, gpointer func)
36
47
  }
37
48
 
38
49
  static VALUE
39
- fontset_foreach(VALUE self)
50
+ rg_each(VALUE self)
40
51
  {
41
52
  VALUE func = rb_block_proc();
42
53
  G_RELATIVE(self, func);
@@ -48,15 +59,15 @@ fontset_foreach(VALUE self)
48
59
  #endif
49
60
 
50
61
  void
51
- Init_pango_fontset()
62
+ Init_pango_fontset(VALUE mPango)
52
63
  {
53
- VALUE pFontSet = G_DEF_CLASS(PANGO_TYPE_FONTSET, "Fontset", mPango);
54
-
64
+ VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_FONTSET, "Fontset", mPango);
65
+
55
66
  id_call = rb_intern("call");
56
67
 
57
- rb_define_method(pFontSet, "get_font", fontset_get_font, 1);
58
- rb_define_method(pFontSet, "metrics", fontset_get_metrics, 0);
68
+ RG_DEF_METHOD(get_font, 1);
69
+ RG_DEF_METHOD(metrics, 0);
59
70
  #if PANGO_CHECK_VERSION(1,4,0)
60
- rb_define_method(pFontSet, "each", fontset_foreach, 0);
71
+ RG_DEF_METHOD(each, 0);
61
72
  #endif
62
73
  }