summaryrefslogtreecommitdiff
path: root/atspi/atspi-text.c
diff options
context:
space:
mode:
Diffstat (limited to 'atspi/atspi-text.c')
-rw-r--r--atspi/atspi-text.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/atspi/atspi-text.c b/atspi/atspi-text.c
index 1e887d39..009d07bf 100644
--- a/atspi/atspi-text.c
+++ b/atspi/atspi-text.c
@@ -892,6 +892,72 @@ atspi_text_set_selection (AtspiText *obj,
return retval;
}
+/**
+ * atspi_text_scroll_substring_to:
+ * @obj: a pointer to the #AtspiText object on which to operate.
+ * @start_offset: a #gint indicating the start of the desired text range.
+ * @end_offset: a #gint indicating the first character past the desired range.
+ * @type: a #AtspiScrollType indicating where the object should be placed on the
+ * screen.
+ *
+ * Scrolls whatever container of the #AtspiText text range so it becomes
+ * visible on the screen.
+ *
+ * Returns: #TRUE if successful, #FALSE otherwise.
+ **/
+gboolean
+atspi_text_scroll_substring_to (AtspiText *obj,
+ gint start_offset,
+ gint end_offset,
+ AtspiScrollType type,
+ GError **error)
+{
+ dbus_bool_t retval = FALSE;
+
+ g_return_val_if_fail (obj != NULL, FALSE);
+
+ _atspi_dbus_call (obj, atspi_interface_text, "ScrollSubstringTo",
+ error, "iiu=>b",
+ start_offset, end_offset, type, &retval);
+
+ return retval;
+}
+
+/**
+ * atspi_text_scroll_substring_to_point:
+ * @obj: a pointer to the #AtspiText object on which to operate.
+ * @start_offset: a #gint indicating the start of the desired text range.
+ * @end_offset: a #gint indicating the first character past the desired range.
+ * @coords: a #AtspiCoordType indicating whether the coordinates are relative to
+ * the screen, to the window, or to the parent object.
+ * @x: the x coordinate of the point to reach
+ * @y: the y coordinate of the point to reach
+ *
+ * Scrolls whatever container of the #AtspiText text range so it becomes
+ * visible on the screen at a given position.
+ *
+ * Returns: #TRUE if successful, #FALSE otherwise.
+ **/
+gboolean
+atspi_text_scroll_substring_to_point (AtspiText *obj,
+ gint start_offset,
+ gint end_offset,
+ AtspiCoordType coords,
+ gint x,
+ gint y,
+ GError **error)
+{
+ dbus_bool_t retval = FALSE;
+
+ g_return_val_if_fail (obj != NULL, FALSE);
+
+ _atspi_dbus_call (obj, atspi_interface_text, "ScrollSubstringToPoint",
+ error, "iiuii=>b",
+ start_offset, end_offset, coords, x, y, &retval);
+
+ return retval;
+}
+
static void
atspi_text_base_init (AtspiText *klass)
{