atk 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,70 @@
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ *
5
+ * This library is free software; you can redistribute it and/or
6
+ * modify it under the terms of the GNU Lesser General Public
7
+ * License as published by the Free Software Foundation; either
8
+ * version 2.1 of the License, or (at your option) any later version.
9
+ *
10
+ * This library is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ * Lesser General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Lesser General Public
16
+ * License along with this library; if not, write to the Free Software
17
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
+ * MA 02110-1301 USA
19
+ */
20
+
21
+ #ifndef __RBATKCONVERSIONS_H__
22
+ #define __RBATKCONVERSIONS_H__
23
+
24
+ #define RVAL2ATKACTION(o) (ATK_ACTION(RVAL2GOBJ(o)))
25
+ #define RVAL2ATKCOMPONENT(o) (ATK_COMPONENT(RVAL2GOBJ(o)))
26
+ #define RVAL2ATKDOCUMENT(o) (ATK_DOCUMENT(RVAL2GOBJ(o)))
27
+ #define RVAL2ATKEDITABLETEXT(o) (ATK_EDITABLE_TEXT(RVAL2GOBJ(o)))
28
+ #define RVAL2ATKGOBJECTACCESSIBLE(o) (ATK_GOBJECT_ACCESSIBLE(RVAL2GOBJ(o)))
29
+ #define RVAL2ATKHYPERLINK(o) (ATK_HYPERLINK(RVAL2GOBJ(o)))
30
+ #define RVAL2ATKHYPERTEXT(o) (ATK_HYPERTEXT(RVAL2GOBJ(o)))
31
+ #define RVAL2ATKIMAGE(o) (ATK_IMAGE(RVAL2GOBJ(o)))
32
+ #define RVAL2ATKIMPLEMENTOR(o) (ATK_IMPLEMENTOR(RVAL2GOBJ(o)))
33
+ #define RVAL2ATKNOOPOBJECT(o) (ATK_NOOPOBJECT(RVAL2GOBJ(o)))
34
+ #define RVAL2ATKNOOPOBJECTFACTORY(o) (ATK_NO_OP_OBJECT_FACTORY(RVAL2GOBJ(o)))
35
+ #define RVAL2ATKOBJECT(o) (ATK_OBJECT(RVAL2GOBJ(o)))
36
+ #define RVAL2ATKOBJECTFACTORY(o) (ATK_OBJECT_FACTORY(RVAL2GOBJ(o)))
37
+ #define RVAL2ATKREGISTRY(o) (ATK_REGISTRY(RVAL2GOBJ(o)))
38
+ #define RVAL2ATKRELATION(o) (ATK_RELATION(RVAL2GOBJ(o)))
39
+ #define RVAL2ATKRELATIONSET(o) (ATK_RELATION_SET(RVAL2GOBJ(o)))
40
+ #define RVAL2ATKSELECTION(o) (ATK_SELECTION(RVAL2GOBJ(o)))
41
+ #define RVAL2ATKSTATE(o) (ATK_STATE(RVAL2GOBJ(o)))
42
+ #define RVAL2ATKSTATESET(o) (ATK_STATE_SET(RVAL2GOBJ(o)))
43
+ #define RVAL2ATKSTREAMABLECONTENT(o) (ATK_STREAMABLE_CONTENT(RVAL2GOBJ(o)))
44
+ #define RVAL2ATKTABLE(o) (ATK_TABLE(RVAL2GOBJ(o)))
45
+ #define RVAL2ATKTEXT(o) (ATK_TEXT(RVAL2GOBJ(o)))
46
+ #define RVAL2ATKVALUE(o) (ATK_VALUE(RVAL2GOBJ(o)))
47
+
48
+ #define RVAL2ATKTEXTRANGE(o) ((AtkTextRange*)RVAL2BOXED(o, ATK_TYPE_TEXT_RANGE))
49
+ #define ATKTEXTRANGE2RVAL(o) (BOXED2RVAL(o, ATK_TYPE_TEXT_RANGE))
50
+ #define RVAL2ATKTEXTRECTANGLE(o) ((AtkTextRectangle*)RVAL2BOXED(o, ATK_TYPE_TEXT_RECTANGLE))
51
+ #define ATKTEXTRECTANGLE2RVAL(o) (BOXED2RVAL(o, ATK_TYPE_TEXT_RECTANGLE))
52
+
53
+ #define RVAL2ATKCOORDTYPE(o) (RVAL2GENUM(o, ATK_TYPE_COORD_TYPE))
54
+ #define ATKCOORDTYPE2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_COORD_TYPE))
55
+ #define RVAL2ATKLAYER(o) (RVAL2GENUM(o, ATK_TYPE_LAYER))
56
+ #define ATKLAYER2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_LAYER))
57
+ #define RVAL2ATKRELATIONTYPE(o) (RVAL2GENUM(o, ATK_TYPE_RELATION_TYPE))
58
+ #define ATKRELATIONTYPE2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_RELATION_TYPE))
59
+ #define RVAL2ATKROLE(o) (RVAL2GENUM(o, ATK_TYPE_ROLE))
60
+ #define ATKROLE2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_ROLE))
61
+ #define RVAL2ATKSTATETYPE(o) (RVAL2GENUM(o, ATK_TYPE_STATE_TYPE))
62
+ #define ATKSTATETYPE2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_STATE_TYPE))
63
+ #define RVAL2ATKTEXTATTRIBUTE(o) (RVAL2GENUM(o, ATK_TYPE_TEXT_ATTRIBUTE))
64
+ #define ATKTEXTATTRIBUTE2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_TEXT_ATTRIBUTE))
65
+ #define RVAL2ATKTEXTBOUNDARY(o) (RVAL2GENUM(o, ATK_TYPE_TEXT_BOUNDARY))
66
+ #define ATKTEXTBOUNDARY2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_TEXT_BOUNDARY))
67
+ #define RVAL2ATKTEXTCLIPTYPE(o) (RVAL2GENUM(o, ATK_TYPE_TEXT_CLIP_TYPE))
68
+ #define ATKTEXTCLIPTYPE2RVAL(o) (GENUM2RVAL(o, ATK_TYPE_TEXT_CLIP_TYPE))
69
+
70
+ #endif /* __RBATKCONVERSIONS_H__ */
@@ -1,20 +1,31 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
3
-
4
- rbatkdocument.c -
5
-
6
- $Author: sakai $
7
- $Date: 2007/06/16 09:18:55 $
8
-
9
- Copyright (C) 2003 Masao Mutoh
10
- ************************************************/
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
+ */
11
21
 
