if (event->detail2)
_object_needs_scroll_gesture_send(atd, event->source);
} else {
- if (atd->read_timer && atd->prev_highlighted_obj == event->source) {
+ if (atd->read_timer && atspi_accessible_is_equal(atd->prev_highlighted_obj, event->source)) {
gchar *id = atspi_accessible_get_unique_id(atd->prev_highlighted_obj, NULL);
DEBUG("Prev highlighted %s lost highlight", id);
g_free(id);
// pop modal
DEBUG("Pop modal");
timer_reschedule(atd);
- } else if (flat_navi_context_current_get(navigator_get_flat_navi_context(atd->view_content_changed_ecd->user_data)) == event->source) {
+ } else if (atspi_accessible_is_equal(flat_navi_context_current_get(navigator_get_flat_navi_context(atd->view_content_changed_ecd->user_data)), event->source)) {
DEBUG("Current highlighted object becomes not-showing");
timer_reschedule(atd);
}
}
//On rotation, send the bounds-changed notification to read landscape, portrait view,
//the width, height is updated based on rotation angle.
- else if ((role == ATSPI_ROLE_WINDOW) && (event->source == atd->root)) {
+ else if ((role == ATSPI_ROLE_WINDOW) && atspi_accessible_is_equal(event->source, atd->root)) {
if (rect) {
if (rect->width > rect->height)
SUPPRESS_FORMAT_ERROR(tw_speak(_IGNORE_ON_TV("IDS_ACCS_OPT_LANDSCAPE_VIEW_TTS"), EINA_TRUE));
DEBUG("context is not valid - is null");
else if (!context->root)
DEBUG("context is not valid - root is null");
- else if (new_root != NULL && context->root != new_root)
+ else if (new_root != NULL && !atspi_accessible_is_equal(context->root, new_root))
DEBUG("context is not valid - root is different");
- if (!context || !context->root || (new_root != NULL && context->root != new_root))
+ if (!context || !context->root || (new_root != NULL && !atspi_accessible_is_equal(context->root, new_root)))
return FLAT_NAVI_CONTEXT_NOT_VALID;
object_state st = is_object_showing_and_not_defunct(context->current, "current");
}
char *result_text = NULL;
- if (!grd->current_obj || grd->current_obj != current_obj) {
+ if (!grd->current_obj || !atspi_accessible_is_equal(grd->current_obj, current_obj)) {
granularity_read_text_list_init();
grd->current_obj = current_obj;
DEBUG("END");
return;
}
- if (h_type != HIGHLIGHT_POINT_AGAIN && nd->current_obj == obj && _widget_has_state(nd->current_obj, ATSPI_STATE_HIGHLIGHTED)) {
+ if (h_type != HIGHLIGHT_POINT_AGAIN && atspi_accessible_is_equal(nd->current_obj, obj) &&
+ _widget_has_state(nd->current_obj, ATSPI_STATE_HIGHLIGHTED)) {
DEBUG("Object already highlighted");
gchar *name = atspi_accessible_get_name(obj, NULL);
DEBUG("Object name : %s", name ? name : "name nil");
child_iter = atspi_accessible_get_child_at_index(parent, jdx, &err);
GERROR_CHECK(err)
- if (current_widget == child_iter) {
+ if (atspi_accessible_is_equal(current_widget, child_iter)) {
role = atspi_accessible_get_role_name(parent, &err);
if (role)
DEBUG("Childen found in parent: %s at index: %d\n", role, jdx);
touched_window_bus_name = atspi_accessible_get_bus_name(touched_window, NULL);
context_root_bus_name = atspi_accessible_get_bus_name(context_root, NULL);
- if (touched_window && touched_window != context_root &&
+ if (touched_window && !atspi_accessible_is_equal(touched_window, context_root) &&
g_strcmp0(touched_window_bus_name, context_root_bus_name)) {
gchar *id = atspi_accessible_get_unique_id(touched_window, NULL);
gchar *id2 = atspi_accessible_get_unique_id(context_root, NULL);
gchar *name;
gchar *role;
// find accessible object with Scrollable interface
- while (ret && (ret != top_window)) {
+ while (ret && (!atspi_accessible_is_equal(ret, top_window))) {
name = atspi_accessible_get_name(ret, &err);
GERROR_CHECK(err)
role = atspi_accessible_get_role_name(ret, &err);
DEBUG("obj == NULL");
nd->auto_review_on = false;
return;
- } else if (obj == (ref = flat_navi_context_last_get(nd->flat_navi_context))) {
- DEBUG("obj == flat_navi_context_last_get()");
+ } else if (atspi_accessible_is_equal(obj, (ref = flat_navi_context_last_get(nd->flat_navi_context)))) {
+ DEBUG("obj is equal to flat_navi_context_last_get()");
nd->auto_review_on = false;
}
if (!_current_highlight_on_keyboard_is(nd))
break;
}
- if (current_accessible == nd->current_obj)
+ if (atspi_accessible_is_equal(current_accessible, nd->current_obj))
_activate_widget(nd);
else
DEBUG("Do not handle gesture, because current object is changed!");
TIZEN_PROD_STATIC void _new_highlighted_obj_changed(AtspiAccessible *new_highlighted_obj, AtspiRole role, void *user_data)
{
- gchar *prev_id, *next_id;
NavigatorData *nd = user_data;
if (!nd) {
ERROR("Navigator data required!");
return;
}
- prev_id = atspi_accessible_get_unique_id(flat_navi_context_current_get(nd->flat_navi_context), NULL);
- next_id = atspi_accessible_get_unique_id(new_highlighted_obj, NULL);
- DEBUG("current highlighted obj: %s, new_highlighted obj: %s (role: %d)", prev_id, next_id, role);
- g_free(prev_id);
- g_free(next_id);
-
- if (nd->flat_navi_context && ((nd->current_obj != new_highlighted_obj) || (flat_navi_context_current_get(nd->flat_navi_context) != new_highlighted_obj))) {
+ if (nd->flat_navi_context &&
+ (!atspi_accessible_is_equal(nd->current_obj, new_highlighted_obj) ||
+ !atspi_accessible_is_equal(flat_navi_context_current_get(nd->flat_navi_context), new_highlighted_obj))) {
/* The application could change highlight directly, in this case
scrreen reader should call atspi_component_clear_highlight using
currently highlighted object */
WindowInfo *wi;
EINA_LIST_FOREACH(wtd->window_infos, l, wi)
- if(wi && wi->window == window) return EINA_TRUE;
+ if(wi && atspi_accessible_is_equal(wi->window, window)) return EINA_TRUE;
return EINA_FALSE;
}
Eina_List *l, *l_prev;
EINA_LIST_REVERSE_FOREACH_SAFE(wtd->window_infos, l, l_prev, wi) {
if (!wi) continue;
- if (wi->window == window) {
+ if (atspi_accessible_is_equal(wi->window, window)) {
g_object_unref(wi->window);
g_free(wi->rect);
g_free(wi);
AtspiAccessible *top_window;
top_window = _top_window_get(wtd);
- remove_from_top = (top_window == window);
+ remove_from_top = atspi_accessible_is_equal(top_window, window);
Eina_Bool window_removed = EINA_FALSE;
Eina_Bool view_change_need = EINA_FALSE;
int removed_index = 0;
EINA_LIST_REVERSE_FOREACH_SAFE(wtd->window_infos, l, l_prev, wi) {
if (!wi) continue;
- if (wi->window == window) {
+ if (atspi_accessible_is_equal(wi->window, window)) {
view_change_need = wi->view_change_need;
keyboard_window_is = wi->keyboard_window_is;
g_object_unref(wi->window);
removed_index++;
}
- if (wtd->subroot && window == wtd->subroot) {
+ if (wtd->subroot && atspi_accessible_is_equal(window, wtd->subroot)) {
DEBUG("Remove subroot: %p ", wtd->subroot);
wtd->subroot = NULL;
}
EINA_LIST_REVERSE_FOREACH(wtd->window_infos, l, wi) {
if (!wi) continue;
- if (window == wi->window) {
+ if (atspi_accessible_is_equal(window, wi->window)) {
return wi->window_activate_info_type;
}
}