[atkmm] Object, Text, Value: Add some API
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atkmm] Object, Text, Value: Add some API
- Date: Tue, 23 Jul 2019 07:40:43 +0000 (UTC)
commit c072b5cea8545b004bb0458d1ad21e8ea77e85a0
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Tue Jul 23 08:59:11 2019 +0200
Object, Text, Value: Add some API
* atk/src/object.hg: Add get_object_locale(), get/set_accessible_id(),
property_accessible_table_caption_object() and
property_accessible_hypertext_nlinks().
* atk/src/text.hg: Add signal_text_insert() and signal_text_remove().
* atk/src/value.hg: Add signal_value_changed().
atk/src/object.hg | 6 ++++++
atk/src/text.hg | 9 ++++++++-
atk/src/value.hg | 8 +++++---
3 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/atk/src/object.hg b/atk/src/object.hg
index 9612b00..ee14b5e 100644
--- a/atk/src/object.hg
+++ b/atk/src/object.hg
@@ -78,6 +78,10 @@ public:
_WRAP_METHOD(bool add_relationship(Relation::Type relationship, const Glib::RefPtr<Object>& target),
atk_object_add_relationship)
_WRAP_METHOD(bool remove_relationship(Relation::Type relationship, const Glib::RefPtr<Object>& target),
atk_object_remove_relationship)
+ _WRAP_METHOD(Glib::ustring get_object_locale() const, atk_object_get_object_locale)
+ _WRAP_METHOD(Glib::ustring get_accessible_id() const, atk_object_get_accessible_id)
+ _WRAP_METHOD(void set_accessible_id(const Glib::ustring& name), atk_object_set_accessible_id)
+
_WRAP_SIGNAL(void children_changed(guint change_index, gpointer changed_child), "children_changed",
detail_name add_or_remove)
_WRAP_SIGNAL(void focus_event(bool focus_in), "focus_event")
_WRAP_SIGNAL(void property_change(AtkPropertyValues* values), "property_change", detail_name property_name)
@@ -103,6 +107,8 @@ public:
_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>)
+ _WRAP_PROPERTY("accessible-table-caption-object", Glib::RefPtr<Atk::Object>)
+ _WRAP_PROPERTY("accessible-hypertext-nlinks", int)
};
} // namespace Atk
diff --git a/atk/src/text.hg b/atk/src/text.hg
index d7bf29b..ddf7a5a 100644
--- a/atk/src/text.hg
+++ b/atk/src/text.hg
@@ -163,8 +163,15 @@ public:
ClipType x_clip_type, ClipType y_clip_type),
atk_text_get_bounded_ranges)
// AtkObject::text-changed is deprecated in favor of text-insert and text-remove,
- // but gtk+ still emits text-changed. /Kjell 2017-09-14
+ // but code in gtk+/gtk/a11y still emits text-changed, 2019-07-23.
+ // Deprecation of a signal probably means "don't emit" rather than "don't listen",
+ // so let's keep it here.
+ // Two no_default_handler because the wrapped C signals have no default handlers.
_WRAP_SIGNAL(void text_changed(int position, int length), "text_changed", detail_name insert_or_delete)
+ _WRAP_SIGNAL(void text_insert(int position, int length, const Glib::ustring& text),
+ "text_insert", detail_name system, no_default_handler)
+ _WRAP_SIGNAL(void text_remove(int position, int length, const Glib::ustring& text),
+ "text_remove", detail_name system, no_default_handler)
_WRAP_SIGNAL(void text_caret_moved(int location), "text_caret_moved")
_WRAP_SIGNAL(void text_selection_changed(), "text_selection_changed")
_WRAP_SIGNAL(void text_attributes_changed(), "text_attributes_changed")
diff --git a/atk/src/value.hg b/atk/src/value.hg
index c0f8d0c..24d5473 100644
--- a/atk/src/value.hg
+++ b/atk/src/value.hg
@@ -63,10 +63,12 @@ public:
_WRAP_METHOD(void set_value(const gdouble new_value), atk_value_set_value)
- _IGNORE(atk_value_get_minimum_increment)
-
- //TODO: atk_value_get_sub_ranges ()
+ _IGNORE(atk_value_get_minimum_increment) dnl// deprecated
+ //TODO: atk_value_get_sub_ranges()
+ // no_default_handler because the wrapped C signal has no default handler.
+ _WRAP_SIGNAL(void value_changed(double value, const Glib::ustring& text),
+ "value-changed", no_default_handler)
protected:
_WRAP_VFUNC(void get_current_value(Glib::ValueBase& value) const, get_current_value)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]