From 651f22369b11d37c46a7a50bbd75d44b3b3daf24 Mon Sep 17 00:00:00 2001 From: seoz Date: Fri, 17 Feb 2012 05:28:55 +0000 Subject: [PATCH] elm test_actionslider.c: Cover more APIs. Patch by Shinwoo Kim On Thu, Feb 16, 2012 at 10:20 AM, cnook wrote: Dear All, Hello~ As you guess, the patch is for the elementary_test. Please review the patch and give any feedbacks. The test_actionslider patch is mainly for elm_actionslider_xxx_get() APIs. It would not be a good idea to add test code for such APIs. So I have planed to add test code except elm_xxx_get() APIs Sincerely, Shinwoo Kim. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68054 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/bin/test_actionslider.c | 58 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/src/bin/test_actionslider.c b/src/bin/test_actionslider.c index 53213ce..bdaf5d1 100644 --- a/src/bin/test_actionslider.c +++ b/src/bin/test_actionslider.c @@ -6,8 +6,66 @@ static void _pos_selected_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info) { + Elm_Actionslider_Pos ipos, mpos, epos; + printf("Selection: %s\n", (char *)event_info); printf("Label selected: %s\n", elm_actionslider_selected_label_get(obj)); + + ipos = elm_actionslider_indicator_pos_get(obj); + + switch (ipos) + { + case ELM_ACTIONSLIDER_NONE: + printf("actionslider indicator pos: none!\n"); + break; + case ELM_ACTIONSLIDER_LEFT: + printf("actionslider indicator pos: left!\n"); + break; + case ELM_ACTIONSLIDER_CENTER: + printf("actionslider indicator pos: center!\n"); + break; + case ELM_ACTIONSLIDER_RIGHT: + printf("actionslider indicator pos: right!\n"); + break; + case ELM_ACTIONSLIDER_ALL: + printf("actionslider indicator pos: all!\n"); + break; + } + + mpos = elm_actionslider_magnet_pos_get(obj); + + switch (mpos) + { + case ELM_ACTIONSLIDER_NONE: + printf("actionslider magnet pos: none!\n"); + break; + case ELM_ACTIONSLIDER_LEFT: + printf("actionslider magnet pos: left!\n"); + break; + case ELM_ACTIONSLIDER_CENTER: + printf("actionslider magnet pos: center!\n"); + break; + case ELM_ACTIONSLIDER_RIGHT: + printf("actionslider magnet pos: right!\n"); + break; + case ELM_ACTIONSLIDER_ALL: + printf("actionslider magnet pos: all!\n"); + break; + } + + epos = elm_actionslider_enabled_pos_get(obj); + + if (epos) + { + printf("actionslider enabled pos: "); + if (epos & ELM_ACTIONSLIDER_LEFT) + printf("left "); + if (epos & ELM_ACTIONSLIDER_CENTER) + printf("center "); + if (epos & ELM_ACTIONSLIDER_RIGHT) + printf("right "); + printf("\n"); + } } static void -- 2.7.4