gtk2 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/gtk2/extconf.rb +8 -4
- data/ext/gtk2/rbgdkdraw.c +1 -1
- data/ext/gtk2/rbgdkpango.c +10 -21
- data/test/run-test.rb +14 -6
- data/test/test_gtk_icon_theme.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74397d370ca2618dc816f21fbb1b3f5794f86020
|
4
|
+
data.tar.gz: 88c8131c8f2b548c647c84e03c4d4c03f3d957df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a427a7d05044fbda10b6c41bc1f1bf1cad212fa919b169a3201091a80f867f2ff7fc1a30900aba514eb7b0463b05da8d13b1a2214e8922c5be506b43ddfb9dd
|
7
|
+
data.tar.gz: 64fb546a1ec4b94162ba978ccebf855259ea8344ebca94ec22a765477601286fbe93b172499c364a2f3f53fe6117ca85e6e26e9826498adf004ae2d31cb0eca0
|
data/ext/gtk2/extconf.rb
CHANGED
@@ -33,7 +33,7 @@ end
|
|
33
33
|
|
34
34
|
have_func("rb_errinfo")
|
35
35
|
|
36
|
-
["glib2", "
|
36
|
+
["glib2", "pango"].each do |package|
|
37
37
|
directory = "#{package}#{version_suffix}"
|
38
38
|
build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{package}/#{RUBY_VERSION}"
|
39
39
|
add_depend_package(package, "#{directory}/ext/#{package}",
|
@@ -49,10 +49,10 @@ end
|
|
49
49
|
setup_windows(module_name, base_dir)
|
50
50
|
|
51
51
|
unless required_pkg_config_package([package_id, 2, 10, 0],
|
52
|
-
:
|
52
|
+
:alt_linux => "libgtk+2-devel",
|
53
53
|
:debian => "libgtk2.0-dev",
|
54
54
|
:redhat => "gtk2-devel",
|
55
|
-
:
|
55
|
+
:arch_linux => "gtk2",
|
56
56
|
:homebrew => "gtk+",
|
57
57
|
:macports => "gtk2")
|
58
58
|
exit(false)
|
@@ -68,9 +68,13 @@ $defs << "-DRUBY_GTK2_TARGET=\\\"#{target}\\\""
|
|
68
68
|
STDOUT.print(target, "\n")
|
69
69
|
|
70
70
|
gdk_include_path = nil
|
71
|
-
include_paths =
|
71
|
+
include_paths =
|
72
|
+
$CFLAGS.gsub(/-D\w+/, '').split(/-I/) +
|
73
|
+
$INCFLAGS.split(/-I/) +
|
74
|
+
['/usr/include']
|
72
75
|
include_paths.each do |path|
|
73
76
|
path.strip!
|
77
|
+
next if path.empty?
|
74
78
|
|
75
79
|
if FileTest.exist?("#{path}/gdk/gdkkeysyms.h")
|
76
80
|
gdk_include_path = Pathname("#{path}/gdk")
|
data/ext/gtk2/rbgdkdraw.c
CHANGED
data/ext/gtk2/rbgdkpango.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
3
|
+
* Copyright (C) 2011-2017 Ruby-GNOME2 Project Team
|
4
4
|
* Copyright (C) 2003,2004 Masao Mutoh
|
5
5
|
*
|
6
6
|
* This library is free software; you can redistribute it and/or
|
@@ -20,9 +20,9 @@
|
|
20
20
|
*/
|
21
21
|
|
22
22
|
#include "global.h"
|
23
|
-
#include
|
23
|
+
#include <rb-pango.h>
|
24
24
|
|
25
|
-
#define RG_TARGET_NAMESPACE
|
25
|
+
#define RG_TARGET_NAMESPACE mGdkPango
|
26
26
|
|
27
27
|
static VALUE
|
28
28
|
rg_m_context(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
|
@@ -55,7 +55,7 @@ gdkpango_attr_embossed_initialize(VALUE self, VALUE embossed)
|
|
55
55
|
static VALUE
|
56
56
|
gdkpango_attr_embossed_value(VALUE self)
|
57
57
|
{
|
58
|
-
return CBOOL2RVAL(((GdkPangoAttrEmbossed*)
|
58
|
+
return CBOOL2RVAL(((GdkPangoAttrEmbossed*)RVAL2PANGOATTR(self))->embossed);
|
59
59
|
}
|
60
60
|
|
61
61
|
static VALUE
|
@@ -68,7 +68,7 @@ gdkpango_attr_stipple_initialize(VALUE self, VALUE stipple)
|
|
68
68
|
static VALUE
|
69
69
|
gdkpango_attr_stipple_value(VALUE self)
|
70
70
|
{
|
71
|
-
return GOBJ2RVAL(((GdkPangoAttrStipple*)
|
71
|
+
return GOBJ2RVAL(((GdkPangoAttrStipple*)RVAL2PANGOATTR(self))->stipple);
|
72
72
|
}
|
73
73
|
|
74
74
|
static VALUE
|
@@ -130,7 +130,7 @@ gdkpango_attr_emboss_color_initialize(VALUE self, VALUE color)
|
|
130
130
|
static VALUE
|
131
131
|
gdkpango_attr_emboss_color_value(VALUE self)
|
132
132
|
{
|
133
|
-
return BOXED2RVAL(&(((GdkPangoAttrEmbossColor *)
|
133
|
+
return BOXED2RVAL(&(((GdkPangoAttrEmbossColor *)RVAL2PANGOATTR(self))->color),
|
134
134
|
PANGO_TYPE_COLOR);
|
135
135
|
}
|
136
136
|
#endif
|
@@ -139,16 +139,14 @@ void
|
|
139
139
|
Init_gtk_gdk_pango(VALUE mGdk)
|
140
140
|
{
|
141
141
|
VALUE klass;
|
142
|
-
PangoAttribute* tmpattr;
|
143
|
-
GdkColor color;
|
144
|
-
|
145
142
|
VALUE RG_TARGET_NAMESPACE = rb_define_module_under(mGdk, "Pango");
|
146
143
|
VALUE context = GTYPE2CLASS(PANGO_TYPE_CONTEXT);
|
147
144
|
VALUE layout = GTYPE2CLASS(PANGO_TYPE_LAYOUT);
|
148
145
|
VALUE layoutline = GTYPE2CLASS(PANGO_TYPE_LAYOUT_LINE);
|
149
|
-
VALUE
|
150
|
-
VALUE
|
151
|
-
VALUE
|
146
|
+
VALUE mPango = rb_const_get(rb_cObject, rb_intern("Pango"));
|
147
|
+
VALUE pattr = rb_const_get(mPango, rb_intern("Attribute"));
|
148
|
+
VALUE pattrbool = rb_const_get(mPango, rb_intern("AttrBool"));
|
149
|
+
VALUE pattr_color = rb_const_get(mPango, rb_intern("AttrColor"));
|
152
150
|
|
153
151
|
RG_DEF_MODFUNC(context, -1);
|
154
152
|
|
@@ -159,25 +157,16 @@ Init_gtk_gdk_pango(VALUE mGdk)
|
|
159
157
|
|
160
158
|
klass = rb_define_class_under(mGdk, "PangoAttrEmbossed", pattrbool);
|
161
159
|
rb_define_method(klass, "initialize", gdkpango_attr_embossed_initialize, 1);
|
162
|
-
tmpattr = gdk_pango_attr_embossed_new(TRUE);
|
163
160
|
rb_define_method(klass, "value", gdkpango_attr_embossed_value, 0);
|
164
|
-
RBPANGO_ADD_ATTRIBUTE(tmpattr->klass->type, klass);
|
165
|
-
pango_attribute_destroy(tmpattr);
|
166
161
|
|
167
162
|
klass = rb_define_class_under(mGdk, "PangoAttrStipple", pattr);
|
168
163
|
rb_define_method(klass, "initialize", gdkpango_attr_stipple_initialize, 1);
|
169
164
|
rb_define_method(klass, "value", gdkpango_attr_stipple_value, 0);
|
170
|
-
tmpattr = gdk_pango_attr_stipple_new(NULL);
|
171
|
-
RBPANGO_ADD_ATTRIBUTE(tmpattr->klass->type, klass);
|
172
|
-
pango_attribute_destroy(tmpattr);
|
173
165
|
|
174
166
|
#if GTK_CHECK_VERSION(2, 12, 0)
|
175
167
|
klass = rb_define_class_under(mGdk, "PangoAttrEmbossColor", pattr_color);
|
176
168
|
rb_define_method(klass, "initialize",
|
177
169
|
gdkpango_attr_emboss_color_initialize, 1);
|
178
170
|
rb_define_method(klass, "value", gdkpango_attr_emboss_color_value, 0);
|
179
|
-
tmpattr = gdk_pango_attr_emboss_color_new(&color);
|
180
|
-
RBPANGO_ADD_ATTRIBUTE(tmpattr->klass->type, klass);
|
181
|
-
pango_attribute_destroy(tmpattr);
|
182
171
|
#endif
|
183
172
|
}
|
data/test/run-test.rb
CHANGED
@@ -4,17 +4,25 @@ ruby_gnome2_base = File.join(File.dirname(__FILE__), "..", "..")
|
|
4
4
|
ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
|
5
5
|
|
6
6
|
glib_base = File.join(ruby_gnome2_base, "glib2")
|
7
|
+
gobject_introspection_base = File.join(ruby_gnome2_base, "gobject-introspection")
|
8
|
+
gio_base = File.join(ruby_gnome2_base, "gio2")
|
7
9
|
atk_base = File.join(ruby_gnome2_base, "atk")
|
10
|
+
cairo_gobject_base = File.join(ruby_gnome2_base, "cairo-gobject")
|
8
11
|
pango_base = File.join(ruby_gnome2_base, "pango")
|
9
12
|
gdk_pixbuf_base = File.join(ruby_gnome2_base, "gdk_pixbuf2")
|
10
13
|
gtk_base = File.join(ruby_gnome2_base, "gtk2")
|
11
14
|
|
12
|
-
[
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
[
|
16
|
+
[glib_base, "glib2"],
|
17
|
+
[gobject_introspection_base, "gobject-introspection"],
|
18
|
+
[gio_base, "gio2"],
|
19
|
+
[atk_base, "atk"],
|
20
|
+
[cairo_gobject_base, "cairo-gobject"],
|
21
|
+
[pango_base, "pango"],
|
22
|
+
[gdk_pixbuf_base, "gdk_pixbuf2"],
|
23
|
+
[gtk_base, "gtk2"],
|
24
|
+
].each do |target, module_name|
|
25
|
+
if File.exist?("#{target}/Makefile") and system("which make > /dev/null")
|
18
26
|
`make -C #{target.dump} > /dev/null` or exit(false)
|
19
27
|
end
|
20
28
|
$LOAD_PATH.unshift(File.join(target, "ext", module_name))
|
data/test/test_gtk_icon_theme.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gtk2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
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: 2017-
|
11
|
+
date: 2017-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: atk
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.1.
|
19
|
+
version: 3.1.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.1.
|
26
|
+
version: 3.1.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pango
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.1.
|
33
|
+
version: 3.1.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.1.
|
40
|
+
version: 3.1.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: gdk_pixbuf2
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3.1.
|
47
|
+
version: 3.1.2
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 3.1.
|
54
|
+
version: 3.1.2
|
55
55
|
description: Ruby/GTK2 is a Ruby binding of GTK+-2.x.
|
56
56
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
57
57
|
executables: []
|
@@ -536,7 +536,7 @@ files:
|
|
536
536
|
- test/test_gtk_widget.rb
|
537
537
|
homepage: http://ruby-gnome2.sourceforge.jp/
|
538
538
|
licenses:
|
539
|
-
-
|
539
|
+
- LGPL-2.1+
|
540
540
|
metadata: {}
|
541
541
|
post_install_message:
|
542
542
|
rdoc_options: []
|