pango 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +27 -5
  3. data/ext/pango/depend +2 -2
  4. data/ext/pango/extconf.rb +32 -28
  5. data/ext/pango/pango.def +0 -16
  6. data/ext/pango/rb-pango-attr-list.c +64 -0
  7. data/ext/pango/rb-pango-attribute.c +147 -0
  8. data/ext/pango/rb-pango-context.c +79 -0
  9. data/ext/pango/{rbpangoconversions.h → rb-pango-conversions.h} +4 -6
  10. data/ext/pango/rb-pango-private.h +27 -0
  11. data/ext/pango/rb-pango.c +32 -0
  12. data/ext/pango/rb-pango.h +29 -0
  13. data/extconf.rb +25 -9
  14. data/lib/pango.rb +24 -68
  15. data/lib/pango/cairo-loader.rb +63 -0
  16. data/lib/pango/color.rb +31 -0
  17. data/lib/pango/deprecated.rb +37 -0
  18. data/lib/pango/font-description.rb +29 -0
  19. data/lib/pango/language.rb +29 -0
  20. data/lib/pango/layout.rb +41 -0
  21. data/lib/pango/loader.rb +87 -0
  22. data/lib/pango/markup.rb +31 -0
  23. data/lib/pango/matrix.rb +64 -0
  24. data/lib/pango/rectangle.rb +28 -0
  25. data/lib/pango/version.rb +30 -0
  26. data/test/pango-test-utils.rb +7 -7
  27. data/test/run-test.rb +34 -8
  28. data/test/test-attr-list.rb +28 -0
  29. data/test/test-color.rb +1 -3
  30. data/test/test-context.rb +4 -4
  31. data/test/test-enum.rb +37 -0
  32. data/test/test-font-description.rb +31 -0
  33. data/test/test-language.rb +2 -1
  34. data/test/test-layout.rb +12 -0
  35. data/test/test-markup.rb +30 -0
  36. data/test/test-matrix.rb +131 -5
  37. data/test/test-rectangle.rb +16 -3
  38. metadata +42 -56
  39. data/README +0 -32
  40. data/ext/pango/rbpango.c +0 -356
  41. data/ext/pango/rbpango.h +0 -95
  42. data/ext/pango/rbpangoanalysis.c +0 -218
  43. data/ext/pango/rbpangoattribute.c +0 -506
  44. data/ext/pango/rbpangoattriterator.c +0 -141
  45. data/ext/pango/rbpangoattrlist.c +0 -101
  46. data/ext/pango/rbpangocairo.c +0 -122
  47. data/ext/pango/rbpangocairocontext.c +0 -131
  48. data/ext/pango/rbpangocolor.c +0 -120
  49. data/ext/pango/rbpangocontext.c +0 -344
  50. data/ext/pango/rbpangocoverage.c +0 -106
  51. data/ext/pango/rbpangoengine.c +0 -73
  52. data/ext/pango/rbpangofont.c +0 -110
  53. data/ext/pango/rbpangofontdescription.c +0 -282
  54. data/ext/pango/rbpangofontface.c +0 -73
  55. data/ext/pango/rbpangofontfamily.c +0 -79
  56. data/ext/pango/rbpangofontmap.c +0 -102
  57. data/ext/pango/rbpangofontmetrics.c +0 -85
  58. data/ext/pango/rbpangofontset.c +0 -69
  59. data/ext/pango/rbpangofontsetsimple.c +0 -60
  60. data/ext/pango/rbpangoglyphinfo.c +0 -123
  61. data/ext/pango/rbpangoglyphitem.c +0 -125
  62. data/ext/pango/rbpangoglyphstring.c +0 -151
  63. data/ext/pango/rbpangogravity.c +0 -54
  64. data/ext/pango/rbpangoitem.c +0 -95
  65. data/ext/pango/rbpangolanguage.c +0 -94
  66. data/ext/pango/rbpangolayout.c +0 -583
  67. data/ext/pango/rbpangolayoutiter.c +0 -189
  68. data/ext/pango/rbpangolayoutline.c +0 -243
  69. data/ext/pango/rbpangologattr.c +0 -109
  70. data/ext/pango/rbpangomatrix.c +0 -143
  71. data/ext/pango/rbpangoprivate.h +0 -49
  72. data/ext/pango/rbpangorectangle.c +0 -170
  73. data/ext/pango/rbpangorenderer.c +0 -193
  74. data/ext/pango/rbpangoscript.c +0 -84
  75. data/ext/pango/rbpangoscriptiter.c +0 -92
  76. data/ext/pango/rbpangotabarray.c +0 -128
  77. data/sample/attribute.rb +0 -82
  78. data/sample/break.rb +0 -28
  79. data/sample/gdk_layout.rb +0 -27
  80. data/sample/glyphstring.rb +0 -61
  81. data/sample/item.rb +0 -37
  82. data/sample/label.rb +0 -23
  83. data/sample/layout.rb +0 -102
  84. data/sample/pango_cairo.rb +0 -66
  85. data/sample/parse.rb +0 -33
  86. data/sample/sample.txt +0 -10
  87. data/sample/script.rb +0 -23
