atk 2.2.4-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README +30 -0
- data/Rakefile +31 -0
- data/ext/atk/atk.def +2 -0
- data/ext/atk/depend +11 -0
- data/ext/atk/extconf.rb +81 -0
- data/ext/atk/rbatk.c +66 -0
- data/ext/atk/rbatk.h +47 -0
- data/ext/atk/rbatkaction.c +85 -0
- data/ext/atk/rbatkcomponent.c +175 -0
- data/ext/atk/rbatkconversions.h +70 -0
- data/ext/atk/rbatkdocument.c +96 -0
- data/ext/atk/rbatkeditabletext.c +177 -0
- data/ext/atk/rbatkgobjectaccessible.c +46 -0
- data/ext/atk/rbatkhyperlink.c +71 -0
- data/ext/atk/rbatkhypertext.c +53 -0
- data/ext/atk/rbatkimage.c +68 -0
- data/ext/atk/rbatkimplementor.c +38 -0
- data/ext/atk/rbatknoopobject.c +40 -0
- data/ext/atk/rbatknoopobjectfactory.c +40 -0
- data/ext/atk/rbatkobject.c +153 -0
- data/ext/atk/rbatkobjectfactory.c +53 -0
- data/ext/atk/rbatkobjectrole.c +50 -0
- data/ext/atk/rbatkprivate.h +48 -0
- data/ext/atk/rbatkregistry.c +63 -0
- data/ext/atk/rbatkrelation.c +98 -0
- data/ext/atk/rbatkrelationset.c +95 -0
- data/ext/atk/rbatkrelationtype.c +38 -0
- data/ext/atk/rbatkselection.c +87 -0
- data/ext/atk/rbatkstate.c +51 -0
- data/ext/atk/rbatkstateset.c +180 -0
- data/ext/atk/rbatkstreamablecontent.c +57 -0
- data/ext/atk/rbatktable.c +271 -0
- data/ext/atk/rbatktext.c +318 -0
- data/ext/atk/rbatktextattribute.c +54 -0
- data/ext/atk/rbatktextrange.c +92 -0
- data/ext/atk/rbatktextrectangle.c +149 -0
- data/ext/atk/rbatkutil.c +122 -0
- data/ext/atk/rbatkvalue.c +78 -0
- data/extconf.rb +49 -0
- data/lib/2.0/atk.so +0 -0
- data/lib/2.1/atk.so +0 -0
- data/lib/2.2/atk.so +0 -0
- data/lib/atk.rb +21 -0
- data/test/atk-test-utils.rb +21 -0
- data/test/run-test.rb +45 -0
- data/test/test-text-rectangle.rb +26 -0
- data/vendor/local/bin/libatk-1.0-0.dll +0 -0
- data/vendor/local/include/atk-1.0/atk/atk-enum-types.h +63 -0
- data/vendor/local/include/atk-1.0/atk/atk.h +61 -0
- data/vendor/local/include/atk-1.0/atk/atkaction.h +117 -0
- data/vendor/local/include/atk-1.0/atk/atkcomponent.h +225 -0
- data/vendor/local/include/atk-1.0/atk/atkdocument.h +113 -0
- data/vendor/local/include/atk-1.0/atk/atkeditabletext.h +109 -0
- data/vendor/local/include/atk-1.0/atk/atkgobjectaccessible.h +68 -0
- data/vendor/local/include/atk-1.0/atk/atkhyperlink.h +114 -0
- data/vendor/local/include/atk-1.0/atk/atkhyperlinkimpl.h +68 -0
- data/vendor/local/include/atk-1.0/atk/atkhypertext.h +78 -0
- data/vendor/local/include/atk-1.0/atk/atkimage.h +90 -0
- data/vendor/local/include/atk-1.0/atk/atkmisc.h +112 -0
- data/vendor/local/include/atk-1.0/atk/atknoopobject.h +59 -0
- data/vendor/local/include/atk-1.0/atk/atknoopobjectfactory.h +59 -0
- data/vendor/local/include/atk-1.0/atk/atkobject.h +751 -0
- data/vendor/local/include/atk-1.0/atk/atkobjectfactory.h +72 -0
- data/vendor/local/include/atk-1.0/atk/atkplug.h +66 -0
- data/vendor/local/include/atk-1.0/atk/atkrange.h +59 -0
- data/vendor/local/include/atk-1.0/atk/atkregistry.h +74 -0
- data/vendor/local/include/atk-1.0/atk/atkrelation.h +99 -0
- data/vendor/local/include/atk-1.0/atk/atkrelationset.h +91 -0
- data/vendor/local/include/atk-1.0/atk/atkrelationtype.h +83 -0
- data/vendor/local/include/atk-1.0/atk/atkselection.h +100 -0
- data/vendor/local/include/atk-1.0/atk/atksocket.h +71 -0
- data/vendor/local/include/atk-1.0/atk/atkstate.h +190 -0
- data/vendor/local/include/atk-1.0/atk/atkstateset.h +92 -0
- data/vendor/local/include/atk-1.0/atk/atkstreamablecontent.h +110 -0
- data/vendor/local/include/atk-1.0/atk/atktable.h +233 -0
- data/vendor/local/include/atk-1.0/atk/atktablecell.h +104 -0
- data/vendor/local/include/atk-1.0/atk/atktext.h +453 -0
- data/vendor/local/include/atk-1.0/atk/atkutil.h +357 -0
- data/vendor/local/include/atk-1.0/atk/atkvalue.h +163 -0
- data/vendor/local/include/atk-1.0/atk/atkversion.h +394 -0
- data/vendor/local/include/atk-1.0/atk/atkwindow.h +53 -0
- data/vendor/local/lib/girepository-1.0/Atk-1.0.typelib +0 -0
- data/vendor/local/lib/libatk-1.0.dll.a +0 -0
- data/vendor/local/lib/libatk-1.0.la +41 -0
- data/vendor/local/lib/pkgconfig/atk.pc +11 -0
- data/vendor/local/share/gir-1.0/Atk-1.0.gir +15525 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkAction.html +477 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkComponent.html +1146 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkDocument.html +714 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkEditableText.html +429 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkGObjectAccessible.html +166 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkHyperlink.html +570 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkHypertext.html +286 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkImage.html +319 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkMisc.html +191 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkNoOpObject.html +130 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkNoOpObjectFactory.html +107 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkObject.html +3056 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkObjectFactory.html +214 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkRegistry.html +265 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkRelation.html +659 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkRelationSet.html +413 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkSelection.html +453 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkStateSet.html +539 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkStreamableContent.html +274 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkTable.html +1790 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkTableCell.html +497 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkText.html +2547 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkUtil.html +1111 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkValue.html +743 -0
- data/vendor/local/share/gtk-doc/html/atk/AtkWindow.html +452 -0
- data/vendor/local/share/gtk-doc/html/atk/accessibles.html +49 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-1-12.html +51 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-1-13.html +41 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-1-20.html +35 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-1-22.html +45 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-1-3.html +41 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-1-30.html +41 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-1-4.html +35 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-1-6.html +35 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-1-9.html +39 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-2-10.html +35 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-2-12.html +78 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-2-2.html +53 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-2-8.html +47 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-deprecated.html +119 -0
- data/vendor/local/share/gtk-doc/html/atk/api-index-full.html +775 -0
- data/vendor/local/share/gtk-doc/html/atk/atk-AtkHyperlinkImpl.html +142 -0
- data/vendor/local/share/gtk-doc/html/atk/atk-AtkPlug.html +147 -0
- data/vendor/local/share/gtk-doc/html/atk/atk-AtkRange.html +328 -0
- data/vendor/local/share/gtk-doc/html/atk/atk-AtkSocket.html +207 -0
- data/vendor/local/share/gtk-doc/html/atk/atk-AtkState.html +556 -0
- data/vendor/local/share/gtk-doc/html/atk/atk-Versioning-Utilities.html +293 -0
- data/vendor/local/share/gtk-doc/html/atk/atk.devhelp2 +441 -0
- data/vendor/local/share/gtk-doc/html/atk/atkobject.html +33 -0
- data/vendor/local/share/gtk-doc/html/atk/data.html +49 -0
- data/vendor/local/share/gtk-doc/html/atk/deprecated.html +33 -0
- data/vendor/local/share/gtk-doc/html/atk/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/atk/index.html +175 -0
- data/vendor/local/share/gtk-doc/html/atk/index.sgml +632 -0
- data/vendor/local/share/gtk-doc/html/atk/interfaces.html +89 -0
- data/vendor/local/share/gtk-doc/html/atk/left-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/atk/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/atk/overview.html +47 -0
- data/vendor/local/share/gtk-doc/html/atk/right-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/atk/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/atk/style.css +476 -0
- data/vendor/local/share/gtk-doc/html/atk/toolkit.html +33 -0
- data/vendor/local/share/gtk-doc/html/atk/up-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/atk/up.png +0 -0
- data/vendor/local/share/gtk-doc/html/atk/utilities.html +47 -0
- data/vendor/local/share/license/atk/AUTHORS +18 -0
- data/vendor/local/share/license/atk/COPYING +482 -0
- data/vendor/local/share/locale/af/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/am/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/an/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ar/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/as/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ast/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/az/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/be/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/be@latin/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/bg/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/bn/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/bn_IN/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/bs/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ca/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ca@valencia/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/cs/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/cy/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/dz/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/el/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/en@shaw/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/en_CA/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/en_GB/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/eo/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/et/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/eu/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/fa/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/fi/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ga/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/gl/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/gu/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/he/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/hi/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/hr/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/hu/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/hy/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/is/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ja/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ka/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/kk/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/km/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/kn/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ko/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ku/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/li/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/lt/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/lv/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/mai/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/mk/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ml/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/mn/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/mr/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ms/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/nb/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ne/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/nl/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/nn/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/oc/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/or/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/pa/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ps/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/pt/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ro/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ru/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/rw/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/si/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/sk/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/sq/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/sr@ije/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/sr@latin/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/sv/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ta/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/te/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/tg/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/th/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/tk/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/tt/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/ug/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/uk/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/vi/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/wa/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/xh/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/yi/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/zh_CN/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/zh_HK/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/atk10.mo +0 -0
- data/vendor/local/share/locale/zu/LC_MESSAGES/atk10.mo +0 -0
- metadata +307 -0
@@ -0,0 +1,149 @@
|
|
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
ADDED
@@ -0,0 +1,122 @@
|
|
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
|
+
}
|
@@ -0,0 +1,78 @@
|
|
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
ADDED
@@ -0,0 +1,49 @@
|
|
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
|
data/lib/2.0/atk.so
ADDED
Binary file
|
data/lib/2.1/atk.so
ADDED
Binary file
|
data/lib/2.2/atk.so
ADDED
Binary file
|
data/lib/atk.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'glib2'
|
2
|
+
|
3
|
+
base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
|
4
|
+
vendor_dir = base_dir + "vendor" + "local"
|
5
|
+
vendor_bin_dir = vendor_dir + "bin"
|
6
|
+
GLib.prepend_dll_path(vendor_bin_dir)
|
7
|
+
begin
|
8
|
+
major, minor, _ = RUBY_VERSION.split(/\./)
|
9
|
+
require "#{major}.#{minor}/atk.so"
|
10
|
+
rescue LoadError
|
11
|
+
require 'atk.so'
|
12
|
+
end
|
13
|
+
|
14
|
+
if vendor_dir.exist?
|
15
|
+
begin
|
16
|
+
require "gobject-introspection"
|
17
|
+
vendor_girepository_dir = vendor_dir + "lib" + "girepository-1.0"
|
18
|
+
GObjectIntrospection.prepend_typelib_path(vendor_girepository_dir)
|
19
|
+
rescue LoadError
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Copyright (C) 2013 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
require "test-unit"
|
18
|
+
require "test/unit/notify"
|
19
|
+
|
20
|
+
module AtkTestUtils
|
21
|
+
end
|