Commit 9471ef4c8bc15fc315fa78900de17c3818990ae0

Authored by samuel thibault
1 parent f71c3bc6

debian/patches/1002-scrollsubtringto: Support scrollto interface

debian/changelog
... ... @@ -2,6 +2,7 @@ at-spi2-atk (2.14.0-2+hypra1) UNRELEASED; urgency=medium
2 2  
3 3 * debian/patches/1001-scrollto: Support scrollto interface.
4 4 * control: Bump atk and at-spi2-core build-deps accordingly.
  5 + * debian/patches/1002-scrollsubtringto: Support scrollto interface.
5 6  
6 7 -- Samuel Thibault <sthibault@debian.org> Mon, 19 Nov 2018 17:11:33 +0100
7 8  
... ...
debian/patches/1002-scrollsubstringto 0 → 100644
... ... @@ -0,0 +1,145 @@
  1 +commit bb4e5163510bb380c43702e62afe986596871b3c
  2 +Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
  3 +Date: Wed Jun 27 15:41:49 2018 +0200
  4 +
  5 + Add ScrollSubstringTo and ScrollSubstringToPoint text interfaces
  6 +
  7 +#diff --git a/NEWS b/NEWS
  8 +#index 7dde170..7e005ba 100644
  9 +#--- a/NEWS
  10 +#+++ b/NEWS
  11 +#@@ -1,3 +1,7 @@
  12 +#+What's new in at-spi2-atk 2.31.0:
  13 +#+
  14 +#+* Add ScrollSubstringTo and ScrollSubstringToPoint interfaces.
  15 +#+
  16 +# What's new in at-spi2-atk 2.29.1:
  17 +#
  18 +# * Fix a case where we could return without unlocking a mutex (bgo#793625).
  19 +diff --git a/atk-adaptor/adaptors/text-adaptor.c b/atk-adaptor/adaptors/text-adaptor.c
  20 +index 69dbdfa..6f9d4fa 100644
  21 +--- a/atk-adaptor/adaptors/text-adaptor.c
  22 ++++ b/atk-adaptor/adaptors/text-adaptor.c
  23 +@@ -845,6 +845,75 @@ impl_GetDefaultAttributeSet (DBusConnection * bus, DBusMessage * message,
  24 + return reply;
  25 + }
  26 +
  27 ++static DBusMessage *
  28 ++impl_ScrollSubstringTo (DBusConnection * bus,
  29 ++ DBusMessage * message, void *user_data)
  30 ++{
  31 ++ AtkText *text = (AtkText *) user_data;
  32 ++ dbus_int32_t startOffset, endOffset;
  33 ++ dbus_uint32_t type;
  34 ++ dbus_bool_t ret;
  35 ++ DBusMessage *reply = NULL;
  36 ++
  37 ++ g_return_val_if_fail (ATK_IS_TEXT (user_data),
  38 ++ droute_not_yet_handled_error (message));
  39 ++
  40 ++ if (!dbus_message_get_args
  41 ++ (message, NULL, DBUS_TYPE_INT32, &startOffset,
  42 ++ DBUS_TYPE_INT32, &endOffset,
  43 ++ DBUS_TYPE_UINT32, &type,
  44 ++ DBUS_TYPE_INVALID))
  45 ++ {
  46 ++ return droute_invalid_arguments_error (message);
  47 ++ }
  48 ++
  49 ++ ret = atk_text_scroll_substring_to (text, startOffset, endOffset, type);
  50 ++
  51 ++ reply = dbus_message_new_method_return (message);
  52 ++ if (reply)
  53 ++ {
  54 ++ dbus_message_append_args (reply, DBUS_TYPE_BOOLEAN, &ret,
  55 ++ DBUS_TYPE_INVALID);
  56 ++ }
  57 ++ return reply;
  58 ++}
  59 ++
  60 ++static DBusMessage *
  61 ++impl_ScrollSubstringToPoint (DBusConnection * bus,
  62 ++ DBusMessage * message, void *user_data)
  63 ++{
  64 ++ AtkText *text = (AtkText *) user_data;
  65 ++ dbus_int32_t startOffset, endOffset;
  66 ++ dbus_uint32_t type;
  67 ++ dbus_int32_t x, y;
  68 ++ dbus_bool_t ret;
  69 ++ DBusMessage *reply = NULL;
  70 ++
  71 ++ g_return_val_if_fail (ATK_IS_TEXT (user_data),
  72 ++ droute_not_yet_handled_error (message));
  73 ++
  74 ++ if (!dbus_message_get_args
  75 ++ (message, NULL, DBUS_TYPE_INT32, &startOffset,
  76 ++ DBUS_TYPE_INT32, &endOffset,
  77 ++ DBUS_TYPE_UINT32, &type,
  78 ++ DBUS_TYPE_INT32, &x,
  79 ++ DBUS_TYPE_INT32, &y,
  80 ++ DBUS_TYPE_INVALID))
  81 ++ {
  82 ++ return droute_invalid_arguments_error (message);
  83 ++ }
  84 ++
  85 ++ ret = atk_text_scroll_substring_to_point (text, startOffset, endOffset, type, x, y);
  86 ++
  87 ++ reply = dbus_message_new_method_return (message);
  88 ++ if (reply)
  89 ++ {
  90 ++ dbus_message_append_args (reply, DBUS_TYPE_BOOLEAN, &ret,
  91 ++ DBUS_TYPE_INVALID);
  92 ++ }
  93 ++ return reply;
  94 ++}
  95 ++
  96 + static DRouteMethod methods[] = {
  97 + {impl_GetText, "GetText"},
  98 + {impl_SetCaretOffset, "SetCaretOffset"},
  99 +@@ -867,6 +936,8 @@ static DRouteMethod methods[] = {
  100 + {impl_GetBoundedRanges, "GetBoundedRanges"},
  101 + {impl_GetAttributeRun, "GetAttributeRun"},
  102 + {impl_GetDefaultAttributeSet, "GetDefaultAttributeSet"},
  103 ++ {impl_ScrollSubstringTo, "ScrollSubstringTo"},
  104 ++ {impl_ScrollSubstringToPoint, "ScrollSubstringToPoint"},
  105 + {NULL, NULL}
  106 + };
  107 +
  108 +diff --git a/atk-adaptor/introspection.c b/atk-adaptor/introspection.c
  109 +index 20911a8..e017449 100644
  110 +--- a/atk-adaptor/introspection.c
  111 ++++ b/atk-adaptor/introspection.c
  112 +@@ -724,6 +724,20 @@ const char *spi_org_a11y_atspi_Text =
  113 + " <arg direction=\"out\" type=\"a{ss}\" />"
  114 + " </method>"
  115 + ""
  116 ++" <method name=\"ScrollSubstringTo\">"
  117 ++" <arg direction=\"in\" name=\"startOffset\" type=\"i\" />"
  118 ++" <arg direction=\"in\" name=\"endOffset\" type=\"i\" />"
  119 ++" <arg direction=\"in\" name=\"type\" type=\"u\"/>"
  120 ++" </method>"
  121 ++""
  122 ++" <method name=\"ScrollSubstringToPoint\">"
  123 ++" <arg direction=\"in\" name=\"startOffset\" type=\"i\" />"
  124 ++" <arg direction=\"in\" name=\"endOffset\" type=\"i\" />"
  125 ++" <arg direction=\"in\" name=\"type\" type=\"u\"/>"
  126 ++" <arg direction=\"in\" name=\"x\" type=\"i\"/>"
  127 ++" <arg direction=\"in\" name=\"y\" type=\"i\"/>"
  128 ++" </method>"
  129 ++""
  130 + "</interface>"
  131 + "";
  132 +
  133 +#diff --git a/meson.build b/meson.build
  134 +#index dbe6f8f..c47e4b1 100644
  135 +#--- a/meson.build
  136 +#+++ b/meson.build
  137 +#@@ -39,7 +39,7 @@ glib_req_version = '>= 2.32.0'
  138 +# gobject_req_version = '>= 2.0.0'
  139 +# gmodule_req_version = '>= 2.0.0'
  140 +# atk_req_version = '>= 2.29.2'
  141 +#-atspi_req_version = '>= 2.29.1'
  142 +#+atspi_req_version = '>= 2.31.0'
  143 +# libxml_req_version = '>= 2.9.1'
  144 +#
  145 +# libdbus_dep = dependency('dbus-1', version: libdbus_req_version)
... ...
debian/patches/series
1 1 git-c8cda37e28307ad195996ad54b9ee1680cca3ec3
2 2  
3 3 1001-scrollto
  4 +1002-scrollsubstringto
... ...