pango 3.3.6 → 3.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/pango/rb-pango-attribute.c +10 -0
- data/lib/pango/attr-list.rb +29 -0
- data/lib/pango/attr-type.rb +1 -1
- data/lib/pango/loader.rb +2 -1
- data/test/test-attr-list.rb +6 -1
- data/test/test-attr-type.rb +24 -0
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04eeba47b2dd7cbe4b2d66834bba3ba388e943929c55e6c82c050acc67e5b301
|
4
|
+
data.tar.gz: 631c3411917422b93a55e7a6a3630376b10c5ee1d4c029c62c15f23aa7d586ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf8626ac1b2355bd0e790ed6f454eff077bc2790828d2feb87c0c1d1839e0a0f8d34d50a1f912c401c60d388bcea4a9ed3a824a988692e2eccb583df3708462b
|
7
|
+
data.tar.gz: 142a334e270ce44df68db9b177c4a9dfbd21701a68854c977cbb2207b27652825a8b29dd85b610a01198a3b0445290143487b861cd7249a5427dc9ac3d40e1ef
|
@@ -20,6 +20,15 @@
|
|
20
20
|
|
21
21
|
#include "rb-pango-private.h"
|
22
22
|
|
23
|
+
#ifndef PANGO_CHECK_VERSION
|
24
|
+
# define PANGO_CHECK_VERSION(major, minor, micro) \
|
25
|
+
(PANGO_VERSION_MAJOR > (major) || \
|
26
|
+
(PANGO_VERSION_MAJOR == (major) && PANGO_VERSION_MINOR > (minor)) || \
|
27
|
+
(PANGO_VERSION_MAJOR == (major) && PANGO_VERSION_MINOR == (minor) && \
|
28
|
+
PANGO_VERSION_MICRO >= (micro)))
|
29
|
+
#endif
|
30
|
+
|
31
|
+
#if !PANGO_CHECK_VERSION(1, 44, 0)
|
23
32
|
static GType
|
24
33
|
pango_attribute_get_type(void)
|
25
34
|
{
|
@@ -30,6 +39,7 @@ pango_attribute_get_type(void)
|
|
30
39
|
(GBoxedFreeFunc)pango_attribute_destroy);
|
31
40
|
return our_type;
|
32
41
|
}
|
42
|
+
#endif
|
33
43
|
|
34
44
|
VALUE
|
35
45
|
rbpango_attribute_to_ruby(PangoAttribute *attribute)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Copyright (C) 2019 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
module Pango
|
18
|
+
class AttrList
|
19
|
+
include Enumerable
|
20
|
+
|
21
|
+
def each(&block)
|
22
|
+
iter = iterator
|
23
|
+
yield(iter)
|
24
|
+
while iter.next
|
25
|
+
yield(iter)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/pango/attr-type.rb
CHANGED
data/lib/pango/loader.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2017-
|
1
|
+
# Copyright (C) 2017-2019 Ruby-GNOME2 Project Team
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -81,6 +81,7 @@ module Pango
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def require_libraries
|
84
|
+
require "pango/attr-list"
|
84
85
|
require "pango/attr-type"
|
85
86
|
require "pango/color"
|
86
87
|
require "pango/font-description"
|
data/test/test-attr-list.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2017 Ruby-GNOME2 Project Team
|
1
|
+
# Copyright (C) 2017-2019 Ruby-GNOME2 Project Team
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -24,5 +24,10 @@ class TestAttrList < Test::Unit::TestCase
|
|
24
24
|
def test_insert
|
25
25
|
attribute = Pango::AttrLanguage.new(Pango::Language.default)
|
26
26
|
@attrs.insert(attribute)
|
27
|
+
assert_equal([
|
28
|
+
[attribute.value.to_s],
|
29
|
+
[],
|
30
|
+
],
|
31
|
+
@attrs.collect {|iter| iter.attrs.collect {|a| a.value.to_s}})
|
27
32
|
end
|
28
33
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Copyright (C) 2019 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class TestAttrType < Test::Unit::TestCase
|
18
|
+
sub_test_case(".to_class") do
|
19
|
+
test("AttrFontDesc") do
|
20
|
+
assert_equal(Pango::AttrFontDesc,
|
21
|
+
Pango::AttrType::FONT_DESC.to_class)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pango
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Ruby-GNOME2 Project Team
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date: 2019-
|
10
|
+
date: 2019-08-16 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: cairo-gobject
|
@@ -16,28 +15,28 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - '='
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.3.
|
18
|
+
version: 3.3.7
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - '='
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.3.
|
25
|
+
version: 3.3.7
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
27
|
name: gobject-introspection
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
30
|
- - '='
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.3.
|
32
|
+
version: 3.3.7
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
37
36
|
requirements:
|
38
37
|
- - '='
|
39
38
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.3.
|
39
|
+
version: 3.3.7
|
41
40
|
description: Ruby/Pango is a Ruby binding of pango-1.x.
|
42
41
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
43
42
|
executables: []
|
@@ -61,6 +60,7 @@ files:
|
|
61
60
|
- ext/pango/rb-pango.h
|
62
61
|
- extconf.rb
|
63
62
|
- lib/pango.rb
|
63
|
+
- lib/pango/attr-list.rb
|
64
64
|
- lib/pango/attr-type.rb
|
65
65
|
- lib/pango/cairo-loader.rb
|
66
66
|
- lib/pango/color.rb
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- test/test-analysis.rb
|
80
80
|
- test/test-attr-iterator.rb
|
81
81
|
- test/test-attr-list.rb
|
82
|
+
- test/test-attr-type.rb
|
82
83
|
- test/test-attribute.rb
|
83
84
|
- test/test-color.rb
|
84
85
|
- test/test-context.rb
|