Make focus navigatable between windows. 08/311508/1
authorYoungsun Suh <youngsun.suh@samsung.com>
Fri, 3 May 2024 01:44:28 +0000 (10:44 +0900)
committerYoungsun Suh <youngsun.suh@samsung.com>
Wed, 22 May 2024 05:09:10 +0000 (14:09 +0900)
Change-Id: Iafe27b170f4bb195c6e24b93ed8f3fadc9b4ab0e

35 files changed:
include/app_tracker.h
include/flat_navi.h
include/utils.h
include/window_tracker.h
src/app_tracker.c
src/flat_navi.c
src/navigator.c
src/utils.c
src/window_tracker.c
tests2/wrappers/mocked_app_tracker.cpp
tests2/wrappers/mocked_app_tracker.h
tests2/wrappers/mocked_dbus_direct_reading_adapter.cpp
tests2/wrappers/mocked_dbus_direct_reading_adapter.h
tests2/wrappers/mocked_flat_navi.cpp
tests2/wrappers/mocked_flat_navi.h
tests2/wrappers/mocked_granularity_read.cpp
tests2/wrappers/mocked_granularity_read.h
tests2/wrappers/mocked_keyboard_tracker.cpp
tests2/wrappers/mocked_keyboard_tracker.h
tests2/wrappers/mocked_main.cpp
tests2/wrappers/mocked_main.h
tests2/wrappers/mocked_navigator.cpp
tests2/wrappers/mocked_navigator.h
tests2/wrappers/mocked_screen_reader.cpp
tests2/wrappers/mocked_screen_reader.h
tests2/wrappers/mocked_screen_reader_spi.cpp
tests2/wrappers/mocked_screen_reader_spi.h
tests2/wrappers/mocked_screen_reader_system.cpp
tests2/wrappers/mocked_screen_reader_system.h
tests2/wrappers/mocked_screen_reader_tts.cpp
tests2/wrappers/mocked_screen_reader_tts.h
tests2/wrappers/mocked_smart_notification.cpp
tests2/wrappers/mocked_smart_notification.h
tests2/wrappers/mocked_window_tracker.cpp
tests2/wrappers/mocked_window_tracker.h

index 7cea472a5a626613e019f2475a99bf586912e9eb..148f50450b6788415370fd26a14d638ab6dafebe 100644 (file)
@@ -59,6 +59,24 @@ void app_tracker_scroll_gesture_required_object_info_send(App_Tracker_Data* atd)
  */
 AtspiAccessible* app_tracker_top_window_get(App_Tracker_Data *atd);
 
+/**
+ * @brief Return next accessible window from current root
+ *
+ * @param atd internal data of app tracker module
+ * @param current_root root of current window to start search with
+ * @return accessible object of the next window
+ */
+AtspiAccessible* app_tracker_next_window_get(App_Tracker_Data *atd, AtspiAccessible *current_root);
+
+/**
+ * @brief Return previous accessible window from current root
+ *
+ * @param atd internal data of app tracker module
+ * @param current_root root of current window to start search with
+ * @return accessible object of the previous window
+ */
+AtspiAccessible* app_tracker_prev_window_get(App_Tracker_Data *atd, AtspiAccessible *current_root);
+
 /**
  * @brief This function allows access to submodule functinality of app_tracker.
  *
index f303629ef9a0f4cdcc5d9dba95ca2d8ded2e1a8f..0554711be3b884352c02c098f0af084d579b8044 100644 (file)
@@ -7,6 +7,7 @@
 
 typedef struct _FlatNaviContext FlatNaviContext;
 typedef enum { SEARCH_FORWARD = 1, SEARCH_BACKWARD = 2 } search_direction;
+typedef enum { CTX_SETUP_FAIL = -1, CTX_SETUP_SUCCESS = 0, CTX_SETUP_SUCCESS_HIGHLIGHT = 1 } context_setup_result;
 typedef Eina_Bool(*StopConditionCb)(AtspiAccessible *);
 
 /**
@@ -33,12 +34,28 @@ FlatNaviContext *flat_navi_context_create();
  * @param ctx - an allocated FlatNaviContext. Should be created first with flat_navi_context_create().
  * @param root - a node from AT-SPI2 accessibility tree that defines the root of flat navigation context, this means, navigation will be limited to the sub-tree of this node.
  *
- * @return Initialized FlatNaviContext.
+ * @return context_setup_result
  *
  * @note Context will use heuristics to filter elements of UI which can be navigated.
  * @note By default, current element is the first object in first line.
  */
