focus: item focus moves by geometry

Desktop / Enlightenment / Elementary - Jaehwan Kim [samsung.com] - 12 August 2015 23:58 UTC

In the widget code, focus origin is added. It can know the focus movement is originated by which action. The widgets can choose the item focus moves to last focused item or geometrically nearby item by focus origin. In gengrid, focus moves to last focused item if focus origin is ELM_FOCUS_REVERT. It moves to nearby item if focus origin is from ELM_FOCUS_UP to ELM_FOCUS_LEFT.

TODO: widgets have items should add the direction feature if it want the focus to move to nearby item.

@feature

f6712f9 focus: item focus moves by geometry.
src/lib/elm_focus.h | 4 +++-
src/lib/elm_gengrid.c | 40 +++++++++++++++++++++++++++++++++++++++-
src/lib/elm_widget.c | 26 +++++++++++++++++++++++---
src/lib/elm_widget.eo | 5 +++++
src/lib/elm_widget.h | 4 ++++
src/lib/elm_win.c | 18 +++++++++++++++++-
6 files changed, 91 insertions(+), 6 deletions(-)

Upstream: git.enlightenment.org


  • Share