pango 0.90.7-x86-mingw32 → 0.90.8-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,16 @@
1
+ 2011-02-26 Kouhei Sutou <kou@cozmixng.org>
2
+
3
+ * ext/pango/extconf.rb: remove needless add_distcleanfile.
4
+ Patch by Vincent Carmona. Thanks!!!
5
+
6
+ 2011-02-05 Masaaki Aoyagi
7
+
8
+ * ext/pango/*.c: change to ANSI C style.
9
+
10
+ 2011-02-04 Masaaki Aoyagi
11
+
12
+ * ext/pango/rbpangoglyphinfo.c: fix declaration.
13
+
1
14
  2011-01-30 Kouhei Sutou <kou@cozmixng.org>
2
15
 
3
16
  * Rakefile, ext/pango/extconf.rb: share depended packages
data/ext/pango/extconf.rb CHANGED
@@ -65,8 +65,6 @@ have_func("pango_attr_iterator_get_attrs", pango_header)
65
65
  have_func("pango_itemize_with_base_dir", pango_header)
66
66
  have_func("pango_font_family_is_monospace", pango_header)
67
67
 
68
- add_distcleanfile("rbpangoinits.c")
69
-
70
68
  make_version_header("PANGO", "pango", ".")
71
69
 
72
70
  create_pkg_config_file("Ruby/Pango", package_id)
@@ -38,8 +38,7 @@ pango_analysis_get_type(void)
38
38
  /**********************************/
39
39
 
40
40
  static VALUE
