diff --git a/debian/changelog b/debian/changelog index 8d6bf264d980affc38803375d419aae003fa3a16..296a4c5067e235ddc6754185cbe3399141a845c9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ at-spi2-core (2.14.0-1+hypra1) UNRELEASED; urgency=medium * debian/patches/1000-lock-modifiers: Support locking modifiers for double-capslock support in Orca. * debian/patches/1001-scrollto: Support scrollto interface. + * debian/patches/1002-scrollsubstringto: Support scrollsubstringto + interface. -- Samuel Thibault Mon, 19 Nov 2018 16:44:36 +0100 diff --git a/debian/patches/1002-scrollsubstringto b/debian/patches/1002-scrollsubstringto new file mode 100644 index 0000000000000000000000000000000000000000..68713fe80fef6ff0a6fbae609bd7d321e56847d1 --- /dev/null +++ b/debian/patches/1002-scrollsubstringto @@ -0,0 +1,174 @@ +commit 29a11aad565b0ad29acacc943074137b24e6fa22 +Author: Samuel Thibault +Date: Wed Jun 27 15:14:59 2018 +0200 + + Add ScrollSubstringTo and ScrollSubstringToPoint text interfaces + +#diff --git a/NEWS b/NEWS +#index 2767e4a..dfbe165 100644 +#--- a/NEWS +#+++ b/NEWS +#@@ -1,3 +1,7 @@ +#+What's new in at-spi2-core 2.31.0: +#+ +#+* Add ScrollSubstringTo and ScrollSubstringToPoint text interfaces. +#+ +# What's new in at-spi2-core 2.29.1: +# +# * Add dbus-broker support to bus launcher. +diff --git a/atspi/atspi-text.c b/atspi/atspi-text.c +index 1e887d3..009d07b 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) + { +diff --git a/atspi/atspi-text.h b/atspi/atspi-text.h +index 8e11eb0..05b99dc 100644 +--- a/atspi/atspi-text.h ++++ b/atspi/atspi-text.h +@@ -137,6 +137,10 @@ gboolean atspi_text_remove_selection (AtspiText *obj, gint selection_num, GError + + gboolean atspi_text_set_selection (AtspiText *obj, gint selection_num, gint start_offset, gint end_offset, GError **error); + ++gboolean atspi_text_scroll_substring_to (AtspiText *obj, gint start_offset, gint end_offset, AtspiScrollType type, GError **error); ++ ++gboolean atspi_text_scroll_substring_to_point (AtspiText *obj, gint start_offset, gint end_offset, AtspiCoordType coords, gint x, gint y, GError **error); ++ + G_END_DECLS + + #endif /* _ATSPI_TEXT_H_ */ +#diff --git a/doc/libatspi/libatspi-sections.txt b/doc/libatspi/libatspi-sections.txt +#index 14304ff..adb9130 100644 +#--- a/doc/libatspi/libatspi-sections.txt +#+++ b/doc/libatspi/libatspi-sections.txt +#@@ -30,6 +30,8 @@ atspi_text_set_selection +# atspi_text_get_string_at_offset +# atspi_text_get_text_attribute_value +# atspi_text_get_text_attributes +#+atspi_text_scroll_substring_to +#+atspi_text_scroll_substring_to_point +# +# ATSPI_TEXT +# ATSPI_IS_TEXT +#diff --git a/idl/text.didl b/idl/text.didl +#index 07ce85e..d5ae66c 100644 +#--- a/idl/text.didl +#+++ b/idl/text.didl +#@@ -241,6 +241,22 @@ namespace org.freestandards.atspi { +# method GetAttributeSet reply { +# Attributes attributes' +# } +#+ +#+ /* +#+ Scroll this text range so it becomes visible on the screen. +#+ */ +#+ method ScrollSubstringTo { +#+ ScrollType type; +#+ } +#+ +#+ /* +#+ Scroll this text range so it becomes visible on the screen at a given position. +#+ */ +#+ method ScrollSubstringToPoint { +#+ CoordType type; +#+ int32 x; +#+ int32 y; +#+ } +# } +# +# /* +diff --git a/xml/Text.xml b/xml/Text.xml +index 320ee5e..313131e 100644 +--- a/xml/Text.xml ++++ b/xml/Text.xml +@@ -152,5 +152,19 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + diff --git a/debian/patches/series b/debian/patches/series index 96825455eb127ebc8f31dec75818a8799baba15c..c9d3ef8a8234c2c8b6b471e55e80a8c2a59cd870 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 1000-lock-modifiers 1001-scrollto +1002-scrollsubstringto