cairo-gobject 3.3.7 → 3.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cairo-gobject.gemspec +2 -2
- data/ext/cairo-gobject/rb-cairo-gobject.c +68 -19
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a87d8bc7d59251a4596776a305c959aef4b6ccec7e7196260e048c88f092eee7
|
4
|
+
data.tar.gz: 7ee049e7287c9f4b943e99b1a4637e296cb55afd483a4baada92a2de62e56f51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cb02022e6e0a4ef1223954617e8ec01f7a1e6c6a7714a32eb9943189e75f674bfbb066e82eb17f9c32b699070a6c511b7bf8efc267b28eb98caa50238b673ac
|
7
|
+
data.tar.gz: d6186c3a986353380b3204bd21ce5f01f80805810b4946f23ce8bb6cf1a3046f31b40acc8d414311dff481018d0a7d5c9bd6142843663118b057b91d500810cc
|
data/cairo-gobject.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- ruby -*-
|
2
2
|
#
|
3
|
-
# Copyright (C) 2018 Ruby-
|
3
|
+
# Copyright (C) 2018 Ruby-GNOME 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
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.name = "cairo-gobject"
|
23
23
|
s.summary = "Ruby/CairoGObject is a Ruby binding of cairo-gobject."
|
24
24
|
s.description = "Ruby/CairoGObject is a Ruby binding of cairo-gobject."
|
25
|
-
s.author = "The Ruby-
|
25
|
+
s.author = "The Ruby-GNOME Project Team"
|
26
26
|
s.email = "ruby-gnome2-devel-en@lists.sourceforge.net"
|
27
27
|
s.homepage = "https://ruby-gnome2.osdn.jp/"
|
28
28
|
s.licenses = ["LGPL-2.1+"]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (C) 2013-
|
3
|
+
* Copyright (C) 2013-2019 Ruby-GNOME 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
|
@@ -22,8 +22,11 @@
|
|
22
22
|
|
23
23
|
#define RG_TARGET_NAMESPACE rb_mCairoGObject
|
24
24
|
|
25
|
+
static VALUE RG_TARGET_NAMESPACE;
|
26
|
+
|
25
27
|
#define DEFINE_CONVERSION(prefix, \
|
26
28
|
gtype, \
|
29
|
+
ClassName, \
|
27
30
|
rb_klass, \
|
28
31
|
RVAL2CR, \
|
29
32
|
CR2RVAL) \
|
@@ -47,10 +50,22 @@ prefix ## _s_gtype(G_GNUC_UNUSED VALUE klass) \
|
|
47
50
|
return rbgobj_gtype_new(gtype); \
|
48
51
|
} \
|
49
52
|
\
|
53
|
+
static VALUE \
|
54
|
+
rg_ ## prefix ## _s_try_convert(VALUE klass, VALUE value) \
|
55
|
+
{ \
|
56
|
+
if (RTEST(rb_obj_is_kind_of(value, klass))) { \
|
57
|
+
return value; \
|
58
|
+
} else { \
|
59
|
+
gpointer raw_object = RVAL2CR(value); \
|
60
|
+
return BOXED2RVAL(raw_object, gtype); \
|
61
|
+
} \
|
62
|
+
} \
|
63
|
+
\
|
50
64
|
static void \
|
51
65
|
define_ ## prefix ## _conversion(void) \
|
52
66
|
{ \
|
53
67
|
RGConvertTable table; \
|
68
|
+
VALUE rg_klass; \
|
54
69
|
\
|
55
70
|
memset(&table, 0, sizeof(RGConvertTable)); \
|
56
71
|
table.type = gtype; \
|
@@ -64,32 +79,66 @@ define_ ## prefix ## _conversion(void) \
|
|
64
79
|
"gtype", \
|
65
80
|
prefix ## _s_gtype, \
|
66
81
|
0); \
|
82
|
+
\
|
83
|
+
rg_klass = G_DEF_CLASS(gtype, ClassName, RG_TARGET_NAMESPACE); \
|
84
|
+
rb_define_singleton_method(rg_klass, \
|
85
|
+
"try_convert", \
|
86
|
+
rg_ ## prefix ## _s_try_convert, \
|
87
|
+
1); \
|
67
88
|
}
|
68
89
|
|
69
|
-
DEFINE_CONVERSION(context,
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
DEFINE_CONVERSION(
|
76
|
-
|
77
|
-
|
90
|
+
DEFINE_CONVERSION(context,
|
91
|
+
CAIRO_GOBJECT_TYPE_CONTEXT,
|
92
|
+
"Context",
|
93
|
+
rb_cCairo_Context,
|
94
|
+
RVAL2CRCONTEXT,
|
95
|
+
CRCONTEXT2RVAL)
|
96
|
+
DEFINE_CONVERSION(device,
|
97
|
+
CAIRO_GOBJECT_TYPE_DEVICE,
|
98
|
+
"Device",
|
99
|
+
rb_cCairo_Device,
|
100
|
+
RVAL2CRDEVICE,
|
101
|
+
CRDEVICE2RVAL)
|
102
|
+
DEFINE_CONVERSION(pattern,
|
103
|
+
CAIRO_GOBJECT_TYPE_PATTERN,
|
104
|
+
"Pattern",
|
105
|
+
rb_cCairo_Pattern,
|
106
|
+
RVAL2CRPATTERN,
|
107
|
+
CRPATTERN2RVAL)
|
108
|
+
DEFINE_CONVERSION(surface,
|
109
|
+
CAIRO_GOBJECT_TYPE_SURFACE,
|
110
|
+
"Surface",
|
111
|
+
rb_cCairo_Surface,
|
112
|
+
RVAL2CRSURFACE,
|
113
|
+
CRSURFACE2RVAL)
|
114
|
+
DEFINE_CONVERSION(scaled_font,
|
115
|
+
CAIRO_GOBJECT_TYPE_SCALED_FONT,
|
116
|
+
"ScaledFont",
|
78
117
|
rb_cCairo_ScaledFont,
|
79
|
-
RVAL2CRSCALEDFONT,
|
80
|
-
|
81
|
-
|
82
|
-
|
118
|
+
RVAL2CRSCALEDFONT,
|
119
|
+
CRSCALEDFONT2RVAL)
|
120
|
+
DEFINE_CONVERSION(font_face,
|
121
|
+
CAIRO_GOBJECT_TYPE_FONT_FACE,
|
122
|
+
"FontFace",
|
123
|
+
rb_cCairo_FontFace,
|
124
|
+
RVAL2CRFONTFACE,
|
125
|
+
CRFONTFACE2RVAL)
|
126
|
+
DEFINE_CONVERSION(font_options,
|
127
|
+
CAIRO_GOBJECT_TYPE_FONT_OPTIONS,
|
128
|
+
"FontOptions",
|
83
129
|
rb_cCairo_FontOptions,
|
84
|
-
RVAL2CRFONTOPTIONS,
|
85
|
-
|
86
|
-
|
130
|
+
RVAL2CRFONTOPTIONS,
|
131
|
+
CRFONTOPTIONS2RVAL)
|
132
|
+
DEFINE_CONVERSION(region,
|
133
|
+
CAIRO_GOBJECT_TYPE_REGION,
|
134
|
+
"Region",
|
135
|
+
rb_cCairo_Region,
|
136
|
+
RVAL2CRREGION,
|
137
|
+
CRREGION2RVAL)
|
87
138
|
|
88
139
|
void
|
89
140
|
Init_cairo_gobject(void)
|
90
141
|
{
|
91
|
-
VALUE RG_TARGET_NAMESPACE;
|
92
|
-
|
93
142
|
RG_TARGET_NAMESPACE = rb_define_module("CairoGObject");
|
94
143
|
|
95
144
|
rb_define_const(RG_TARGET_NAMESPACE, "BUILD_VERSION",
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cairo-gobject
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- The Ruby-
|
7
|
+
- The Ruby-GNOME Project Team
|
8
|
+
autorequire:
|
8
9
|
bindir: bin
|
9
10
|
cert_chain: []
|
10
|
-
date: 2019-
|
11
|
+
date: 2019-09-09 00:00:00.000000000 Z
|
11
12
|
dependencies:
|
12
13
|
- !ruby/object:Gem::Dependency
|
13
14
|
name: cairo
|
@@ -29,14 +30,14 @@ dependencies:
|
|
29
30
|
requirements:
|
30
31
|
- - '='
|
31
32
|
- !ruby/object:Gem::Version
|
32
|
-
version: 3.3.
|
33
|
+
version: 3.3.8
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
36
|
version_requirements: !ruby/object:Gem::Requirement
|
36
37
|
requirements:
|
37
38
|
- - '='
|
38
39
|
- !ruby/object:Gem::Version
|
39
|
-
version: 3.3.
|
40
|
+
version: 3.3.8
|
40
41
|
description: Ruby/CairoGObject is a Ruby binding of cairo-gobject.
|
41
42
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
42
43
|
executables: []
|