41
- ana_initialize(self)
42
- VALUE self;
41
+ ana_initialize(VALUE self)
43
42
  {
44
43
  PangoAnalysis ana = { NULL, NULL, NULL, 0 };
45
44
  G_INITIALIZE(self, &ana);
@@ -48,15 +47,13 @@ ana_initialize(self)
48
47
 
49
48
  #if PANGO_CHECK_VERSION(1,4,0)
50
49
  static VALUE
51
- ana_set_shape_engine(self, engine)
52
- VALUE self, engine;
50
+ ana_set_shape_engine(VALUE self, VALUE engine)
53
51
  {
54
52
  _SELF(self)->shape_engine = PANGO_ENGINE_SHAPE(RVAL2GOBJ(engine));
55
53
  return self;
56
54
  }
57
55
  static VALUE
58
- ana_get_shape_engine(self)
59
- VALUE self;
56
+ ana_get_shape_engine(VALUE self)
60
57
  {
61
58
  VALUE ret;
62
59
  if (_SELF(self)->shape_engine){
@@ -72,15 +69,13 @@ ana_get_shape_engine(self)
72
69
  }
73
70
 
74
71
  static VALUE
75
- ana_set_lang_engine(self, engine)
76
- VALUE self, engine;
72
+ ana_set_lang_engine(VALUE self, VALUE engine)
77
73
  {
78
74
  _SELF(self)->lang_engine = PANGO_ENGINE_LANG(RVAL2GOBJ(engine));
79
75
  return self;
80
76
  }
81
77
  static VALUE
82
- ana_get_lang_engine(self)
83
- VALUE self;
78
+ ana_get_lang_engine(VALUE self)
84
79
  {
85
80
  VALUE ret;
86
81
  if (_SELF(self)->lang_engine){
@@ -97,53 +92,46 @@ ana_get_lang_engine(self)
97
92
  #endif
98
93
 
99
94
  static VALUE
100
- ana_set_font(self, font)
101
- VALUE self, font;
95
+ ana_set_font(VALUE self, VALUE font)
102
96
  {
103
97
  _SELF(self)->font = PANGO_FONT(RVAL2GOBJ(font));
104
98
  return self;
105
99
  }
106
100
 
107
101
  static VALUE
108
- ana_get_font(self)
109
- VALUE self;
102
+ ana_get_font(VALUE self)
110
103
  {
111
104
  return GOBJ2RVAL(_SELF(self)->font);
112
105
  }
113
106
 
114
107
  static VALUE
115
- ana_set_level(self, level)
116
- VALUE self, level;
108
+ ana_set_level(VALUE self, VALUE level)
117
109
  {
118
110
  _SELF(self)->level = NUM2UINT(level);
119
111
  return self;
120
112
  }
121
113
 
122
114
  static VALUE
123
- ana_get_level(self)
124
- VALUE self;
115
+ ana_get_level(VALUE self)
125
116
  {
126
117
  return UINT2NUM(_SELF(self)->level);
127
118
  }
128
119
 
129
120
  static VALUE
130
- ana_set_language(self, lang)
131
- VALUE self, lang;
121
+ ana_set_language(VALUE self, VALUE lang)
132
122
  {
133
123
  _SELF(self)->language = RVAL2BOXED(lang, PANGO_TYPE_LANGUAGE);
134
124
  return self;
135
125
  }
136
126
 
137
127
  static VALUE
138
- ana_get_language(self)
139
- VALUE self;
128
+ ana_get_language(VALUE self)
140
129
  {
141
130
  return BOXED2RVAL(_SELF(self)->language, PANGO_TYPE_LANGUAGE);
142
131
  }
143
132
 
144
133
  static VALUE
145
- ana_set_extra_attrs(self, attrs)
146
- VALUE self, attrs;
134
+ ana_set_extra_attrs(VALUE self, VALUE attrs)
147
135
  {
148
136
  gint i;
149
137
  gint len = RARRAY_LEN(attrs);
@@ -158,8 +146,7 @@ ana_set_extra_attrs(self, attrs)
158
146
  }
159
147
 
160
148
  static VALUE
161
- ana_get_extra_attrs(self)
162
- VALUE self;
149
+ ana_get_extra_attrs(VALUE self)
163
150
  {
164
151
  VALUE ary = rb_ary_new();
165
152
  GSList* list = _SELF(self)->extra_attrs;
@@ -16,17 +16,14 @@ static VALUE type_to_klass;
16
16
 
17
17
  /***********************************************/
18
18
  void
19
- pango_add_attribute(attr_type, klass)
20
- int attr_type;
21
- VALUE klass;
19
+ pango_add_attribute(int attr_type, VALUE klass)
22
20
  {
23
21
  rb_hash_aset(type_to_klass, INT2FIX(attr_type), klass);
24
22
  }
25
23
 
26
24
  /* This is for Attributes which has PangoAttrType. */
27
25
  VALUE
28
- pango_get_attribute_klass(attr_type)
29
- VALUE attr_type;
26
+ pango_get_attribute_klass(VALUE attr_type)
30
27
  {
31
28
  VALUE type = Qnil;
32
29
  if (TYPE(attr_type) == T_STRING){
@@ -51,8 +48,7 @@ pango_get_attribute_klass(attr_type)
51
48
  }
52
49
 
53
50
  VALUE
54
- pango_make_attribute(attr)
55
- PangoAttribute* attr;
51
+ pango_make_attribute(PangoAttribute *attr)
56
52
  {
57
53
  if (attr == NULL) return Qnil;
58
54
  return Data_Wrap_Struct(rb_hash_aref(type_to_klass, INT2FIX(attr->klass->type)), 0,
@@ -61,8 +57,7 @@ pango_make_attribute(attr)
61
57
  }
62
58
 
63
59
  PangoAttribute*
64
- pango_get_attribute(attr)
65
- VALUE attr;
60
+ pango_get_attribute(VALUE attr)
66
61
  {
67
62
  PangoAttribute *gattr;
68
63
 
@@ -77,8 +72,7 @@ pango_get_attribute(attr)
77
72
 
78
73
  /***********************************************/
79
74
  static VALUE
80
- attr_s_allocate(klass)
81
- VALUE klass;
75
+ attr_s_allocate(VALUE klass)
82
76
  {
83
77
  /* Don't define destroy method here.
84
78
  return Data_Wrap_Struct(klass, 0, pango_attribute_destroy, 0);
@@ -90,10 +84,7 @@ attr_s_allocate(klass)
90
84
  #define attr_s_new rb_class_new_instance
91
85
  #else
92
86
  static VALUE
93
- attr_s_new(argc, argv, klass)
94
- int argc;
95
- VALUE* argv;
96
- VALUE klass;
87
+ attr_s_new(int argc, VALUE *argv, VALUE klass)
97
88
  {
98
89
  VALUE obj = attr_s_allocate(klass);
99
90
  rb_obj_call_init(obj, argc, argv);
@@ -114,15 +105,13 @@ gboolean pango_parse_markup (const char *markup_text,
114
105
  */
115
106
 
116
107
  static VALUE
117
- attr_s_type_register(self, name)
118
- VALUE self, name;
108
+ attr_s_type_register(VALUE self, VALUE name)
119
109
  {
120
110
  return INT2NUM(pango_attr_type_register(RVAL2CSTR(name)));
121
111
  }
122
112
 
123
113
  static VALUE
124
- attr_equal(self, other)
125
- VALUE self, other;
114
+ attr_equal(VALUE self, VALUE other)
126
115
  {
127
116
  return CBOOL2RVAL(pango_attribute_equal(RVAL2ATTR(self), RVAL2ATTR(other)));
128
117
  }
@@ -132,8 +121,7 @@ attr_equal(self, other)
132
121
  */
133
122
  /* PangoAttribute */
134
123
  static VALUE
135
- attr_start_index(self)
136
- VALUE self;
124
+ attr_start_index(VALUE self)
137
125
  {
138
126
  return UINT2NUM(RVAL2ATTR(self)->start_index);
139
127
  }
@@ -146,8 +134,7 @@ attr_set_start_index(VALUE self, VALUE value)
146
134
  }
147
135
 
148
136
  static VALUE
149
- attr_end_index(self)
150
- VALUE self;
137
+ attr_end_index(VALUE self)
151
138
  {
152
139
  return UINT2NUM(RVAL2ATTR(self)->end_index);
153
140
  }
@@ -161,24 +148,21 @@ attr_set_end_index(VALUE self, VALUE value)
161
148
 
162
149
  /* PangoAttrString */
163
150
  static VALUE
164
- attr_string_value(self)
165
- VALUE self;
151
+ attr_string_value(VALUE self)
166
152
  {
167
153
  return CSTR2RVAL(((PangoAttrString*)RVAL2ATTR(self))->value);
168
154
  }
169
155
 
170
156
  /* PangoAttrLanguage */
171
157
  static VALUE
172
- attr_language_value(self)
173
- VALUE self;
158
+ attr_language_value(VALUE self)
174
159
  {
175
160
  return BOXED2RVAL(((PangoAttrLanguage*)RVAL2ATTR(self))->value, PANGO_TYPE_LANGUAGE);
176
161
  }
177
162
 
178
163
  /* PangoAttrColor */
179
164
  static VALUE
180
- attr_color_value(self)
181
- VALUE self;
165
+ attr_color_value(VALUE self)
182
166
  {
183
167
  PangoColor color = ((PangoAttrColor*)RVAL2ATTR(self))->color;
184
168
  return BOXED2RVAL(&color, PANGO_TYPE_COLOR);
@@ -186,56 +170,49 @@ attr_color_value(self)
186
170
 
187
171
  /* PangoAttrInt */
188
172
  static VALUE
189
- attr_int_value(self)
190
- VALUE self;
173
+ attr_int_value(VALUE self)
191
174
  {
192
175
  return INT2NUM(((PangoAttrInt*)RVAL2ATTR(self))->value);
193
176
  }
194
177
 
195
178
  /* PangoAttrFloat */
196
179
  static VALUE
197
- attr_float_value(self)
198
- VALUE self;
180
+ attr_float_value(VALUE self)
199
181
  {
200
182
  return rb_float_new(((PangoAttrFloat*)RVAL2ATTR(self))->value);
201
183
  }
202
184
 
203
185
  /* PangoAttrBool(This is Ruby/Pango's original class) */
204
186
  static VALUE
205
- attr_bool_value(self)
206
- VALUE self;
187
+ attr_bool_value(VALUE self)
207
188
  {
208
189
  return CBOOL2RVAL(((PangoAttrInt*)RVAL2ATTR(self))->value);
209
190
  }
210
191
 
211
192
  /* PangoAttrFontDesc */
212
193
  static VALUE
213
- attr_fontdesc_value(self)
214
- VALUE self;
194
+ attr_fontdesc_value(VALUE self)
215
195
  {
216
196
  return BOXED2RVAL(((PangoAttrFontDesc*)RVAL2ATTR(self))->desc, PANGO_TYPE_FONT_DESCRIPTION);
217
197
  }
218
198
 
219
199
  /* PangoAttrShape */
220
200
  static VALUE
221
- attr_shape_ink_rect(self)
222
- VALUE self;
201
+ attr_shape_ink_rect(VALUE self)
223
202
  {
224
203
  PangoRectangle rect = ((PangoAttrShape*)RVAL2ATTR(self))->ink_rect;
225
204
  return BOXED2RVAL(&rect, PANGO_TYPE_RECTANGLE);
226
205
  }
227
206
 
228
207
  static VALUE
229
- attr_shape_logical_rect(self)
230
- VALUE self;
208
+ attr_shape_logical_rect(VALUE self)
231
209
  {
232
210
  PangoRectangle rect = ((PangoAttrShape*)RVAL2ATTR(self))->logical_rect;
233
211
  return BOXED2RVAL(&rect, PANGO_TYPE_RECTANGLE);
234
212
  }
235
213
 
236
214
  static VALUE
237
- attr_shape_value(self)
238
- VALUE self;
215
+ attr_shape_value(VALUE self)
239
216
  {
240
217
  return rb_ary_new3(2, attr_shape_ink_rect(self), attr_shape_logical_rect(self));
241
218
  }
@@ -245,8 +222,7 @@ attr_shape_value(self)
245
222
  */
246
223
  #define MAKE_ATTRINT_INIT(klassname, funcname)\
247
224
  static VALUE \
248
- attr_ ## klassname ## _initialize(self, val)\
249
- VALUE self, val;\
225
+ attr_ ## klassname ## _initialize(VALUE self, VALUE val)\
250
226
  {\
251
227
  DATA_PTR(self) = pango_attr_ ## funcname ## _new(NUM2INT(val));\
252
228
  return Qnil;\
@@ -254,16 +230,14 @@ attr_ ## klassname ## _initialize(self, val)\
254
230
 
255
231
  #define MAKE_ATTRENUM_INIT(klassname, funcname, type)\
256
232
  static VALUE \
257
- attr_ ## klassname ## _initialize(self, val)\
258
- VALUE self, val;\
233
+ attr_ ## klassname ## _initialize(VALUE self, VALUE val)\
259
234
  {\
260
235
  DATA_PTR(self) = pango_attr_ ## funcname ## _new(RVAL2GENUM(val, type));\
261
236
  return Qnil;\
262
237
  }
263
238
 
264
239
  static VALUE
265
- attr_AttrLanguage_initialize(self, lang)
266
- VALUE self, lang;
240
+ attr_AttrLanguage_initialize(VALUE self, VALUE lang)
267
241
  {
268
242
  DATA_PTR(self) = pango_attr_language_new(
269
243
  (PangoLanguage*)RVAL2BOXED(lang, PANGO_TYPE_LANGUAGE));
@@ -271,8 +245,7 @@ attr_AttrLanguage_initialize(self, lang)
271
245
  }
272
246
 
273
247
  static VALUE
274
- attr_AttrFamily_initialize(self, family)
275
- VALUE self, family;
248
+ attr_AttrFamily_initialize(VALUE self, VALUE family)
276
249
  {
277
250
  DATA_PTR(self) = pango_attr_family_new(RVAL2CSTR(family));
278
251
  return Qnil;
@@ -284,16 +257,14 @@ MAKE_ATTRENUM_INIT(AttrStretch, stretch, PANGO_TYPE_STRETCH);
284
257
  MAKE_ATTRENUM_INIT(AttrWeight, weight, PANGO_TYPE_WEIGHT);
285
258
 
286
259
  static VALUE
287
- attr_AttrSize_initialize(self, size)
288
- VALUE self, size;
260
+ attr_AttrSize_initialize(VALUE self, VALUE size)
289
261
  {
290
262
  DATA_PTR(self) = pango_attr_size_new(NUM2INT(size));
291
263
  return Qnil;
292
264
  }
293
265
  #if PANGO_CHECK_VERSION(1,8,1)
294
266
  static VALUE
295
- attr_AttrAbsoluteSize_initialize(self, size)
296
- VALUE self, size;
267
+ attr_AttrAbsoluteSize_initialize(VALUE self, VALUE size)
297
268
  {
298
269
  DATA_PTR(self) = pango_attr_size_new_absolute(NUM2INT(size));
299
270
  return Qnil;
@@ -317,8 +288,7 @@ attr_AttrGravityHint_initialize(VALUE self, VALUE gravity_hint)
317
288
  #endif
318
289
 
319
290
  static VALUE
320
- attr_AttrFontDescription_initialize(self, fontdescription)
321
- VALUE self, fontdescription;
291
+ attr_AttrFontDescription_initialize(VALUE self, VALUE fontdescription)
322
292
  {
323
293
  DATA_PTR(self) = pango_attr_font_desc_new(
324
294
  (PangoFontDescription*)RVAL2BOXED(fontdescription,
@@ -328,32 +298,28 @@ attr_AttrFontDescription_initialize(self, fontdescription)
328
298
  }
329
299
 
330
300
  static VALUE
331
- attr_AttrForeground_initialize(self, r, g, b)
332
- VALUE self, r, g, b;
301
+ attr_AttrForeground_initialize(VALUE self, VALUE r, VALUE g, VALUE b)
333
302
  {
334
303
  DATA_PTR(self) = pango_attr_foreground_new(FIX2UINT(r), FIX2UINT(g), FIX2UINT(b));
335
304
  return Qnil;
336
305
  }
337
306
 
338
307
  static VALUE
339
- attr_AttrBackground_initialize(self, r, g, b)
340
- VALUE self, r, g, b;
308
+ attr_AttrBackground_initialize(VALUE self, VALUE r, VALUE g, VALUE b)
341
309
  {
342
310
  DATA_PTR(self) = pango_attr_background_new(FIX2UINT(r), FIX2UINT(g), FIX2UINT(b));
343
311
  return Qnil;
344
312
  }
345
313
 
346
314
  static VALUE
347
- attr_AttrStrikethrough_initialize(self, strikethrough)
348
- VALUE self, strikethrough;
315
+ attr_AttrStrikethrough_initialize(VALUE self, VALUE strikethrough)
349
316
  {
350
317
  DATA_PTR(self) = pango_attr_strikethrough_new(RVAL2CBOOL(strikethrough));
351
318
  return Qnil;
352
319
  }
353
320
  #if HAVE_PANGO_ATTR_STRIKETHROUGH_COLOR_NEW
354
321
  static VALUE
355
- attr_AttrStrikethroughColor_initialize(self, r, g, b)
356
- VALUE self, r, g, b;
322
+ attr_AttrStrikethroughColor_initialize(VALUE self, VALUE r, VALUE g, VALUE b)
357
323
  {
358
324
  DATA_PTR(self) = pango_attr_strikethrough_color_new(FIX2UINT(r), FIX2UINT(g), FIX2UINT(b));
359
325
  return Qnil;
@@ -363,8 +329,7 @@ attr_AttrStrikethroughColor_initialize(self, r, g, b)
363
329
  MAKE_ATTRENUM_INIT(AttrUnderline, underline, PANGO_TYPE_UNDERLINE);
364
330
  #if HAVE_PANGO_ATTR_UNDERLINE_COLOR_NEW
365
331
  static VALUE
366
- attr_AttrUnderlineColor_initialize(self, r, g, b)
367
- VALUE self, r, g, b;
332
+ attr_AttrUnderlineColor_initialize(VALUE self, VALUE r, VALUE g, VALUE b)
368
333
  {
369
334
  DATA_PTR(self) = pango_attr_underline_color_new(FIX2UINT(r), FIX2UINT(g), FIX2UINT(b));
370
335
  return Qnil;
@@ -372,10 +337,7 @@ attr_AttrUnderlineColor_initialize(self, r, g, b)
372
337
  #endif
373
338
 
374
339
  static VALUE
375
- attr_AttrShape_initialize(argc, argv, self)
376
- int argc;
377
- VALUE *argv;
378
- VALUE self;
340
+ attr_AttrShape_initialize(int argc, VALUE *argv, VALUE self)
379
341
  {
380
342
  VALUE ink_rect, logical_rect, data;
381
343
 
@@ -404,8 +366,7 @@ attr_AttrShape_initialize(argc, argv, self)
404
366
  }
405
367
 
406
368
  static VALUE
407
- attr_AttrScale_initialize(self, scale)
408
- VALUE self, scale;
369
+ attr_AttrScale_initialize(VALUE self, VALUE scale)
409
370
  {
410
371
  DATA_PTR(self) = pango_attr_scale_new(NUM2DBL(scale));
411
372
  return Qnil;
@@ -413,8 +374,7 @@ attr_AttrScale_initialize(self, scale)
413
374
 
414
375
  #if PANGO_CHECK_VERSION(1,4,0)
415
376
  static VALUE
416
- attr_AttrFallback_initialize(self, enable_fallback)
417
- VALUE self, enable_fallback;
377
+ attr_AttrFallback_initialize(VALUE self, VALUE enable_fallback)
418
378
  {
419
379
  DATA_PTR(self) = pango_attr_fallback_new(RVAL2CBOOL(enable_fallback));
420
380
  return Qnil;