g_object_unref(value_interface);
}
+TIZEN_PROD_STATIC void _do_action_name(NavigatorData *nd, char *action_name)
+{
+ DEBUG("START");
+ AtspiAccessible *obj = NULL;
+
+ if (nd->current_obj == NULL)
+ return;
+
+ obj = _get_currently_controlled_accessible(nd->current_obj);
+ if (obj) {
+ _do_action(obj, action_name);
+ g_object_unref(obj);
+ }
+}
+
TIZEN_PROD_STATIC void _activate_widget(NavigatorData *nd)
{
//activate the widget
DEBUG("END");
}
-TIZEN_PROD_STATIC Eina_Bool _has_value(NavigatorData *nd)
+TIZEN_PROD_STATIC Eina_Bool _has_value_interface(NavigatorData *nd)
+{
+ DEBUG("START");
+ AtspiValue *value_interface = _get_value_interface(nd);
+ if (value_interface) {
+ g_object_unref(value_interface);
+ return EINA_TRUE;
+ }
+
+ return EINA_FALSE;
+}
+
+TIZEN_PROD_STATIC Eina_Bool _has_value_text_attr(NavigatorData *nd)
{
DEBUG("START");
AtspiAccessible *obj = NULL;
+ Eina_Bool has_value_text = EINA_FALSE;
if (nd->current_obj == NULL)
return EINA_FALSE;
obj = _get_currently_controlled_accessible(nd->current_obj);
- AtspiValue *value = atspi_accessible_get_value_iface(obj);
- g_object_unref(obj);
-
- if (value) {
- g_object_unref(value);
- return EINA_TRUE;
+ if (obj) {
+ GHashTable *hash_table = atspi_accessible_get_attributes(obj, NULL);
+ if (hash_table) {
+ if (get_value_format(hash_table) == ACCESSIBLE_VALUE_FORMAT_TEXT) {
+ has_value_text = EINA_TRUE;
+ }
+ g_hash_table_unref(hash_table);
+ }
+ g_object_unref(obj);
}
- return EINA_FALSE;
+ return has_value_text;
}
TIZEN_PROD_STATIC Eina_Bool _is_enabled(NavigatorData *nd)
return;
}
+ if (!_has_value_interface(nd)) {
+ DEBUG("no value interface");
+ nd->prepared = false;
+ return;
+ }
+
if (gi == NULL) {
ERROR("NULL gesture");
return;
_caret_move_backward(nd);
else
_select_text_forward(nd, EINA_FALSE);
- } else if (_has_value(nd) && _is_enabled(nd))
+ } else if (_has_value_interface(nd) && _is_enabled(nd)) {
_value_inc(nd, 0);
- else {
+ } else if (_has_value_text_attr(nd) && _is_enabled(nd)) {
+ _do_action_name(nd, "increment");
+ } else {
if (_granularity_text_read(nd, EINA_FALSE)) break;
_focus_prev(nd);
}
_caret_move_forward(nd);
else
_select_text_forward(nd, EINA_TRUE);
- } else if (_has_value(nd) && _is_enabled(nd))
+ } else if (_has_value_interface(nd) && _is_enabled(nd)) {
_value_dec(nd, 0);
- else {
+ } else if (_has_value_text_attr(nd) && _is_enabled(nd)) {
+ _do_action_name(nd, "decrement");
+ } else {
if (_granularity_text_read(nd, EINA_TRUE)) break;
_focus_next(nd);
}