summaryrefslogtreecommitdiff
path: root/atspi/atspi-text.c
diff options
context:
space:
mode:
authorMike Gorse <mgorse@alum.wpi.edu>2019-07-18 18:21:09 -0500
committerMike Gorse <mgorse@alum.wpi.edu>2019-07-18 18:21:09 -0500
commit36a621aa17ed27be55cd9f16a1f7b29904cb510c (patch)
treeaab19c716716c0d831a3f180e88bddd6b9b60e90 /atspi/atspi-text.c
parent5604b79d72179708b218ddaaf226fc38614ca4a9 (diff)
downloadat-spi2-core-36a621aa17ed27be55cd9f16a1f7b29904cb510c.tar.gz
Refactor the API for the screen reader to notify listeners of its status
Remove atspi_text_notify_reading_position, and instead add a region_changed signal. Also make the dbus API more like the API used for other events. Per discussion at https://gitlab.gnome.org/GNOME/orca/issues/36
Diffstat (limited to 'atspi/atspi-text.c')
-rw-r--r--atspi/atspi-text.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/atspi/atspi-text.c b/atspi/atspi-text.c
index a84dbbb2..a360f56c 100644
--- a/atspi/atspi-text.c
+++ b/atspi/atspi-text.c
@@ -962,47 +962,6 @@ atspi_text_scroll_substring_to_point (AtspiText *obj,
return retval;
}
-/**
- * atspi_text_notify_reading_position:
- * @obj: the #AtspiText object being read.
- * @startOffset: the offset of the text currently being read.
- * @endOffset: the offset of the end of the text currently being read.
- *
- * Notifies interested listeners of the specific text that the screen
- * reader is currently reading. This allows a magnifier to synchronize with
- * the screen reader and highlight the text that is currently being read.
- */
-void
-atspi_text_notify_reading_position (AtspiText *obj,
- gint startOffset,
- gint endOffset)
-{
- DBusMessage *signal;
- AtspiAccessible *accessible;
- DBusMessageIter iter, iter_struct;
-
- g_return_if_fail (obj != NULL);
-
- accessible = ATSPI_ACCESSIBLE(obj);
-
- if (!_atspi_prepare_screen_reader_interface ())
- return;
-
- signal = dbus_message_new_signal (ATSPI_DBUS_PATH_SCREEN_READER,
- ATSPI_DBUS_INTERFACE_SCREEN_READER,
- "ReadingPosition");
- dbus_message_iter_init_append (signal, &iter);
- dbus_message_iter_open_container (&iter, DBUS_TYPE_STRUCT, NULL,
- &iter_struct);
- dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_STRING, &accessible->parent.app->bus_name);
- dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_OBJECT_PATH, &accessible->parent.path);
- dbus_message_iter_close_container (&iter, &iter_struct);
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT32, &startOffset);
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT32, &endOffset);
- dbus_connection_send (_atspi_bus (), signal, NULL);
- dbus_message_unref (signal);
-}
-
static void
atspi_text_base_init (AtspiText *klass)
{