atk 3.1.1 → 3.1.2
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.
- checksums.yaml +4 -4
- data/Rakefile +18 -2
- data/dependency-check/Rakefile +44 -0
- data/lib/atk.rb +29 -21
- data/test/atk-test-utils.rb +1 -1
- data/test/run-test.rb +5 -2
- data/test/test-text-rectangle.rb +5 -4
- data/test/test-version.rb +1 -1
- metadata +7 -44
- data/README +0 -30
- data/ext/atk/atk.def +0 -2
- data/ext/atk/depend +0 -11
- data/ext/atk/extconf.rb +0 -83
- data/ext/atk/rbatk.c +0 -66
- data/ext/atk/rbatk.h +0 -47
- data/ext/atk/rbatkaction.c +0 -85
- data/ext/atk/rbatkcomponent.c +0 -175
- data/ext/atk/rbatkconversions.h +0 -70
- data/ext/atk/rbatkdocument.c +0 -96
- data/ext/atk/rbatkeditabletext.c +0 -177
- data/ext/atk/rbatkgobjectaccessible.c +0 -46
- data/ext/atk/rbatkhyperlink.c +0 -71
- data/ext/atk/rbatkhypertext.c +0 -53
- data/ext/atk/rbatkimage.c +0 -68
- data/ext/atk/rbatkimplementor.c +0 -38
- data/ext/atk/rbatknoopobject.c +0 -40
- data/ext/atk/rbatknoopobjectfactory.c +0 -40
- data/ext/atk/rbatkobject.c +0 -153
- data/ext/atk/rbatkobjectfactory.c +0 -53
- data/ext/atk/rbatkobjectrole.c +0 -50
- data/ext/atk/rbatkprivate.h +0 -48
- data/ext/atk/rbatkregistry.c +0 -63
- data/ext/atk/rbatkrelation.c +0 -98
- data/ext/atk/rbatkrelationset.c +0 -95
- data/ext/atk/rbatkrelationtype.c +0 -38
- data/ext/atk/rbatkselection.c +0 -87
- data/ext/atk/rbatkstate.c +0 -51
- data/ext/atk/rbatkstateset.c +0 -180
- data/ext/atk/rbatkstreamablecontent.c +0 -57
- data/ext/atk/rbatktable.c +0 -271
- data/ext/atk/rbatktext.c +0 -318
- data/ext/atk/rbatktextattribute.c +0 -54
- data/ext/atk/rbatktextrange.c +0 -92
- data/ext/atk/rbatktextrectangle.c +0 -149
- data/ext/atk/rbatkutil.c +0 -122
- data/ext/atk/rbatkvalue.c +0 -78
- data/extconf.rb +0 -49
@@ -1,149 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
/*
|
3
|
-
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
-
* Copyright (C) 2004 Masao Mutoh
|
5
|
-
* Copyright (C) 2002,2003 Masao Mutoh
|
6
|
-
* Copyright (C) 1998-2000 Yukihiro Matsumoto,
|
7
|
-
* Daisuke Kanda,
|
8
|
-
* Hiroshi Igarashi
|
9
|
-
*
|
10
|
-
* This library is free software; you can redistribute it and/or
|
11
|
-
* modify it under the terms of the GNU Lesser General Public
|
12
|
-
* License as published by the Free Software Foundation; either
|
13
|
-
* version 2.1 of the License, or (at your option) any later version.
|
14
|
-
*
|
15
|
-
* This library is distributed in the hope that it will be useful,
|
16
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
18
|
-
* Lesser General Public License for more details.
|
19
|
-
*
|
20
|
-
* You should have received a copy of the GNU Lesser General Public
|
21
|
-
* License along with this library; if not, write to the Free Software
|
22
|
-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
23
|
-
* MA 02110-1301 USA
|
24
|
-
*/
|
25
|
-
|
26
|
-
#include "rbatkprivate.h"
|
27
|
-
|
28
|
-
#ifdef HAVE_ATK_TEXT_GET_BOUNDED_RANGES
|
29
|
-
#define RG_TARGET_NAMESPACE cTextRectangle
|
30
|
-
#define _SELF(r) (RVAL2ATKTEXTRECTANGLE(r))
|
31
|
-
|
32
|
-
/**********************************/
|
33
|
-
static AtkTextRectangle*
|
34
|
-
atk_text_rectangle_copy(const AtkTextRectangle* val)
|
35
|
-
{
|
36
|
-
AtkTextRectangle* new_val;
|
37
|
-
g_return_val_if_fail (val != NULL, NULL);
|
38
|
-
new_val = g_new(AtkTextRectangle, 1);
|
39
|
-
*new_val = *val;
|
40
|
-
return new_val;
|
41
|
-
}
|
42
|
-
|
43
|
-
GType
|
44
|
-
atk_text_rectangle_get_type(void)
|
45
|
-
{
|
46
|
-
static GType our_type = 0;
|
47
|
-
|
48
|
-
if (our_type == 0)
|
49
|
-
our_type = g_boxed_type_register_static ("AtkTextRectangle",
|
50
|
-
(GBoxedCopyFunc)atk_text_rectangle_copy,
|
51
|
-
(GBoxedFreeFunc)g_free);
|
52
|
-
return our_type;
|
53
|
-
}
|
54
|
-
/**********************************/
|
55
|
-
|
56
|
-
static VALUE
|
57
|
-
rg_initialize(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
|
58
|
-
{
|
59
|
-
AtkTextRectangle rectangle;
|
60
|
-
|
61
|
-
rectangle.x = NUM2INT(x);
|
62
|
-
rectangle.y = NUM2INT(y);
|
63
|
-
rectangle.width = NUM2INT(width);
|
64
|
-
rectangle.height = NUM2INT(height);
|
65
|
-
|
66
|
-
G_INITIALIZE(self, g_boxed_copy(ATK_TYPE_TEXT_RECTANGLE, &rectangle));
|
67
|
-
return Qnil;
|
68
|
-
}
|
69
|
-
|
70
|
-
/* Struct accessors */
|
71
|
-
static VALUE
|
72
|
-
rg_x(VALUE self)
|
73
|
-
{
|
74
|
-
return INT2NUM(_SELF(self)->x);
|
75
|
-
}
|
76
|
-
|
77
|
-
static VALUE
|
78
|
-
rg_y(VALUE self)
|
79
|
-
{
|
80
|
-
return INT2NUM(_SELF(self)->y);
|
81
|
-
}
|
82
|
-
|
83
|
-
static VALUE
|
84
|
-
rg_width(VALUE self)
|
85
|
-
{
|
86
|
-
return INT2NUM(_SELF(self)->width);
|
87
|
-
}
|
88
|
-
|
89
|
-
static VALUE
|
90
|
-
rg_height(VALUE self)
|
91
|
-
{
|
92
|
-
return INT2NUM(_SELF(self)->height);
|
93
|
-
}
|
94
|
-
|
95
|
-
static VALUE
|
96
|
-
rg_set_x(VALUE self, VALUE x)
|
97
|
-
{
|
98
|
-
_SELF(self)->x = NUM2INT(x);
|
99
|
-
return self;
|
100
|
-
}
|
101
|
-
|
102
|
-
static VALUE
|
103
|
-
rg_set_y(VALUE self, VALUE y)
|
104
|
-
{
|
105
|
-
_SELF(self)->y = NUM2INT(y);
|
106
|
-
return self;
|
107
|
-
}
|
108
|
-
|
109
|
-
static VALUE
|
110
|
-
rg_set_width(VALUE self, VALUE width)
|
111
|
-
{
|
112
|
-
_SELF(self)->width = NUM2INT(width);
|
113
|
-
return self;
|
114
|
-
}
|
115
|
-
|
116
|
-
static VALUE
|
117
|
-
rg_set_height(VALUE self, VALUE height)
|
118
|
-
{
|
119
|
-
_SELF(self)->height = NUM2INT(height);
|
120
|
-
return self;
|
121
|
-
}
|
122
|
-
|
123
|
-
static VALUE
|
124
|
-
rg_to_a(VALUE self)
|
125
|
-
{
|
126
|
-
AtkTextRectangle* a = _SELF(self);
|
127
|
-
return rb_ary_new3(4, INT2FIX(a->x), INT2FIX(a->y),
|
128
|
-
INT2FIX(a->width), INT2FIX(a->height));
|
129
|
-
}
|
130
|
-
#endif
|
131
|
-
|
132
|
-
void
|
133
|
-
Init_atk_text_rectangle(VALUE mAtk)
|
134
|
-
{
|
135
|
-
#ifdef HAVE_ATK_TEXT_GET_BOUNDED_RANGES
|
136
|
-
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_TEXT_RECTANGLE, "TextRectangle", mAtk);
|
137
|
-
|
138
|
-
RG_DEF_METHOD(initialize, 4);
|
139
|
-
RG_DEF_METHOD(x, 0);
|
140
|
-
RG_DEF_METHOD(y, 0);
|
141
|
-
RG_DEF_METHOD(width, 0);
|
142
|
-
RG_DEF_METHOD(height, 0);
|
143
|
-
RG_DEF_METHOD(set_x, 1);
|
144
|
-
RG_DEF_METHOD(set_y, 1);
|
145
|
-
RG_DEF_METHOD(set_width, 1);
|
146
|
-
RG_DEF_METHOD(set_height, 1);
|
147
|
-
RG_DEF_METHOD(to_a, 0);
|
148
|
-
#endif
|
149
|
-
}
|
data/ext/atk/rbatkutil.c
DELETED
@@ -1,122 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
/*
|
3
|
-
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
-
* Copyright (C) 2004 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 "rbatkprivate.h"
|
23
|
-
|
24
|
-
#define RG_TARGET_NAMESPACE cUtil
|
25
|
-
static ID id_call;
|
26
|
-
|
27
|
-
/* How can I implement them?
|
28
|
-
guint atk_add_focus_tracker (AtkEventListener focus_tracker);
|
29
|
-
void atk_remove_focus_tracker (guint tracker_id);
|
30
|
-
void atk_focus_tracker_init (AtkEventListenerInit add_function);
|
31
|
-
void (*AtkEventListener) (AtkObject*);
|
32
|
-
void (*AtkEventListenerInit) (void);
|
33
|
-
guint atk_add_global_event_listener (GSignalEmissionHook listener,
|
34
|
-
const gchar *event_type);
|
35
|
-
void atk_remove_global_event_listener
|
36
|
-
(guint listener_id);
|
37
|
-
*/
|
38
|
-
|
39
|
-
static VALUE
|
40
|
-
rg_s_focus_tracker_notify(VALUE self, VALUE obj)
|
41
|
-
{
|
42
|
-
atk_focus_tracker_notify(RVAL2ATKOBJECT(obj));
|
43
|
-
return self;
|
44
|
-
}
|
45
|
-
|
46
|
-
static gint
|
47
|
-
key_snoop_func(AtkKeyEventStruct* event, gpointer func)
|
48
|
-
{
|
49
|
-
VALUE ret = rb_funcall((VALUE)func, id_call, 7,
|
50
|
-
INT2NUM(event->type), UINT2NUM(event->state),
|
51
|
-
UINT2NUM(event->keyval), INT2NUM(event->length),
|
52
|
-
CSTR2RVAL(event->string), UINT2NUM(event->keycode),
|
53
|
-
UINT2NUM(event->timestamp));
|
54
|
-
return NUM2INT(ret);
|
55
|
-
}
|
56
|
-
|
57
|
-
static VALUE
|
58
|
-
rg_s_add_key_event_listener(VALUE self)
|
59
|
-
{
|
60
|
-
guint ret;
|
61
|
-
VALUE func = rb_block_proc();
|
62
|
-
G_RELATIVE(self, func);
|
63
|
-
ret = atk_add_key_event_listener((AtkKeySnoopFunc)key_snoop_func, (gpointer)func);
|
64
|
-
return UINT2NUM(ret);
|
65
|
-
}
|
66
|
-
|
67
|
-
static VALUE
|
68
|
-
rg_s_remove_key_event_listener(VALUE self, VALUE id)
|
69
|
-
{
|
70
|
-
atk_remove_key_event_listener(NUM2UINT(id));
|
71
|
-
return self;
|
72
|
-
}
|
73
|
-
|
74
|
-
static VALUE
|
75
|
-
rg_s_root(G_GNUC_UNUSED VALUE self)
|
76
|
-
{
|
77
|
-
return GOBJ2RVAL(atk_get_root());
|
78
|
-
}
|
79
|
-
|
80
|
-
static VALUE
|
81
|
-
rg_s_focus_object(G_GNUC_UNUSED VALUE self)
|
82
|
-
{
|
83
|
-
return GOBJ2RVAL(atk_get_focus_object());
|
84
|
-
}
|
85
|
-
|
86
|
-
static VALUE
|
87
|
-
rg_s_toolkit_name(G_GNUC_UNUSED VALUE self)
|
88
|
-
{
|
89
|
-
return CSTR2RVAL(atk_get_toolkit_name());
|
90
|
-
}
|
91
|
-
|
92
|
-
static VALUE
|
93
|
-
rg_s_toolkit_version(G_GNUC_UNUSED VALUE self)
|
94
|
-
{
|
95
|
-
return CSTR2RVAL(atk_get_toolkit_version());
|
96
|
-
}
|
97
|
-
|
98
|
-
void
|
99
|
-
Init_atk_util(VALUE mAtk)
|
100
|
-
{
|
101
|
-
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_UTIL, "Util", mAtk);
|
102
|
-
|
103
|
-
id_call = rb_intern("call");
|
104
|
-
|
105
|
-
RG_DEF_SMETHOD(focus_tracker_notify, 1);
|
106
|
-
RG_DEF_SMETHOD(add_key_event_listener, 0);
|
107
|
-
RG_DEF_SMETHOD(remove_key_event_listener, 1);
|
108
|
-
|
109
|
-
RG_DEF_SMETHOD(root, 0);
|
110
|
-
RG_DEF_SMETHOD(focus_object, 0);
|
111
|
-
RG_DEF_SMETHOD(toolkit_name, 0);
|
112
|
-
RG_DEF_SMETHOD(toolkit_version, 0);
|
113
|
-
|
114
|
-
/* AtkCoordType */
|
115
|
-
G_DEF_CLASS(ATK_TYPE_COORD_TYPE, "CoordType", RG_TARGET_NAMESPACE);
|
116
|
-
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, ATK_TYPE_COORD_TYPE, "ATK_");
|
117
|
-
|
118
|
-
/* AtkKeyEventType */
|
119
|
-
G_DEF_CLASS(ATK_TYPE_KEY_EVENT_TYPE, "KeyEventType", RG_TARGET_NAMESPACE);
|
120
|
-
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, ATK_TYPE_KEY_EVENT_TYPE, "ATK_");
|
121
|
-
|
122
|
-
}
|
data/ext/atk/rbatkvalue.c
DELETED
@@ -1,78 +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 "rbatkprivate.h"
|
23
|
-
|
24
|
-
#define RG_TARGET_NAMESPACE mValue
|
25
|
-
#define _SELF(s) (RVAL2ATKVALUE(s))
|
26
|
-
|
27
|
-
static VALUE
|
28
|
-
rg_current(VALUE self)
|
29
|
-
{
|
30
|
-
GValue gval = G_VALUE_INIT;
|
31
|
-
atk_value_get_current_value(_SELF(self), &gval);
|
32
|
-
|
33
|
-
return GVAL2RVAL(&gval);
|
34
|
-
}
|
35
|
-
|
36
|
-
static VALUE
|
37
|
-
rg_max(VALUE self)
|
38
|
-
{
|
39
|
-
GValue gval = G_VALUE_INIT;
|
40
|
-
atk_value_get_maximum_value(_SELF(self), &gval);
|
41
|
-
|
42
|
-
return GVAL2RVAL(&gval);
|
43
|
-
}
|
44
|
-
|
45
|
-
static VALUE
|
46
|
-
rg_min(VALUE self)
|
47
|
-
{
|
48
|
-
GValue gval = G_VALUE_INIT;
|
49
|
-
atk_value_get_minimum_value(_SELF(self), &gval);
|
50
|
-
|
51
|
-
return GVAL2RVAL(&gval);
|
52
|
-
}
|
53
|
-
|
54
|
-
static VALUE
|
55
|
-
rg_set_current(VALUE self, VALUE value)
|
56
|
-
{
|
57
|
-
GValue gval = G_VALUE_INIT;
|
58
|
-
g_value_init(&gval, RVAL2GTYPE(value));
|
59
|
-
|
60
|
-
rbgobj_rvalue_to_gvalue(value, &gval);
|
61
|
-
|
62
|
-
if (! atk_value_set_current_value(_SELF(self), &gval)){
|
63
|
-
rb_raise(rb_eRuntimeError, "Can't set the current value.");
|
64
|
-
}
|
65
|
-
|
66
|
-
return self;
|
67
|
-
}
|
68
|
-
|
69
|
-
void
|
70
|
-
Init_atk_value(VALUE mAtk)
|
71
|
-
{
|
72
|
-
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_VALUE, "Value", mAtk);
|
73
|
-
|
74
|
-
RG_DEF_METHOD(current, 0);
|
75
|
-
RG_DEF_METHOD(max, 0);
|
76
|
-
RG_DEF_METHOD(min, 0);
|
77
|
-
RG_DEF_METHOD(set_current, 1);
|
78
|
-
}
|
data/extconf.rb
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'pathname'
|
4
|
-
require 'mkmf'
|
5
|
-
require 'rbconfig'
|
6
|
-
require 'fileutils'
|
7
|
-
|
8
|
-
package = "atk"
|
9
|
-
|
10
|
-
base_dir = Pathname(__FILE__).dirname.expand_path
|
11
|
-
ext_dir = base_dir + "ext" + package
|
12
|
-
mkmf_gnome2_dir = base_dir + 'lib'
|
13
|
-
|
14
|
-
ruby = File.join(RbConfig::CONFIG['bindir'],
|
15
|
-
RbConfig::CONFIG['ruby_install_name'] +
|
16
|
-
RbConfig::CONFIG["EXEEXT"])
|
17
|
-
|
18
|
-
build_dir = Pathname("ext") + package
|
19
|
-
FileUtils.mkdir_p(build_dir.to_s) unless build_dir.exist?
|
20
|
-
extconf_rb_path = ext_dir + "extconf.rb"
|
21
|
-
system(ruby, "-C", build_dir.to_s, extconf_rb_path.to_s, *ARGV) || exit(false)
|
22
|
-
|
23
|
-
create_makefile(package)
|
24
|
-
FileUtils.mv("Makefile", "Makefile.lib")
|
25
|
-
|
26
|
-
File.open("Makefile", "w") do |makefile|
|
27
|
-
makefile.puts(<<-EOM)
|
28
|
-
all:
|
29
|
-
(cd ext/#{package} && $(MAKE))
|
30
|
-
$(MAKE) -f Makefile.lib
|
31
|
-
|
32
|
-
install:
|
33
|
-
(cd ext/#{package} && $(MAKE) install)
|
34
|
-
$(MAKE) -f Makefile.lib install
|
35
|
-
|
36
|
-
site-install:
|
37
|
-
(cd ext/#{package} && $(MAKE) site-install)
|
38
|
-
$(MAKE) -f Makefile.lib site-install
|
39
|
-
|
40
|
-
clean:
|
41
|
-
(cd ext/#{package} && $(MAKE) clean)
|
42
|
-
$(MAKE) -f Makefile.lib clean
|
43
|
-
|
44
|
-
distclean:
|
45
|
-
(cd ext/#{package} && $(MAKE) distclean)
|
46
|
-
$(MAKE) -f Makefile.lib distclean
|
47
|
-
@rm -f Makefile.lib
|
48
|
-
EOM
|
49
|
-
end
|