12
- #include "rbatk.h"
22
+ #include "rbatkprivate.h"
13
23
 
14
- #define _SELF(s) (ATK_DOCUMENT(RVAL2GOBJ(s)))
24
+ #define RG_TARGET_NAMESPACE mDocument
25
+ #define _SELF(s) (RVAL2ATKDOCUMENT(s))
15
26
 
16
27
  static VALUE
17
- rbatk_document_get_document_type(VALUE self)
28
+ rg_document_type(VALUE self)
18
29
  {
19
30
  return CSTR2RVAL(atk_document_get_document_type(_SELF(self)));
20
31
  }
@@ -22,7 +33,7 @@ rbatk_document_get_document_type(VALUE self)
22
33
  /*
23
34
  How can I implement this?
24
35
  static VALUE
25
- rbatk_document_get_document(VALUE self)
36
+ rg_document(VALUE self)
26
37
  {
27
38
  return GOBJ2RVAL(atk_document_get_document(_SELF(self)));
28
39
  }
@@ -30,14 +41,14 @@ rbatk_document_get_document(VALUE self)
30
41
 
31
42
  #if ATK_CHECK_VERSION(1,12,0)
32
43
  static VALUE
33
- rbatk_document_get_attribute_value(VALUE self, VALUE name)
44
+ rg_get_attribute_value(VALUE self, VALUE name)
34
45
  {
35
46
  return CSTR2RVAL(atk_document_get_attribute_value(_SELF(self),
36
47
  RVAL2CSTR(name)));
37
48
  }
38
49
 
39
50
  static VALUE
40
- rbatk_document_set_attribute_value(VALUE self, VALUE name, VALUE value)
51
+ rg_set_attribute_value(VALUE self, VALUE name, VALUE value)
41
52
  {
42
53
  gboolean ret = atk_document_set_attribute_value(_SELF(self),
43
54
  RVAL2CSTR(name),
@@ -50,7 +61,7 @@ rbatk_document_set_attribute_value(VALUE self, VALUE name, VALUE value)
50
61
  }
51
62
 
52
63
  static VALUE
53
- rbatk_document_get_attributes(VALUE self)
64
+ rg_attributes(VALUE self)
54
65
  {
55
66
  AtkAttributeSet* list = atk_document_get_attributes(_SELF(self));
56
67
  VALUE ary = rb_ary_new();
@@ -63,27 +74,27 @@ rbatk_document_get_attributes(VALUE self)
63
74
  }
64
75
 
65
76
  static VALUE
66
- rbatk_document_get_locale(VALUE self)
77
+ rg_locale(VALUE self)
67
78
  {
68
79
  return CSTR2RVAL(atk_document_get_locale(_SELF(self)));
69
80
  }
70
81
  #endif
71
82
 
72
83
  void
73
- Init_atk_document()
84
+ Init_atk_document(VALUE mAtk)
74
85
  {
75
- VALUE mDoc = G_DEF_INTERFACE(ATK_TYPE_DOCUMENT, "Document", mAtk);
86
+ VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_DOCUMENT, "Document", mAtk);
76
87
 
77
- rb_define_method(mDoc, "document_type", rbatk_document_get_document_type, 0);
88
+ RG_DEF_METHOD(document_type, 0);
78
89
  /*
79
- rb_define_method(mDoc, "document", rbatk_document_get_document, 0);
90
+ RG_DEF_METHOD(document, 0);
80
91
  */
