From: Hyojung Jo Date: Thu, 3 Sep 2015 07:29:09 +0000 (+0900) Subject: Hide action menu view when app is paused X-Git-Tag: accepted/tizen/tv/20150903.111011^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=12bc19146da33b5e64df281969935178e873898d;p=profile%2Ftv%2Fapps%2Fnative%2Fair_favorite.git Hide action menu view when app is paused Change-Id: Ia8451e30ea001f1aac85a45f82aad95cde3130ec Signed-off-by: Hyojung Jo --- diff --git a/src/main.c b/src/main.c index 6fd76e9..9330e02 100644 --- a/src/main.c +++ b/src/main.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -126,6 +127,26 @@ static void _app_control(app_control_h control, void *data) _ERR("Push view failed."); } +static void _pause(void *data) +{ + view_state state; + + state = viewmgr_get_view_state(VIEW_ACTION_MENU); + if (state == VIEW_STATE_VISIBLE) + viewmgr_hide_view(VIEW_ACTION_MENU); + + state = viewmgr_get_view_state(VIEW_PIN); + if (state == VIEW_STATE_VISIBLE) + viewmgr_hide_view(VIEW_PIN); + + inputmgr_enable(EINA_FALSE); +} + +static void _resume(void *data) +{ + inputmgr_enable(EINA_TRUE); +} + int main(int argc, char *argv[]) { struct _appdata ad; @@ -133,6 +154,8 @@ int main(int argc, char *argv[]) .create = _create, .terminate = _terminate, .app_control = _app_control, + .pause = _pause, + .resume = _resume, }; memset(&ad, 0x00, sizeof(ad));