pango 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- 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/rbpangocolor.c
CHANGED
@@ -1,20 +1,31 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2002,2003 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"
|
23
|
+
|
24
|
+
#define RG_TARGET_NAMESPACE cColor
|
25
|
+
#define _SELF(self) (RVAL2PANGOCOLOR(self))
|
15
26
|
|
16
27
|
static VALUE
|
17
|
-
|
28
|
+
rg_initialize(VALUE self, VALUE red, VALUE green, VALUE blue)
|
18
29
|
{
|
19
30
|
PangoColor c;
|
20
31
|
c.red = NUM2INT(red);
|
@@ -26,52 +37,52 @@ color_initialize(VALUE self, VALUE red, VALUE green, VALUE blue)
|
|
26
37
|
}
|
27
38
|
|
28
39
|
static VALUE
|
29
|
-
|
40
|
+
rg_parse(VALUE self, VALUE spec)
|
30
41
|
{
|
31
42
|
return CBOOL2RVAL(pango_color_parse(_SELF(self), RVAL2CSTR(spec)));
|
32
43
|
}
|
33
44
|
|
34
45
|
static VALUE
|
35
|
-
|
46
|
+
rg_red(VALUE self)
|
36
47
|
{
|
37
48
|
return INT2FIX(_SELF(self)->red);
|
38
49
|
}
|
39
50
|
|
40
51
|
static VALUE
|
41
|
-
|
52
|
+
rg_set_red(VALUE self, VALUE red)
|
42
53
|
{
|
43
54
|
_SELF(self)->red = NUM2INT(red);
|
44
55
|
return self;
|
45
56
|
}
|
46
57
|
|
47
58
|
static VALUE
|
48
|
-
|
59
|
+
rg_green(VALUE self)
|
49
60
|
{
|
50
61
|
return INT2FIX(_SELF(self)->green);
|
51
62
|
}
|
52
63
|
|
53
64
|
static VALUE
|
54
|
-
|
65
|
+
rg_set_green(VALUE self, VALUE green)
|
55
66
|
{
|
56
67
|
_SELF(self)->green = NUM2INT(green);
|
57
68
|
return self;
|
58
69
|
}
|
59
70
|
|
60
71
|
static VALUE
|
61
|
-
|
72
|
+
rg_blue(VALUE self)
|
62
73
|
{
|
63
74
|
return INT2FIX(_SELF(self)->blue);
|
64
75
|
}
|
65
76
|
|
66
77
|
static VALUE
|
67
|
-
|
78
|
+
rg_set_blue(VALUE self, VALUE blue)
|
68
79
|
{
|
69
80
|
_SELF(self)->blue = NUM2INT(blue);
|
70
81
|
return self;
|
71
82
|
}
|
72
83
|
|
73
84
|
static VALUE
|
74
|
-
|
85
|
+
rg_to_a(VALUE self)
|
75
86
|
{
|
76
87
|
PangoColor *c = _SELF(self);
|
77
88
|
return rb_ary_new3(3, INT2FIX(c->red),
|
@@ -79,7 +90,7 @@ color_to_a(VALUE self)
|
|
79
90
|
}
|
80
91
|
|
81
92
|
static VALUE
|
82
|
-
|
93
|
+
rg_operator_color_equal(VALUE self, VALUE other)
|
83
94
|
{
|
84
95
|
PangoColor* c1 = _SELF(self);
|
85
96
|
PangoColor* c2 = _SELF(other);
|
@@ -89,20 +100,20 @@ color_equal(VALUE self, VALUE other)
|
|
89
100
|
}
|
90
101
|
|
91
102
|
void
|
92
|
-
Init_pango_color()
|
103
|
+
Init_pango_color(VALUE mPango)
|
93
104
|
{
|
94
|
-
VALUE
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
G_DEF_SETTERS(
|
105
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_COLOR, "Color", mPango);
|
106
|
+
|
107
|
+
RG_DEF_METHOD(initialize, 3);
|
108
|
+
RG_DEF_METHOD(parse, 1);
|
109
|
+
RG_DEF_METHOD(red, 0);
|
110
|
+
RG_DEF_METHOD(set_red, 1);
|
111
|
+
RG_DEF_METHOD(green, 0);
|
112
|
+
RG_DEF_METHOD(set_green, 1);
|
113
|
+
RG_DEF_METHOD(blue, 0);
|
114
|
+
RG_DEF_METHOD(set_blue, 1);
|
115
|
+
RG_DEF_METHOD(to_a, 0);
|
116
|
+
RG_DEF_METHOD_OPERATOR("==", color_equal, 1);
|
117
|
+
|
118
|
+
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
108
119
|
}
|
data/ext/pango/rbpangocontext.c
CHANGED
@@ -1,26 +1,35 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2002-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"
|
23
|
+
|
24
|
+
#define RG_TARGET_NAMESPACE cContext
|
25
|
+
#define _SELF(self) (RVAL2PANGOCONTEXT(self))
|
17
26
|
|
18
27
|
static VALUE
|
19
|
-
|
28
|
+
rg_itemize(int argc, VALUE *argv, VALUE self)
|
20
29
|
{
|
21
30
|
VALUE arg1, arg2, arg3, arg4, arg5, arg6;
|
22
31
|
GList* list;
|
23
|
-
|
32
|
+
|
24
33
|
rb_scan_args(argc, argv, "42", &arg1, &arg2, &arg3, &arg4, &arg5, &arg6);
|
25
34
|
|
26
35
|
if (TYPE(arg1) == T_STRING) {
|
@@ -28,25 +37,25 @@ rcontext_itemize(int argc, VALUE *argv, VALUE self)
|
|
28
37
|
RVAL2CSTR(arg1), /* text */
|
29
38
|
NUM2INT(arg2), /* start_index */
|
30
39
|
NUM2INT(arg3), /* length */
|
31
|
-
(
|
32
|
-
NIL_P(arg5) ? NULL : (
|
40
|
+
RVAL2PANGOATTRLIST(arg4), /* attrs */
|
41
|
+
NIL_P(arg5) ? NULL : RVAL2PANGOATTRITERATOR(arg5)); /* cached_iter */
|
33
42
|
} else {
|
34
43
|
#ifdef HAVE_PANGO_ITEMIZE_WITH_BASE_DIR
|
35
44
|
list = pango_itemize_with_base_dir(_SELF(self),
|
36
|
-
|
45
|
+
RVAL2PANGODIRECTION(arg1), /* base_dir */
|
37
46
|
RVAL2CSTR(arg2), /* text */
|
38
47
|
NUM2INT(arg3), /* start_index */
|
39
48
|
NUM2INT(arg4), /* length */
|
40
|
-
(
|
41
|
-
NIL_P(arg6) ? NULL : (
|
49
|
+
RVAL2PANGOATTRLIST(arg5), /* attrs */
|
50
|
+
NIL_P(arg6) ? NULL : RVAL2PANGOATTRITERATOR(arg6)); /* cached_iter */
|
42
51
|
#else
|
43
52
|
rb_warn("Pango::Context#itemize(base_dir, text, start_index, length, attrs, cached_iter) isn't supported on this environment.");
|
44
53
|
list = pango_itemize(_SELF(self),
|
45
54
|
RVAL2CSTR(arg1), /* text */
|
46
55
|
NUM2INT(arg2), /* start_index */
|
47
56
|
NUM2INT(arg3), /* length */
|
48
|
-
(
|
49
|
-
NIL_P(arg5) ? NULL : (
|
57
|
+
RVAL2PANGOATTRLIST(arg4), /* attrs */
|
58
|
+
NIL_P(arg5) ? NULL : RVAL2PANGOATTRITERATOR(arg5)); /* cached_iter */
|
50
59
|
#endif
|
51
60
|
}
|
52
61
|
return GLIST2ARY2F(list, PANGO_TYPE_ITEM);
|
@@ -58,22 +67,22 @@ GList* pango_reorder_items (GList *logical_items);
|
|
58
67
|
|
59
68
|
#ifdef PANGO_ENABLE_BACKEND
|
60
69
|
static VALUE
|
61
|
-
|
70
|
+
rg_initialize(VALUE self)
|
62
71
|
{
|
63
72
|
G_INITIALIZE(self, pango_context_new());
|
64
73
|
return Qnil;
|
65
74
|
}
|
66
75
|
|
67
76
|
static VALUE
|
68
|
-
|
77
|
+
rg_set_font_map(VALUE self, VALUE font_map)
|
69
78
|
{
|
70
|
-
pango_context_set_font_map(_SELF(self),
|
79
|
+
pango_context_set_font_map(_SELF(self), RVAL2PANGOFONTMAP(font_map));
|
71
80
|
return self;
|
72
81
|
}
|
73
82
|
|
74
83
|
#if PANGO_CHECK_VERSION(1,6,0)
|
75
84
|
static VALUE
|
76
|
-
|
85
|
+
rg_font_map(VALUE self)
|
77
86
|
{
|
78
87
|
return GOBJ2RVAL(pango_context_get_font_map(_SELF(self)));
|
79
88
|
}
|
@@ -81,120 +90,119 @@ rcontext_get_font_map(VALUE self)
|
|
81
90
|
#endif /* PANGO_ENABLE_BACKEND */
|
82
91
|
|
83
92
|
static VALUE
|
84
|
-
|
93
|
+
rg_font_description(VALUE self)
|
85
94
|
{
|
86
95
|
PangoFontDescription* ret = pango_context_get_font_description(_SELF(self));
|
87
|
-
return
|
96
|
+
return PANGOFONTDESCRIPTION2RVAL(ret);
|
88
97
|
}
|
89
98
|
|
90
99
|
static VALUE
|
91
|
-
|
100
|
+
rg_set_font_description(VALUE self, VALUE desc)
|
92
101
|
{
|
93
|
-
pango_context_set_font_description(_SELF(self),
|
102
|
+
pango_context_set_font_description(_SELF(self), RVAL2PANGOFONTDESCRIPTION(desc));
|
94
103
|
return self;
|
95
104
|
}
|
96
105
|
|
97
106
|
static VALUE
|
98
|
-
|
107
|
+
rg_language(VALUE self)
|
99
108
|
{
|
100
109
|
PangoLanguage* ret = pango_context_get_language(_SELF(self));
|
101
|
-
return
|
110
|
+
return PANGOLANGUAGE2RVAL(ret);
|
102
111
|
}
|
103
112
|
|
104
113
|
static VALUE
|
105
|
-
|
114
|
+
rg_set_language(VALUE self, VALUE lang)
|
106
115
|
{
|
107
116
|
pango_context_set_language(_SELF(self),
|
108
|
-
|
117
|
+
RVAL2PANGOLANGUAGE(lang));
|
109
118
|
return self;
|
110
119
|
}
|
111
120
|
|
112
121
|
static VALUE
|
113
|
-
|
122
|
+
rg_base_dir(VALUE self)
|
114
123
|
{
|
115
|
-
return
|
124
|
+
return PANGODIRECTION2RVAL(pango_context_get_base_dir(_SELF(self)));
|
116
125
|
}
|
117
126
|
|
118
127
|
static VALUE
|
119
|
-
|
128
|
+
rg_set_base_dir(VALUE self, VALUE direction)
|
120
129
|
{
|
121
|
-
pango_context_set_base_dir(_SELF(self),
|
130
|
+
pango_context_set_base_dir(_SELF(self), RVAL2PANGODIRECTION(direction));
|
122
131
|
return self;
|
123
132
|
}
|
124
133
|
|
125
134
|
#if PANGO_CHECK_VERSION(1,16,0)
|
126
135
|
static VALUE
|
127
|
-
|
136
|
+
rg_base_gravity(VALUE self)
|
128
137
|
{
|
129
|
-
return
|
138
|
+
return PANGOGRAVITY2RVAL(pango_context_get_base_gravity(_SELF(self)));
|
130
139
|
}
|
131
140
|
|
132
141
|
static VALUE
|
133
|
-
|
142
|
+
rg_set_base_gravity(VALUE self, VALUE gravity)
|
134
143
|
{
|
135
|
-
pango_context_set_base_gravity(_SELF(self),
|
144
|
+
pango_context_set_base_gravity(_SELF(self), RVAL2PANGOGRAVITY(gravity));
|
136
145
|
return self;
|
137
146
|
}
|
138
147
|
|
139
148
|
static VALUE
|
140
|
-
|
149
|
+
rg_gravity_hint(VALUE self)
|
141
150
|
{
|
142
|
-
return
|
151
|
+
return PANGOGRAVITYHINT2RVAL(pango_context_get_gravity_hint(_SELF(self)));
|
143
152
|
}
|
144
153
|
|
145
154
|
static VALUE
|
146
|
-
|
155
|
+
rg_set_gravity_hint(VALUE self, VALUE gravity_hint)
|
147
156
|
{
|
148
|
-
pango_context_set_gravity_hint(_SELF(self),
|
157
|
+
pango_context_set_gravity_hint(_SELF(self), RVAL2PANGOGRAVITYHINT(gravity_hint));
|
149
158
|
return self;
|
150
159
|
}
|
151
160
|
#endif
|
152
161
|
|
153
162
|
#if PANGO_CHECK_VERSION(1,6,0)
|
154
163
|
static VALUE
|
155
|
-
|
164
|
+
rg_matrix(VALUE self)
|
156
165
|
{
|
157
166
|
const PangoMatrix* matrix = pango_context_get_matrix(_SELF(self));
|
158
|
-
return
|
167
|
+
return PANGOMATRIX2RVAL((PangoMatrix*)matrix);
|
159
168
|
}
|
160
169
|
|
161
170
|
static VALUE
|
162
|
-
|
171
|
+
rg_set_matrix(VALUE self, VALUE matrix)
|
163
172
|
{
|
164
173
|
pango_context_set_matrix(_SELF(self),
|
165
|
-
(
|
174
|
+
RVAL2PANGOMATRIX(matrix));
|
166
175
|
return self;
|
167
176
|
}
|
168
177
|
#endif
|
169
178
|
|
170
179
|
static VALUE
|
171
|
-
|
180
|
+
rg_load_font(VALUE self, VALUE desc)
|
172
181
|
{
|
173
|
-
return GOBJ2RVAL(pango_context_load_font(_SELF(self),
|
182
|
+
return GOBJ2RVAL(pango_context_load_font(_SELF(self), RVAL2PANGOFONTDESCRIPTION(desc)));
|
174
183
|
}
|
175
184
|
|
176
185
|
static VALUE
|
177
|
-
|
186
|
+
rg_load_fontset(VALUE self, VALUE desc, VALUE lang)
|
178
187
|
{
|
179
188
|
return GOBJ2RVAL(pango_context_load_fontset(_SELF(self),
|
180
|
-
|
189
|
+
RVAL2PANGOFONTDESCRIPTION(desc), RVAL2PANGOLANGUAGE(lang)));
|
181
190
|
}
|
182
191
|
|
183
192
|
static VALUE
|
184
|
-
|
193
|
+
rg_get_metrics(int argc, VALUE *argv, VALUE self)
|
185
194
|
{
|
186
195
|
VALUE desc, lang;
|
187
196
|
|
188
197
|
rb_scan_args(argc, argv, "11", &desc, &lang);
|
189
198
|
|
190
|
-
return
|
191
|
-
|
192
|
-
|
193
|
-
PANGO_TYPE_FONT_METRICS);
|
199
|
+
return PANGOFONTMETRICS2RVAL(pango_context_get_metrics(_SELF(self),
|
200
|
+
RVAL2PANGOFONTDESCRIPTION(desc),
|
201
|
+
NIL_P(lang) ? NULL : RVAL2PANGOLANGUAGE(lang)));
|
194
202
|
}
|
195
203
|
|
196
204
|
static VALUE
|
197
|
-
|
205
|
+
rg_families(VALUE self)
|
198
206
|
{
|
199
207
|
int n_families;
|
200
208
|
PangoFontFamily** families;
|
@@ -215,9 +223,9 @@ rcontext_list_families(VALUE self)
|
|
215
223
|
}
|
216
224
|
|
217
225
|
#if PANGO_CHECK_VERSION(1,10,0)
|
218
|
-
#
|
226
|
+
# ifdef HAVE_RB_CAIRO_H
|
219
227
|
static VALUE
|
220
|
-
|
228
|
+
rg_set_font_options(VALUE self, VALUE options)
|
221
229
|
{
|
222
230
|
if (NIL_P(options))
|
223
231
|
pango_cairo_context_set_font_options(_SELF(self), NULL);
|
@@ -228,7 +236,7 @@ rcontext_set_font_options(VALUE self, VALUE options)
|
|
228
236
|
}
|
229
237
|
|
230
238
|
static VALUE
|
231
|
-
|
239
|
+
rg_font_options(VALUE self)
|
232
240
|
{
|
233
241
|
const cairo_font_options_t *options;
|
234
242
|
options = pango_cairo_context_get_font_options(_SELF(self));
|
@@ -239,78 +247,77 @@ rcontext_get_font_options(VALUE self)
|
|
239
247
|
}
|
240
248
|
|
241
249
|
static VALUE
|
242
|
-
|
250
|
+
rg_set_resolution(VALUE self, VALUE dpi)
|
243
251
|
{
|
244
252
|
pango_cairo_context_set_resolution(_SELF(self), NUM2DBL(dpi));
|
245
253
|
return self;
|
246
254
|
}
|
247
255
|
|
248
256
|
static VALUE
|
249
|
-
|
257
|
+
rg_resolution(VALUE self)
|
250
258
|
{
|
251
259
|
return rb_float_new(pango_cairo_context_get_resolution(_SELF(self)));
|
252
260
|
}
|
253
261
|
# endif
|
254
262
|
#endif
|
255
263
|
|
256
|
-
|
257
264
|
static VALUE
|
258
|
-
|
265
|
+
rg_list_families(VALUE self)
|
259
266
|
{
|
260
267
|
rb_warn("Deprecated. Use Pango::Context#families instead.");
|
261
|
-
return
|
268
|
+
return rg_families(self);
|
262
269
|
}
|
263
270
|
|
264
271
|
void
|
265
|
-
Init_pango_context()
|
272
|
+
Init_pango_context(VALUE mPango)
|
266
273
|
{
|
267
|
-
VALUE
|
274
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_CONTEXT, "Context", mPango);
|
268
275
|
|
269
|
-
|
276
|
+
RG_DEF_METHOD(itemize, -1);
|
270
277
|
|
271
278
|
#ifdef PANGO_ENABLE_BACKEND
|
272
|
-
|
273
|
-
|
279
|
+
RG_DEF_METHOD(initialize, 0);
|
280
|
+
RG_DEF_METHOD(set_font_map, 1);
|
274
281
|
#if PANGO_CHECK_VERSION(1,6,0)
|
275
|
-
|
282
|
+
RG_DEF_METHOD(font_map, 0);
|
276
283
|
#endif
|
277
284
|
#endif /* PANGO_ENABLE_BACKEND */
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
285
|
+
RG_DEF_METHOD(font_description, 0);
|
286
|
+
RG_DEF_METHOD(set_font_description, 1);
|
287
|
+
RG_DEF_METHOD(language, 0);
|
288
|
+
RG_DEF_METHOD(set_language, 1);
|
289
|
+
RG_DEF_METHOD(base_dir, 0);
|
290
|
+
RG_DEF_METHOD(set_base_dir, 1);
|
284
291
|
#if PANGO_CHECK_VERSION(1,16,0)
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
292
|
+
RG_DEF_METHOD(base_gravity, 0);
|
293
|
+
RG_DEF_METHOD(set_base_gravity, 1);
|
294
|
+
RG_DEF_METHOD(gravity_hint, 0);
|
295
|
+
RG_DEF_METHOD(set_gravity_hint, 1);
|
289
296
|
#endif
|
290
297
|
#if PANGO_CHECK_VERSION(1,6,0)
|
291
|
-
|
292
|
-
|
298
|
+
RG_DEF_METHOD(matrix, 0);
|
299
|
+
RG_DEF_METHOD(set_matrix, 1);
|
293
300
|
#endif
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
301
|
+
RG_DEF_METHOD(load_font, 1);
|
302
|
+
RG_DEF_METHOD(load_fontset, 2);
|
303
|
+
RG_DEF_METHOD(get_metrics, -1);
|
304
|
+
RG_DEF_METHOD(families, 0);
|
298
305
|
|
299
306
|
#if PANGO_CHECK_VERSION(1,10,0)
|
300
|
-
#
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
307
|
+
# ifdef HAVE_RB_CAIRO_H
|
308
|
+
RG_DEF_METHOD(set_font_options, 1);
|
309
|
+
RG_DEF_METHOD(font_options, 0);
|
310
|
+
RG_DEF_METHOD(set_resolution, 1);
|
311
|
+
RG_DEF_METHOD(resolution, 0);
|
305
312
|
# endif
|
306
313
|
#endif
|
307
|
-
|
314
|
+
|
308
315
|
/* This will remove 2 or 3 releases later since 0.14.0. */
|
309
|
-
|
316
|
+
RG_DEF_METHOD(list_families, 0);
|
310
317
|
|
311
|
-
G_DEF_SETTERS(
|
318
|
+
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
312
319
|
|
313
320
|
/* PangoDirection */
|
314
|
-
G_DEF_CLASS(PANGO_TYPE_DIRECTION, "Direction",
|
315
|
-
G_DEF_CONSTANTS(
|
321
|
+
G_DEF_CLASS(PANGO_TYPE_DIRECTION, "Direction", RG_TARGET_NAMESPACE);
|
322
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_DIRECTION, "PANGO_");
|
316
323
|
}
|