81
92
  #if ATK_CHECK_VERSION(1,12,0)
82
- rb_define_method(mDoc, "get_attribute_value", rbatk_document_get_attribute_value, 1);
83
- rb_define_alias(mDoc, "[]", "get_attribute_value");
84
- rb_define_method(mDoc, "set_attribute_value", rbatk_document_set_attribute_value, 2);
85
- rb_define_alias(mDoc, "[]=", "set_attribute_value");
86
- rb_define_method(mDoc, "attributes", rbatk_document_get_attributes, 0);
87
- rb_define_method(mDoc, "locale", rbatk_document_get_locale, 0);
93
+ RG_DEF_METHOD(get_attribute_value, 1);
94
+ RG_DEF_ALIAS("[]", "get_attribute_value");
95
+ RG_DEF_METHOD(set_attribute_value, 2);
96
+ RG_DEF_ALIAS("[]=", "set_attribute_value");
97
+ RG_DEF_METHOD(attributes, 0);
98
+ RG_DEF_METHOD(locale, 0);
88
99
  #endif
89
100
  }
@@ -1,47 +1,131 @@
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
+ */
21
+
22
+ #include "rbatkprivate.h"
23
+
24
+ #define RG_TARGET_NAMESPACE mEditableText
25
+ #define _SELF(s) (RVAL2ATKEDITABLETEXT(s))
26
+
27
+ struct rval2atkattributegslist_args {
28
+ VALUE ary;
29
+ long n;
30
+ GSList *result;
31
+ };
3
32
 
