pango 3.2.5 → 3.2.6
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.
- checksums.yaml +4 -4
- data/COPYING.LIB +502 -0
- data/README.md +25 -0
- data/Rakefile +8 -8
- data/ext/pango/extconf.rb +4 -1
- data/ext/pango/pango.def +1 -0
- data/ext/pango/rb-pango-attr-list.c +3 -3
- data/ext/pango/rb-pango-attribute.c +67 -57
- data/ext/pango/rb-pango-conversions.h +3 -3
- data/ext/pango/rb-pango-private.h +0 -1
- data/ext/pango/rb-pango.c +0 -1
- data/ext/pango/rb-pango.h +2 -1
- data/lib/pango/loader.rb +13 -1
- data/lib/pango/rectangle.rb +7 -1
- data/pango.gemspec +43 -0
- metadata +9 -49
- data/ext/pango/rb-pango-context.c +0 -79
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2017 Ruby-GNOME2 Project Team
|
3
|
+
* Copyright (C) 2017-2018 Ruby-GNOME2 Project Team
|
4
4
|
*
|
5
5
|
* This library is free software; you can redistribute it and/or
|
6
6
|
* modify it under the terms of the GNU Lesser General Public
|
@@ -75,7 +75,7 @@ extern PangoAttribute *rbpango_attribute_from_ruby(VALUE rb_attribute);
|
|
75
75
|
#define PANGOLOGATTR2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_LOG_ATTR))
|
76
76
|
#define RVAL2PANGOMATRIX(o) ((PangoMatrix*)RVAL2BOXED(o, PANGO_TYPE_MATRIX))
|
77
77
|
#define PANGOMATRIX2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_MATRIX))
|
78
|
-
#define RVAL2PANGORECTANGLE(o) ((PangoRectangle *)
|
78
|
+
#define RVAL2PANGORECTANGLE(o) ((PangoRectangle *)rb_gi_struct_get_raw(o, G_TYPE_NONE))
|
79
79
|
#define RVAL2PANGOSCRIPTITER(o) ((PangoScriptIter*)RVAL2BOXED(o, PANGO_TYPE_SCRIPT_ITER))
|
80
80
|
#define PANGOSCRIPTITER2RVAL(o) (BOXED2RVAL(o, PANGO_TYPE_SCRIPT_ITER))
|
81
81
|
#define RVAL2PANGOTABARRAY(o) ((PangoTabArray*)RVAL2BOXED(o, PANGO_TYPE_TAB_ARRAY))
|
@@ -115,4 +115,4 @@ extern PangoAttribute *rbpango_attribute_from_ruby(VALUE rb_attribute);
|
|
115
115
|
#define RVAL2PANGOFONTMASK(o) (RVAL2GFLAGS(o, PANGO_TYPE_FONT_MASK))
|
116
116
|
#define PANGOFONTMASK2RVAL(o) (GFLAGS2RVAL(o, PANGO_TYPE_FONT_MASK))
|
117
117
|
|
118
|
-
#define RVAL2PANGOATTR(o) (
|
118
|
+
#define RVAL2PANGOATTR(o) (rbpango_attribute_from_ruby(o))
|
@@ -25,5 +25,4 @@
|
|
25
25
|
G_GNUC_INTERNAL void rbpango_attribute_init(VALUE mPango);
|
26
26
|
G_GNUC_INTERNAL void rbpango_attr_iterator_init(VALUE mPango);
|
27
27
|
G_GNUC_INTERNAL void rbpango_attr_list_init(VALUE mPango);
|
28
|
-
G_GNUC_INTERNAL void rbpango_context_init(VALUE mPango);
|
29
28
|
G_GNUC_INTERNAL void rbpango_scale_init(VALUE mPango);
|
data/ext/pango/rb-pango.c
CHANGED
data/ext/pango/rb-pango.h
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2017 Ruby-GNOME2 Project Team
|
3
|
+
* Copyright (C) 2017-2018 Ruby-GNOME2 Project Team
|
4
4
|
*
|
5
5
|
* This library is free software; you can redistribute it and/or
|
6
6
|
* modify it under the terms of the GNU Lesser General Public
|
@@ -23,6 +23,7 @@
|
|
23
23
|
#include <pango/pango.h>
|
24
24
|
|
25
25
|
#include <rbgobject.h>
|
26
|
+
#include <rb-gobject-introspection.h>
|
26
27
|
|
27
28
|
#include "rb-pango-conversions.h"
|
28
29
|
|
data/lib/pango/loader.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2017 Ruby-GNOME2 Project Team
|
1
|
+
# Copyright (C) 2017-2018 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
|
@@ -30,10 +30,22 @@ module Pango
|
|
30
30
|
load_methods(info, klass)
|
31
31
|
end
|
32
32
|
require_libraries
|
33
|
+
convert_attribute_classes
|
34
|
+
end
|
35
|
+
|
36
|
+
def convert_attribute_classes
|
37
|
+
self.class.register_boxed_class_converter(Attribute.gtype) do |attribute|
|
38
|
+
attribute.klass.type.to_class
|
39
|
+
end
|
33
40
|
end
|
34
41
|
|
35
42
|
def load_struct_info(info)
|
36
43
|
case info.name
|
44
|
+
when "AttrClass"
|
45
|
+
klass = self.class.define_struct(info.size,
|
46
|
+
info.name,
|
47
|
+
@base_module)
|
48
|
+
load_fields(info, klass)
|
37
49
|
when /Class\z/
|
38
50
|
super
|
39
51
|
when "Attribute", /\AAttr[A-Z]/
|
data/lib/pango/rectangle.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2017 Ruby-GNOME2 Project Team
|
1
|
+
# Copyright (C) 2017-2018 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
|
@@ -28,5 +28,11 @@ module Pango
|
|
28
28
|
def to_a
|
29
29
|
[x, y, width, height]
|
30
30
|
end
|
31
|
+
|
32
|
+
def dup
|
33
|
+
duplicated = self.class.new(x, y, width, height)
|
34
|
+
duplicated.taint if tainted?
|
35
|
+
duplicated
|
36
|
+
end
|
31
37
|
end
|
32
38
|
end
|
data/pango.gemspec
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
#
|
3
|
+
# Copyright (C) 2018 Ruby-GNOME2 Project Team
|
4
|
+
#
|
5
|
+
# This library is free software; you can redistribute it and/or
|
6
|
+
# modify it under the terms of the GNU Lesser General Public
|
7
|
+
# License as published by the Free Software Foundation; either
|
8
|
+
# version 2.1 of the License, or (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This library is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public
|
16
|
+
# License along with this library; if not, write to the Free Software
|
17
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
|
19
|
+
require_relative "../glib2/version"
|
20
|
+
|
21
|
+
Gem::Specification.new do |s|
|
22
|
+
s.name = "pango"
|
23
|
+
s.summary = "Ruby/Pango is a Ruby binding of pango-1.x."
|
24
|
+
s.description = "Ruby/Pango is a Ruby binding of pango-1.x."
|
25
|
+
s.author = "The Ruby-GNOME2 Project Team"
|
26
|
+
s.email = "ruby-gnome2-devel-en@lists.sourceforge.net"
|
27
|
+
s.homepage = "https://ruby-gnome2.osdn.jp/"
|
28
|
+
s.licenses = ["LGPL-2.1+"]
|
29
|
+
s.version = ruby_glib2_version
|
30
|
+
s.extensions = ["ext/#{s.name}/extconf.rb"]
|
31
|
+
s.require_paths = ["lib"]
|
32
|
+
s.files = [
|
33
|
+
"COPYING.LIB",
|
34
|
+
"README.md",
|
35
|
+
"Rakefile",
|
36
|
+
"#{s.name}.gemspec",
|
37
|
+
"extconf.rb",
|
38
|
+
"ext/#{s.name}/depend",
|
39
|
+
]
|
40
|
+
s.files += Dir.glob("lib/**/*.rb")
|
41
|
+
s.files += Dir.glob("ext/#{s.name}/*.{c,h,def,rb}")
|
42
|
+
s.files += Dir.glob("test/**/*")
|
43
|
+
end
|
metadata
CHANGED
@@ -1,57 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pango
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Ruby-GNOME2 Project Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: cairo
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 1.14.0
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 1.14.0
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: cairo-gobject
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - '='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 3.2.5
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - '='
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 3.2.5
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: gobject-introspection
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - '='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 3.2.5
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - '='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 3.2.5
|
11
|
+
date: 2018-06-06 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
55
13
|
description: Ruby/Pango is a Ruby binding of pango-1.x.
|
56
14
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
57
15
|
executables: []
|
@@ -59,6 +17,8 @@ extensions:
|
|
59
17
|
- ext/pango/extconf.rb
|
60
18
|
extra_rdoc_files: []
|
61
19
|
files:
|
20
|
+
- COPYING.LIB
|
21
|
+
- README.md
|
62
22
|
- Rakefile
|
63
23
|
- ext/pango/depend
|
64
24
|
- ext/pango/extconf.rb
|
@@ -66,7 +26,6 @@ files:
|
|
66
26
|
- ext/pango/rb-pango-attr-iterator.c
|
67
27
|
- ext/pango/rb-pango-attr-list.c
|
68
28
|
- ext/pango/rb-pango-attribute.c
|
69
|
-
- ext/pango/rb-pango-context.c
|
70
29
|
- ext/pango/rb-pango-conversions.h
|
71
30
|
- ext/pango/rb-pango-private.h
|
72
31
|
- ext/pango/rb-pango-scale.c
|
@@ -86,6 +45,7 @@ files:
|
|
86
45
|
- lib/pango/matrix.rb
|
87
46
|
- lib/pango/rectangle.rb
|
88
47
|
- lib/pango/version.rb
|
48
|
+
- pango.gemspec
|
89
49
|
- test/pango-test-utils.rb
|
90
50
|
- test/run-test.rb
|
91
51
|
- test/test-analysis.rb
|
@@ -104,7 +64,7 @@ files:
|
|
104
64
|
- test/test-pango.rb
|
105
65
|
- test/test-rectangle.rb
|
106
66
|
- test/test-version.rb
|
107
|
-
homepage:
|
67
|
+
homepage: https://ruby-gnome2.osdn.jp/
|
108
68
|
licenses:
|
109
69
|
- LGPL-2.1+
|
110
70
|
metadata: {}
|
@@ -116,7 +76,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
116
76
|
requirements:
|
117
77
|
- - ">="
|
118
78
|
- !ruby/object:Gem::Version
|
119
|
-
version:
|
79
|
+
version: '0'
|
120
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
81
|
requirements:
|
122
82
|
- - ">="
|
@@ -124,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
84
|
version: '0'
|
125
85
|
requirements: []
|
126
86
|
rubyforge_project:
|
127
|
-
rubygems_version:
|
87
|
+
rubygems_version: 3.0.0.beta1
|
128
88
|
signing_key:
|
129
89
|
specification_version: 4
|
130
90
|
summary: Ruby/Pango is a Ruby binding of pango-1.x.
|
@@ -1,79 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
/*
|
3
|
-
* Copyright (C) 2017 Ruby-GNOME2 Project Team
|
4
|
-
*
|
5
|
-
* This library is free software; you can redistribute it and/or
|
6
|
-
* modify it under the terms of the GNU Lesser General Public
|
7
|
-
* License as published by the Free Software Foundation; either
|
8
|
-
* version 2.1 of the License, or (at your option) any later version.
|
9
|
-
*
|
10
|
-
* This library is distributed in the hope that it will be useful,
|
11
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
-
* Lesser General Public License for more details.
|
14
|
-
*
|
15
|
-
* You should have received a copy of the GNU Lesser General Public
|
16
|
-
* License along with this library; if not, write to the Free Software
|
17
|
-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
18
|
-
* MA 02110-1301 USA
|
19
|
-
*/
|
20
|
-
|
21
|
-
#include "rb-pango-private.h"
|
22
|
-
|
23
|
-
#if PANGO_VERSION_CHECK(1, 18, 0)
|
24
|
-
# include <pango/pangocairo.h>
|
25
|
-
# include <rb_cairo.h>
|
26
|
-
#endif
|
27
|
-
|
28
|
-
#define RG_TARGET_NAMESPACE cContext
|
29
|
-
|
30
|
-
#if PANGO_VERSION_CHECK(1, 18, 0)
|
31
|
-
static void
|
32
|
-
shape_renderer_callback(cairo_t *cr,
|
33
|
-
PangoAttrShape *attr,
|
34
|
-
gboolean do_path,
|
35
|
-
gpointer data)
|
36
|
-
{
|
37
|
-
VALUE rb_cr;
|
38
|
-
VALUE rb_mPango;
|
39
|
-
VALUE rb_cPangoAttrShape;
|
40
|
-
VALUE rb_attr;
|
41
|
-
VALUE rb_do_path;
|
42
|
-
VALUE rb_callback;
|
43
|
-
ID id_call;
|
44
|
-
|
45
|
-
rb_cr = CRCONTEXT2RVAL(cr);
|
46
|
-
rb_mPango = rb_const_get(rb_cObject, rb_intern("Pango"));
|
47
|
-
rb_cPangoAttrShape = rb_const_get(rb_mPango, rb_intern("AttrShape"));
|
48
|
-
rb_attr = Data_Wrap_Struct(rb_cPangoAttrShape,
|
49
|
-
NULL,
|
50
|
-
pango_attribute_destroy,
|
51
|
-
pango_attribute_copy((PangoAttribute *)attr));
|
52
|
-
rb_do_path = CBOOL2RVAL(do_path);
|
53
|
-
rb_callback = (VALUE)data;
|
54
|
-
CONST_ID(id_call, "call");
|
55
|
-
rb_funcall(rb_callback, id_call, 3, rb_cr, rb_attr, rb_do_path);
|
56
|
-
}
|
57
|
-
|
58
|
-
static VALUE
|
59
|
-
rg_set_shape_renderer(VALUE self)
|
60
|
-
{
|
61
|
-
VALUE func = rb_block_proc();
|
62
|
-
rb_iv_set(self, "@shape_renderer", func);
|
63
|
-
pango_cairo_context_set_shape_renderer(RVAL2PANGOCONTEXT(self),
|
64
|
-
shape_renderer_callback,
|
65
|
-
(gpointer)func,
|
66
|
-
NULL);
|
67
|
-
return self;
|
68
|
-
}
|
69
|
-
#endif
|
70
|
-
|
71
|
-
void
|
72
|
-
rbpango_context_init(VALUE mPango)
|
73
|
-
{
|
74
|
-
VALUE RG_TARGET_NAMESPACE;
|
75
|
-
|
76
|
-
RG_TARGET_NAMESPACE = rb_const_get(mPango, rb_intern("Context"));
|
77
|
-
|
78
|
-
RG_DEF_METHOD(set_shape_renderer, 0);
|
79
|
-
}
|