-int flat_navi_context_setup(FlatNaviContext *ctx, AtspiAccessible *root);
+context_setup_result flat_navi_context_setup(FlatNaviContext *ctx, AtspiAccessible *root);
+
+/**
+ * @brief Returns whether the context root is switched to next/prev window.
+ *
+ * @param ctx FlatNaviContext
+ *
+ * @return Eina_Bool true if flat_navi result requires root change.
+ */
+Eina_Bool flat_navi_context_requires_root_change(FlatNaviContext *ctx);
+
+/**
+ * @brief Falls back to strategy to loop in the same root.
+ *
+ * @note This is called if no valid next/prev window is found.
+ */
+void flat_navi_fallback_to_loop_in_same_root(FlatNaviContext *ctx);
 
 /**
  * @brief Changes context root
index de6c9a6450a321764cd2c62df8b21e1f9d3f71d5..5a11fa505a144a4930c9309a8b92a5d6f30cdadc 100644 (file)
@@ -167,5 +167,10 @@ static inline void ESAL(Eina_Strbuf *buf, const char *txt)
        // strlen() by a constant if it knows the length of the string.
        eina_strbuf_append_length(buf, txt, strlen(txt));
 }
+typedef enum {
+       OBJECT_VALID, OBJECT_NOT_VALID, OBJECT_NOT_VISIBLE
+} object_state;
+
+object_state is_object_showing_and_not_defunct(AtspiAccessible *obj, char *object_name);
 
 #endif /* UTILS_H_ */
index 629e313ed5e41e2744c40264e626e2e6aef15f9d..99e265ea883083a405f002814ea260c98b0dc6c7 100644 (file)
@@ -52,6 +52,24 @@ AtspiAccessible *window_tracker_top_win_get(WindowTrackerData *wtd);
  */
 AtspiAccessible *window_tracker_top_window_get(WindowTrackerData *wtd);
 
+/**
+ * @brief Return next accessible window from current root
+ *
+ * @param wtd internal data struct of window tracker
+ * @param current_root root of current window to start search with
+ * @return accessible object of the next window
+ */
+AtspiAccessible *window_tracker_next_window_get(WindowTrackerData *wtd, AtspiAccessible *current_root);
+
+/**
+ * @brief Return previous accessible window from current root
+ *
+ * @param wtd internal data struct of window tracker
+ * @param current_root root of current window to start search with
+ * @return accessible object of the previous window
+ */
+AtspiAccessible *window_tracker_prev_window_get(WindowTrackerData *wtd, AtspiAccessible *current_root);
+
 /*
  * @brief Appends window from window list
  */
index 325da1d3fbc26ee56a4dbbc73e68afbb57c13685..29493a731da66c16cac154e147cd9cd11ffd4e01 100644 (file)
@@ -806,6 +806,16 @@ AtspiAccessible* app_tracker_top_window_get(App_Tracker_Data *atd)
        return atd ? window_tracker_top_window_get(atd->window_tracker_data) : NULL;
 }
 
+AtspiAccessible* app_tracker_next_window_get(App_Tracker_Data *atd, AtspiAccessible *current_root)
+{
+       return atd ? window_tracker_next_window_get(atd->window_tracker_data, current_root) : NULL;
+}
+
+AtspiAccessible* app_tracker_prev_window_get(App_Tracker_Data *atd, AtspiAccessible *current_root)
+{
+       return atd ? window_tracker_prev_window_get(atd->window_tracker_data, current_root) : NULL;
+}
+
 AtspiAccessible* app_tracker_at_point_window_get(App_Tracker_Data *atd, int x, int y)
 {
        return atd ? window_tracker_at_point_window_get(atd->window_tracker_data, x, y) : NULL;
index 151950d08e36211f475ed4cee80af0290b49ecb9..d0e5d1352f702cc16856f17f58c09e30d0a70b72 100644 (file)
@@ -34,7 +34,9 @@
 typedef enum {
        LAST_ENTRY_NONE,
        LAST_ENTRY_FIRST,
-       LAST_ENTRY_LAST
+       LAST_ENTRY_LAST,
+       LAST_ENTRY_FIRST_NAV_NEXT,
+       LAST_ENTRY_LAST_NAV_NEXT
 } last_entry_mode;
 
 struct _FlatNaviContext {
@@ -371,6 +373,23 @@ static void _on_chain_end(FlatNaviContext *ctx, search_direction direction)
                _on_chain_end_loop(ctx, direction);
 }
 
+static Eina_Bool _should_navigate_to_next_win(FlatNaviContext *ctx)
+{
+#ifndef SCREEN_READER_TV
+       AtspiRole role = atspi_accessible_get_role(ctx->root, NULL);
+       return role == ATSPI_ROLE_COMBO_BOX ? EINA_FALSE : EINA_TRUE;
+#endif
+       return EINA_FALSE;
+}
+
+static void _on_last_item_reached(FlatNaviContext *ctx, search_direction direction)
+{
+       /* TODO Is it a proper place for sound generation? */
+       if (vc_get_sound_feedback())
+               smart_notification(FOCUS_CHAIN_END_NOTIFICATION_EVENT, 0, 0);
+       ctx->last_entry = direction == SEARCH_FORWARD ? LAST_ENTRY_LAST : LAST_ENTRY_FIRST;
+}
+
 static void _navigate_by_one(FlatNaviContext *ctx, search_direction direction)
 {
        if (direction != SEARCH_FORWARD && direction != SEARCH_BACKWARD) {
@@ -385,20 +404,15 @@ static void _navigate_by_one(FlatNaviContext *ctx, search_direction direction)
                DEBUG("%s", direction == SEARCH_FORWARD ?
                                                                "Last item reached or failed" :
                                                                "first item reached or failed");
-
                if (ctx->last_entry == (direction == SEARCH_FORWARD ? LAST_ENTRY_LAST : LAST_ENTRY_FIRST)) {
                        _on_chain_end(ctx, direction);
-               }
-               else {
-                       /* TODO Is it a proper place for sound generation? */
-                       if (vc_get_sound_feedback())
-                               smart_notification(FOCUS_CHAIN_END_NOTIFICATION_EVENT, 0, 0);
-
-                       ctx->last_entry = direction == SEARCH_FORWARD ? LAST_ENTRY_LAST : LAST_ENTRY_FIRST;
+               } else if (_should_navigate_to_next_win(ctx)) {
+                       ctx->last_entry = direction == SEARCH_FORWARD ? LAST_ENTRY_LAST_NAV_NEXT : LAST_ENTRY_FIRST_NAV_NEXT;
+               } else {
+                       _on_last_item_reached(ctx, direction);
                }
                if (ret) g_object_unref(ret);
-       }
-       else {
+       } else {
                if (ctx->current) g_object_unref(ctx->current);
                ctx->current = ret;
                ctx->last_entry = LAST_ENTRY_NONE;
@@ -424,14 +438,14 @@ static bool _return_to_old_root(AtspiAccessible *old_root)
        return (role == ATSPI_ROLE_COMBO_BOX);
 }
 
-int flat_navi_context_setup(FlatNaviContext *ctx, AtspiAccessible *root)
+context_setup_result flat_navi_context_setup(FlatNaviContext *ctx, AtspiAccessible *root)
 {
        AtspiAccessible *old_root;
 
        DEBUG("START");
        if (!ctx) {
                DEBUG("END -- no context");
-               return -1;
+               return CTX_SETUP_FAIL;
        }
        char *root_name = atspi_accessible_get_name(root, NULL);
        gchar *id = atspi_accessible_get_unique_id(root, NULL);
@@ -449,12 +463,32 @@ int flat_navi_context_setup(FlatNaviContext *ctx, AtspiAccessible *root)
                ctx->current = old_root;
        } else {
                if (old_root) g_object_unref(old_root);
-               ctx->current = _first(ctx);
+               if (ctx->last_entry == LAST_ENTRY_FIRST_NAV_NEXT) {
+                       ctx->current = _last(ctx);
+               } else {
+                       ctx->current = _first(ctx);
+               }
        }
+       Eina_Bool highlight_current =
+               ctx->last_entry == LAST_ENTRY_FIRST_NAV_NEXT || ctx->last_entry == LAST_ENTRY_LAST_NAV_NEXT;
        ctx->last_entry = LAST_ENTRY_NONE;
 
        DEBUG("END");
-       return 0;
+       return highlight_current ? CTX_SETUP_SUCCESS_HIGHLIGHT : CTX_SETUP_SUCCESS;
+}
+
+Eina_Bool flat_navi_context_requires_root_change(FlatNaviContext *ctx)
+{
+       return ctx->last_entry == LAST_ENTRY_FIRST_NAV_NEXT || ctx->last_entry == LAST_ENTRY_LAST_NAV_NEXT;
+}
+
+void flat_navi_fallback_to_loop_in_same_root(FlatNaviContext *ctx)
+{
+       if (ctx->last_entry == LAST_ENTRY_FIRST_NAV_NEXT) {
+               _on_last_item_reached(ctx, SEARCH_BACKWARD);
+       } else if (ctx->last_entry == LAST_ENTRY_LAST_NAV_NEXT) {
+               _on_last_item_reached(ctx, SEARCH_FORWARD);
+       }
 }
 
 void flat_navi_context_root_change(FlatNaviContext *ctx, AtspiAccessible *root)
@@ -564,39 +598,6 @@ AtspiAccessible *flat_navi_context_last(FlatNaviContext *ctx)
        return ret;
 }
 
-typedef enum {
-       OBJECT_VALID, OBJECT_NOT_VALID, OBJECT_NOT_VISIBLE
-} object_state;
-
-static object_state is_object_showing_and_not_defunct(AtspiAccessible *obj, char *object_name)
-{
-       if (!obj) DEBUG("%s is null", object_name);
-       if (!obj)
-               return OBJECT_NOT_VALID;
-       AtspiStateSet *ss = atspi_accessible_get_state_set(obj);
-       if (!ss) {
-               ERROR("failed to get state set for %s", object_name);
-               return OBJECT_NOT_VALID;
-       }
-
-       Eina_Bool showing = atspi_state_set_contains(ss, ATSPI_STATE_SHOWING);
-       Eina_Bool defunct = atspi_state_set_contains(ss, ATSPI_STATE_DEFUNCT);
-       g_object_unref(ss);
-
-       if (defunct) {
-               gchar *id = atspi_accessible_get_unique_id(obj, NULL);
-               DEBUG("%s %s is defunct", object_name, id);
-               g_free(id);
-       } else if (!showing) {
-               gchar *id = atspi_accessible_get_unique_id(obj, NULL);
-               DEBUG("%s %s is not showing", object_name, id);
-               g_free(id);
-       }
-       if (defunct)
-               return OBJECT_NOT_VALID;
-       return showing ? OBJECT_VALID : OBJECT_NOT_VISIBLE;
-}
-
 FlatNaviContextValidity flat_navi_is_valid(FlatNaviContext *context, AtspiAccessible *new_root)
 {
        if (!context)
index e9eab4d832b6bc0c3d943ed5887fab8e08000a79..a7a17e7f551aad72352bb1537a33fd1ba849c079 100644 (file)
@@ -582,6 +582,32 @@ TIZEN_PROD_STATIC Eina_Bool _focus_next_prev_is_movable(AtspiAccessible *obj)
        return ret;
 }
 
+static Eina_Bool _switch_to_next_root_if_valid(NavigatorData *nd, Eina_Bool is_forward)
+{
+       DEBUG("START");
+       if (flat_navi_context_requires_root_change(nd->flat_navi_context)) {
+               AtspiAccessible *current_root = flat_navi_context_root_get(nd->flat_navi_context);
+               if (current_root) {
+                       AtspiAccessible *new_root = NULL;
+                       if (is_forward)
+                               new_root = app_tracker_next_window_get(nd->app_tracker_data, current_root);
+                       else
+                               new_root = app_tracker_prev_window_get(nd->app_tracker_data, current_root);
+
+                       if (new_root && new_root != app_tracker_desktop_get(nd->app_tracker_data) && nd->context_switch_cb) {
+                               DEBUG("switching to new_root for flat_nav_context");
+                               nd->context_switch_cb(nd->context_switch_data, new_root);
+                               return EINA_TRUE;
+                       } else {
+                               flat_navi_fallback_to_loop_in_same_root(nd->flat_navi_context);
+                       }
+               }
+       }
+
+       DEBUG("END");
+       return EINA_FALSE;
+}
+
 TIZEN_PROD_STATIC void _focus_next(NavigatorData *nd)
 {
        DEBUG("START");
@@ -606,8 +632,10 @@ TIZEN_PROD_STATIC void _focus_next(NavigatorData *nd)
                        return;
                }
 