4
- rbatkeditabletext.c -
33
+ static VALUE
34
+ rbatk_rval2atkattributegslist_body(VALUE value)
35
+ {
36
+ long i;
37
+ struct rval2atkattributegslist_args *args = (struct rval2atkattributegslist_args *)value;
5
38
 
6
- $Author: sakai $
7
- $Date: 2007/06/16 09:24:04 $
39
+ for (i = 0; i < args->n; i++) {
40
+ VALUE ary = rb_ary_to_ary(RARRAY_PTR(args->ary)[i]);
41
+ AtkAttribute *attribute;
8
42
 
9
- Copyright (C) 2003 Masao Mutoh
10
- ************************************************/
11
- #include "rbatk.h"
43
+ if (RARRAY_LEN(ary) != 2)
44
+ rb_raise(rb_eArgError, "attribute %ld should be an array of length 2", i);
12
45
 
13
- #define _SELF(s) (ATK_EDITABLE_TEXT(RVAL2GOBJ(s)))
46
+ attribute = g_new(AtkAttribute, 1);
47
+ args->result = g_slist_append(args->result, attribute);
48
+ attribute->name = g_strdup(RVAL2CSTR(RARRAY_PTR(ary)[0]));
49
+ attribute->value = g_strdup(RVAL2CSTR(RARRAY_PTR(ary)[1]));
50
+ }
14
51
 
15
- static VALUE
16
- rbatk_edit_set_run_attributes(VALUE self, VALUE attributes, VALUE start_offset, VALUE end_offset)
52
+ return Qnil;
53
+ }
54
+
55
+ static void
56
+ rbatk_atkattributegslist_free(GSList *list)
17
57
  {
18
- long i;
19
- gboolean ret;
20
- AtkAttributeSet* list = NULL;
21
-
22
- if (NIL_P(attributes)) return Qfalse;
23
-
24
- Check_Type(attributes, T_ARRAY);
25
- for (i=0; i<RARRAY_LEN(attributes); i++) {
26
- list = g_slist_append(list, RVAL2GOBJ(RARRAY_PTR(attributes)[i]));
58
+ GSList *p;
59
+
60
+ for (p = list; p != NULL; p = g_slist_next(p)) {
61
+ AtkAttribute *attribute = (AtkAttribute *)p->data;
62
+
63
+ g_free(attribute->value);
64
+ g_free(attribute->name);
65
+ g_free(attribute);
27
66
  }
28
67
 
29
- ret = CBOOL2RVAL(atk_editable_text_set_run_attributes(
30
- _SELF(self), list,
31
- NUM2INT(start_offset), NUM2INT(end_offset)));
32
68
  g_slist_free(list);
33
- return ret;
69
+ }
70
+
71
+ static G_GNUC_NORETURN VALUE
72
+ rbatk_rval2atkattributegslist_rescue(VALUE value)
73
+ {
74
+ rbatk_atkattributegslist_free(((struct rval2atkattributegslist_args *)value)->result);
75
+
76
+ rb_exc_raise(rb_errinfo());
77
+ }
78
+
79
+ static GSList *
80
+ rbatk_rval2atkattributegslist(VALUE value)
81
+ {
82
+ struct rval2atkattributegslist_args args;
83
+
84
+ args.ary = rb_ary_to_ary(value);
85
+ args.n = RARRAY_LEN(args.ary);
86
+ args.result = NULL;
87
+
88
+ rb_rescue(rbatk_rval2atkattributegslist_body, (VALUE)&args,
89
+ rbatk_rval2atkattributegslist_rescue, (VALUE)&args);
90
+
91
+ return args.result;
92
+ }
93
+
94
+ #define RVAL2ATKATTRIBUTEGSLIST(value) rbatk_rval2atkattributegslist(value)
95
+
96
+ static VALUE
97
+ rg_set_run_attributes(VALUE self,
98
+ VALUE attributes,
99
+ VALUE rbstart_offset,
100
+ VALUE rbend_offset)
101
+ {
102
+ AtkEditableText *editable;
103
+ gint start_offset, end_offset;
104
+ AtkAttributeSet *list;
105
+ gboolean result;
106
+
107
+ if (NIL_P(attributes))
108
+ return Qfalse;
109
+
110
+ editable = _SELF(self);
111
+ start_offset = NUM2INT(rbstart_offset);
112
+ end_offset = NUM2INT(rbend_offset);
113
+ list = RVAL2ATKATTRIBUTEGSLIST(attributes);
114
+ result = atk_editable_text_set_run_attributes(editable, list, start_offset, end_offset);
115
+ rbatk_atkattributegslist_free(list);
116
+
117
+ return CBOOL2RVAL(result);
34
118
  }
35
119
 
36
120
  static VALUE
37
- rbatk_edit_set_text_contents(VALUE self, VALUE str)
121
+ rg_set_text_contents(VALUE self, VALUE str)
38
122
  {
39
123
  atk_editable_text_set_text_contents(_SELF(self), RVAL2CSTR(str));
40
124
  return self;
41
125
  }
42
126
 
43
127
  static VALUE
44
- rbatk_edit_insert_text(VALUE self, VALUE str, VALUE position)
128
+ rg_insert_text(VALUE self, VALUE str, VALUE position)
45
129
  {
46
130
  gint pos = NUM2INT(position);
47
131
 
@@ -51,45 +135,45 @@ rbatk_edit_insert_text(VALUE self, VALUE str, VALUE position)
51
135
  }
52
136
 
53
137
  static VALUE
54
- rbatk_edit_copy_text(VALUE self, VALUE start_pos, VALUE end_pos)
138
+ rg_copy_text(VALUE self, VALUE start_pos, VALUE end_pos)
55
139
  {
56
140
  atk_editable_text_copy_text(_SELF(self), NUM2INT(start_pos), NUM2INT(end_pos));
57
141
  return self;
58
142
  }
59
143
 
60
144
  static VALUE
61
- rbatk_edit_cut_text(VALUE self, VALUE start_pos, VALUE end_pos)
145
+ rg_cut_text(VALUE self, VALUE start_pos, VALUE end_pos)
62
146
  {
63
147
  atk_editable_text_cut_text(_SELF(self), NUM2INT(start_pos), NUM2INT(end_pos));
64
148
  return self;
65
149
  }
66
150
 
67
151
  static VALUE
68
- rbatk_edit_delete_text(VALUE self, VALUE start_pos, VALUE end_pos)
152
+ rg_delete_text(VALUE self, VALUE start_pos, VALUE end_pos)
69
153
  {
70
154
  atk_editable_text_delete_text(_SELF(self), NUM2INT(start_pos), NUM2INT(end_pos));
71
155
  return self;
72
156
  }
73
157
 
74
158
  static VALUE
75
- rbatk_edit_paste_text(VALUE self, VALUE position)
159
+ rg_paste_text(VALUE self, VALUE position)
76
160
  {
77
161
  atk_editable_text_paste_text(_SELF(self), NUM2INT(position));
78
162
  return self;
79
163
  }
80
164
 
81
165
  void
82
- Init_atk_editabletext()
166
+ Init_atk_editabletext(VALUE mAtk)
83
167
  {
84
- VALUE editable = G_DEF_INTERFACE(ATK_TYPE_EDITABLE_TEXT, "EditableText", mAtk);
168
+ VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(ATK_TYPE_EDITABLE_TEXT, "EditableText", mAtk);
85
169
 
86
- rb_define_method(editable, "set_run_attributes", rbatk_edit_set_run_attributes, 3);
87
- rb_define_method(editable, "set_text_contents", rbatk_edit_set_text_contents, 1);
88
- rb_define_method(editable, "insert_text", rbatk_edit_insert_text, 2);
89
- rb_define_method(editable, "copy_text", rbatk_edit_copy_text, 2);
90
- rb_define_method(editable, "cut_text", rbatk_edit_cut_text, 2);
91
- rb_define_method(editable, "delete_text", rbatk_edit_delete_text, 2);
92
- rb_define_method(editable, "paste_text", rbatk_edit_paste_text, 1);
170
+ RG_DEF_METHOD(set_run_attributes, 3);
171
+ RG_DEF_METHOD(set_text_contents, 1);
172
+ RG_DEF_METHOD(insert_text, 2);
173
+ RG_DEF_METHOD(copy_text, 2);
174
+ RG_DEF_METHOD(cut_text, 2);
175
+ RG_DEF_METHOD(delete_text, 2);
176
+ RG_DEF_METHOD(paste_text, 1);
93
177
 
94
- G_DEF_SETTERS(editable);
178
+ G_DEF_SETTERS(RG_TARGET_NAMESPACE);
95
179
  }
@@ -1,35 +1,46 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
3
-
4
- rbatkgobjectaccessible.c -
5
-
6
- $Author: mutoh $
7
- $Date: 2003/12/07 17:18:16 $
8
-
9
- Copyright (C) 2003 Masao Mutoh
10
- ************************************************/
11
-
12
- #include "rbatk.h"
13
-
14
- #define _SELF(s) (ATK_GOBJECT_ACCESSIBLE(RVAL2GOBJ(s)))
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 cGObjectAccessible
25
+ #define _SELF(s) (RVAL2ATKGOBJECTACCESSIBLE(s))
15
26
 
16
27
  static VALUE
17
- rbatk_gobjectaccessible_s_for_object(VALUE self, VALUE obj)
28
+ rg_s_for_object(G_GNUC_UNUSED VALUE self, VALUE obj)
18
29
  {
19
30
  return GOBJ2RVAL(atk_gobject_accessible_for_object(RVAL2GOBJ(obj)));
20
31
  }
21
32
 
22
33
  static VALUE
23
- rbatk_gobjectaccessible_get_object(VALUE self)
34
+ rg_object(VALUE self)
24
35
  {
25
36
  return GOBJ2RVAL(atk_gobject_accessible_get_object(_SELF(self)));
26
37
  }
27
38
 
28
39
  void
29
- Init_atk_gobjectaccessible()
40
+ Init_atk_gobjectaccessible(VALUE mAtk)
30
41
  {
31
- VALUE macc = G_DEF_CLASS(ATK_TYPE_GOBJECT_ACCESSIBLE, "GObjectAccessible", mAtk);
42
+ VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(ATK_TYPE_GOBJECT_ACCESSIBLE, "GObjectAccessible", mAtk);
32
43
 
33
- rb_define_singleton_method(macc, "for_object", rbatk_gobjectaccessible_s_for_object, 1);
34
- rb_define_method(macc, "object", rbatk_gobjectaccessible_get_object, 0);
44
+ RG_DEF_SMETHOD(for_object, 1);
45
+ RG_DEF_METHOD(object, 0);
35
46
  }