woohyun pushed a commit to branch master.
commit 0a513a353a7bf5a9a6a00d6df3fc23494533bdcf
Author: WooHyun Jung <[email protected]>
Date: Mon Mar 11 17:03:21 2013 +0900
elementary/naviframe : Naviframe is now supporting focus_direction.
---
ChangeLog | 1 +
NEWS | 1 +
src/lib/elc_naviframe.c | 39 +++++++++++++++++++++++++++++++++++++++
3 files changed, 41 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index a6e9c3d..bcd73fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1140,3 +1140,4 @@
2013-03-11 WooHyun Jung
* Fixed a bug that naviframe's focus_next didn't work after changing
evenry item to elm_layout.
+ * Naviframe is now supproting .
diff --git a/NEWS b/NEWS
index 65dfc2e..0585e87 100644
--- a/NEWS
+++ b/NEWS
@@ -83,6 +83,7 @@ Improvements:
* Improve support on 64bits system.
* Improve gengrid item append performance.
* Naviframe works for H/W Back key event.
+ * Naviframe is now supproting focus_direction.
Fixes:
diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c
index 8d73b6c..537f776 100644
--- a/src/lib/elc_naviframe.c
+++ b/src/lib/elc_naviframe.c
@@ -1231,6 +1231,42 @@ _elm_naviframe_smart_focus_next(Eo *obj, void *_pd
EINA_UNUSED, va_list *list)
}
static void
+_elm_naviframe_smart_focus_direction_manager_is(Eo *obj EINA_UNUSED, void *_pd
EINA_UNUSED, va_list *list)
+{
+ Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+ *ret = EINA_TRUE;
+}
+
+static void
+_elm_naviframe_smart_focus_direction(Eo *obj EINA_UNUSED, void *_pd
EINA_UNUSED, va_list *list)
+{
+ Evas_Object *base = va_arg(*list, Evas_Object *);
+ double degree = va_arg(*list, double);
+ Evas_Object **direction = va_arg(*list, Evas_Object **);
+ double *weight = va_arg(*list, double *);
+ Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+ if (ret) *ret = EINA_FALSE;
+ Eina_Bool int_ret;
+
+ Eina_List *l = NULL;
+ Elm_Naviframe_Item *top_it;
+ void *(*list_data_get)(const Eina_List *list);
+
+ top_it = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj);
+ if (!top_it) return;
+
+ list_data_get = eina_list_data_get;
+
+ l = eina_list_append(l, VIEW(top_it));
+
+ int_ret = elm_widget_focus_list_direction_get
+ (obj, base, l, list_data_get, degree, direction, weight);
+
+ if (ret) *ret = int_ret;
+ eina_list_free(l);
+}
+
+static void
_elm_naviframe_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
{
Elm_Naviframe_Smart_Data *priv = _pd;
@@ -1996,6 +2032,9 @@ _class_constructor(Eo_Class *klass)
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS),
_elm_naviframe_smart_focus_next_manager_is),
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT),
_elm_naviframe_smart_focus_next),
+
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS),
_elm_naviframe_smart_focus_direction_manager_is),
+ EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION),
_elm_naviframe_smart_focus_direction),
+
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME),
_elm_naviframe_smart_theme),
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ACCESS),
_elm_naviframe_smart_access),
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_EVENT),
_elm_naviframe_smart_event),
--
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev