summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoon87.park <moon87.park@samsung.com>2017-10-12 09:54:02 +0900
committerchulseung kim <charles0.kim@samsung.com>2017-11-23 05:30:24 +0000
commit3beeced85915181b4e9f53fa62053ea4134b812c (patch)
tree603a7e3293c79090fad50bdf9fd494389dd004ff
parent354ee3efc52bf626577f30177cc63a160516bb36 (diff)
downloadw-clock-viewer-3beeced85915181b4e9f53fa62053ea4134b812c.tar.gz
w-clock-viewer-3beeced85915181b4e9f53fa62053ea4134b812c.tar.bz2
w-clock-viewer-3beeced85915181b4e9f53fa62053ea4134b812c.zip
Change-Id: I67d84a8b1f75e9b9136e9a62b4661cd85efe21c8 (cherry picked from commit 79314a7db3f1552433bd31bc8597e3097965097f)
-rw-r--r--default-clock/src/analog.c69
1 files changed, 34 insertions, 35 deletions
diff --git a/default-clock/src/analog.c b/default-clock/src/analog.c
index b77cfe3..609dab1 100644
--- a/default-clock/src/analog.c
+++ b/default-clock/src/analog.c
@@ -61,13 +61,13 @@ static int alpm_module_init(void *module_ops, void *data)
return -1;
}
- if(!data) {
+ if (!data) {
_E("data is NULL!!");
return -1;
}
alpm_md = ops->modules.priv;
- if(!alpm_md) {
+ if (!alpm_md) {
_E("alpm_md is NULL!");
return -1;
}
@@ -123,7 +123,7 @@ static int alpm_module_deinit(void *module_ops, void *data)
}
alpm_md = ops->modules.priv;
- if(!alpm_md) {
+ if (!alpm_md) {
_E("alpm_md is NULL!");
return -1;
}
@@ -143,7 +143,7 @@ static int alpm_module_deinit(void *module_ops, void *data)
alpm_md = NULL;
}
- return 1;
+ return 1;
}
static double __get_hour_degree()
@@ -171,7 +171,7 @@ static double __get_minute_degree()
return 0.0f;
}
- return tm_now.tm_min * 360 / 60;
+ return (double)(tm_now.tm_min * 360 / (float)60);
}
static Evas_Object* __create_hour_hand(Evas_Object* parent)
@@ -215,8 +215,7 @@ static void _set_analog(void *data)
{
alpm_module_data *alpm_md = (alpm_module_data *)data;
- if (alpm_md->ly_clock != NULL)
- {
+ if (alpm_md->ly_clock != NULL) {
evas_object_del(alpm_md->ly_clock);
alpm_md->ly_clock = NULL;
}
@@ -274,22 +273,22 @@ static int alpm_module_update_clock(void *module_ops, void *data)
*/
ALPM_CLOCK_PLUGIN_EXPORT_API int ALPM_CLOCK_PLUGIN_MODULE_INIT(alpm_clock_plugin_module_ops *ops)
{
- alpm_module_data *alpm_md;
+ alpm_module_data *alpm_md;
- _D("ALPM_CLOCK_PLUGIN_MODULE INIT!!");
- if( !ops )
- return -1;
+ _D("ALPM_CLOCK_PLUGIN_MODULE INIT!!");
+ if (!ops)
+ return -1;
- alpm_md = calloc(1, sizeof(alpm_module_data));
- if( !alpm_md )
- return -1;
+ alpm_md = calloc(1, sizeof(alpm_module_data));
+ if (!alpm_md)
+ return -1;
- ops->modules.ui_runtime_plugin_init = alpm_module_init;
- ops->modules.ui_runtime_plugin_deinit = alpm_module_deinit;
- ops->modules.ui_runtime_plugin_update_clock = alpm_module_update_clock;
- ops->modules.priv = alpm_md;
+ ops->modules.ui_runtime_plugin_init = alpm_module_init;
+ ops->modules.ui_runtime_plugin_deinit = alpm_module_deinit;
+ ops->modules.ui_runtime_plugin_update_clock = alpm_module_update_clock;
+ ops->modules.priv = alpm_md;
- return 1;
+ return 1;
}
/**
@@ -299,17 +298,17 @@ ALPM_CLOCK_PLUGIN_EXPORT_API int ALPM_CLOCK_PLUGIN_MODULE_INIT(alpm_clock_plugin
*/
ALPM_CLOCK_PLUGIN_EXPORT_API int ALPM_CLOCK_PLUGIN_MODULE_EXIT(alpm_clock_plugin_module_ops *ops)
{
- alpm_module_data *alpm_md;
+ alpm_module_data *alpm_md;
- _D("ALPM_CLOCK_PLUGIN_MODULE EXIT!!");
- if( !ops )
- return -1;
+ _D("ALPM_CLOCK_PLUGIN_MODULE EXIT!!");
+ if (!ops)
+ return -1;
- alpm_md = ops->modules.priv;
- if( alpm_md )
- free(alpm_md);
+ alpm_md = ops->modules.priv;
+ if (alpm_md)
+ free(alpm_md);
- return 1;
+ return 1;
}
/**
@@ -319,15 +318,15 @@ ALPM_CLOCK_PLUGIN_EXPORT_API int ALPM_CLOCK_PLUGIN_MODULE_EXIT(alpm_clock_plugin
*/
ALPM_CLOCK_PLUGIN_EXPORT_API int ALPM_CLOCK_PLUGIN_MODULE_LOCALE_UPDATE(alpm_clock_plugin_module_ops *ops)
{
- alpm_module_data *alpm_md;
+ alpm_module_data *alpm_md;
- _D("ALPM_CLOCK_PLUGIN_MODULE_LOCALE_UPDATE!!");
- if( !ops )
- return -1;
+ _D("ALPM_CLOCK_PLUGIN_MODULE_LOCALE_UPDATE!!");
+ if (!ops)
+ return -1;
- alpm_md = ops->modules.priv;
- if( !alpm_md )
- return -1;
+ alpm_md = ops->modules.priv;
+ if (!alpm_md)
+ return -1;
- return 1;
+ return 1;
}