Debian Codegraph @

atk/src/object.hg

raw
1 /* $Id: object.hg,v 1.5 2004/11/30 21:41:44 murrayc Exp $ */
2
3 /* Copyright (C) 1998-2002 The gtkmm Development 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, see <https://www.gnu.org/licenses/>.
17 */
18
19 _DEFS(atkmm,atk)
20 _PINCLUDE(glibmm/private/object_p.h)
21
22 #include <glibmm/object.h>
23 #include <atkmm/component.h>
24 #include <atkmm/relation.h>
25
26 #ifndef DOXYGEN_SHOULD_SKIP_THIS
27 extern "C" { typedef struct _AtkPropertyValues AtkPropertyValues; }
28 #endif
29
30
31 namespace Atk
32 {
33
34 _CC_INCLUDE(atk/atk-enum-types.h)
35 _WRAP_ENUM(Role, AtkRole, decl_prefix ATKMM_API)
36
37 class ATKMM_API RelationSet;
38 class ATKMM_API Relation;
39 class ATKMM_API StateSet;
40
41 typedef guint64 State;
42
43 /** The base object class for the Accessibility Toolkit API.
44 * This class is the primary class for accessibility support via the Accessibility ToolKit (ATK). Objects which are
45 * instances of Atk::Object (or instances of Atk::Object-derived types) are queried for properties which relate basic
46 * (and generic) properties of a UI component such as name and description. Instances of Atk::Object may also be queried
47 * as to whether they implement other ATK interfaces (e.g. Atk::Action, Atk::Component, etc.), as appropriate to the role
48 * which a given UI component plays in a user interface.
49 *
50 * All UI components in an application which provide useful information or services to the user must provide corresponding
51 * Atk::Object instances on request (in GTK+, for instance, usually on a call to Gtk::Widget::get_accessible()), either via
52 * ATK support built into the toolkit for the widget class or ancestor class, or in the case of custom widgets, if the
53 * inherited Atk::Object implementation is insufficient, via instances of a new Atk::Object subclass.
54 */
55 class ATKMM_API Object : public Glib::Object
56 {
57 _CLASS_GOBJECT(Object, AtkObject, ATK_OBJECT, Glib::Object, GObject, , , ATKMM_API)
58 _CUSTOM_WRAP_NEW() // see wrap_new() implementation in object.ccg
59 _IGNORE(atk_object_initialize, atk_object_get_layer, atk_object_get_mdi_zorder)
60 public:
61
62 _WRAP_METHOD(Glib::ustring get_name() const, atk_object_get_name)
63 _WRAP_METHOD(Glib::ustring get_description() const, atk_object_get_description)
64 _WRAP_METHOD(Glib::RefPtr<Atk::Object> get_parent(), atk_object_get_parent, refreturn)
65 _WRAP_METHOD(int get_n_accessible_children() const, atk_object_get_n_accessible_children)
66 _WRAP_METHOD(Glib::RefPtr<Atk::Object> get_accessible_child(int i), atk_object_ref_accessible_child)
67 _WRAP_METHOD(Glib::RefPtr<RelationSet> get_relation_set(), atk_object_ref_relation_set, refreturn)
68 _WRAP_METHOD(Role get_role() const, atk_object_get_role)
69 _WRAP_METHOD(Glib::RefPtr<StateSet> get_state_set(), atk_object_ref_state_set)
70 _WRAP_METHOD(int get_index_in_parent(), atk_object_get_index_in_parent)
71 _WRAP_METHOD(void set_name(const Glib::ustring& name), atk_object_set_name)
72 _WRAP_METHOD(void set_description(const Glib::ustring& description), atk_object_set_description)
73 _WRAP_METHOD(void set_parent(const Glib::RefPtr<Atk::Object>& parent), atk_object_set_parent)
74 _WRAP_METHOD(void set_role(Role role), atk_object_set_role)
75 //_WRAP_METHOD(guint connect_property_change_handler(AtkPropertyChangeHandler* handler), atk_object_connect_property_change_handler)
76 //_WRAP_METHOD(void remove_property_change_handler(guint handler_id), atk_object_remove_property_change_handler)
77 _WRAP_METHOD(void notify_state_change(State state, bool value), atk_object_notify_state_change)
78
79 _WRAP_METHOD(bool add_relationship(RelationType relationship, const Glib::RefPtr<Object>& target), atk_object_add_relationship)
80 _WRAP_METHOD(bool remove_relationship(RelationType relationship, const Glib::RefPtr<Object>& target), atk_object_remove_relationship)
81
82 _WRAP_SIGNAL(void children_changed(guint change_index, gpointer changed_child), "children_changed")
83 _WRAP_SIGNAL(void focus_event(bool focus_in), "focus_event")
84 _WRAP_SIGNAL(void property_change(AtkPropertyValues* values), "property_change")
85
86 #m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
87 _WRAP_SIGNAL(void state_change(const Glib::ustring& name, bool state_set), "state_change")
88
89 _WRAP_SIGNAL(void visible_data_changed(), "visible_data_changed")
90 _WRAP_SIGNAL(void active_descendant_changed(void** child), "active_descendant_changed")
91
92 _WRAP_PROPERTY("accessible-name", Glib::ustring)
93 _WRAP_PROPERTY("accessible-description", Glib::ustring)
94 _WRAP_PROPERTY("accessible-parent", Glib::RefPtr<Atk::Object>)
95 _WRAP_PROPERTY("accessible-value", double)
96 _WRAP_PROPERTY("accessible-role", int)
97 _WRAP_PROPERTY("accessible-component-layer", int)
98 _WRAP_PROPERTY("accessible-component-mdi-zorder", int)
99 _WRAP_PROPERTY("accessible-table-caption", Glib::ustring)
100 _WRAP_PROPERTY("accessible-table-column-description", Glib::ustring)
101 _WRAP_PROPERTY("accessible-table-column-header", Glib::RefPtr<Atk::Object>)
102 _WRAP_PROPERTY("accessible-table-row-description", Glib::ustring)
103 _WRAP_PROPERTY("accessible-table-row-header", Glib::RefPtr<Atk::Object>)
104 _WRAP_PROPERTY("accessible-table-summary", Glib::RefPtr<Atk::Object>)
105 };
106
107 } // namespace Atk