From: Artur Świgoń Date: Wed, 12 Apr 2023 12:29:34 +0000 (+0200) Subject: elm_atspi_bridge: Support org.a11y.atspi.Value.Text property X-Git-Tag: accepted/tizen/unified/20230421.103336~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac5c46c10df3708ec5e3292d6f698b31a5cf379c;p=platform%2Fupstream%2Fefl.git elm_atspi_bridge: Support org.a11y.atspi.Value.Text property Change-Id: I33b7a93bc515e369fc6a96fdcca531cef053ffb5 --- diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index f1a7d58..7ec6133 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -1299,6 +1299,7 @@ _accessible_reading_material_get(const Eldbus_Service_Interface *iface, const El const char *name = NULL; unsigned int s1, s2; double value = 0; + const char *value_text = NULL; double increment = 0; double max_value = 0; double min_value = 0; @@ -1410,11 +1411,12 @@ _accessible_reading_material_get(const Eldbus_Service_Interface *iface, const El min_value = 0; if (efl_isa(obj, EFL_ACCESS_VALUE_INTERFACE)) { - efl_access_value_and_text_get(obj, &value, NULL); + efl_access_value_and_text_get(obj, &value, &value_text); increment = efl_access_value_increment_get(obj); efl_access_value_range_get(obj, &min_value, &max_value, NULL); } eldbus_message_iter_basic_append(iter, 'd', value); + eldbus_message_iter_basic_append(iter, 's', value_text ? value_text : ""); eldbus_message_iter_basic_append(iter, 'd', increment); eldbus_message_iter_basic_append(iter, 'd', max_value); eldbus_message_iter_basic_append(iter, 'd', min_value); @@ -1630,7 +1632,7 @@ static const Eldbus_Method accessible_methods[] = { {"s", "labledByName"},{"s", "textIfceName"}, {"u", "role"}, {"au", "stateSet"}, {"s", "localizedName"}, {"i", "childCount"}, - {"d", "currentValue"},{"d", "minimumIncrement"}, + {"d", "currentValue"}, {"s", "currentValueText"}, {"d", "minimumIncrement"}, {"d", "maximumValue"},{"d", "minimumValue"}, {"s", "description"}, {"i", "indexInParent"}, {"b", "isSelectedInParent"}, {"b", "hasCheckboxChild"}, @@ -3599,6 +3601,13 @@ _value_properties_get(const Eldbus_Service_Interface *interface, const char *pro eldbus_message_iter_basic_append(iter, 'd', value); return EINA_TRUE; } + if (!strcmp(property, "Text")) + { + const char *value_text = NULL; + efl_access_value_and_text_get(obj, NULL, &value_text); + eldbus_message_iter_basic_append(iter, 's', value_text ? value_text : ""); + return EINA_TRUE; + } return EINA_FALSE; } @@ -3767,6 +3776,7 @@ static const Eldbus_Property value_properties[] = { { "MaximumValue", "d", NULL, NULL, 0 }, { "MinimumIncrement", "d", NULL, NULL, 0 }, { "CurrentValue", "d", NULL, NULL, 0 }, + { "Text", "s", NULL, NULL, 0 }, { NULL, NULL, NULL, NULL, 0 } };