diff options
Diffstat (limited to 'libs/gtkmm2/atk/src/object.hg')
-rw-r--r-- | libs/gtkmm2/atk/src/object.hg | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/libs/gtkmm2/atk/src/object.hg b/libs/gtkmm2/atk/src/object.hg new file mode 100644 index 0000000000..a1f42883b2 --- /dev/null +++ b/libs/gtkmm2/atk/src/object.hg @@ -0,0 +1,105 @@ +/* $Id: object.hg,v 1.5 2004/11/30 21:41:44 murrayc Exp $ */ + +/* Copyright (C) 1998-2002 The gtkmm Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +_DEFS(atkmm,atk) +_PINCLUDE(glibmm/private/object_p.h) + +#include <atkmm/component.h> +#include <atkmm/relation.h> + +#ifndef DOXYGEN_SHOULD_SKIP_THIS +extern "C" { typedef struct _AtkPropertyValues AtkPropertyValues; } +#endif + + +namespace Atk +{ + +_CC_INCLUDE(atk/atk-enum-types.h) +_WRAP_ENUM(Role, AtkRole) + +class RelationSet; +class Relation; +class StateSet; + +typedef guint64 State; + +/** The base object class for the Accessibility Toolkit API. + * This class is the primary class for accessibility support via the Accessibility ToolKit (ATK). Objects which are + * instances of Atk::Object (or instances of Atk::Object-derived types) are queried for properties which relate basic + * (and generic) properties of a UI component such as name and description. Instances of Atk::Object may also be queried + * as to whether they implement other ATK interfaces (e.g. Atk::Action, Atk::Component, etc.), as appropriate to the role + * which a given UI component plays in a user interface. + * + * All UI components in an application which provide useful information or services to the user must provide corresponding + * Atk::Object instances on request (in GTK+, for instance, usually on a call to Gtk::Widget::get_accessible()), either via + * ATK support built into the toolkit for the widget class or ancestor class, or in the case of custom widgets, if the + * inherited Atk::Object implementation is insufficient, via instances of a new Atk::Object subclass. + */ +class Object : public Glib::Object +{ + _CLASS_GOBJECT(Object, AtkObject, ATK_OBJECT, Glib::Object, GObject) + _CUSTOM_WRAP_NEW() // see wrap_new() implementation in object.ccg + _IGNORE(atk_object_initialize, atk_object_get_layer, atk_object_get_mdi_zorder) +public: + + _WRAP_METHOD(Glib::ustring get_name() const, atk_object_get_name) + _WRAP_METHOD(Glib::ustring get_description() const, atk_object_get_description) + _WRAP_METHOD(Glib::RefPtr<Atk::Object> get_parent(), atk_object_get_parent, refreturn) + _WRAP_METHOD(int get_n_accessible_children() const, atk_object_get_n_accessible_children) + _WRAP_METHOD(Glib::RefPtr<Atk::Object> get_accessible_child(int i), atk_object_ref_accessible_child) + _WRAP_METHOD(Glib::RefPtr<RelationSet> get_relation_set(), atk_object_ref_relation_set, refreturn) + _WRAP_METHOD(Role get_role() const, atk_object_get_role) + _WRAP_METHOD(Glib::RefPtr<StateSet> get_state_set(), atk_object_ref_state_set) + _WRAP_METHOD(int get_index_in_parent(), atk_object_get_index_in_parent) + _WRAP_METHOD(void set_name(const Glib::ustring& name), atk_object_set_name) + _WRAP_METHOD(void set_description(const Glib::ustring& description), atk_object_set_description) + _WRAP_METHOD(void set_parent(const Glib::RefPtr<Atk::Object>& parent), atk_object_set_parent) + _WRAP_METHOD(void set_role(Role role), atk_object_set_role) + //_WRAP_METHOD(guint connect_property_change_handler(AtkPropertyChangeHandler* handler), atk_object_connect_property_change_handler) + //_WRAP_METHOD(void remove_property_change_handler(guint handler_id), atk_object_remove_property_change_handler) + _WRAP_METHOD(void notify_state_change(State state, bool value), atk_object_notify_state_change) + + _WRAP_METHOD(bool add_relationship(RelationType relationship, const Glib::RefPtr<Object>& target), atk_object_add_relationship) + _WRAP_METHOD(bool remove_relationship(RelationType relationship, const Glib::RefPtr<Object>& target), atk_object_remove_relationship) + + _WRAP_SIGNAL(void children_changed(guint change_index, gpointer changed_child), "children_changed") + _WRAP_SIGNAL(void focus_event(bool focus_in), "focus_event") + _WRAP_SIGNAL(void property_change(AtkPropertyValues* values), "property_change") + _WRAP_SIGNAL(void state_change(const Glib::ustring& name, bool state_set), "state_change") + _WRAP_SIGNAL(void visible_data_changed(), "visible_data_changed") + _WRAP_SIGNAL(void active_descendant_changed(void** child), "active_descendant_changed") + + _WRAP_PROPERTY("accessible-name", Glib::ustring) + _WRAP_PROPERTY("accessible-description", Glib::ustring) + _WRAP_PROPERTY("accessible-parent", Glib::RefPtr<Atk::Object>) + _WRAP_PROPERTY("accessible-value", double) + _WRAP_PROPERTY("accessible-role", int) + _WRAP_PROPERTY("accessible-component-layer", int) + _WRAP_PROPERTY("accessible-component-mdi-zorder", int) + _WRAP_PROPERTY("accessible-table-caption", Glib::ustring) + _WRAP_PROPERTY("accessible-table-column-description", Glib::ustring) + _WRAP_PROPERTY("accessible-table-column-header", Glib::RefPtr<Atk::Object>) + _WRAP_PROPERTY("accessible-table-row-description", Glib::ustring) + _WRAP_PROPERTY("accessible-table-row-header", Glib::RefPtr<Atk::Object>) + _WRAP_PROPERTY("accessible-table-summary", Glib::RefPtr<Atk::Object>) +}; + +} // namespace Atk + |