pango 0.90.7 → 0.90.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/ChangeLog +13 -0
  2. data/ext/pango/extconf.rb +0 -2
  3. data/ext/pango/rbpangoanalysis.c +13 -26
  4. data/ext/pango/rbpangoattribute.c +35 -75
  5. data/ext/pango/rbpangoattriterator.c +5 -12
  6. data/ext/pango/rbpangoattrlist.c +8 -17
  7. data/ext/pango/rbpangocairo.c +14 -28
  8. data/ext/pango/rbpangocolor.c +10 -23
  9. data/ext/pango/rbpangocontext.c +21 -46
  10. data/ext/pango/rbpangocoverage.c +6 -12
  11. data/ext/pango/rbpangoengine.c +2 -4
  12. data/ext/pango/rbpangofont.c +6 -16
  13. data/ext/pango/rbpangofontdescription.c +21 -42
  14. data/ext/pango/rbpangofontface.c +3 -6
  15. data/ext/pango/rbpangofontfamily.c +3 -6
  16. data/ext/pango/rbpangofontmap.c +5 -10
  17. data/ext/pango/rbpangofontmetrics.c +8 -16
  18. data/ext/pango/rbpangofontset.c +4 -10
  19. data/ext/pango/rbpangofontsetsimple.c +3 -6
  20. data/ext/pango/rbpangoglyphinfo.c +7 -14
  21. data/ext/pango/rbpangoglyphitem.c +6 -12
  22. data/ext/pango/rbpangoglyphstring.c +8 -18
  23. data/ext/pango/rbpangoitem.c +6 -12
  24. data/ext/pango/rbpangolanguage.c +5 -12
  25. data/ext/pango/rbpangolayout.c +45 -96
  26. data/ext/pango/rbpangolayoutiter.c +16 -32
  27. data/ext/pango/rbpangolayoutline.c +18 -36
  28. data/ext/pango/rbpangologattr.c +3 -6
  29. data/ext/pango/rbpangomain.c +9 -20
  30. data/ext/pango/rbpangomatrix.c +9 -20
  31. data/ext/pango/rbpangorectangle.c +15 -30
  32. data/ext/pango/rbpangorenderer.c +14 -28
  33. data/ext/pango/rbpangoscript.c +2 -4
  34. data/ext/pango/rbpangoscriptiter.c +4 -8
  35. data/ext/pango/rbpangotabarray.c +7 -16
  36. metadata +7 -10
  37. data/ext/pango/Makefile +0 -166
  38. data/ext/pango/rbpangoversion.h +0 -25
  39. data/ext/pango/ruby-pango.pc +0 -3
@@ -29,32 +29,28 @@ pango_coverage_get_type(void)
29
29
  /**********************************/
30
30
 
31
31
  static VALUE
32
- coverage_initialize(self)
33
- VALUE self;
32
+ coverage_initialize(VALUE self)
34
33
  {
35
34
  G_INITIALIZE(self, pango_coverage_new());
36
35
  return Qnil;
37
36
  }
38
37
 
39
38
  static VALUE
40
- coverage_get_level(self, index_)
41
- VALUE self, index_;
39
+ coverage_get_level(VALUE self, VALUE index_)
42
40
  {
43
41
  return GENUM2RVAL(pango_coverage_get(_SELF(self), NUM2INT(index_)),
44
42
  PANGO_TYPE_COVERAGE_LEVEL);
45
43
  }
46
44
 
47
45
  static VALUE
48
- coverage_max(self, other)
49
- VALUE self, other;
46
+ coverage_max(VALUE self, VALUE other)
50
47
  {
51
48
  pango_coverage_max(_SELF(self), _SELF(other));
52
49
  return self;
53
50
  }
54
51
 
55
52
  static VALUE
