diff options
author | hyunho <hhstark.kang@samsung.com> | 2020-05-26 14:36:58 +0900 |
---|---|---|
committer | hyunho <hhstark.kang@samsung.com> | 2020-05-26 14:37:56 +0900 |
commit | 84cf55daa0d0f444cafe779ca44526dfca446ad4 (patch) | |
tree | 5359170c770b9474d11c46ddbca4f36ec960197f | |
parent | 30c46e667a0ddf43bb3607344aaece3de54208c2 (diff) | |
download | application-84cf55daa0d0f444cafe779ca44526dfca446ad4.tar.gz application-84cf55daa0d0f444cafe779ca44526dfca446ad4.tar.bz2 application-84cf55daa0d0f444cafe779ca44526dfca446ad4.zip |
Support ambient block tick state
Change-Id: Ieb0c8b9b108d75aeb487a9da2acc7485dce2ec4c
Signed-off-by: hyunho <hhstark.kang@samsung.com>
-rw-r--r-- | appcore_ui_app_ambient/include/ui_app_ambient.h | 14 | ||||
-rw-r--r-- | appcore_ui_app_ambient/src/ui_app_ambient.c | 2 |
2 files changed, 13 insertions, 3 deletions
diff --git a/appcore_ui_app_ambient/include/ui_app_ambient.h b/appcore_ui_app_ambient/include/ui_app_ambient.h index 4193eb6..70f44a9 100644 --- a/appcore_ui_app_ambient/include/ui_app_ambient.h +++ b/appcore_ui_app_ambient/include/ui_app_ambient.h @@ -47,6 +47,16 @@ typedef enum { } ui_app_ambient_event_e; /** + * @brief Enumeration for ambient state. + * @remark This function only for internal applications + */ +typedef enum { + UI_APP_AMBIENT_STATE_LEAVE, + UI_APP_AMBIENT_STATE_ENTER, + UI_APP_AMBIENT_STATE_BLOCK_TICK +} ui_app_ambient_state_e; + +/** * @brief Called with the period set with ui_app_ambient_set_update_period() if the device is in the ambient mode. * @remark This function only for internal applications * @param[in] user_data The user data to be passed to the callback functions @@ -58,12 +68,12 @@ typedef void (*ui_app_ambient_update_frame_cb) (void *user_data); /** * @brief Called when the device enters or exits the ambient mode. * @remark This function only for internal applications - * @param[in] ambient_mode Whether ambient mode is true or not + * @param[in] state The ambient mode * @param[in] data The extra bundle data from ambient viewer * @param[in] user_data The user data to be passed to the callback functions * @see ui_app_ambient_set_lifecycle() */ -typedef void (*ui_app_ambient_changed_cb) (bool ambient_mode, bundle *data, void *user_data); +typedef void (*ui_app_ambient_changed_cb) (ui_app_ambient_state_e state, bundle *data, void *user_data); /** * @brief The structure type containing the set of callback functions for application events handle. diff --git a/appcore_ui_app_ambient/src/ui_app_ambient.c b/appcore_ui_app_ambient/src/ui_app_ambient.c index efd8a7a..b256c26 100644 --- a/appcore_ui_app_ambient/src/ui_app_ambient.c +++ b/appcore_ui_app_ambient/src/ui_app_ambient.c @@ -212,7 +212,7 @@ int __on_change_signal(const char *endpoint, aul_app_com_result_e e, b = bundle_decode((bundle_raw *)extra, strlen(extra)); if (ambient_lifecycle.ambient_changed) - ambient_lifecycle.ambient_changed((bool)atoi(mode), b, user_data); + ambient_lifecycle.ambient_changed((ui_app_ambient_state_e)atoi(mode), b, user_data); if (b) bundle_free(b); |