aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_gengrid.c
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-05-11 22:42:45 +0900
committerDaniel Juyung Seo <juyung.seo@samsung.com>2014-05-11 22:46:16 +0900
commit45e8b4c82e2b0fcb0af6207654b2e4d56693f3f4 (patch)
tree7cd171235399912560fff048e0019ef52ae51ebb /legacy/elementary/src/bin/test_gengrid.c
parentRevert "remove all scrolling changes for focused items." (diff)
downloadefl-45e8b4c82e2b0fcb0af6207654b2e4d56693f3f4.tar.gz
focus: Change new API names related to focus auto scrolling.
elm_config_focus_auto_scroll_bring_in_enabled_get/set() -> elm_config_focus_autoscroll_mode_get/set() The main reason is that bring_in_enabled_get/set() APIs are too restricted and thus not flexible. I got more requirements for the focus autoscrolling such as none, wholely visible not just bring_in and show. So it is correct to add mode_set/get() APIs for the focus auto scrolling. Thanks god, we've found this before the release :) @feature
Diffstat (limited to 'legacy/elementary/src/bin/test_gengrid.c')
-rw-r--r--legacy/elementary/src/bin/test_gengrid.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/legacy/elementary/src/bin/test_gengrid.c b/legacy/elementary/src/bin/test_gengrid.c
index 784bfa9658..5d58b5b795 100644
--- a/legacy/elementary/src/bin/test_gengrid.c
+++ b/legacy/elementary/src/bin/test_gengrid.c
@@ -5,6 +5,8 @@
#endif
#include <Elementary.h>
+Evas_Object * _focus_autoscroll_mode_frame_create(Evas_Object *parent);
+
static Elm_Gengrid_Item_Class *gic, *ggic;
Evas_Object *grid_content_get(void *data, Evas_Object *obj, const char *part);
@@ -1391,14 +1393,6 @@ _gg_focus_focus_animate_changed_cb(void *data,
}
static void
-_gg_focus_bring_in_changed_cb(void *data EINA_UNUSED,
- Evas_Object *obj,
- void *event_info EINA_UNUSED)
-{
- elm_config_focus_auto_scroll_bring_in_enabled_set(elm_check_state_get(obj));
-}
-
-static void
_grid_reorder_mode(void *data, Evas_Object *obj,
void *event_info EINA_UNUSED)
{
@@ -1532,15 +1526,6 @@ test_gengrid_focus(void *data EINA_UNUSED,
evas_object_show(ck);
ck = elm_check_add(bx_opt);
- elm_object_text_set(ck, "Focus Auto scroll bring in enable");
- evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
- evas_object_smart_callback_add(ck, "changed", _gg_focus_bring_in_changed_cb,
- NULL);
- elm_check_state_set(ck, elm_config_focus_auto_scroll_bring_in_enabled_get());
- elm_box_pack_end(bx_opt, ck);
- evas_object_show(ck);
-
- ck = elm_check_add(bx_opt);
elm_object_text_set(ck, "Item Select on Focus disable");
elm_check_state_set(ck, elm_config_item_select_on_focus_disabled_get());
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
@@ -1550,6 +1535,10 @@ test_gengrid_focus(void *data EINA_UNUSED,
elm_box_pack_end(bx_opt, ck);
evas_object_show(ck);
+ // Focus Autoscroll Mode
+ fr = _focus_autoscroll_mode_frame_create(bx);
+ elm_box_pack_end(bx, fr);
+
//Focus movement policy
fr = elm_frame_add(bx);
elm_object_text_set(fr, "Focus Movement Policy");