AtspiAccessible *flat_navi_context_line_first(FlatNaviContext *ctx);
/**
- * Advances to first line.
+ * Advances to last line.
*
* @param ctx FlatNaviContext
*
*/
AtspiAccessible *flat_navi_context_line_last(FlatNaviContext *ctx);
+/**
+ * Advances to the last element of the last line
+ *
+ * @param ctx FlatNaviContext
+ *
+ * @return AtspiAccessible* pointer to current object
+ *
+ * @note current element will be last of line
+ */
+AtspiAccessible *flat_navi_context_line_last_object_last(FlatNaviContext *ctx);
+
#endif /* end of include guard: FLAT_NAVI_H_ */
Eina_List *new = eina_list_next(ctx->current);
if (new)
+ {
ctx->current = new;
+ }
else
- return flat_navi_context_line_next(ctx);
+ {
+ AtspiAccessible *next = flat_navi_context_line_next(ctx);
+ if (next)
+ {
+ return next;
+ }
+ else
+ {
+ return flat_navi_context_line_first(ctx);
+ }
+ }
return eina_list_data_get(ctx->current);
}
ctx->current = new;
else
{
- if (!flat_navi_context_line_prev(ctx))
- return NULL;
+ if (!flat_navi_context_line_prev(ctx))
+ {
+ return flat_navi_context_line_last_object_last(ctx);
+ }
ctx->current = eina_list_last(eina_list_data_get(ctx->current_line));
}
return eina_list_data_get(ctx->current);
}
+
+AtspiAccessible *flat_navi_context_line_last_object_last(FlatNaviContext *ctx)
+{
+ Eina_List *new = eina_list_last(ctx->current_line);
+
+ ctx->current_line = new;
+ ctx->current = eina_list_last(eina_list_data_get(ctx->current_line));
+
+ return eina_list_data_get(ctx->current);
+}