atk 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/atk/extconf.rb +3 -0
- data/ext/atk/rbatk.c +56 -17
- data/ext/atk/rbatk.h +21 -12
- data/ext/atk/rbatkaction.c +38 -27
- data/ext/atk/rbatkcomponent.c +61 -50
- data/ext/atk/rbatkconversions.h +70 -0
- data/ext/atk/rbatkdocument.c +38 -27
- data/ext/atk/rbatkeditabletext.c +123 -39
- data/ext/atk/rbatkgobjectaccessible.c +30 -19
- data/ext/atk/rbatkhyperlink.c +34 -22
- data/ext/atk/rbatkhypertext.c +32 -20
- data/ext/atk/rbatkimage.c +34 -22
- data/ext/atk/rbatkimplementor.c +26 -14
- data/ext/atk/rbatknoopobject.c +28 -17
- data/ext/atk/rbatknoopobjectfactory.c +28 -17
- data/ext/atk/rbatkobject.c +48 -63
- data/ext/atk/rbatkobjectfactory.c +32 -20
- data/ext/atk/rbatkobjectrole.c +50 -0
- data/ext/atk/rbatkprivate.h +48 -0
- data/ext/atk/rbatkregistry.c +34 -22
- data/ext/atk/rbatkrelation.c +68 -43
- data/ext/atk/rbatkrelationset.c +44 -32
- data/ext/atk/rbatkrelationtype.c +38 -0
- data/ext/atk/rbatkselection.c +38 -26
- data/ext/atk/rbatkstate.c +32 -20
- data/ext/atk/rbatkstateset.c +113 -65
- data/ext/atk/rbatkstreamablecontent.c +33 -23
- data/ext/atk/rbatktable.c +91 -80
- data/ext/atk/rbatktext.c +85 -107
- data/ext/atk/rbatktextattribute.c +54 -0
- data/ext/atk/rbatktextrange.c +38 -33
- data/ext/atk/rbatktextrectangle.c +53 -48
- data/ext/atk/rbatkutil.c +44 -35
- data/ext/atk/rbatkvalue.c +39 -29
- data/lib/1.8/atk.so +0 -0
- data/lib/1.9/atk.so +0 -0
- data/vendor/local/bin/libatk-1.0-0.dll +0 -0
- data/vendor/local/lib/atk-1.0.def +3 -0
- data/vendor/local/lib/atk-1.0.lib +0 -0
- data/vendor/local/lib/libatk-1.0.dll.a +0 -0
- data/vendor/local/manifest/{atk-dev_1.32.0-1_win32.mft → atk-dev_1.32.0-2_win32.mft} +3 -3
- data/vendor/local/manifest/{atk_1.32.0-1_win32.mft → atk_1.32.0-2_win32.mft} +1 -1
- data/vendor/local/src/dieterv/packaging/atk_1.32.0-2_win32.log +740 -0
- data/vendor/local/src/{tml/packaging/atk_1.32.0-1_win32.sh → dieterv/packaging/atk_1.32.0-2_win32.sh} +30 -7
- metadata +18 -16
- data/ChangeLog +0 -278
- data/ext/atk/makeinits.rb +0 -39
- data/ext/atk/rbatkinits.c +0 -56
- data/vendor/local/src/tml/packaging/atk_1.32.0-1_win32.log +0 -730
data/ext/atk/rbatkhyperlink.c
CHANGED
@@ -1,59 +1,71 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2003,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
|
+
*/
|
3
21
|
|
4
|
-
|
22
|
+
#include "rbatkprivate.h"
|
5
23
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
Copyright (C) 2003,2004 Masao Mutoh
|
10
|
-
************************************************/
|
11
|
-
#include "rbatk.h"
|
12
|
-
|
13
|
-
#define _SELF(s) (ATK_HYPERLINK(RVAL2GOBJ(s)))
|
24
|
+
#define RG_TARGET_NAMESPACE cHyperlink
|
25
|
+
#define _SELF(s) (RVAL2ATKHYPERLINK(s))
|
14
26
|
|
15
27
|
static VALUE
|
16
|
-
|
28
|
+
rg_get_uri(VALUE self, VALUE i)
|
17
29
|
{
|
18
30
|
return CSTR2RVAL(atk_hyperlink_get_uri(_SELF(self), NUM2INT(i)));
|
19
31
|
}
|
20
32
|
|
21
33
|
static VALUE
|
22
|
-
|
34
|
+
rg_get_object(VALUE self, VALUE i)
|
23
35
|
{
|
24
36
|
return GOBJ2RVAL(atk_hyperlink_get_object(_SELF(self), NUM2INT(i)));
|
25
37
|
}
|
26
38
|
|
27
39
|
static VALUE
|
28
|
-
|
40
|
+
rg_valid_p(VALUE self)
|
29
41
|
{
|
30
42
|
return CBOOL2RVAL(atk_hyperlink_is_valid(_SELF(self)));
|
31
43
|
}
|
32
44
|
|
33
45
|
#ifdef HAVE_ATK_HYPERLINK_IS_INLINE
|
34
46
|
static VALUE
|
35
|
-
|
47
|
+
rg_inline_p(VALUE self)
|
36
48
|
{
|
37
49
|
return CBOOL2RVAL(atk_hyperlink_is_inline(_SELF(self)));
|
38
50
|
}
|
39
51
|
#endif
|
40
52
|
|
41
53
|
static VALUE
|
42
|
-
|
54
|
+
rg_n_anchors(VALUE self)
|
43
55
|
{
|
44
56
|
return INT2NUM(atk_hyperlink_get_n_anchors(_SELF(self)));
|
45
57
|
}
|
46
58
|
|
47
59
|
void
|
48
|
-
Init_atk_hyperlink()
|
60
|
+
Init_atk_hyperlink(VALUE mAtk)
|
49
61
|
{
|
50
|
-
VALUE
|
62
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_HYPERLINK, "Hyperlink", mAtk);
|
51
63
|
|
52
|
-
|
53
|
-
|
54
|
-
|
64
|
+
RG_DEF_METHOD(get_uri, 1);
|
65
|
+
RG_DEF_METHOD(get_object, 1);
|
66
|
+
RG_DEF_METHOD_P(valid, 0);
|
55
67
|
#ifdef HAVE_ATK_HYPERLINK_IS_INLINE
|
56
|
-
|
68
|
+
RG_DEF_METHOD_P(inline, 0);
|
57
69
|
#endif
|
58
|
-
|
70
|
+
RG_DEF_METHOD(n_anchors, 0);
|
59
71
|
}
|
data/ext/atk/rbatkhypertext.c
CHANGED
@@ -1,41 +1,53 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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 mHypertext
|
25
|
+
#define _SELF(s) (RVAL2ATKHYPERTEXT(s))
|
14
26
|
|
15
27
|
static VALUE
|
16
|
-
|
28
|
+
rg_get_link(VALUE self, VALUE link_index)
|
17
29
|
{
|
18
30
|
return GOBJ2RVAL(atk_hypertext_get_link(_SELF(self), NUM2INT(link_index)));
|
19
31
|
}
|
20
32
|
|
21
33
|
static VALUE
|
22
|
-
|
34
|
+
rg_n_links(VALUE self)
|
23
35
|
{
|
24
36
|
return INT2NUM(atk_hypertext_get_n_links(_SELF(self)));
|
25
37
|
}
|
26
38
|
|
27
39
|
static VALUE
|
28
|
-
|
40
|
+
rg_link_index(VALUE self, VALUE char_index)
|
29
41
|
{
|
30
42
|
return INT2NUM(atk_hypertext_get_link_index(_SELF(self), NUM2INT(char_index)));
|
31
43
|
}
|
32
44
|
|
33
45
|
void
|
34
|
-
Init_atk_hypertext()
|
46
|
+
Init_atk_hypertext(VALUE mAtk)
|
35
47
|
{
|
36
|
-
VALUE
|
48
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_HYPERTEXT, "Hypertext", mAtk);
|
37
49
|
|
38
|
-
|
39
|
-
|
40
|
-
|
50
|
+
RG_DEF_METHOD(get_link, 1);
|
51
|
+
RG_DEF_METHOD(n_links, 0);
|
52
|
+
RG_DEF_METHOD(link_index, 1);
|
41
53
|
}
|
data/ext/atk/rbatkimage.c
CHANGED
@@ -1,34 +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) 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
|
+
*/
|
3
21
|
|
4
|
-
|
22
|
+
#include "rbatkprivate.h"
|
5
23
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
Copyright (C) 2004 Masao Mutoh
|
10
|
-
************************************************/
|
11
|
-
#include "rbatk.h"
|
12
|
-
|
13
|
-
#define _SELF(s) (ATK_IMAGE(RVAL2GOBJ(s)))
|
24
|
+
#define RG_TARGET_NAMESPACE mImage
|
25
|
+
#define _SELF(s) (RVAL2ATKIMAGE(s))
|
14
26
|
|
15
27
|
static VALUE
|
16
|
-
|
28
|
+
rg_image_position(VALUE self, VALUE coord_type)
|
17
29
|
{
|
18
30
|
gint x, y;
|
19
31
|
atk_image_get_image_position(_SELF(self), &x, &y,
|
20
|
-
|
32
|
+
RVAL2ATKCOORDTYPE(coord_type));
|
21
33
|
return rb_assoc_new(INT2NUM(x), INT2NUM(y));
|
22
34
|
}
|
23
35
|
|
24
36
|
static VALUE
|
25
|
-
|
37
|
+
rg_image_description(VALUE self)
|
26
38
|
{
|
27
39
|
return CSTR2RVAL(atk_image_get_image_description(_SELF(self)));
|
28
40
|
}
|
29
41
|
|
30
42
|
static VALUE
|
31
|
-
|
43
|
+
rg_set_image_description(VALUE self, VALUE description)
|
32
44
|
{
|
33
45
|
gboolean ret = atk_image_set_image_description(_SELF(self),
|
34
46
|
RVAL2CSTR(description));
|
@@ -37,7 +49,7 @@ rbatkimage_set_image_description(VALUE self, VALUE description)
|
|
37
49
|
}
|
38
50
|
|
39
51
|
static VALUE
|
40
|
-
|
52
|
+
rg_image_size(VALUE self)
|
41
53
|
{
|
42
54
|
gint width, height;
|
43
55
|
atk_image_get_image_size(_SELF(self), &width, &height);
|
@@ -45,14 +57,14 @@ rbatkimage_get_image_size(VALUE self)
|
|
45
57
|
}
|
46
58
|
|
47
59
|
void
|
48
|
-
Init_atk_image()
|
60
|
+
Init_atk_image(VALUE mAtk)
|
49
61
|
{
|
50
|
-
VALUE
|
62
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_IMAGE, "Image", mAtk);
|
51
63
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
64
|
+
RG_DEF_METHOD(image_position, 1);
|
65
|
+
RG_DEF_METHOD(image_description, 0);
|
66
|
+
RG_DEF_METHOD(set_image_description, 1);
|
67
|
+
RG_DEF_METHOD(image_size, 0);
|
56
68
|
|
57
|
-
G_DEF_SETTERS(
|
69
|
+
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
58
70
|
}
|
data/ext/atk/rbatkimplementor.c
CHANGED
@@ -1,26 +1,38 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
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
|
+
*/
|
3
21
|
|
4
|
-
|
22
|
+
#include "rbatkprivate.h"
|
5
23
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
Copyright (C) 2003 Masao Mutoh
|
10
|
-
************************************************/
|
11
|
-
#include "rbatk.h"
|
12
|
-
|
13
|
-
#define _SELF(s) (ATK_IMPLEMENTOR(RVAL2GOBJ(s)))
|
24
|
+
#define RG_TARGET_NAMESPACE mImplementor
|
25
|
+
#define _SELF(s) (RVAL2ATKIMPLEMENTOR(s))
|
14
26
|
|
15
27
|
static VALUE
|
16
|
-
|
28
|
+
rg_ref_accessible(VALUE self)
|
17
29
|
{
|
18
30
|
return GOBJ2RVAL(atk_implementor_ref_accessible(_SELF(self)));
|
19
31
|
}
|
20
32
|
|
21
33
|
void
|
22
|
-
Init_atk_implementor()
|
34
|
+
Init_atk_implementor(VALUE mAtk)
|
23
35
|
{
|
24
|
-
VALUE
|
25
|
-
|
36
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_IMPLEMENTOR, "Implementor", mAtk);
|
37
|
+
RG_DEF_METHOD(ref_accessible, 0);
|
26
38
|
}
|
data/ext/atk/rbatknoopobject.c
CHANGED
@@ -1,29 +1,40 @@
|
|
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) 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 cNoOpObject
|
25
|
+
#define _SELF(s) (RVAL2ATKNOOPOBJECT(s))
|
15
26
|
|
16
27
|
static VALUE
|
17
|
-
|
28
|
+
rg_initialize(VALUE self, VALUE gobj)
|
18
29
|
{
|
19
30
|
G_INITIALIZE(self, atk_no_op_object_new(RVAL2GOBJ(gobj)));
|
20
31
|
return Qnil;
|
21
32
|
}
|
22
33
|
|
23
34
|
void
|
24
|
-
Init_atk_noopobject()
|
35
|
+
Init_atk_noopobject(VALUE mAtk)
|
25
36
|
{
|
26
|
-
VALUE
|
37
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_NO_OP_OBJECT, "NoOpObject", mAtk);
|
27
38
|
|
28
|
-
|
39
|
+
RG_DEF_METHOD(initialize, 1);
|
29
40
|
}
|
@@ -1,29 +1,40 @@
|
|
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) 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 cNoOpObjectFactory
|
25
|
+
#define _SELF(s) (RVAL2ATKNOOPOBJECTFACTORY(s))
|
15
26
|
|
16
27
|
static VALUE
|
17
|
-
|
28
|
+
rg_initialize(VALUE self)
|
18
29
|
{
|
19
30
|
G_INITIALIZE(self, atk_no_op_object_factory_new());
|
20
31
|
return Qnil;
|
21
32
|
}
|
22
33
|
|
23
34
|
void
|
24
|
-
Init_atk_noopobjectfactory()
|
35
|
+
Init_atk_noopobjectfactory(VALUE mAtk)
|
25
36
|
{
|
26
|
-
VALUE
|
37
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_NO_OP_OBJECT_FACTORY, "NoOpObjectFactory", mAtk);
|
27
38
|
|
28
|
-
|
39
|
+
RG_DEF_METHOD(initialize, 0);
|
29
40
|
}
|
data/ext/atk/rbatkobject.c
CHANGED
@@ -1,16 +1,27 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2003,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 cObject
|
14
25
|
#define _SELF(s) RVAL2ATKOBJECT(s)
|
15
26
|
|
16
27
|
/* How can I implement this? Since 1.10
|
@@ -26,19 +37,19 @@ AtkObject* atk_object_get_parent (AtkObject *accessible);
|
|
26
37
|
*/
|
27
38
|
|
28
39
|
static VALUE
|
29
|
-
|
40
|
+
rg_n_accessible_children(VALUE self)
|
30
41
|
{
|
31
42
|
return INT2NUM(atk_object_get_n_accessible_children(_SELF(self)));
|
32
43
|
}
|
33
44
|
|
34
45
|
static VALUE
|
35
|
-
|
46
|
+
rg_ref_accessible_child(VALUE self, VALUE i)
|
36
47
|
{
|
37
48
|
return GOBJ2RVAL(atk_object_ref_accessible_child(_SELF(self), NUM2INT(i)));
|
38
49
|
}
|
39
50
|
|
40
51
|
static VALUE
|
41
|
-
|
52
|
+
rg_ref_relation_set(VALUE self)
|
42
53
|
{
|
43
54
|
return GOBJ2RVAL(atk_object_ref_relation_set(_SELF(self)));
|
44
55
|
}
|
@@ -50,13 +61,13 @@ AtkRole atk_object_get_role (AtkObject *accessible);
|
|
50
61
|
*/
|
51
62
|
|
52
63
|
static VALUE
|
53
|
-
|
64
|
+
rg_ref_state_set(VALUE self)
|
54
65
|
{
|
55
66
|
return GOBJ2RVAL(atk_object_ref_state_set(_SELF(self)));
|
56
67
|
}
|
57
68
|
|
58
69
|
static VALUE
|
59
|
-
|
70
|
+
rg_index_in_parent(VALUE self)
|
60
71
|
{
|
61
72
|
return INT2NUM(atk_object_get_index_in_parent(_SELF(self)));
|
62
73
|
}
|
@@ -81,10 +92,10 @@ void atk_object_remove_property_change_handler
|
|
81
92
|
*/
|
82
93
|
|
83
94
|
static VALUE
|
84
|
-
|
95
|
+
rg_notify_state_change(VALUE self, VALUE state, VALUE value)
|
85
96
|
{
|
86
97
|
atk_object_notify_state_change(_SELF(self),
|
87
|
-
|
98
|
+
RVAL2ATKSTATETYPE(state),
|
88
99
|
RVAL2CBOOL(value));
|
89
100
|
return self;
|
90
101
|
}
|
@@ -96,73 +107,47 @@ void atk_object_initialize (AtkObject *accessible,
|
|
96
107
|
|
97
108
|
#ifdef HAVE_ATK_OBJECT_ADD_RELATIONSHIP
|
98
109
|
static VALUE
|
99
|
-
|
110
|
+
rg_add_relationship(VALUE self, VALUE relationship, VALUE target)
|
100
111
|
{
|
101
112
|
return CBOOL2RVAL(atk_object_add_relationship(
|
102
113
|
_SELF(self),
|
103
|
-
|
114
|
+
RVAL2ATKRELATIONTYPE(relationship),
|
104
115
|
_SELF(target)));
|
105
116
|
}
|
106
117
|
#endif
|
107
118
|
|
108
119
|
#ifdef HAVE_ATK_OBJECT_REMOVE_RELATIONSHIP
|
109
120
|
static VALUE
|
110
|
-
|
121
|
+
rg_remove_relationship(VALUE self, VALUE relationship, VALUE target)
|
111
122
|
{
|
112
123
|
return CBOOL2RVAL(atk_object_remove_relationship(
|
113
124
|
_SELF(self),
|
114
|
-
|
125
|
+
RVAL2ATKRELATIONTYPE(relationship),
|
115
126
|
_SELF(target)));
|
116
127
|
}
|
117
128
|
#endif
|
118
129
|
|
119
|
-
/* We don't need this.
|
120
|
-
G_CONST_RETURN gchar* atk_role_get_name (AtkRole role);
|
121
|
-
*/
|
122
|
-
|
123
|
-
static VALUE
|
124
|
-
rbatkrole_get_localized_name(VALUE self)
|
125
|
-
{
|
126
|
-
#ifdef HAVE_ATK_ROLE_GET_LOCALIZED_NAME
|
127
|
-
return CSTR2RVAL(atk_role_get_localized_name(RVAL2GENUM(self, ATK_TYPE_ROLE)));
|
128
|
-
#else
|
129
|
-
rb_warning("not supported in this version of ATK.");
|
130
|
-
return Qnil;
|
131
|
-
#endif
|
132
|
-
}
|
133
|
-
|
134
|
-
static VALUE
|
135
|
-
rbatkrole_s_for_name(VALUE self, VALUE name)
|
136
|
-
{
|
137
|
-
return GENUM2RVAL(atk_role_for_name(RVAL2CSTR(name)), ATK_TYPE_ROLE);
|
138
|
-
}
|
139
|
-
|
140
130
|
void
|
141
|
-
Init_atk_object()
|
131
|
+
Init_atk_object(VALUE mAtk)
|
142
132
|
{
|
143
|
-
VALUE
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
rb_define_method(obj, "notify_state_change", rbatkobj_notify_state_change, 2);
|
133
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_OBJECT, "Object", mAtk);
|
134
|
+
|
135
|
+
RG_DEF_METHOD(n_accessible_children, 0);
|
136
|
+
RG_DEF_METHOD(ref_accessible_child, 1);
|
137
|
+
RG_DEF_METHOD(ref_relation_set, 0);
|
138
|
+
RG_DEF_METHOD(ref_state_set, 0);
|
139
|
+
RG_DEF_METHOD(index_in_parent, 0);
|
140
|
+
RG_DEF_METHOD(notify_state_change, 2);
|
152
141
|
#ifdef HAVE_ATK_OBJECT_ADD_RELATIONSHIP
|
153
|
-
|
142
|
+
RG_DEF_METHOD(add_relationship, 2);
|
154
143
|
#endif
|
155
144
|
#ifdef HAVE_ATK_OBJECT_REMOVE_RELATIONSHIP
|
156
|
-
|
145
|
+
RG_DEF_METHOD(remove_relationship, 2);
|
157
146
|
#endif
|
158
147
|
|
159
|
-
|
160
|
-
role = G_DEF_CLASS(ATK_TYPE_ROLE, "Role", obj);
|
161
|
-
rb_define_method(role, "localized_name", rbatkrole_get_localized_name, 0);
|
162
|
-
rb_define_singleton_method(role, "for_name", rbatkrole_s_for_name, 1);
|
163
|
-
G_DEF_CONSTANTS(obj, ATK_TYPE_ROLE, "ATK_");
|
148
|
+
Init_atk_object_role(RG_TARGET_NAMESPACE);
|
164
149
|
|
165
150
|
/* AtkLayer */
|
166
|
-
G_DEF_CLASS(ATK_TYPE_LAYER, "Layer",
|
167
|
-
G_DEF_CONSTANTS(
|
151
|
+
G_DEF_CLASS(ATK_TYPE_LAYER, "Layer", RG_TARGET_NAMESPACE);
|
152
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, ATK_TYPE_LAYER, "ATK_");
|
168
153
|
}
|