From: Radoslaw Cybulski Date: Tue, 9 Jul 2019 14:33:27 +0000 (+0200) Subject: atspi: add pause / resume reading functionality X-Git-Tag: submit/tizen/20190805.083058~181 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F51%2F209651%2F4;p=platform%2Fupstream%2Fefl.git atspi: add pause / resume reading functionality @tizen_only Change-Id: I00dd618dcbed153eb4cf7783f3da5ba6d6b8c0af --- diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index b717126..757231a 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -7500,6 +7500,33 @@ _on_read_command_call(void *data, const Eldbus_Message *msg, Eldbus_Pending *pen } EAPI void +elm_atspi_bridge_utils_pause_resume(Eina_Bool pause) +{ + Eldbus_Message *msg; + Eldbus_Message_Iter *iter; + Eo *bridge = _elm_atspi_bridge_get(); + if (!bridge) + { + ERR("AT-SPI: Atspi bridge is not enabled."); + return; + } + ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(bridge, pd); + if (!pd->a11y_bus) + { + ERR("AT-SPI: a11y bus is not set."); + return; + } + + msg = eldbus_message_method_call_new(ELM_ATSPI_DIRECT_READ_BUS, + ELM_ATSPI_DIRECT_READ_PATH, + ELM_ATSPI_DIRECT_READ_INTERFACE, + "PauseResume"); + iter = eldbus_message_iter_get(msg); + eldbus_message_iter_arguments_append(iter, "b", pause); + eldbus_connection_send(pd->a11y_bus, msg, NULL, NULL, -1); +} + +EAPI void elm_atspi_bridge_utils_say(const char* text, Eina_Bool discardable, const Elm_Atspi_Say_Signal_Cb func, diff --git a/src/lib/elementary/elm_atspi_bridge.h b/src/lib/elementary/elm_atspi_bridge.h index c1025b2..f4b0e4a 100644 --- a/src/lib/elementary/elm_atspi_bridge.h +++ b/src/lib/elementary/elm_atspi_bridge.h @@ -29,6 +29,8 @@ typedef void (*Elm_Atspi_Say_Signal_Cb)(void *data, const char *say_signal); * “ReadingCancelled” * “ReadingStopped” * “ReadingSkipped” + * “ReadingPaused” + * “ReadingResumed” * @param data The user data to be passed to the callback function * * @ingroup Elm_Atspi_Bridge @@ -41,6 +43,14 @@ EAPI void elm_atspi_bridge_utils_say(const char* text, Eina_Bool discardable, const Elm_Atspi_Say_Signal_Cb func, const void *data); + +/** + * @brief Pause / resume screen-reader reading + * + * @param pause True, when reading should be paused, otherwise reading will be resumed. + */ +EAPI void elm_atspi_bridge_utils_pause_resume(Eina_Bool pause); + // //TIZEN_ONLY(20161027) - Export elm_atspi_bridge_utils_is_screen_reader_enabled /**