summaryrefslogtreecommitdiff
path: root/atspi/atspi-text.c
diff options
context:
space:
mode:
authorMike Gorse <mgorse@alum.wpi.edu>2019-05-05 16:20:08 -0500
committerMike Gorse <mgorse@alum.wpi.edu>2019-05-05 16:20:08 -0500
commit218af4ee001d1093c0328a55a00e0ae9e4fc3262 (patch)
treeede93395199f76603d7a2c525ef67e05a134ac5c /atspi/atspi-text.c
parent2e14dcd16f43144222385b01157ab408f0a02a4c (diff)
downloadat-spi2-core-218af4ee001d1093c0328a55a00e0ae9e4fc3262.tar.gz
More updates related to reading position notifications
Allow a client to receive notifications through AtspiEventListeners. This involves special casing, since the event is generated by the screen reader, not the GUI, and is, thus, handled by a different DBus interface, but, from the client's perspective, it looks like a normal AT-SPI event. Also renamed atspi_text_notify_read_position to atspi_text_notify_reading_position and fixed a few warnings.
Diffstat (limited to 'atspi/atspi-text.c')
-rw-r--r--atspi/atspi-text.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/atspi/atspi-text.c b/atspi/atspi-text.c
index 24095606..2c50a5bc 100644
--- a/atspi/atspi-text.c
+++ b/atspi/atspi-text.c
@@ -963,7 +963,7 @@ atspi_text_scroll_substring_to_point (AtspiText *obj,
}
/**
- * atspi_text_notify_read_position:
+ * atspi_text_notify_reading_position:
* @obj: the #AtspiText object being read.
* @offset: the offset of the text currently being read.
*
@@ -972,10 +972,9 @@ atspi_text_scroll_substring_to_point (AtspiText *obj,
* the screen reader and highlight the text that is currently being read.
*/
void
-atspi_text_notify_read_position (AtspiText *obj,
- gint offset)
+atspi_text_notify_reading_position (AtspiText *obj,
+ gint offset)
{
- DBusConnection *bus = _atspi_bus ();
DBusMessage *signal;
AtspiAccessible *accessible;
gint len;
@@ -994,14 +993,14 @@ atspi_text_notify_read_position (AtspiText *obj,
if (!quark_text_len)
quark_text_len = g_quark_from_string ("accessible-text-len");
- plen = g_object_get_qdata (accessible, quark_text_len);
+ plen = g_object_get_qdata (G_OBJECT (accessible), quark_text_len);
if (plen)
- len = (gint)plen;
+ len = (gint) (gint64)plen;
else
{
len = atspi_text_get_character_count (obj, NULL);
- plen = (gpointer)len;
- g_object_set_qdata (accessible, quark_text_len, plen);
+ plen = (gpointer) (gint64)len;
+ g_object_set_qdata (G_OBJECT (accessible), quark_text_len, plen);
}
remaining = (len >= 0 ? len - offset : 0);