pango 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32
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.
- data/ext/pango/extconf.rb +3 -0
- data/ext/pango/rbpango.c +312 -12
- data/ext/pango/rbpango.h +33 -22
- data/ext/pango/rbpangoanalysis.c +98 -58
- data/ext/pango/rbpangoattribute.c +94 -85
- data/ext/pango/rbpangoattriterator.c +39 -28
- data/ext/pango/rbpangoattrlist.c +42 -32
- data/ext/pango/rbpangocairo.c +38 -172
- data/ext/pango/rbpangocairocontext.c +151 -0
- data/ext/pango/rbpangocolor.c +49 -38
- data/ext/pango/rbpangocontext.c +109 -102
- data/ext/pango/rbpangoconversions.h +111 -0
- data/ext/pango/rbpangocoverage.c +45 -37
- data/ext/pango/rbpangoengine.c +22 -12
- data/ext/pango/rbpangofont.c +52 -43
- data/ext/pango/rbpangofontdescription.c +102 -91
- data/ext/pango/rbpangofontface.c +32 -21
- data/ext/pango/rbpangofontfamily.c +31 -20
- data/ext/pango/rbpangofontmap.c +44 -36
- data/ext/pango/rbpangofontmetrics.c +41 -30
- data/ext/pango/rbpangofontset.c +32 -21
- data/ext/pango/rbpangofontsetsimple.c +34 -24
- data/ext/pango/rbpangoglyphinfo.c +48 -35
- data/ext/pango/rbpangoglyphitem.c +43 -33
- data/ext/pango/rbpangoglyphstring.c +59 -59
- data/ext/pango/rbpangogravity.c +34 -23
- data/ext/pango/rbpangoitem.c +43 -34
- data/ext/pango/rbpangolanguage.c +44 -34
- data/ext/pango/rbpangolayout.c +167 -160
- data/ext/pango/rbpangolayoutiter.c +70 -59
- data/ext/pango/rbpangolayoutline.c +106 -71
- data/ext/pango/rbpangologattr.c +42 -31
- data/ext/pango/rbpangomatrix.c +47 -35
- data/ext/pango/rbpangoprivate.h +53 -0
- data/ext/pango/rbpangorectangle.c +58 -49
- data/ext/pango/rbpangorenderer.c +81 -70
- data/ext/pango/rbpangoscript.c +37 -27
- data/ext/pango/rbpangoscriptiter.c +32 -22
- data/ext/pango/rbpangotabarray.c +48 -37
- data/lib/1.8/pango.so +0 -0
- data/lib/1.9/pango.so +0 -0
- data/vendor/local/bin/libpango-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
- data/vendor/local/bin/pango-querymodules.exe +0 -0
- data/vendor/local/bin/pango-view.exe +0 -0
- data/vendor/local/etc/pango/pango.modules +1 -1
- data/vendor/local/include/pango-1.0/pango/pango-attributes.h +1 -1
- data/vendor/local/include/pango-1.0/pango/pango-context.h +3 -3
- data/vendor/local/include/pango-1.0/pango/pango-features.h +3 -3
- data/vendor/local/include/pango-1.0/pango/pango-font.h +3 -3
- data/vendor/local/include/pango-1.0/pango/pango-language.h +3 -3
- data/vendor/local/include/pango-1.0/pango/pango-layout.h +6 -1
- data/vendor/local/include/pango-1.0/pango/pango-renderer.h +1 -1
- data/vendor/local/include/pango-1.0/pango/pango-script.h +6 -6
- data/vendor/local/include/pango-1.0/pango/pango-utils.h +6 -6
- data/vendor/local/lib/libpango-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
- data/vendor/local/lib/pango-1.0.def +2 -0
- data/vendor/local/lib/pango-1.0.lib +0 -0
- data/vendor/local/lib/pangocairo-1.0.lib +0 -0
- data/vendor/local/lib/pangoft2-1.0.lib +0 -0
- data/vendor/local/lib/pangowin32-1.0.def +1 -1
- data/vendor/local/lib/pangowin32-1.0.lib +0 -0
- data/vendor/local/lib/pkgconfig/pango.pc +1 -1
- data/vendor/local/lib/pkgconfig/pangocairo.pc +1 -1
- data/vendor/local/lib/pkgconfig/pangoft2.pc +1 -1
- data/vendor/local/lib/pkgconfig/pangowin32.pc +1 -1
- data/vendor/local/manifest/{pango-dev_1.28.3-1_win32.mft → pango-dev_1.29.4-1_win32.mft} +5 -5
- data/vendor/local/manifest/{pango_1.28.3-1_win32.mft → pango_1.29.4-1_win32.mft} +2 -2
- data/vendor/local/share/doc/{pango-1.28.3 → pango-1.29.4}/COPYING +0 -0
- data/vendor/local/share/doc/{pango-dev-1.28.3 → pango-dev-1.29.4}/COPYING +0 -0
- data/vendor/local/share/gtk-doc/html/pango/PangoEngineLang.html +9 -10
- data/vendor/local/share/gtk-doc/html/pango/PangoEngineShape.html +25 -27
- data/vendor/local/share/gtk-doc/html/pango/PangoFcDecoder.html +19 -28
- data/vendor/local/share/gtk-doc/html/pango/PangoFcFont.html +42 -60
- data/vendor/local/share/gtk-doc/html/pango/PangoFcFontMap.html +97 -147
- data/vendor/local/share/gtk-doc/html/pango/PangoMarkupFormat.html +6 -6
- data/vendor/local/share/gtk-doc/html/pango/index-1.10.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index-1.12.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index-1.14.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index-1.16.html +5 -5
- data/vendor/local/share/gtk-doc/html/pango/index-1.18.html +3 -5
- data/vendor/local/share/gtk-doc/html/pango/index-1.2.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index-1.20.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index-1.22.html +5 -5
- data/vendor/local/share/gtk-doc/html/pango/index-1.24.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index-1.26.html +4 -4
- data/vendor/local/share/gtk-doc/html/pango/index-1.28.html +8 -11
- data/vendor/local/share/gtk-doc/html/pango/index-1.30.html +38 -0
- data/vendor/local/share/gtk-doc/html/pango/index-1.4.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index-1.6.html +4 -4
- data/vendor/local/share/gtk-doc/html/pango/index-1.8.html +4 -4
- data/vendor/local/share/gtk-doc/html/pango/index-all.html +38 -40
- data/vendor/local/share/gtk-doc/html/pango/index-deprecated.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index.html +6 -5
- data/vendor/local/share/gtk-doc/html/pango/index.sgml +71 -34
- data/vendor/local/share/gtk-doc/html/pango/lowlevel.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/pango-ATSUI-Fonts.html +4 -66
- data/vendor/local/share/gtk-doc/html/pango/pango-Bidirectional-Text.html +52 -50
- data/vendor/local/share/gtk-doc/html/pango/pango-Cairo-Rendering.html +217 -278
- data/vendor/local/share/gtk-doc/html/pango/pango-Coverage-Maps.html +40 -41
- data/vendor/local/share/gtk-doc/html/pango/pango-Engines.html +37 -49
- data/vendor/local/share/gtk-doc/html/pango/pango-Fonts.html +481 -628
- data/vendor/local/share/gtk-doc/html/pango/pango-FreeType-Fonts-and-Rendering.html +76 -118
- data/vendor/local/share/gtk-doc/html/pango/pango-Glyph-Storage.html +302 -452
- data/vendor/local/share/gtk-doc/html/pango/pango-Layout-Objects.html +492 -517
- data/vendor/local/share/gtk-doc/html/pango/pango-Miscellaneous-Utilities.html +134 -164
- data/vendor/local/share/gtk-doc/html/pango/pango-Modules.html +34 -45
- data/vendor/local/share/gtk-doc/html/pango/pango-OpenType-Font-Handling.html +244 -359
- data/vendor/local/share/gtk-doc/html/pango/pango-Scripts-and-Languages.html +117 -122
- data/vendor/local/share/gtk-doc/html/pango/pango-Tab-Stops.html +112 -120
- data/vendor/local/share/gtk-doc/html/pango/pango-Text-Attributes.html +394 -523
- data/vendor/local/share/gtk-doc/html/pango/pango-Text-Processing.html +269 -364
- data/vendor/local/share/gtk-doc/html/pango/pango-Version-Checking.html +26 -40
- data/vendor/local/share/gtk-doc/html/pango/pango-Vertical-Text.html +72 -75
- data/vendor/local/share/gtk-doc/html/pango/pango-Win32-Fonts-and-Rendering.html +97 -145
- data/vendor/local/share/gtk-doc/html/pango/pango-X-Fonts-and-Rendering.html +114 -188
- data/vendor/local/share/gtk-doc/html/pango/pango-Xft-Fonts-and-Rendering.html +114 -176
- data/vendor/local/share/gtk-doc/html/pango/pango-hierarchy.html +42 -8
- data/vendor/local/share/gtk-doc/html/pango/pango-pango-renderer.html +106 -150
- data/vendor/local/share/gtk-doc/html/pango/pango-querymodules.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/pango.devhelp2 +35 -35
- data/vendor/local/share/gtk-doc/html/pango/pango.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/rendering.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/style.css +2 -1
- data/vendor/local/share/gtk-doc/html/pango/tools.html +3 -3
- data/vendor/local/share/man/man1/pango-querymodules.1 +12 -3
- data/vendor/local/share/man/man1/pango-view.1 +2 -2
- data/vendor/local/src/dieterv/packaging/pango_1.29.4-1_win32.log +806 -0
- data/vendor/local/src/{tml/packaging/pango_1.28.3-1_win32.sh → dieterv/packaging/pango_1.29.4-1_win32.sh} +7 -7
- metadata +19 -19
- data/ChangeLog +0 -721
- data/ext/pango/rbpangoinits.c +0 -72
- data/ext/pango/rbpangomain.c +0 -202
- data/vendor/local/share/gtk-doc/html/pango/pango.devhelp +0 -799
- data/vendor/local/src/tml/packaging/pango_1.28.3-1_win32.log +0 -950
data/ext/pango/rbpangorenderer.c
CHANGED
@@ -1,52 +1,63 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2005 Masao Mutoh
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "rbpangoprivate.h"
|
13
23
|
|
14
24
|
#if PANGO_CHECK_VERSION(1,8,0)
|
15
|
-
#define
|
25
|
+
#define RG_TARGET_NAMESPACE cRenderer
|
26
|
+
#define _SELF(self) (RVAL2PANGORENDERER(self))
|
16
27
|
|
17
28
|
static VALUE
|
18
|
-
|
29
|
+
rg_draw_layout(VALUE self, VALUE layout, VALUE x, VALUE y)
|
19
30
|
{
|
20
31
|
pango_renderer_draw_layout(_SELF(self),
|
21
|
-
|
32
|
+
RVAL2PANGOLAYOUT(layout),
|
22
33
|
NUM2INT(x), NUM2INT(y));
|
23
34
|
return self;
|
24
35
|
}
|
25
36
|
|
26
37
|
static VALUE
|
27
|
-
|
38
|
+
rg_draw_layout_line(VALUE self, VALUE line, VALUE x, VALUE y)
|
28
39
|
{
|
29
40
|
pango_renderer_draw_layout_line(_SELF(self),
|
30
|
-
(
|
41
|
+
RVAL2PANGOLAYOUTLINE(line),
|
31
42
|
NUM2INT(x), NUM2INT(y));
|
32
43
|
return self;
|
33
44
|
}
|
34
45
|
|
35
46
|
static VALUE
|
36
|
-
|
47
|
+
rg_draw_glyphs(VALUE self, VALUE font, VALUE glyphs, VALUE x, VALUE y)
|
37
48
|
{
|
38
|
-
pango_renderer_draw_glyphs(_SELF(self),
|
39
|
-
|
40
|
-
(
|
49
|
+
pango_renderer_draw_glyphs(_SELF(self),
|
50
|
+
RVAL2PANGOFONT(font),
|
51
|
+
RVAL2PANGOGLYPHSTRING(glyphs),
|
41
52
|
NUM2INT(x), NUM2INT(y));
|
42
53
|
return self;
|
43
54
|
}
|
44
55
|
|
45
56
|
static VALUE
|
46
|
-
|
57
|
+
rg_draw_rectangle(VALUE self, VALUE part, VALUE x, VALUE y, VALUE width, VALUE height)
|
47
58
|
{
|
48
|
-
#
|
49
|
-
pango_renderer_draw_rectangle(_SELF(self),
|
59
|
+
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
60
|
+
pango_renderer_draw_rectangle(_SELF(self), RVAL2PANGORENDERPART(part),
|
50
61
|
NUM2INT(x), NUM2INT(y), NUM2INT(width), NUM2INT(height));
|
51
62
|
#else
|
52
63
|
pango_renderer_draw_rectangle(_SELF(self), NUM2INT(part),
|
@@ -56,7 +67,7 @@ renderer_draw_rectangle(VALUE self, VALUE part, VALUE x, VALUE y, VALUE width, V
|
|
56
67
|
}
|
57
68
|
|
58
69
|
static VALUE
|
59
|
-
|
70
|
+
rg_draw_error_underline(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
|
60
71
|
{
|
61
72
|
pango_renderer_draw_error_underline(_SELF(self),
|
62
73
|
NUM2INT(x), NUM2INT(y), NUM2INT(width), NUM2INT(height));
|
@@ -64,11 +75,11 @@ renderer_draw_error_underline(VALUE self, VALUE x, VALUE y, VALUE width, VALUE h
|
|
64
75
|
}
|
65
76
|
|
66
77
|
static VALUE
|
67
|
-
|
78
|
+
rg_draw_trapezoid(VALUE self, VALUE part, VALUE y1, VALUE x11, VALUE x21, VALUE y2, VALUE x12, VALUE x22)
|
68
79
|
{
|
69
|
-
#
|
80
|
+
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
70
81
|
pango_renderer_draw_trapezoid(_SELF(self),
|
71
|
-
|
82
|
+
RVAL2PANGORENDERPART(part),
|
72
83
|
NUM2DBL(y1), NUM2DBL(x11), NUM2DBL(x21),
|
73
84
|
NUM2DBL(y2), NUM2DBL(x12), NUM2DBL(x22));
|
74
85
|
#else
|
@@ -80,35 +91,35 @@ renderer_draw_trapezoid(VALUE self, VALUE part, VALUE y1, VALUE x11, VALUE x21,
|
|
80
91
|
}
|
81
92
|
|
82
93
|
static VALUE
|
83
|
-
|
94
|
+
rg_draw_glyph(VALUE self, VALUE font, VALUE glyph, VALUE x, VALUE y)
|
84
95
|
{
|
85
|
-
pango_renderer_draw_glyph(_SELF(self),
|
96
|
+
pango_renderer_draw_glyph(_SELF(self), RVAL2PANGOFONT(font),
|
86
97
|
NUM2INT(glyph), NUM2INT(x), NUM2INT(y));
|
87
98
|
return self;
|
88
99
|
}
|
89
100
|
|
90
101
|
static VALUE
|
91
|
-
|
102
|
+
rg_deactivate(VALUE self)
|
92
103
|
{
|
93
104
|
pango_renderer_deactivate(_SELF(self));
|
94
105
|
return self;
|
95
106
|
}
|
96
107
|
|
97
108
|
static VALUE
|
98
|
-
|
109
|
+
rg_activate(VALUE self)
|
99
110
|
{
|
100
111
|
pango_renderer_activate(_SELF(self));
|
101
112
|
if (rb_block_given_p()) {
|
102
|
-
rb_ensure(rb_yield, self,
|
113
|
+
rb_ensure(rb_yield, self, rg_deactivate, self);
|
103
114
|
}
|
104
115
|
return self;
|
105
116
|
}
|
106
117
|
|
107
118
|
static VALUE
|
108
|
-
|
119
|
+
rg_part_changed(VALUE self, VALUE part)
|
109
120
|
{
|
110
|
-
#
|
111
|
-
pango_renderer_part_changed(_SELF(self),
|
121
|
+
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
122
|
+
pango_renderer_part_changed(_SELF(self), RVAL2PANGORENDERPART(part));
|
112
123
|
#else
|
113
124
|
pango_renderer_part_changed(_SELF(self), NUM2INT(part));
|
114
125
|
#endif
|
@@ -116,74 +127,74 @@ renderer_part_changed(VALUE self, VALUE part)
|
|
116
127
|
}
|
117
128
|
|
118
129
|
static VALUE
|
119
|
-
|
130
|
+
rg_set_color(VALUE self, VALUE part, VALUE color)
|
120
131
|
{
|
121
|
-
#
|
122
|
-
pango_renderer_set_color(_SELF(self),
|
123
|
-
|
132
|
+
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
133
|
+
pango_renderer_set_color(_SELF(self), RVAL2PANGORENDERPART(part),
|
134
|
+
NIL_P(color) ? NULL : RVAL2PANGOCOLOR(color));
|
124
135
|
#else
|
125
136
|
pango_renderer_set_color(_SELF(self), NUM2INT(part),
|
126
|
-
|
137
|
+
NIL_P(color) ? NULL : RVAL2PANGOCOLOR(color));
|
127
138
|
#endif
|
128
139
|
return self;
|
129
140
|
}
|
130
141
|
|
131
142
|
static VALUE
|
132
|
-
|
143
|
+
rg_get_color(VALUE self, VALUE part)
|
133
144
|
{
|
134
|
-
#
|
145
|
+
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
135
146
|
PangoColor* color = pango_renderer_get_color(_SELF(self),
|
136
|
-
|
147
|
+
RVAL2PANGORENDERPART(part));
|
137
148
|
#else
|
138
149
|
PangoColor* color = pango_renderer_get_color(_SELF(self),NUM2INT(part));
|
139
150
|
#endif
|
140
|
-
return
|
151
|
+
return PANGOCOLOR2RVAL(color);
|
141
152
|
}
|
142
153
|
|
143
154
|
static VALUE
|
144
|
-
|
155
|
+
rg_set_matrix(VALUE self, VALUE matrix)
|
145
156
|
{
|
146
157
|
pango_renderer_set_matrix(_SELF(self),
|
147
|
-
|
158
|
+
NIL_P(matrix) ? NULL : RVAL2PANGOMATRIX(matrix));
|
148
159
|
return self;
|
149
160
|
}
|
150
161
|
|
151
162
|
static VALUE
|
152
|
-
|
163
|
+
rg_matrix(VALUE self)
|
153
164
|
{
|
154
165
|
const PangoMatrix* matrix = pango_renderer_get_matrix(_SELF(self));
|
155
|
-
return
|
166
|
+
return PANGOMATRIX2RVAL((PangoMatrix*)matrix);
|
156
167
|
}
|
157
168
|
|
158
169
|
#endif
|
159
170
|
|
160
171
|
void
|
161
|
-
Init_pangorenderer()
|
172
|
+
Init_pangorenderer(VALUE mPango)
|
162
173
|
{
|
163
174
|
#if PANGO_CHECK_VERSION(1,8,0)
|
164
|
-
VALUE
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
G_DEF_SETTERS(
|
175
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_RENDERER, "Renderer", mPango);
|
176
|
+
|
177
|
+
RG_DEF_METHOD(draw_layout, 3);
|
178
|
+
RG_DEF_METHOD(draw_layout_line, 3);
|
179
|
+
RG_DEF_METHOD(draw_glyphs, 4);
|
180
|
+
RG_DEF_METHOD(draw_rectangle, 5);
|
181
|
+
RG_DEF_METHOD(draw_error_underline, 4);
|
182
|
+
RG_DEF_METHOD(draw_trapezoid, 7);
|
183
|
+
RG_DEF_METHOD(draw_glyph, 4);
|
184
|
+
RG_DEF_METHOD(activate, 0);
|
185
|
+
RG_DEF_METHOD(deactivate, 0);
|
186
|
+
RG_DEF_METHOD(part_changed, 1);
|
187
|
+
RG_DEF_METHOD(set_color, 2);
|
188
|
+
RG_DEF_METHOD(get_color, 1);
|
189
|
+
RG_DEF_METHOD(set_matrix, 1);
|
190
|
+
RG_DEF_METHOD(matrix, 0);
|
191
|
+
|
192
|
+
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
182
193
|
|
183
194
|
/* PangoRenderPart */
|
184
|
-
#
|
185
|
-
G_DEF_CLASS(PANGO_TYPE_RENDER_PART, "Part",
|
186
|
-
G_DEF_CONSTANTS(
|
195
|
+
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
196
|
+
G_DEF_CLASS(PANGO_TYPE_RENDER_PART, "Part", RG_TARGET_NAMESPACE);
|
197
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_RENDER_PART, "PANGO_RENDER_");
|
187
198
|
#endif
|
188
199
|
|
189
200
|
#endif
|
data/ext/pango/rbpangoscript.c
CHANGED
@@ -1,35 +1,46 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2005 Masao Mutoh
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
3
21
|
|
4
|
-
|
5
|
-
|
6
|
-
$Author: ggc $
|
7
|
-
$Date: 2006/06/22 19:52:54 $
|
8
|
-
|
9
|
-
Copyright (C) 2005 Masao Mutoh
|
10
|
-
************************************************/
|
11
|
-
|
12
|
-
#include "rbpango.h"
|
22
|
+
#include "rbpangoprivate.h"
|
13
23
|
|
14
24
|
#if PANGO_CHECK_VERSION(1,4,0)
|
15
|
-
#define
|
25
|
+
#define RG_TARGET_NAMESPACE cScript
|
26
|
+
#define _SELF(r) (RVAL2PANGOSCRIPT(r))
|
16
27
|
|
17
28
|
static VALUE
|
18
|
-
|
29
|
+
rg_s_for_unichar(G_GNUC_UNUSED VALUE self, VALUE ch)
|
19
30
|
{
|
20
|
-
return
|
31
|
+
return PANGOSCRIPT2RVAL(pango_script_for_unichar(NUM2UINT(ch)));
|
21
32
|
}
|
22
33
|
|
23
34
|
static VALUE
|
24
|
-
|
35
|
+
rg_sample_language(VALUE self)
|
25
36
|
{
|
26
37
|
PangoLanguage* lang = pango_script_get_sample_language(_SELF(self));
|
27
|
-
return
|
38
|
+
return PANGOLANGUAGE2RVAL(lang);
|
28
39
|
}
|
29
40
|
|
30
41
|
#if PANGO_CHECK_VERSION(1,16,0)
|
31
42
|
static VALUE
|
32
|
-
|
43
|
+
rg_get_gravity(int argc, VALUE *argv, VALUE self)
|
33
44
|
{
|
34
45
|
VALUE wide, gravity, gravity_hint;
|
35
46
|
int n;
|
@@ -39,20 +50,20 @@ rbpango_script_get_gravity(int argc, VALUE *argv, VALUE self)
|
|
39
50
|
|
40
51
|
if (n == 2) {
|
41
52
|
g = pango_gravity_get_for_script(_SELF(self),
|
42
|
-
|
43
|
-
|
53
|
+
RVAL2PANGOGRAVITY(gravity),
|
54
|
+
RVAL2PANGOGRAVITYHINT(gravity_hint));
|
44
55
|
} else {
|
45
56
|
# if PANGO_CHECK_VERSION(1,26,0)
|
46
57
|
g = pango_gravity_get_for_script_and_width(_SELF(self),
|
47
58
|
RVAL2CBOOL(wide),
|
48
|
-
|
49
|
-
|
59
|
+
RVAL2PANGOGRAVITY(gravity),
|
60
|
+
RVAL2PANGOGRAVITYHINT(gravity_hint));
|
50
61
|
# else
|
51
62
|
rb_raise(rb_eArgError,
|
52
63
|
"the 3rd 'wide' argument requires Pango >= 1.26");
|
53
64
|
# endif
|
54
65
|
}
|
55
|
-
return
|
66
|
+
return PANGOGRAVITY2RVAL(g);
|
56
67
|
}
|
57
68
|
#endif
|
58
69
|
|
@@ -63,16 +74,15 @@ gboolean pango_language_includes_script (PangoLanguage *language,
|
|
63
74
|
#endif
|
64
75
|
|
65
76
|
void
|
66
|
-
Init_pango_script()
|
77
|
+
Init_pango_script(VALUE mPango)
|
67
78
|
{
|
68
79
|
#if PANGO_CHECK_VERSION(1,4,0)
|
69
|
-
VALUE
|
80
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_SCRIPT, "Script", mPango);
|
70
81
|
|
71
|
-
|
72
|
-
|
82
|
+
RG_DEF_SMETHOD(for_unichar, 1);
|
83
|
+
RG_DEF_METHOD(sample_language, 0);
|
73
84
|
#endif
|
74
85
|
#if PANGO_CHECK_VERSION(1,16,0)
|
75
|
-
|
86
|
+
RG_DEF_METHOD(get_gravity, -1);
|
76
87
|
#endif
|
77
88
|
}
|
78
|
-
|
@@ -1,15 +1,25 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2005 Masao Mutoh
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "rbpangoprivate.h"
|
13
23
|
|
14
24
|
#if PANGO_CHECK_VERSION(1,4,0)
|
15
25
|
|
@@ -40,10 +50,11 @@ pango_script_iter_get_type(void)
|
|
40
50
|
}
|
41
51
|
/**********************************/
|
42
52
|
|
43
|
-
#define
|
53
|
+
#define RG_TARGET_NAMESPACE cScriptIter
|
54
|
+
#define _SELF(r) (RVAL2PANGOSCRIPTITER(r))
|
44
55
|
|
45
56
|
static VALUE
|
46
|
-
|
57
|
+
rg_initialize(VALUE self, VALUE text)
|
47
58
|
{
|
48
59
|
PangoScriptIter* iter;
|
49
60
|
|
@@ -54,7 +65,7 @@ rbpango_scriptiter_initialize(VALUE self, VALUE text)
|
|
54
65
|
}
|
55
66
|
|
56
67
|
static VALUE
|
57
|
-
|
68
|
+
rg_range(VALUE self)
|
58
69
|
{
|
59
70
|
G_CONST_RETURN char* start;
|
60
71
|
G_CONST_RETURN char* end;
|
@@ -63,25 +74,24 @@ rbpango_scriptiter_get_range(VALUE self)
|
|
63
74
|
pango_script_iter_get_range(_SELF(self), &start, &end, &script);
|
64
75
|
|
65
76
|
return rb_ary_new3(3, CSTR2RVAL(start), CSTR2RVAL(end),
|
66
|
-
|
77
|
+
PANGOSCRIPT2RVAL(script));
|
67
78
|
}
|
68
79
|
|
69
80
|
static VALUE
|
70
|
-
|
81
|
+
rg_next_bang(VALUE self)
|
71
82
|
{
|
72
83
|
return CBOOL2RVAL(pango_script_iter_next(_SELF(self)));
|
73
84
|
}
|
74
85
|
#endif
|
75
86
|
|
76
87
|
void
|
77
|
-
Init_pango_script_iter()
|
88
|
+
Init_pango_script_iter(VALUE mPango)
|
78
89
|
{
|
79
90
|
#if PANGO_CHECK_VERSION(1,4,0)
|
80
|
-
VALUE
|
91
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_SCRIPT_ITER, "ScriptIter", mPango);
|
81
92
|
|
82
|
-
|
83
|
-
|
84
|
-
|
93
|
+
RG_DEF_METHOD(initialize, 1);
|
94
|
+
RG_DEF_METHOD(range, 0);
|
95
|
+
RG_DEF_METHOD_BANG(next, 0);
|
85
96
|
#endif
|
86
97
|
}
|
87
|
-
|