pango 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/pango/rbpango.c +20 -20
- data/ext/pango/rbpangoanalysis.c +0 -2
- data/ext/pango/rbpangoattribute.c +11 -13
- data/ext/pango/rbpangocairo.c +2 -4
- data/ext/pango/rbpangocolor.c +0 -2
- data/ext/pango/rbpangocontext.c +0 -2
- data/ext/pango/rbpangofontdescription.c +0 -2
- data/ext/pango/rbpangoglyphinfo.c +0 -2
- data/ext/pango/rbpangoglyphstring.c +0 -2
- data/ext/pango/rbpangoitem.c +2 -4
- data/ext/pango/rbpangolayout.c +0 -2
- data/ext/pango/rbpangolayoutline.c +0 -1
- data/ext/pango/rbpangologattr.c +4 -6
- data/ext/pango/rbpangomatrix.c +2 -5
- data/ext/pango/rbpangorectangle.c +0 -2
- data/ext/pango/rbpangorenderer.c +0 -2
- data/ext/pango/rbpangotabarray.c +0 -2
- metadata +8 -8
data/ext/pango/rbpango.c
CHANGED
@@ -64,7 +64,7 @@ rpango_reorder_items_ensure(VALUE value)
|
|
64
64
|
}
|
65
65
|
|
66
66
|
static VALUE
|
67
|
-
|
67
|
+
rg_s_reorder_items(G_GNUC_UNUSED VALUE self, VALUE attrs)
|
68
68
|
{
|
69
69
|
struct rpango_reorder_items_args args;
|
70
70
|
args.ary = rb_ary_to_ary(attrs);
|
@@ -77,13 +77,13 @@ rg_m_reorder_items(G_GNUC_UNUSED VALUE self, VALUE attrs)
|
|
77
77
|
|
78
78
|
#if PANGO_CHECK_VERSION(1,4,0)
|
79
79
|
static VALUE
|
80
|
-
|
80
|
+
rg_s_unichar_direction(G_GNUC_UNUSED VALUE self, VALUE ch)
|
81
81
|
{
|
82
82
|
return PANGODIRECTION2RVAL(pango_unichar_direction(NUM2UINT(ch)));
|
83
83
|
}
|
84
84
|
|
85
85
|
static VALUE
|
86
|
-
|
86
|
+
rg_s_find_base_dir(G_GNUC_UNUSED VALUE self, VALUE text)
|
87
87
|
{
|
88
88
|
StringValue(text);
|
89
89
|
return PANGODIRECTION2RVAL(pango_find_base_dir(RSTRING_PTR(text), RSTRING_LEN(text)));
|
@@ -128,7 +128,7 @@ rbg_pangologattrs2rval_free(PangoLogAttr *attrs, long n)
|
|
128
128
|
#define PANGOLOGATTRS2RVAL_FREE(attrs, n) rbg_pangologattrs2rval_free(attrs, n)
|
129
129
|
|
130
130
|
static VALUE
|
131
|
-
|
131
|
+
rg_s_break(G_GNUC_UNUSED VALUE self, VALUE rbtext, VALUE rbanalysis)
|
132
132
|
{
|
133
133
|
const gchar *text = RVAL2CSTR(rbtext);
|
134
134
|
long length = RSTRING_LEN(rbtext);
|
@@ -142,7 +142,7 @@ rg_m_break(G_GNUC_UNUSED VALUE self, VALUE rbtext, VALUE rbanalysis)
|
|
142
142
|
}
|
143
143
|
|
144
144
|
static VALUE
|
145
|
-
|
145
|
+
rg_s_get_log_attrs(G_GNUC_UNUSED VALUE self, VALUE rbtext, VALUE rblevel, VALUE rblanguage)
|
146
146
|
{
|
147
147
|
const gchar *text = RVAL2CSTR(rbtext);
|
148
148
|
long length = RSTRING_LEN(rbtext);
|
@@ -157,7 +157,7 @@ rg_m_get_log_attrs(G_GNUC_UNUSED VALUE self, VALUE rbtext, VALUE rblevel, VALUE
|
|
157
157
|
}
|
158
158
|
|
159
159
|
static VALUE
|
160
|
-
|
160
|
+
rg_s_find_paragraph_boundary(G_GNUC_UNUSED VALUE self, VALUE text)
|
161
161
|
{
|
162
162
|
gint paragraph_delimiter_index, next_paragraph_start;
|
163
163
|
|
@@ -193,7 +193,7 @@ rpango_shape_ensure(VALUE value)
|
|
193
193
|
}
|
194
194
|
|
195
195
|
static VALUE
|
196
|
-
|
196
|
+
rg_s_shape(G_GNUC_UNUSED VALUE self, VALUE rbtext, VALUE rbanalysis)
|
197
197
|
{
|
198
198
|
const gchar *text = RVAL2CSTR(rbtext);
|
199
199
|
long length = RSTRING_LEN(rbtext);
|
@@ -208,7 +208,7 @@ rg_m_shape(G_GNUC_UNUSED VALUE self, VALUE rbtext, VALUE rbanalysis)
|
|
208
208
|
|
209
209
|
/* This method is from rbpangoattribute.c */
|
210
210
|
static VALUE
|
211
|
-
|
211
|
+
rg_s_parse_markup(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
|
212
212
|
{
|
213
213
|
VALUE markup_text, accel_marker;
|
214
214
|
PangoAttrList *pattr_list;
|
@@ -247,13 +247,13 @@ rg_m_parse_markup(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
|
|
247
247
|
}
|
248
248
|
|
249
249
|
static VALUE
|
250
|
-
|
250
|
+
rg_s_pixels(G_GNUC_UNUSED VALUE self, VALUE pixels)
|
251
251
|
{
|
252
252
|
return rb_float_new(PANGO_PIXELS(NUM2DBL(pixels)));
|
253
253
|
}
|
254
254
|
|
255
255
|
static VALUE
|
256
|
-
|
256
|
+
rg_s_cairo_available_p(G_GNUC_UNUSED VALUE self)
|
257
257
|
{
|
258
258
|
#ifdef CAIRO_AVAILABLE
|
259
259
|
return Qtrue;
|
@@ -273,22 +273,22 @@ Init_pango(void)
|
|
273
273
|
INT2FIX(PANGO_MINOR_VERSION),
|
274
274
|
INT2FIX(PANGO_MICRO_VERSION)));
|
275
275
|
|
276
|
-
|
276
|
+
RG_DEF_SMETHOD(reorder_items, 1);
|
277
277
|
|
278
278
|
#if PANGO_CHECK_VERSION(1,4,0)
|
279
|
-
|
280
|
-
|
279
|
+
RG_DEF_SMETHOD(unichar_direction, 1);
|
280
|
+
RG_DEF_SMETHOD(find_base_dir, 1);
|
281
281
|
#endif
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
282
|
+
RG_DEF_SMETHOD(break, 2);
|
283
|
+
RG_DEF_SMETHOD(get_log_attrs, 3);
|
284
|
+
RG_DEF_SMETHOD(find_paragraph_boundary, 1);
|
285
|
+
RG_DEF_SMETHOD(shape, 2);
|
286
|
+
RG_DEF_SMETHOD(parse_markup, -1);
|
287
|
+
RG_DEF_SMETHOD(pixels, 1);
|
288
288
|
|
289
289
|
rb_define_const(RG_TARGET_NAMESPACE, "SCALE", INT2FIX(PANGO_SCALE));
|
290
290
|
|
291
|
-
|
291
|
+
RG_DEF_SMETHOD_P(cairo_available, 0);
|
292
292
|
|
293
293
|
Init_pango_analysis(RG_TARGET_NAMESPACE);
|
294
294
|
Init_pango_attribute(RG_TARGET_NAMESPACE);
|
data/ext/pango/rbpangoanalysis.c
CHANGED
@@ -399,7 +399,7 @@ MAKE_ATTRINT_INIT(AttrLetterSpacing, letter_spacing);
|
|
399
399
|
#define MAKE_ATTR(gtype, name, parent, num)\
|
400
400
|
tmpklass = rb_define_class_under(mPango, #name, parent);\
|
401
401
|
rb_hash_aset(type_to_klass, INT2FIX(gtype), tmpklass);\
|
402
|
-
|
402
|
+
rbg_define_method(tmpklass, "initialize", attr_## name ## _initialize , num);
|
403
403
|
|
404
404
|
void
|
405
405
|
Init_pango_attribute(VALUE mPango)
|
@@ -414,8 +414,6 @@ Init_pango_attribute(VALUE mPango)
|
|
414
414
|
RG_DEF_METHOD(end_index, 0);
|
415
415
|
RG_DEF_METHOD(set_end_index, 1);
|
416
416
|
|
417
|
-
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
418
|
-
|
419
417
|
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
420
418
|
RG_DEF_SMETHOD(allocate, 0);
|
421
419
|
#else
|
@@ -426,25 +424,25 @@ Init_pango_attribute(VALUE mPango)
|
|
426
424
|
#endif
|
427
425
|
|
428
426
|
attrstring = rb_define_class_under(mPango, "AttrString", RG_TARGET_NAMESPACE);
|
429
|
-
|
427
|
+
rbg_define_method(attrstring, "value", attr_string_value, 0);
|
430
428
|
|
431
429
|
pattrint = rb_define_class_under(mPango, "AttrInt", RG_TARGET_NAMESPACE);
|
432
|
-
|
430
|
+
rbg_define_method(pattrint, "value", attr_int_value, 0);
|
433
431
|
|
434
432
|
pattrfloat = rb_define_class_under(mPango, "AttrFloat", RG_TARGET_NAMESPACE);
|
435
|
-
|
433
|
+
rbg_define_method(pattrfloat, "value", attr_float_value, 0);
|
436
434
|
|
437
435
|
pattrcolor = rb_define_class_under(mPango, "AttrColor", RG_TARGET_NAMESPACE);
|
438
|
-
|
436
|
+
rbg_define_method(pattrcolor, "value", attr_color_value, 0);
|
439
437
|
|
440
438
|
pattrbool = rb_define_class_under(mPango, "AttrBool", RG_TARGET_NAMESPACE);
|
441
|
-
|
439
|
+
rbg_define_method(pattrbool, "value", attr_bool_value, 0);
|
442
440
|
|
443
441
|
rb_global_variable(&type_to_klass);
|
444
442
|
type_to_klass = rb_hash_new();
|
445
443
|
|
446
444
|
MAKE_ATTR(PANGO_ATTR_LANGUAGE, AttrLanguage, RG_TARGET_NAMESPACE, 1);
|
447
|
-
|
445
|
+
rbg_define_method(tmpklass, "value", attr_language_value, 0);
|
448
446
|
|
449
447
|
MAKE_ATTR(PANGO_ATTR_FAMILY, AttrFamily, attrstring, 1);
|
450
448
|
MAKE_ATTR(PANGO_ATTR_STYLE, AttrStyle, pattrint, 1);
|
@@ -460,7 +458,7 @@ Init_pango_attribute(VALUE mPango)
|
|
460
458
|
MAKE_ATTR(PANGO_ATTR_GRAVITY_HINT, AttrGravityHint, pattrint, 1);
|
461
459
|
#endif
|
462
460
|
MAKE_ATTR(PANGO_ATTR_FONT_DESC, AttrFontDescription, RG_TARGET_NAMESPACE, 1);
|
463
|
-
|
461
|
+
rbg_define_method(tmpklass, "value", attr_fontdesc_value, 0);
|
464
462
|
MAKE_ATTR(PANGO_ATTR_FOREGROUND, AttrForeground, pattrcolor, 3);
|
465
463
|
MAKE_ATTR(PANGO_ATTR_BACKGROUND, AttrBackground, pattrcolor, 3);
|
466
464
|
MAKE_ATTR(PANGO_ATTR_UNDERLINE, AttrUnderline, pattrint, 1);
|
@@ -480,9 +478,9 @@ Init_pango_attribute(VALUE mPango)
|
|
480
478
|
MAKE_ATTR(PANGO_ATTR_LETTER_SPACING, AttrLetterSpacing, pattrint, 1);
|
481
479
|
#endif
|
482
480
|
MAKE_ATTR(PANGO_ATTR_SHAPE, AttrShape, RG_TARGET_NAMESPACE, -1);
|
483
|
-
|
484
|
-
|
485
|
-
|
481
|
+
rbg_define_method(tmpklass, "ink_rect", attr_shape_ink_rect, 0);
|
482
|
+
rbg_define_method(tmpklass, "logical_rect", attr_shape_logical_rect, 0);
|
483
|
+
rbg_define_method(tmpklass, "value", attr_shape_value, 0);
|
486
484
|
MAKE_ATTR(PANGO_ATTR_SCALE, AttrScale, pattrfloat, 1);
|
487
485
|
/* PangoScale */
|
488
486
|
rb_define_const(tmpklass, "XX_SMALL", rb_float_new(PANGO_SCALE_XX_SMALL));
|
data/ext/pango/rbpangocairo.c
CHANGED
@@ -28,13 +28,13 @@
|
|
28
28
|
#define _SELF(self) (RVAL2PANGOCAIROFONTMAP(self))
|
29
29
|
|
30
30
|
static VALUE
|
31
|
-
rg_s_create(VALUE klass)
|
31
|
+
rg_s_create(G_GNUC_UNUSED VALUE klass)
|
32
32
|
{
|
33
33
|
return GOBJ2RVAL(pango_cairo_font_map_new());
|
34
34
|
}
|
35
35
|
|
36
36
|
static VALUE
|
37
|
-
rg_s_default(VALUE klass)
|
37
|
+
rg_s_default(G_GNUC_UNUSED VALUE klass)
|
38
38
|
{
|
39
39
|
return GOBJ2RVAL(pango_cairo_font_map_get_default());
|
40
40
|
}
|
@@ -75,7 +75,5 @@ Init_pango_cairo(VALUE mPango)
|
|
75
75
|
RG_DEF_METHOD(set_resolution, 1);
|
76
76
|
RG_DEF_METHOD(resolution, 0);
|
77
77
|
RG_DEF_METHOD(create_context, 0);
|
78
|
-
|
79
|
-
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
80
78
|
#endif
|
81
79
|
}
|
data/ext/pango/rbpangocolor.c
CHANGED
data/ext/pango/rbpangocontext.c
CHANGED
@@ -315,8 +315,6 @@ Init_pango_context(VALUE mPango)
|
|
315
315
|
/* This will remove 2 or 3 releases later since 0.14.0. */
|
316
316
|
RG_DEF_METHOD(list_families, 0);
|
317
317
|
|
318
|
-
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
319
|
-
|
320
318
|
/* PangoDirection */
|
321
319
|
G_DEF_CLASS(PANGO_TYPE_DIRECTION, "Direction", RG_TARGET_NAMESPACE);
|
322
320
|
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_DIRECTION, "PANGO_");
|
@@ -266,8 +266,6 @@ Init_pango_font_description(VALUE mPango)
|
|
266
266
|
RG_DEF_ALIAS("to_s", "to_str");
|
267
267
|
RG_DEF_METHOD(to_filename, 0);
|
268
268
|
|
269
|
-
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
270
|
-
|
271
269
|
/* PangoStyle */
|
272
270
|
G_DEF_CLASS(PANGO_TYPE_STYLE, "Style", RG_TARGET_NAMESPACE);
|
273
271
|
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_STYLE, "PANGO_");
|
data/ext/pango/rbpangoitem.c
CHANGED
@@ -38,8 +38,8 @@ item_int_set_ ## name (VALUE self, VALUE val)\
|
|
38
38
|
}
|
39
39
|
|
40
40
|
#define DEF_INT_ACCESSOR(name) \
|
41
|
-
|
42
|
-
|
41
|
+
rbg_define_method(RG_TARGET_NAMESPACE, G_STRINGIFY(name), item_int_ ## name, 0);\
|
42
|
+
rbg_define_method(RG_TARGET_NAMESPACE, G_STRINGIFY(set_ ## name), item_int_set_ ## name, 1);
|
43
43
|
|
44
44
|
/**********************************/
|
45
45
|
#if ! PANGO_CHECK_VERSION(1,9,0)
|
@@ -108,6 +108,4 @@ Init_pango_item(VALUE mPango)
|
|
108
108
|
|
109
109
|
RG_DEF_METHOD(analysis, 0);
|
110
110
|
RG_DEF_METHOD(set_analysis, 1);
|
111
|
-
|
112
|
-
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
113
111
|
}
|
data/ext/pango/rbpangolayout.c
CHANGED
@@ -539,8 +539,6 @@ Init_pango_layout(VALUE mPango)
|
|
539
539
|
RG_DEF_METHOD(lines, 0);
|
540
540
|
RG_DEF_METHOD(iter, 0);
|
541
541
|
|
542
|
-
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
543
|
-
|
544
542
|
/* PangoWrapMode */
|
545
543
|
G_DEF_CLASS(PANGO_TYPE_WRAP_MODE, "WrapMode", RG_TARGET_NAMESPACE);
|
546
544
|
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_WRAP_MODE, "PANGO_");
|
data/ext/pango/rbpangologattr.c
CHANGED
@@ -70,8 +70,8 @@ rg_initialize(VALUE self)
|
|
70
70
|
}
|
71
71
|
|
72
72
|
#define DEFINE_ACCESSOR(logattr, name) \
|
73
|
-
|
74
|
-
|
73
|
+
rbg_define_method(logattr, G_STRINGIFY(name?), log_get_is_ ## name, 0);\
|
74
|
+
rbg_define_method(logattr, G_STRINGIFY(set_ ## name), log_set_is_ ## name, 1);
|
75
75
|
|
76
76
|
ATTR_BOOL(is_line_break);
|
77
77
|
ATTR_BOOL(is_mandatory_break);
|
@@ -107,9 +107,7 @@ Init_pango_logattr(VALUE mPango)
|
|
107
107
|
DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, sentence_end);
|
108
108
|
|
109
109
|
#if PANGO_CHECK_VERSION(1,4,0)
|
110
|
-
|
111
|
-
|
110
|
+
rbg_define_method(RG_TARGET_NAMESPACE, "backspace_deletes_character?", log_get_backspace_deletes_character, 0);
|
111
|
+
rbg_define_method(RG_TARGET_NAMESPACE, "set_backspace_deletes_character", log_set_backspace_deletes_character, 1);
|
112
112
|
#endif
|
113
|
-
|
114
|
-
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
115
113
|
}
|
data/ext/pango/rbpangomatrix.c
CHANGED
@@ -40,8 +40,8 @@ matrix_set_ ## name (VALUE self, VALUE val)\
|
|
40
40
|
}
|
41
41
|
|
42
42
|
#define DEFINE_ACCESSOR(name) \
|
43
|
-
|
44
|
-
|
43
|
+
rbg_define_method(RG_TARGET_NAMESPACE, G_STRINGIFY(name), matrix_get_ ## name, 0);\
|
44
|
+
rbg_define_method(RG_TARGET_NAMESPACE, G_STRINGIFY(set_ ## name), matrix_set_## name, 1);
|
45
45
|
|
46
46
|
static VALUE
|
47
47
|
rg_initialize(int argc, VALUE *argv, VALUE self)
|
@@ -149,8 +149,5 @@ Init_pango_matrix(VALUE mPango)
|
|
149
149
|
DEFINE_ACCESSOR(yy);
|
150
150
|
DEFINE_ACCESSOR(x0);
|
151
151
|
DEFINE_ACCESSOR(y0);
|
152
|
-
|
153
|
-
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
154
|
-
|
155
152
|
#endif
|
156
153
|
}
|
data/ext/pango/rbpangorenderer.c
CHANGED
@@ -189,8 +189,6 @@ Init_pangorenderer(VALUE mPango)
|
|
189
189
|
RG_DEF_METHOD(set_matrix, 1);
|
190
190
|
RG_DEF_METHOD(matrix, 0);
|
191
191
|
|
192
|
-
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
193
|
-
|
194
192
|
/* PangoRenderPart */
|
195
193
|
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
196
194
|
G_DEF_CLASS(PANGO_TYPE_RENDER_PART, "Part", RG_TARGET_NAMESPACE);
|
data/ext/pango/rbpangotabarray.c
CHANGED
@@ -122,8 +122,6 @@ Init_pango_array(VALUE mPango)
|
|
122
122
|
RG_DEF_METHOD(tabs, 0);
|
123
123
|
RG_DEF_METHOD_P(positions_in_pixels, 0);
|
124
124
|
|
125
|
-
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
126
|
-
|
127
125
|
/* PangoTabAlign */
|
128
126
|
G_DEF_CLASS(PANGO_TYPE_TAB_ALIGN, "TabAlign", RG_TARGET_NAMESPACE);
|
129
127
|
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_TAB_ALIGN, "PANGO_");
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pango
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 3
|
10
|
+
version: 1.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- The Ruby-GNOME2 Project Team
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-04-08 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: cairo
|
@@ -41,12 +41,12 @@ dependencies:
|
|
41
41
|
requirements:
|
42
42
|
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
hash:
|
44
|
+
hash: 21
|
45
45
|
segments:
|
46
46
|
- 1
|
47
47
|
- 1
|
48
|
-
-
|
49
|
-
version: 1.1.
|
48
|
+
- 3
|
49
|
+
version: 1.1.3
|
50
50
|
type: :runtime
|
51
51
|
version_requirements: *id002
|
52
52
|
description: Ruby/Pango is a Ruby binding of pango-1.x.
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
requirements: []
|
151
151
|
|
152
152
|
rubyforge_project:
|
153
|
-
rubygems_version: 1.8.
|
153
|
+
rubygems_version: 1.8.15
|
154
154
|
signing_key:
|
155
155
|
specification_version: 3
|
156
156
|
summary: Ruby/Pango is a Ruby binding of pango-1.x.
|