-               if (_focus_next_prev_is_movable(obj)) /* case: highlight_clear, set can_highlight of current to FALSE */
+               if (_focus_next_prev_is_movable(obj)) /* case: highlight_clear, set can_highlight of current to FALSE */
                        obj = flat_navi_context_next(nd->flat_navi_context);
+                       if (_switch_to_next_root_if_valid(nd, EINA_TRUE)) return;
+               }
        }
 
        if (obj)
@@ -715,8 +743,10 @@ TIZEN_PROD_STATIC void _focus_prev(NavigatorData *nd)
                        return;
                }
 
-               if (_focus_next_prev_is_movable(obj)) /* case: highlight_clear, set can_highlight of current to FALSE */
+               if (_focus_next_prev_is_movable(obj)) /* case: highlight_clear, set can_highlight of current to FALSE */
                        obj = flat_navi_context_prev(nd->flat_navi_context);
+                       if (_switch_to_next_root_if_valid(nd, EINA_FALSE)) return;
+               }
        }
 
        if (obj)
@@ -2527,13 +2557,15 @@ TIZEN_PROD_STATIC void _view_content_changed(AtspiAccessible *root, AtspiRole ro
        AtspiAccessible *old_root = NULL;
        if (flat_navi_context_root_get(nd->flat_navi_context))
                old_root = g_object_ref(flat_navi_context_root_get(nd->flat_navi_context));
-       if (flat_navi_context_setup(nd->flat_navi_context, root)) {
+       context_setup_result setup_result = flat_navi_context_setup(nd->flat_navi_context, root);
+       if (setup_result == CTX_SETUP_FAIL) {
                DEBUG("END -- setup failed");
                if (old_root) g_object_unref(old_root);
                return;
        }
+
        AtspiAccessible *new_current = flat_navi_context_current_get(nd->flat_navi_context);
-       if (atspi_accessible_is_equal(old_root, new_current)) {
+       if (setup_result == CTX_SETUP_SUCCESS_HIGHLIGHT || atspi_accessible_is_equal(old_root, new_current)) {
                // when returning to old context root as current in new context we should highlight the current immediately without providing default label
                default_label_enabled = EINA_FALSE;
        }
index 41bd632d9a293b7b8af22d6af23193fdbfb106b4..9980c6537529fbe6dd5f926f29f52a2b64fc805e 100644 (file)
@@ -416,3 +416,32 @@ end:
 
        return status;
 }
+
+object_state is_object_showing_and_not_defunct(AtspiAccessible *obj, char *object_name)
+{
+       if (!obj) DEBUG("%s is null", object_name);
+       if (!obj)
+               return OBJECT_NOT_VALID;
+       AtspiStateSet *ss = atspi_accessible_get_state_set(obj);
+       if (!ss) {
+               ERROR("failed to get state set for %s", object_name);
+               return OBJECT_NOT_VALID;
+       }
+
+       Eina_Bool showing = atspi_state_set_contains(ss, ATSPI_STATE_SHOWING);
+       Eina_Bool defunct = atspi_state_set_contains(ss, ATSPI_STATE_DEFUNCT);
+       g_object_unref(ss);
+
+       if (defunct) {
+               gchar *id = atspi_accessible_get_unique_id(obj, NULL);
+               DEBUG("%s %s is defunct", object_name, id);
+               g_free(id);
+       } else if (!showing) {
+               gchar *id = atspi_accessible_get_unique_id(obj, NULL);
+               DEBUG("%s %s is not showing", object_name, id);
+               g_free(id);
+       }
+       if (defunct)
+               return OBJECT_NOT_VALID;
+       return showing ? OBJECT_VALID : OBJECT_NOT_VISIBLE;
+}
index acb9a10fef22c69afc2cf211db22b4e0e0ab813f..67a90a7596dc66b82ba4fce1d31a175820b17781 100644 (file)
@@ -610,6 +610,166 @@ AtspiAccessible *window_tracker_top_window_get(WindowTrackerData *wtd)
        return _top_window_get(wtd);
 }
 
+static Eina_Bool _is_equal_window_to_root(WindowInfo *wi, AtspiAccessible *root)
+{
+       AtspiAccessibleDefaultLabelInfo *dli = atspi_accessible_get_default_label_info(wi->window, NULL);
+       Eina_Bool ret = EINA_FALSE;
+       if (dli) {
+               if (dli->obj) {
+                       if (atspi_accessible_is_equal(root, dli->obj)) {
+                               DEBUG("Found equal default label to root");
+                               ret = EINA_TRUE;
+                       }
+                       g_object_unref(dli->obj);
+               }
+
+               if (dli->attributes) {
+                       g_hash_table_unref(dli->attributes);
+               }
+
+               g_free(dli);
+       } else if (atspi_accessible_is_equal(root, wi->window)) {
+               DEBUG("Found equal window to root");
+               ret = EINA_TRUE;
+       }
+
+       return ret;
+}
+
+Eina_Bool _has_navigable_object_in_window(AtspiAccessible *window)
+{
+       Eina_Bool has_navigable = EINA_FALSE;
+       AtspiAccessible *ret = atspi_accessible_get_neighbor(window, NULL, ATSPI_NEIGHBOR_SEARCH_FORWARD, NULL);
+       if (ret) {
+               has_navigable = EINA_TRUE;
+               g_object_unref(ret);
+       }
+       return has_navigable;
+}
+
+Eina_Bool _is_next_valid_win(WindowInfo *wi, AtspiAccessible *current_root, AtspiAccessible *current_win, Eina_Bool *hit_current_win)
+{
+       DEBUG("START");
+       if (wi->window == current_win) {
+               if (hit_current_win) *hit_current_win = EINA_TRUE;
+       } else if (is_object_showing_and_not_defunct(wi->window, "root") == OBJECT_VALID
+               && _has_navigable_object_in_window(wi->window)) {
+               DEBUG("found valid next win");
+               return EINA_TRUE;
+       }
+       return EINA_FALSE;
+}
+
+typedef enum { WIN_SEARCH_FORWARD = 0, WIN_SEARCH_BACKWARD = 1 } win_search_direction;
+
+Eina_Iterator *_alloc_iterator_by_search_direction(WindowTrackerData *wtd, win_search_direction direction)
+{
+       if (direction == WIN_SEARCH_FORWARD) {
+               return eina_list_iterator_new(wtd->window_infos);
+       } else {
+               return eina_list_iterator_reversed_new(wtd->window_infos);
+       }
+}
+
+AtspiAccessible *_circular_search_next_valid_win(WindowTrackerData *wtd, AtspiAccessible *current_root, win_search_direction direction)
+{
+       AtspiAccessible *current_win = NULL;
+       AtspiAccessible *target_win = NULL;
+       WindowInfo *wi;
+       Eina_Iterator *iter;
+
+       // 1st loop:
+       //  First, search equal win from curren_root which will become the starting point.
+       //    Example: [1, 2, 3, 4, 5]  => 3 is current_win
+       //  From the current_win, iterate to the end of the list.
+       //    Example: [1, 2, 3, 4, 5]  => Return first valid win from 4, 5. If both are invalid, go to 2nd iteration.
+       iter = _alloc_iterator_by_search_direction(wtd, direction);
+       if (iter == NULL) {
+               ERROR("Unable allocate new iterator");
+               return NULL;
+       }
+
+       EINA_ITERATOR_FOREACH(iter, wi) {
+               if (!wi) continue;
+               if (current_win == NULL) {
+                       if (_is_equal_window_to_root(wi, current_root)) {
+                               current_win = wi->window;
+                       }
+               } else if (_is_next_valid_win(wi, current_root, current_win, NULL)) {
+                       target_win = wi->window;
+                       break;
+               }
+       }
+       eina_iterator_free(iter);
+
+       if (target_win) {
+               DEBUG("Returning next valid window from 1st iteration");
+               return target_win;
+       }
+
+       if (current_win == NULL) {
+               ERROR("Unable to find current window");
+               return NULL;
+       }
+
+
+       // 2nd loop:
+       //  If we didn't find a valid win from the first iteration, try searching from the first item of the list.
+       //    Example: [1, 2, 3, 4, 5]  => Return first valid win from 1, 2. If both are invalid, return NULL.
+       iter = _alloc_iterator_by_search_direction(wtd, direction);
+       if (iter == NULL) {
+               ERROR("Unable allocate new iterator");
+               return NULL;
+       }
+       EINA_ITERATOR_FOREACH(iter, wi) {
+               if (!wi) continue;
+               Eina_Bool hit_current_win = EINA_FALSE;
+               if (_is_next_valid_win(wi, current_root, current_win, &hit_current_win)) {
+                       target_win = wi->window;
+                       break;
+               }
+               if (hit_current_win) break;
+       }
+       eina_iterator_free(iter);
+
+       if (target_win) {
+               DEBUG("Returning next valid window from 2nd iteration");
+               return target_win;
+       }
+
+       DEBUG("Unable to find valid next window");
+       return NULL;
+}
+
+AtspiAccessible *_find_next_valid_win(WindowTrackerData *wtd, AtspiAccessible *current_root, win_search_direction direction)
+{
+       if (current_root == NULL) {
+               ERROR("passed root is NULL. Returing NULL");
+               return NULL;
+       }
+
+       int count = eina_list_count(wtd->window_infos);
+       DEBUG("window_count = %d", count);
+       if (count < 2) {
+               DEBUG("Only a single window exists in the list. Returning NULL");
+               return NULL;
+       }
+
+       return _circular_search_next_valid_win(wtd, current_root, direction);
+}
+
+AtspiAccessible *window_tracker_next_window_get(WindowTrackerData *wtd, AtspiAccessible *current_root)
+{
+       DEBUG("START");
+       return _find_next_valid_win(wtd, current_root, WIN_SEARCH_FORWARD);
+}
+
+AtspiAccessible *window_tracker_prev_window_get(WindowTrackerData *wtd, AtspiAccessible *current_root)
+{
+       DEBUG("START");
+       return _find_next_valid_win(wtd, current_root, WIN_SEARCH_BACKWARD);
+}
+
 void window_tracker_window_append(WindowTrackerData *wtd, AtspiAccessible *window, AtspiRole role)
 {
        _window_append(wtd, window, EINA_TRUE, EINA_FALSE, ACCESSIBLE_WINDOW_ACTIVATE_INFO_DEFAULT_LABEL_ENABLED);
index 6a806fee6e06930a3619ca0da587ce7a2e697dc6..dba4fb5a91567768e31ae6e1bb41cbfce5220886 100644 (file)
@@ -26,7 +26,7 @@ IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, At
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index c0f98d4b6a886a913ac23b541c645463e7f49188..10a19657dbc4e935bad0440cba13a725af47a995 100644 (file)
@@ -40,7 +40,7 @@ DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, Atsp
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index 2f76342c72671be0145fc43e41124dbf5dd6716b..1bf0946dfdf1224e7ce858e0698b15f3303a3103 100644 (file)
@@ -20,7 +20,7 @@ IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, At
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index b2ea3f0800030bbf4a524afb8be81c21eb1d2f13..bff92e7038721a7843c65327afb880aaf374b4c8 100644 (file)
@@ -29,7 +29,7 @@ DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, Atsp
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index a6d1b42578200adfc51ea889dd3f56cb0fe72007..7486dc6e69f4a34ceaa79c9cda6309a15b2ed3f7 100644 (file)
@@ -20,7 +20,7 @@ IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, At
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK2(mock_get_accuracy, get_accuracy, int(double, int));
index 3561c9a8cf952caf6801d2266ea7c18617417c9d..92b267d33c5674c95280396673b2e67dda66414f 100644 (file)
@@ -32,7 +32,7 @@ DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, Atsp
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK2(mock_get_accuracy, get_accuracy, int(double, int));
index 5a8a4f43b3ea803b809b71479b1e677147bf63b0..835c836715e99d8e9ad9f254e58459959ec47bf3 100644 (file)
@@ -17,7 +17,7 @@ IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, At
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index 355fa184d9a3009ef8fbb021b322302082329ed8..5fa64102a08eae55c3611ce4d49518af415c1a88 100644 (file)
@@ -30,7 +30,7 @@ DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, Atsp
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index 27cc9890b472b09ab6ab8c7a2bd284f791db5dcc..121f2620d541882252048cca80ad2a6088c9f6f7 100644 (file)
@@ -15,7 +15,7 @@ IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, At
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index af7c2fc77aa8b8f30afe22a824d95b31db629627..b3fa4fa23993d8250f335baf001cd1bc910e3660 100644 (file)
@@ -26,7 +26,7 @@ DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, Atsp
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index 8f7f3572037b4fcd777fffd9cbd3a260d5c4a5ef..7b6abcf6321b0c18778a56261647532513ac6909 100644 (file)
@@ -20,7 +20,7 @@ IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, At
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index 974141acb02035cd29dc76aa602103760c725847..f6acec00cb737ae054fd32837d03c3eba9d28cb5 100644 (file)
@@ -46,7 +46,7 @@ DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, Atsp
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index c927d58dbba6c3677d1c65c47e45a1e6db1c9922..d9e266b5191a5fbf58c73ba9a537a2f1d83b7afe 100644 (file)
@@ -81,7 +81,7 @@ IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, At
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index 53c9f6bc2f0e3a667cce4a2c4853133920f0afd4..86cb7ce3e39ed7e50d5814bcf8a38fb574d30bef 100644 (file)
@@ -161,7 +161,7 @@ DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, Atsp
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index 207fb045b2378d23c79e0371d9c53096236af45e..7594da0eaea92cea37f3e65ef19d37701633495f 100644 (file)
@@ -15,7 +15,7 @@ IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, At
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index e6897507c23b006503ed29d0404fc38c4cf0b122..fb1ab415cd48ec41f9117e6f9f7dee66c13ba00d 100644 (file)
@@ -26,7 +26,7 @@ DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, Atsp
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index 554724e5e8f4906cb0641e3bf871fe7c4df1b8be..fd1cfc6ce0604a6870f8394afb378e51e194493d 100644 (file)
@@ -17,7 +17,7 @@ IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, At
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK1(mock_free_shtd, free_shtd, void(SignalHandlingTimerData *));
index b2a79f7f50224b15ca3fdbc7a3d1c0140239262d..d298eac93f3b16efcec11737527347ce898b8dec 100644 (file)
@@ -32,7 +32,7 @@ DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, Atsp
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK1(mock_free_shtd, free_shtd, void(SignalHandlingTimerData *));
index c2278cf4ed30876ccc8721ceef2f94551ad2c84c..2aa9d415c3907591ef07fe4181ebbac2d5636ceb 100644 (file)
@@ -18,7 +18,7 @@ IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, At
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index 87c46bf554a3ac52acc1544294c45ca279420d5d..96600c85f77e3ccb2406ecad47c15da55b857515 100644 (file)
@@ -37,7 +37,7 @@ DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, Atsp
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index 5a2a3c574636b83e4f60179c6e33f490b32ffa72..63eb59e694b6e3b2ad720666537b2cb17132c7b9 100644 (file)
@@ -22,7 +22,7 @@ IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, At
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index bd73b26a20653b43463f86b631c8b7cffd337260..d756c54b98b67d41aef43549fc9c6b158c968858 100644 (file)
@@ -34,7 +34,7 @@ DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, Atsp
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index bc631ae37cb60553bc63792107575feedf7c555d..b5d0f34e800216454e9f11f8075ca090c40948f0 100644 (file)
@@ -15,7 +15,7 @@ IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, At
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index 5d8ad152c6b66264d316a3afe94f6745023341c3..8fafb8e136ec40b139e91ef247bc496ec4263caf 100644 (file)
@@ -29,7 +29,7 @@ DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, Atsp
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index e22f5a842596ba3dc23c50d518d79e8a2250ee71..4143016e4d085e628c75c80971935e46f92710e8 100644 (file)
@@ -17,7 +17,7 @@ IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, At
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 IMPLEMENT_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 IMPLEMENT_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));
index 875a102318cf019ea7715ec8ba197a2dbe2428fe..9a2804948323dd5c193d7400d37bcdbe797ed735 100644 (file)
@@ -26,7 +26,7 @@ DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_next, flat_navi_context_next, Atsp
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_prev, flat_navi_context_prev, AtspiAccessible *(FlatNaviContext *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_root_change, flat_navi_context_root_change, void(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK1(mock_flat_navi_context_root_get, flat_navi_context_root_get, AtspiAccessible *(FlatNaviContext *));
-DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, int(FlatNaviContext *, AtspiAccessible *));
+DECLARE_FUNCTION_MOCK2(mock_flat_navi_context_setup, flat_navi_context_setup, context_setup_result(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_get_object_in_relation, flat_navi_get_object_in_relation, AtspiAccessible *(AtspiAccessible *, AtspiRelationType));
 DECLARE_FUNCTION_MOCK2(mock_flat_navi_is_valid, flat_navi_is_valid, FlatNaviContextValidity(FlatNaviContext *, AtspiAccessible *));
 DECLARE_FUNCTION_MOCK3(mock_generate_what_to_read_and_speak, generate_what_to_read_and_speak, void(NavigatorData *, AtspiAccessible *, Eina_Bool));