@@ -1,189 +0,0 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
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 cLayoutIter
25
- #define _SELF(r) (RVAL2PANGOLAYOUTITER(r))
26
-
27
- /**********************************/
28
- #ifndef HAVE_PANGO_LAYOUT_ITER_GET_TYPE
29
- static PangoLayoutIter *
30
- layout_iter_copy(const PangoLayoutIter *ref)
31
- {
32
- return (PangoLayoutIter *)ref;
33
- }
34
-
35
- GType
36
- pango_layout_iter_get_type(void)
37
- {
38
- static GType our_type = 0;
39
-
40
- if (our_type == 0)
41
- our_type = g_boxed_type_register_static ("PangoLayoutIter",
42
- (GBoxedCopyFunc)layout_iter_copy,
43
- (GBoxedFreeFunc)pango_layout_iter_free);
44
- return our_type;
45
- }
46
- #endif
47
- /**********************************/
48
-
49
- static VALUE
50
- rg_next_run_bang(VALUE self)
51
- {
52
- return CBOOL2RVAL(pango_layout_iter_next_run(_SELF(self)));
53
- }
54
-
55
- static VALUE
56
- rg_next_char_bang(VALUE self)
57
- {
58
- return CBOOL2RVAL(pango_layout_iter_next_char(_SELF(self)));
59
- }
60
-
61
- static VALUE
62
- rg_next_cluster_bang(VALUE self)
63
- {
64
- return CBOOL2RVAL(pango_layout_iter_next_cluster(_SELF(self)));
65
- }
66
-
67
- static VALUE
68
- rg_next_line_bang(VALUE self)
69
- {
70
- return CBOOL2RVAL(pango_layout_iter_next_line(_SELF(self)));
71
- }
72
-
73
- static VALUE
74
- rg_at_last_line_p(VALUE self)
75
- {
76
- return CBOOL2RVAL(pango_layout_iter_at_last_line(_SELF(self)));
77
- }
78
-
79
- static VALUE
80
- rg_index(VALUE self)
81
- {
82
- return INT2NUM(pango_layout_iter_get_index(_SELF(self)));
83
- }
84
-
85
- static VALUE
86
- rg_baseline(VALUE self)
87
- {
88
- return INT2NUM(pango_layout_iter_get_baseline(_SELF(self)));
89
- }
90
-
91
- static VALUE
92
- rg_run(VALUE self)
93
- {
94
- PangoLayoutRun* run = pango_layout_iter_get_run(_SELF(self));
95
- return PANGOGLYPHITEM2RVAL(run);
96
- }
97
-
98
- static VALUE
99
- rg_line(VALUE self)
100
- {
101
- return PANGOLAYOUTLINE2RVAL(pango_layout_iter_get_line(_SELF(self)));
102
- }
103
-
104
- static VALUE
105
- rg_char_extents(VALUE self)
106
- {
107
- PangoRectangle logical_rect;
108
-
109
- pango_layout_iter_get_char_extents(_SELF(self), &logical_rect);
110
- return PANGORECTANGLE2RVAL(&logical_rect);
111
- }
112
-
113
- static VALUE
114
- rg_cluster_extents(VALUE self)
115
- {
116
- PangoRectangle ink_rect, logical_rect;
117
-
118
- pango_layout_iter_get_cluster_extents(_SELF(self), &ink_rect, &logical_rect);
119
-
120
- return rb_assoc_new(PANGORECTANGLE2RVAL(&ink_rect),
121
- PANGORECTANGLE2RVAL(&logical_rect));
122
- }
123
-
124
- static VALUE
125
- rg_run_extents(VALUE self)
126
- {
127
- PangoRectangle ink_rect, logical_rect;
128
-
129
- pango_layout_iter_get_run_extents(_SELF(self), &ink_rect, &logical_rect);
130
-
131
- return rb_assoc_new(PANGORECTANGLE2RVAL(&ink_rect),
132
- PANGORECTANGLE2RVAL(&logical_rect));
133
- }
134
-
135
- static VALUE
136
- rg_line_yrange(VALUE self)
137
- {
138
- int y0, y1;
139
- pango_layout_iter_get_line_yrange(_SELF(self), &y0, &y1);
140
- return rb_assoc_new(INT2NUM(y0), INT2NUM(y1));
141
- }
142
-
143
- static VALUE
144
- rg_line_extents(VALUE self)
145
- {
146
- PangoRectangle ink_rect, logical_rect;
147
-
148
- pango_layout_iter_get_line_extents(_SELF(self), &ink_rect, &logical_rect);
149
-
150
- return rb_assoc_new(PANGORECTANGLE2RVAL(&ink_rect),
151
- PANGORECTANGLE2RVAL(&logical_rect));
152
- }
153
- static VALUE
154
- rg_layout_extents(VALUE self)
155
- {
156
- PangoRectangle ink_rect, logical_rect;
157
-
158
- pango_layout_iter_get_layout_extents(_SELF(self), &ink_rect, &logical_rect);
159
-
160
- return rb_assoc_new(PANGORECTANGLE2RVAL(&ink_rect),
161
- PANGORECTANGLE2RVAL(&logical_rect));
162
- }
163
-
164
- void
165
- Init_pango_layout_iter(VALUE mPango)
166
- {
167
- VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_LAYOUT_ITER, "LayoutIter", mPango);
168
-
169
- rbgobj_boxed_not_copy_obj(PANGO_TYPE_LAYOUT_ITER);
170
-
171
- RG_DEF_METHOD_BANG(next_run, 0);
172
- RG_DEF_METHOD_BANG(next_char, 0);
173
- RG_DEF_METHOD_BANG(next_cluster, 0);
174
- RG_DEF_METHOD_BANG(next_line, 0);
175
- RG_DEF_METHOD_P(at_last_line, 0);
176
- /* for backword compatibility. :< */
177
- RG_DEF_ALIAS("at_last_line!", "at_last_line?");
178
- RG_DEF_METHOD(index, 0);
179
- RG_DEF_METHOD(baseline, 0);
180
- RG_DEF_METHOD(run, 0);
181
- RG_DEF_METHOD(line, 0);
182
- RG_DEF_METHOD(char_extents, 0);
183
- RG_DEF_METHOD(cluster_extents, 0);
184
- RG_DEF_METHOD(run_extents, 0);
185
- RG_DEF_METHOD(line_yrange, 0);
186
- RG_DEF_METHOD(line_extents, 0);
187
- RG_DEF_METHOD(layout_extents, 0);
188
-
189
- }
@@ -1,243 +0,0 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
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 cLayoutLine
25
- #define _SELF(r) (RVAL2PANGOLAYOUTLINE(r))
26
-
27
- static VALUE
28
- rg_extents(VALUE self)
29
- {
30
- PangoRectangle ink_rect, logical_rect;
31
-
32
- pango_layout_line_get_extents(_SELF(self), &ink_rect, &logical_rect);
33
-
34
- return rb_assoc_new(PANGORECTANGLE2RVAL(&ink_rect),
35
- PANGORECTANGLE2RVAL(&logical_rect));
36
- }
37
-
38
- static VALUE
39
- rg_pixel_extents(VALUE self)
40
- {
41
- PangoRectangle ink_rect, logical_rect;
42
-
43
- pango_layout_line_get_pixel_extents(_SELF(self), &ink_rect, &logical_rect);
44
-
45
- return rb_assoc_new(PANGORECTANGLE2RVAL(&ink_rect),
46
- PANGORECTANGLE2RVAL(&logical_rect));
47
- }
48
-
49
- static VALUE
50
- rg_index_to_x(VALUE self, VALUE index, VALUE trailing)
51
- {
52
- int x_pos;
53
- pango_layout_line_index_to_x(_SELF(self), NUM2INT(index),
54
- RVAL2CBOOL(trailing), &x_pos);
55
- return INT2NUM(x_pos);
56
- }
57
-
58
- static VALUE
59
- rg_x_to_index(VALUE self, VALUE x_pos)
60
- {
61
- int index = 0;
62
- int trailing = 0;
63
-
64
- gboolean ret = pango_layout_line_x_to_index(_SELF(self), NUM2INT(x_pos),
65
- &index, &trailing);
66
- return rb_ary_new_from_args(3,
67
- CBOOL2RVAL(ret),
68
- INT2NUM(index),
69
- INT2NUM(trailing));
70
- }
71
-
72
- static VALUE
73
- rg_get_x_ranges(VALUE self, VALUE start_index, VALUE end_index)
74
- {
75
- int* ranges;
76
- int i, n_ranges;
77
- VALUE ary;
78
-
79
- pango_layout_line_get_x_ranges(_SELF(self), NUM2INT(start_index),
80
- NUM2INT(end_index), &ranges, &n_ranges);
81
-
82
- ary = rb_ary_new();
83
- for (i = 0; i < n_ranges; i++) {
84
- rb_ary_push(ary, INT2NUM(ranges[i]));
85
- }
86
-
87
- g_free(ranges);
88
- return ary;
89
- }
90
-
91
- /* Structure members */
92
- static VALUE
93
- rg_layout(VALUE self)
94
- {
95
- return GOBJ2RVAL(_SELF(self)->layout);
96
- }
97
-
98
- static VALUE
99
- rg_set_layout(VALUE self, VALUE val)
100
- {
101
- _SELF(self)->layout = RVAL2PANGOLAYOUT(val);
102
- return self;
103
- }
104
-
105
- static VALUE
106
- rg_start_index(VALUE self)
107
- {
108
- return INT2NUM(_SELF(self)->start_index);
109
- }
110
-
111
- static VALUE
112
- rg_set_start_index(VALUE self, VALUE val)
113
- {
114
- _SELF(self)->start_index = NUM2INT(val);
115
- return self;
116
- }
117
-
118
- static VALUE
119
- rg_length(VALUE self)
120
- {
121
- return INT2NUM(_SELF(self)->length);
122
- }
123
-
124
- static VALUE
125
- rg_set_length(VALUE self, VALUE val)
126
- {
127
- _SELF(self)->length = NUM2INT(val);
128
- return self;
129
- }
130
-
131
- static VALUE
132
- rg_runs(VALUE self)
133
- {
134
- GSList* list = _SELF(self)->runs;
135
- VALUE ary = rb_ary_new();
136
- while (list) {
137
- PangoGlyphItem* old_item = (PangoGlyphItem*)list->data;
138
- PangoGlyphItem new_item;
139
-
140
- new_item.item = pango_item_copy(old_item->item);
141
- new_item.glyphs = pango_glyph_string_copy(old_item->glyphs);
142
-
143
- rb_ary_push(ary, PANGOGLYPHITEM2RVAL(&new_item));
144
- list = list->next;
145
- }
146
- return ary;
147
- }
148
-
149
- struct layout_line_set_runs_args {
150
- PangoLayoutLine *line;
151
- VALUE ary;
152
- long n;
153
- GSList *result;
154
- };
155
-
156
- static VALUE
157
- layout_line_set_runs_body(VALUE value)
158
- {
159
- struct layout_line_set_runs_args *args = (struct layout_line_set_runs_args *)value;
160
- long i;
161
-
162
- for (i = 0; i < args->n; i++)
163
- args->result = g_slist_append(args->result,
164
- RVAL2PANGOGLYPHITEM(RARRAY_PTR(args->ary)[i]));
165
-
166
- g_slist_free(args->line->runs);
167
- args->line->runs = args->result;
168
-
169
- return Qnil;
170
- }
171
-
172
- static G_GNUC_NORETURN VALUE
173
- layout_line_set_runs_rescue(VALUE value)
174
- {
175
- g_slist_free(((struct layout_line_set_runs_args *)value)->result);
176
-
177
- rb_exc_raise(rb_errinfo());
178
- }
179
-
180
- static VALUE
181
- rg_set_runs(VALUE self, VALUE attrs)
182
- {
183
- struct layout_line_set_runs_args args;
184
- args.line = _SELF(self);
185
- args.ary = rb_ary_to_ary(attrs);
186
- args.n = RARRAY_LEN(args.ary);
187
- args.result = NULL;
188
-
189
- rb_rescue(layout_line_set_runs_body, (VALUE)&args,
190
- layout_line_set_runs_rescue, (VALUE)&args);
191
-
192
- return self;
193
- }
194
-
195
- static VALUE
196
- rg_paragraph_start_p(VALUE self)
197
- {
198
- return CBOOL2RVAL(_SELF(self)->is_paragraph_start);
199
- }
200
-
201
- static VALUE
202
- rg_set_paragraph_start(VALUE self, VALUE val)
203
- {
204
- _SELF(self)->is_paragraph_start = RVAL2CBOOL(val);
205
- return self;
206
- }
207
-
208
- static VALUE
209
- rg_resolved_dir(VALUE self)
210
- {
211
- return UINT2NUM(_SELF(self)->resolved_dir);
212
- }
213
-
214
- static VALUE
215
- rg_set_resolved_dir(VALUE self, VALUE val)
216
- {
217
- _SELF(self)->resolved_dir = NUM2UINT(val);
218
- return self;
219
- }
220
-
221
- void
222
- Init_pango_layout_line(VALUE mPango)
223
- {
224
- VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_LAYOUT_LINE, "LayoutLine", mPango);
225
-
226
- RG_DEF_METHOD(extents, 0);
227
- RG_DEF_METHOD(pixel_extents, 0);
228
- RG_DEF_METHOD(index_to_x, 2);
229
- RG_DEF_METHOD(x_to_index, 1);
230
- RG_DEF_METHOD(get_x_ranges, 2);
231
- RG_DEF_METHOD(layout, 0);
232
- RG_DEF_METHOD(set_layout, 1);
233
- RG_DEF_METHOD(start_index, 0);
234
- RG_DEF_METHOD(set_start_index, 1);
235
- RG_DEF_METHOD(length, 0);
236
- RG_DEF_METHOD(set_length, 1);
237
- RG_DEF_METHOD(runs, 0);
238
- RG_DEF_METHOD(set_runs, 1);
239
- RG_DEF_METHOD_P(paragraph_start, 0);
240
- RG_DEF_METHOD(set_paragraph_start, 1);
241
- RG_DEF_METHOD(resolved_dir, 0);
242
- RG_DEF_METHOD(set_resolved_dir, 1);
243
- }
@@ -1,109 +0,0 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /*
3
- * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
- * Copyright (C) 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 cLogAttr
25
- #define _SELF(s) (RVAL2PANGOLOGATTR(s))
26
-
27
- /**********************************/
28
- static PangoLogAttr*
29
- log_copy(const PangoLogAttr* val)
30
- {
31
- PangoLogAttr* new_val;
32
- g_return_val_if_fail (val != NULL, NULL);
33
- new_val = g_new(PangoLogAttr, 1);
34
- *new_val = *val;
35
- return new_val;
36
- }
37
-
38
- GType
39
- pango_log_attr_get_type(void)
40
- {
41
- static GType our_type = 0;
42
-
43
- if (our_type == 0)
44
- our_type = g_boxed_type_register_static ("PangoLogAttr",
45
- (GBoxedCopyFunc)log_copy,
46
- (GBoxedFreeFunc)g_free);
47
- return our_type;
48
- }
49
- /**********************************/
50
-
51
- #define ATTR_BOOL(name)\
52
- static VALUE \
53
- log_get_ ## name (VALUE self)\
54
- {\
55
- return CBOOL2RVAL(_SELF(self)->name);\
56
- }\
57
- static VALUE \
58
- log_set_ ## name (VALUE self, VALUE val)\
59
- {\
60
- _SELF(self)->name = RVAL2CBOOL(val);\
61
- return self;\
62
- }
63
-
64
- static VALUE
65
- rg_initialize(VALUE self)
66
- {
67
- PangoLogAttr attribute;
68
- memset(&attribute, 0, sizeof(PangoLogAttr));
69
- G_INITIALIZE(self, g_boxed_copy(PANGO_TYPE_LOG_ATTR, &attribute));
70
- return Qnil;
71
- }
72
-
73
- #define DEFINE_ACCESSOR(logattr, name) \
74
- rbg_define_method(logattr, G_STRINGIFY(name?), log_get_is_ ## name, 0);\
75
- rbg_define_method(logattr, G_STRINGIFY(set_ ## name), log_set_is_ ## name, 1);
76
-
77
- ATTR_BOOL(is_line_break);
78
- ATTR_BOOL(is_mandatory_break);
79
- ATTR_BOOL(is_char_break);
80
- ATTR_BOOL(is_white);
81
- ATTR_BOOL(is_cursor_position);
82
- ATTR_BOOL(is_word_start);
83
- ATTR_BOOL(is_word_end);
84
- ATTR_BOOL(is_sentence_boundary);
85
- ATTR_BOOL(is_sentence_start);
86
- ATTR_BOOL(is_sentence_end);
87
- ATTR_BOOL(backspace_deletes_character);
88
-
89
- void
90
- Init_pango_logattr(VALUE mPango)
91
- {
92
- VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_LOG_ATTR, "LogAttr", mPango);
93
-
94
- RG_DEF_METHOD(initialize, 0);
95
-
96
- DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, line_break);
97
- DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, mandatory_break);
98
- DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, char_break);
99
- DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, white);
100
- DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, cursor_position);
101
- DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, word_start);
102
- DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, word_end);
103
- DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, sentence_boundary);
104
- DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, sentence_start);
105
- DEFINE_ACCESSOR(RG_TARGET_NAMESPACE, sentence_end);
106
-
107
- rbg_define_method(RG_TARGET_NAMESPACE, "backspace_deletes_character?", log_get_backspace_deletes_character, 0);
108
- rbg_define_method(RG_TARGET_NAMESPACE, "set_backspace_deletes_character", log_set_backspace_deletes_character, 1);
109
- }