diff options
author | Minkyu Kang <mk7.kang@samsung.com> | 2015-10-01 13:41:53 +0900 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2015-10-01 13:41:53 +0900 |
commit | e425d0585f2e56bdc9fa78c50227fd9c945bd970 (patch) | |
tree | 6590535d74e3dbf3f28ec7a2dfd6e4d1dcdcc2d8 /src/util/util.c | |
parent | 42643ae109ad310f9b356d996be1247aaefaa85d (diff) | |
download | air_mediahub-e425d0585f2e56bdc9fa78c50227fd9c945bd970.tar.gz air_mediahub-e425d0585f2e56bdc9fa78c50227fd9c945bd970.tar.bz2 air_mediahub-e425d0585f2e56bdc9fa78c50227fd9c945bd970.zip |
action_menu: scrolls the whole area of action menu
Change-Id: I4cbd1d0f47c7d9c8d7f80813e3406c1a5dd65e33
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'src/util/util.c')
-rw-r--r-- | src/util/util.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/util/util.c b/src/util/util.c index 3e9c86d..c698a3d 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -16,6 +16,7 @@ #include <stdbool.h> #include <Elementary.h> +#include <app_control.h> #include <app_debug.h> #include <app_contents.h> @@ -33,6 +34,52 @@ bool util_check_movie_type(const char *str) return strcmp(str, VIDEO_COPYRIGHT); } +bool util_launch_request(const char *appid, const char *key, const char *value) +{ + app_control_h app_ctrl; + int r; + + r = app_control_create(&app_ctrl); + if (r != APP_CONTROL_ERROR_NONE) { + _ERR("failed to create app control handle"); + return false; + } + + r = app_control_set_operation(app_ctrl, APP_CONTROL_OPERATION_DEFAULT); + if (r != APP_CONTROL_ERROR_NONE) { + _ERR("failed to set app control operation"); + app_control_destroy(app_ctrl); + return false; + } + + if (key && value) { + r = app_control_add_extra_data(app_ctrl, key, value); + if (r != APP_CONTROL_ERROR_NONE) { + _ERR("failed to add extra data"); + app_control_destroy(app_ctrl); + return false; + } + } + + r = app_control_set_app_id(app_ctrl, appid); + if (r != APP_CONTROL_ERROR_NONE) { + _ERR("failed to set app control app id"); + app_control_destroy(app_ctrl); + return false; + } + + r = app_control_send_launch_request(app_ctrl, NULL, NULL); + if (r != APP_CONTROL_ERROR_NONE) { + _ERR("failed to send app control launch request"); + app_control_destroy(app_ctrl); + return false; + } + + app_control_destroy(app_ctrl); + + return true; +} + Evas_Object *util_add_button(Evas_Object *base, const char *style, const char *text) { |