56
- coverage_set(self, index_, level)
57
- VALUE self, index_, level;
53
+ coverage_set(VALUE self, VALUE index_, VALUE level)
58
54
  {
59
55
  pango_coverage_set(_SELF(self), NUM2INT(index_),
60
56
  RVAL2GENUM(level, PANGO_TYPE_COVERAGE_LEVEL));
@@ -62,8 +58,7 @@ coverage_set(self, index_, level)
62
58
  }
63
59
 
64
60
  static VALUE
65
- coverage_to_bytes(self)
66
- VALUE self;
61
+ coverage_to_bytes(VALUE self)
67
62
  {
68
63
  guchar* bytes;
69
64
  int n_bytes;
@@ -77,8 +72,7 @@ coverage_to_bytes(self)
77
72
  }
78
73
 
79
74
  static VALUE
80
- coverage_s_from_bytes(self, bytes)
81
- VALUE self, bytes;
75
+ coverage_s_from_bytes(VALUE self, VALUE bytes)
82
76
  {
83
77
  StringValue(bytes);
84
78
  return BOXED2RVAL(pango_coverage_from_bytes((guchar*)RVAL2CSTR(bytes),
@@ -17,8 +17,7 @@
17
17
 
18
18
  /* FIXME
19
19
  static VALUE
20
- rbpango_s_engine_list(self)
21
- VALUE self;
20
+ rbpango_s_engine_list(VALUE self)
22
21
  {
23
22
  PangoEngineInfo* engines = g_new(PangoEngineInfo, 1);
24
23
  int i, n;
@@ -34,8 +33,7 @@ rbpango_s_engine_list(self)
34
33
  }
35
34
 
36
35
  static VALUE
37
- rbpango_s_engine_create(self, id)
38
- VALUE self, id;
36
+ rbpango_s_engine_create(VALUE self, VALUE id)
39
37
  {
40
38
  return GOBJ2RVAL(script_engine_create(RVAL2CSTR(id)));
41
39
  }
@@ -14,8 +14,7 @@
14
14
  #define _SELF(self) (PANGO_FONT(RVAL2GOBJ(self)))
15
15
 
16
16
  static VALUE
17
- font_find_shaper(self, language, ch)
18
- VALUE self, language, ch;
17
+ font_find_shaper(VALUE self, VALUE language, VALUE ch)
19
18
  {
20
19
  return GOBJ2RVAL(pango_font_find_shaper(_SELF(self),
21
20
  (PangoLanguage*)RVAL2BOXED(language, PANGO_TYPE_LANGUAGE),
@@ -23,10 +22,7 @@ font_find_shaper(self, language, ch)
23
22
  }
24
23
 
25
24
  static VALUE
26
- font_describe(argc, argv, self)
27
- int argc;
28
- VALUE *argv;
29
- VALUE self;
25
+ font_describe(int argc, VALUE *argv, VALUE self)
30
26
  {
31
27
  VALUE desc, absolute_size;
32
28
  rb_scan_args(argc, argv, "01", &absolute_size);
@@ -46,8 +42,7 @@ font_describe(argc, argv, self)
46
42
  }
47
43
 
48
44
  static VALUE
49
- font_get_coverage(self, language)
50
- VALUE self, language;
45
+ font_get_coverage(VALUE self, VALUE language)
51
46
  {
52
47
  PangoCoverage* c = pango_font_get_coverage(_SELF(self),
53
48
  (PangoLanguage*)RVAL2BOXED(language, PANGO_TYPE_LANGUAGE));
@@ -55,8 +50,7 @@ font_get_coverage(self, language)
55
50
  }
56
51
 
57
52
  static VALUE
58
- font_get_glyph_extents(self, glyph)
59
- VALUE self, glyph;
53
+ font_get_glyph_extents(VALUE self, VALUE glyph)
60
54
  {
61
55
  PangoRectangle ink_rect, logical_rect;
62
56
  pango_font_get_glyph_extents(_SELF(self),
@@ -69,10 +63,7 @@ font_get_glyph_extents(self, glyph)
69
63
  }
70
64
 
71
65
  static VALUE
72
- font_get_metrics(argc, argv, self)
73
- int argc;
74
- VALUE *argv;
75
- VALUE self;
66
+ font_get_metrics(int argc, VALUE *argv, VALUE self)
76
67
  {
77
68
  VALUE language;
78
69
  PangoLanguage* lang = NULL;
@@ -88,8 +79,7 @@ font_get_metrics(argc, argv, self)
88
79
 
89
80
  #if PANGO_CHECK_VERSION(1,9,0)
90
81
  static VALUE
91
- font_get_font_map(self)
92
- VALUE self;
82
+ font_get_font_map(VALUE self)
93
83
  {
94
84
  return GOBJ2RVAL(pango_font_get_font_map(_SELF(self)));
95
85
  }
@@ -40,15 +40,13 @@ PangoFontDescription* pango_font_description_copy_static
40
40
  */
41
41
 
42
42
  static VALUE
43
- font_desc_hash(self)
44
- VALUE self;
43
+ font_desc_hash(VALUE self)
45
44
  {
46
45
  return UINT2NUM(pango_font_description_hash(_SELF(self)));
47
46
  }
48
47
 
49
48
  static VALUE
50
- font_desc_equal(self, other)
51
- VALUE self, other;
49
+ font_desc_equal(VALUE self, VALUE other)
52
50
  {
53
51
  return CBOOL2RVAL(pango_font_description_equal(_SELF(self), _SELF(other)));
54
52
  }
@@ -59,8 +57,7 @@ void pango_font_descriptions_free (PangoFontDescription **descs,
59
57
  */
60
58
 
61
59
  static VALUE
62
- font_desc_set_family(self, family)
63
- VALUE self, family;
60
+ font_desc_set_family(VALUE self, VALUE family)
64
61
  {
65
62
  pango_font_description_set_family(_SELF(self), RVAL2CSTR(family));
66
63
  return self;
@@ -72,38 +69,33 @@ void pango_font_description_set_family_static
72
69
  */
73
70
 
74
71
  static VALUE
75
- font_desc_get_family(self)
76
- VALUE self;
72
+ font_desc_get_family(VALUE self)
77
73
  {
78
74
  return CSTR2RVAL(pango_font_description_get_family(_SELF(self)));
79
75
  }
80
76
 
81
77
  static VALUE
82
- font_desc_set_style(self, style)
83
- VALUE self, style;
78
+ font_desc_set_style(VALUE self, VALUE style)
84
79
  {
85
80
  pango_font_description_set_style(_SELF(self), RVAL2GENUM(style, PANGO_TYPE_STYLE));
86
81
  return self;
87
82
  }
88
83
 
89
84
  static VALUE
90
- font_desc_get_style(self)
91
- VALUE self;
85
+ font_desc_get_style(VALUE self)
92
86
  {
93
87
  return GENUM2RVAL(pango_font_description_get_style(_SELF(self)), PANGO_TYPE_STYLE);
94
88
  }
95
89
 
96
90
  static VALUE
97
- font_desc_set_variant(self, variant)
98
- VALUE self, variant;
91
+ font_desc_set_variant(VALUE self, VALUE variant)
99
92
  {
100
93
  pango_font_description_set_variant(_SELF(self), RVAL2GENUM(variant, PANGO_TYPE_VARIANT));
101
94
  return self;
102
95
  }
103
96
 
104
97
  static VALUE
105
- font_desc_get_variant(self)
106
- VALUE self;
98
+ font_desc_get_variant(VALUE self)
107
99
  {
108
100
  return GENUM2RVAL(pango_font_description_get_variant(_SELF(self)), PANGO_TYPE_VARIANT);
109
101
  }
@@ -117,54 +109,47 @@ font_desc_set_weight(VALUE self, VALUE weight)
117
109
  }
118
110
 
119
111
  static VALUE
120
- font_desc_get_weight(self)
121
- VALUE self;
112
+ font_desc_get_weight(VALUE self)
122
113
  {
123
114
  return GENUM2RVAL(pango_font_description_get_weight(_SELF(self)), PANGO_TYPE_WEIGHT);
124
115
  }
125
116
 
126
117
  static VALUE
127
- font_desc_set_stretch(self, stretch)
128
- VALUE self, stretch;
118
+ font_desc_set_stretch(VALUE self, VALUE stretch)
129
119
  {
130
120
  pango_font_description_set_stretch(_SELF(self), RVAL2GENUM(stretch, PANGO_TYPE_STRETCH));
131
121
  return self;
132
122
  }
133
123
 
134
124
  static VALUE
135
- font_desc_get_stretch(self)
136
- VALUE self;
125
+ font_desc_get_stretch(VALUE self)
137
126
  {
138
127
  return GENUM2RVAL(pango_font_description_get_stretch(_SELF(self)), PANGO_TYPE_STRETCH);
139
128
  }
140
129
 
141
130
  static VALUE
142
- font_desc_set_size(self, size)
143
- VALUE self, size;
131
+ font_desc_set_size(VALUE self, VALUE size)
144
132
  {
145
133
  pango_font_description_set_size(_SELF(self), NUM2INT(size));
146
134
  return self;
147
135
  }
148
136
 
149
137
  static VALUE
150
- font_desc_get_size(self)
151
- VALUE self;
138
+ font_desc_get_size(VALUE self)
152
139
  {
153
140
  return INT2NUM(pango_font_description_get_size(_SELF(self)));
154
141
  }
155
142
 
156
143
  #if PANGO_CHECK_VERSION(1,8,0)
157
144
  static VALUE
158
- font_desc_set_absolute_size(self, size)
159
- VALUE self, size;
145
+ font_desc_set_absolute_size(VALUE self, VALUE size)
160
146
  {
161
147
  pango_font_description_set_absolute_size(_SELF(self), NUM2INT(size));
162
148
  return self;
163
149
  }
164
150
 
165
151
  static VALUE
166
- font_desc_get_size_is_absolute(self)
167
- VALUE self;
152
+ font_desc_get_size_is_absolute(VALUE self)
168
153
  {
169
154
  return CBOOL2RVAL(pango_font_description_get_size_is_absolute(_SELF(self)));
170
155
  }
@@ -186,23 +171,20 @@ font_desc_set_gravity(VALUE self, VALUE gravity)
186
171
  #endif
187
172
 
188
173
  static VALUE
189
- font_desc_get_set_fields(self)
190
- VALUE self;
174
+ font_desc_get_set_fields(VALUE self)
191
175
  {
192
176
  return GFLAGS2RVAL(pango_font_description_get_set_fields(_SELF(self)), PANGO_TYPE_FONT_MASK);
193
177
  }
194
178
 
195
179
  static VALUE
196
- font_desc_unset_fields(self, to_unset)
197
- VALUE self, to_unset;
180
+ font_desc_unset_fields(VALUE self, VALUE to_unset)
198
181
  {
199
182
  pango_font_description_unset_fields(_SELF(self), RVAL2GFLAGS(to_unset, PANGO_TYPE_FONT_MASK));
200
183
  return self;
201
184
  }
202
185
 
203
186
  static VALUE
204
- font_desc_merge(self, desc_to_merge, replace_existing)
205
- VALUE self, desc_to_merge, replace_existing;
187
+ font_desc_merge(VALUE self, VALUE desc_to_merge, VALUE replace_existing)
206
188
  {
207
189
  pango_font_description_merge(_SELF(self), _SELF(desc_to_merge),
208
190
  RVAL2CBOOL(replace_existing));
@@ -217,8 +199,7 @@ void pango_font_description_merge_static
217
199
  */
218
200
 
219
201
  static VALUE
220
- font_desc_better_match(self, old_match, new_match)
221
- VALUE self, old_match, new_match;
202
+ font_desc_better_match(VALUE self, VALUE old_match, VALUE new_match)
222
203
  {
223
204
  return CBOOL2RVAL(pango_font_description_better_match(_SELF(self),
224
205
  _SELF(old_match),
@@ -226,15 +207,13 @@ font_desc_better_match(self, old_match, new_match)
226
207
  }
227
208
 
228
209
  static VALUE
229
- font_desc_to_string(self)
230
- VALUE self;
210
+ font_desc_to_string(VALUE self)
231
211
  {
232
212
  return CSTR2RVAL(pango_font_description_to_string(_SELF(self)));
233
213
  }
234
214
 
235
215
  static VALUE
236
- font_desc_to_filename(self)
237
- VALUE self;
216
+ font_desc_to_filename(VALUE self)
238
217
  {
239
218
  return CSTR2RVAL(pango_font_description_to_filename(_SELF(self)));
240
219
  }
@@ -14,23 +14,20 @@
14
14
  #define _SELF(self) (PANGO_FONT_FACE(RVAL2GOBJ(self)))
15
15
 
16
16
  static VALUE
17
- font_face_get_face_name(self)
18
- VALUE self;
17
+ font_face_get_face_name(VALUE self)
19
18
  {
20
19
  return CSTR2RVAL(pango_font_face_get_face_name(_SELF(self)));
21
20
  }
22
21
 
23
22
  static VALUE
24
- font_face_describe(self)
25
- VALUE self;
23
+ font_face_describe(VALUE self)
26
24
  {
27
25
  return BOXED2RVAL(pango_font_face_describe(_SELF(self)), PANGO_TYPE_FONT_DESCRIPTION);
28
26
  }
29
27
 
30
28
  #if PANGO_CHECK_VERSION(1,4,0)
31
29
  static VALUE
32
- font_face_list_sizes(self)
33
- VALUE self;
30
+ font_face_list_sizes(VALUE self)
34
31
  {
35
32
  int n_sizes;
36
33
  int* sizes;
@@ -14,24 +14,21 @@
14
14
  #define _SELF(self) (PANGO_FONT_FAMILY(RVAL2GOBJ(self)))
15
15
 
16
16
  static VALUE
17
- font_family_get_name(self)
18
- VALUE self;
17
+ font_family_get_name(VALUE self)
19
18
  {
20
19
  return CSTR2RVAL(pango_font_family_get_name(_SELF(self)));
21
20
  }
22
21
 
23
22
  #ifdef HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE
24
23
  static VALUE
25
- font_family_is_monospace(self)
26
- VALUE self;
24
+ font_family_is_monospace(VALUE self)
27
25
  {
28
26
  return CBOOL2RVAL(pango_font_family_is_monospace(_SELF(self)));
29
27
  }
30
28
  #endif
31
29
 
32
30
  static VALUE
33
- font_family_list_faces(self)
34
- VALUE self;
31
+ font_family_list_faces(VALUE self)
35
32
  {
36
33
  int n_faces;
37
34
  PangoFontFace** faces;
@@ -17,8 +17,7 @@
17
17
 
18
18
  /*
19
19
  static VALUE
20
- font_map_initialize(self)
21
- VALUE self;
20
+ font_map_initialize(VALUE self)
22
21
  {
23
22
  G_INITIALIZE(self, pango_ft2_font_map_new());
24
23
  return Qnil;
@@ -26,8 +25,7 @@ font_map_initialize(self)
26
25
  */
27
26
 
28
27
  static VALUE
29
- font_map_load_font(self, context, desc)
30
- VALUE self, context, desc;
28
+ font_map_load_font(VALUE self, VALUE context, VALUE desc)
31
29
  {
32
30
  return GOBJ2RVAL(pango_font_map_load_font(_SELF(self),
33
31
  PANGO_CONTEXT(RVAL2GOBJ(context)),
@@ -35,8 +33,7 @@ font_map_load_font(self, context, desc)
35
33
  }
36
34
 
37
35
  static VALUE
38
- font_map_load_fontset(self, context, desc, lang)
39
- VALUE self, context, desc, lang;
36
+ font_map_load_fontset(VALUE self, VALUE context, VALUE desc, VALUE lang)
40
37
  {
41
38
  return GOBJ2RVAL(pango_font_map_load_fontset(_SELF(self),
42
39
  PANGO_CONTEXT(RVAL2GOBJ(context)),
@@ -45,8 +42,7 @@ font_map_load_fontset(self, context, desc, lang)
45
42
  }
46
43
 
47
44
  static VALUE
48
- font_map_list_families(self)
49
- VALUE self;
45
+ font_map_list_families(VALUE self)
50
46
  {
51
47
  int n_families;
52
48
  PangoFontFamily** families;
@@ -68,8 +64,7 @@ font_map_list_families(self)
68
64
 
69
65
  #if PANGO_CHECK_VERSION(1,4,0)
70
66
  static VALUE
71
- font_map_get_shape_engine_type(self)
72
- VALUE self;
67
+ font_map_get_shape_engine_type(VALUE self)
73
68
  {
74
69
  return CSTR2RVAL(pango_font_map_get_shape_engine_type(_SELF(self)));
75
70
  }
@@ -14,55 +14,47 @@
14
14
  #define _SELF(self) ((PangoFontMetrics*)RVAL2BOXED(self, PANGO_TYPE_FONT_METRICS))
15
15
 
16
16
  static VALUE
17
- font_metrics_get_ascent(self)
18
- VALUE self;
17
+ font_metrics_get_ascent(VALUE self)
19
18
  {
20
19
  return INT2NUM(pango_font_metrics_get_ascent(_SELF(self)));
21
20
  }
22
21
 
23
22
  static VALUE
24
- font_metrics_get_descent(self)
25
- VALUE self;
23
+ font_metrics_get_descent(VALUE self)
26
24
  {
27
25
  return INT2NUM(pango_font_metrics_get_descent(_SELF(self)));
28
26
  }
29
27
 
30
28
  static VALUE
31
- font_metrics_get_approximate_char_width(self)
32
- VALUE self;
29
+ font_metrics_get_approximate_char_width(VALUE self)
33
30
  {
34
31
  return INT2NUM(pango_font_metrics_get_approximate_char_width(_SELF(self)));
35
32
  }
36
33
 
37
34
  static VALUE
38
- font_metrics_get_approximate_digit_width(self)
39
- VALUE self;
35
+ font_metrics_get_approximate_digit_width(VALUE self)
40
36
  {
41
37
  return INT2NUM(pango_font_metrics_get_approximate_digit_width(_SELF(self)));
42
38
  }
43
39
 
44
40
  #if PANGO_CHECK_VERSION(1,6,0)
45
41
  static VALUE
46
- font_metrics_get_underline_thickness(self)
47
- VALUE self;
42
+ font_metrics_get_underline_thickness(VALUE self)
48
43
  {
49
44
  return INT2NUM(pango_font_metrics_get_underline_thickness(_SELF(self)));
50
45
  }
51
46
  static VALUE
52
- font_metrics_get_underline_position(self)
53
- VALUE self;
47
+ font_metrics_get_underline_position(VALUE self)
54
48
  {
55
49
  return INT2NUM(pango_font_metrics_get_underline_position(_SELF(self)));
56
50
  }
57
51
  static VALUE
58
- font_metrics_get_strikethrough_thickness(self)
59
- VALUE self;
52
+ font_metrics_get_strikethrough_thickness(VALUE self)
60
53
  {
61
54
  return INT2NUM(pango_font_metrics_get_strikethrough_thickness(_SELF(self)));
62
55
  }
63
56
  static VALUE
64
- font_metrics_get_strikethrough_position(self)
65
- VALUE self;
57
+ font_metrics_get_strikethrough_position(VALUE self)
66
58
  {
67
59
  return INT2NUM(pango_font_metrics_get_strikethrough_position(_SELF(self)));
68
60
  }