#ifndef VCONFKEY_INDICATOR_STARTED
#define VCONFKEY_INDICATOR_STARTED "memory/private/"PACKAGE_NAME"/started"
#endif
+#define VCONFKEY_APPTRAY_STATE "file/private/com.samsung.app-tray/is_top"
+
+#define VCONFKEY_BATTERY_DISP_STATE "memory/private/"PACKAGE_NAME"/battery_disp"
#define _FIXED_COUNT 5
INDICATOR_PRIORITY_FIXED_MAX = INDICATOR_PRIORITY_FIXED6,
INDICATOR_PRIORITY_SYSTEM_MIN,
- INDICATOR_PRIORITY_SYSTEM_6 = INDICATOR_PRIORITY_SYSTEM_MIN,
+ INDICATOR_PRIORITY_SYSTEM_7 = INDICATOR_PRIORITY_SYSTEM_MIN,
+ INDICATOR_PRIORITY_SYSTEM_6,
INDICATOR_PRIORITY_SYSTEM_5,
INDICATOR_PRIORITY_SYSTEM_4,
INDICATOR_PRIORITY_SYSTEM_3,
int (*lang_changed) (void *);
int (*region_changed) (void *);
int (*minictrl_control) (int, const char *, void *);
+ int (*wake_up) (void *);
- char data[1024];
void *ad;
Eina_Bool obj_exist;
Text_Icon_Info txt_obj;
#include "indicator_icon_list.h"
#include "indicator_ui.h"
#include "indicator_gui.h"
+#include "indicator_util.h"
#include <vconf.h>
#define DEFAULT_SIZE (CLOCK_WIDTH + (PADDING_WIDTH * 2))
Eina_List *_view_system_list[INDICATOR_WIN_MAX];
Eina_List *_view_noti_list[INDICATOR_WIN_MAX];
-extern int indicator_icon_show_state;
+extern int indicator_icon_show_state[INDICATOR_WIN_MAX];
static Evas_Object *indicator_box_add(Evas_Object * parent)
{
int root_w, root_h;
Ecore_X_Window xwin, root;
- retif(win == NULL, NULL, "Invalid parameter!");
+ retif(win == NULL, , "Invalid parameter!");
INFO("_update_window");
Eina_List *l;
int i = 0;
- retif(win == NULL, NULL, "Invalid parameter!");
+ retif(win == NULL, , "Invalid parameter!");
for (i = 0; i < _FIXED_COUNT; ++i)
elm_box_unpack_all(win->_fixed_box[i]);
void indicator_util_update_display(win_info *win)
{
- retif(win == NULL, FAIL, "Invalid parameter!");
+ retif(win == NULL, , "Invalid parameter!");
_update_window(win);
return 0;
}
-void indicator_util_show_hide_icons(void* data,int bShow)
+static void indicator_util_icon_state(int win_type, int bShow)
{
- struct appdata *ad = (struct appdata *)data;
- Indicator_Icon_Object *icon;
- Eina_List *l;
+ DBG("win_type(%d) Show(%d)",win_type,bShow);
+ indicator_icon_show_state[win_type] = bShow;
+}
+
+void indicator_util_show_hide_icons(void* data,int bShow, int bEffect)
+{
+ win_info *win = (win_info *)data;
+ Ecore_Evas *ee_port;
retif(data == NULL, , "Invalid parameter!");
- int i = 0;
+ if(bShow)
+ {
+ indicator_util_icon_state(win->type,1);
+ }
+ else
+ {
+ indicator_util_icon_state(win->type,0);
+ }
- DBG("Show = %d",bShow);
- if(bShow)
+ ee_port = ecore_evas_ecore_evas_get(evas_object_evas_get(win->win_main));
+
+ if(win->type == INDICATOR_WIN_LAND)
{
- indicator_clock_display_battery_percentage(data);
+ DBG("land = %d",bShow);
+ if(bShow==FALSE)
+ {
+ int mode = 2;
+ int bRepeat = 1;
+ ecore_evas_msg_send(ee_port, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_REPEAT_EVENT, &bRepeat, sizeof(int));
+ ecore_evas_msg_send(ee_port, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_TYPE, &mode, sizeof(int));
+ }
+ else
+ {
+ int mode = 1;
+ int bRepeat = 0;
+ ecore_evas_msg_send(ee_port, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_REPEAT_EVENT, &bRepeat, sizeof(int));
+ ecore_evas_msg_send(ee_port, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_TYPE, &mode, sizeof(int));
+ }
+ }
+ else
+ {
+ DBG("port = %d",bShow);
+ int mode = 1;
+ int bRepeat = 0;
+ ecore_evas_msg_send(ee_port, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_REPEAT_EVENT, &bRepeat, sizeof(int));
+ ecore_evas_msg_send(ee_port, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_TYPE, &mode, sizeof(int));
}
- if(bShow)
+ if(bEffect)
{
- indicator_signal_emit(data,"indicator.noti.show", "indicator.prog");
+ if(bShow)
+ {
+ indicator_signal_emit_by_win(data,"indicator.clip.show", "indicator.prog");
+ indicator_signal_emit_by_win(data,"indicator.noti.show", "indicator.prog");
+ }
+ else
+ {
+ indicator_signal_emit_by_win(data,"indicator.clip.hide", "indicator.prog");
+ indicator_signal_emit_by_win(data,"indicator.noti.hide", "indicator.prog");
+ }
}
else
{
- indicator_signal_emit(data,"indicator.noti.hide", "indicator.prog");
+ if(bShow)
+ {
+ indicator_signal_emit_by_win(data,"indicator.clip.show.noeffect", "indicator.prog");
+ indicator_signal_emit_by_win(data,"indicator.noti.show.noeffect", "indicator.prog");
+ }
+ else
+ {
+ indicator_signal_emit_by_win(data,"indicator.clip.hide.noeffect", "indicator.prog");
+ indicator_signal_emit_by_win(data,"indicator.noti.hide.noeffect", "indicator.prog");
+ }
}
}
-
Eina_Bool indicator_util_is_show_icon(Indicator_Icon_Object *obj)
{
retif(obj == NULL, FAIL, "Invalid parameter!");
extern int indicator_util_get_priority_in_move_area(win_info *win, Evas_Coord, Evas_Coord);
int indicator_util_check_indicator_area(win_info *win,Evas_Coord curr_x, Evas_Coord curr_y);
int indicator_util_check_home_icon_area(win_info *win,Evas_Coord curr_x, Evas_Coord curr_y);
-void indicator_util_show_hide_icons(void* data, int bShow);
+void indicator_util_show_hide_icons(void* data, int bShow, int bEffect);
extern Eina_Bool indicator_util_is_show_icon(Indicator_Icon_Object *obj);
int indicator_util_handle_animated_gif(Indicator_Icon_Object *icon);
#include "indicator_gui.h"
#include "indicator_util.h"
+static unsigned int update_icon_flag = 1;
+
static void _animation_set(Indicator_Icon_Object *icon, int type)
{
Evas_Object *img_edje, *txt_edje;
retif(icon == NULL, , "Invalid parameter!");
- memset(icon->data, 0x00, sizeof(icon->data));
icon->wish_to_show = EINA_FALSE;
DBG("%s icon is hidden!", icon->name);
void indicator_util_event_count_set(int count, void *data)
{
- struct appdata *ad = data;
static int _cnt = -1;
char buf[1024];
{
return indicator_get_max_count_in_non_fixed_list(type);
}
+
+unsigned int indicator_util_get_update_flag(void)
+{
+ return update_icon_flag;
+}
+
+void indicator_util_set_update_flag(unsigned int val)
+{
+ INFO("SET UPDATE FLAG %d",val);
+ update_icon_flag = val;
+}
extern void indicator_util_event_count_set(int count, void *data);
extern unsigned int indicator_util_max_visible_event_count(int type);
+extern unsigned int indicator_util_get_update_flag(void);
+void indicator_util_set_update_flag(unsigned int val);
+
#endif /*__INDICATOR_ICON_UTIL_H__*/
#endif
#endif
+#define MENUSCREEN_PKG_NAME "com.samsung.menuscreen"
#define APP_TRAY_PKG_NAME "com.samsung.app-tray"
static Eina_Bool home_button_pressed = EINA_FALSE;
-static Eina_Bool show_hide_pressed = EINA_FALSE;
+static Eina_Bool show_hide_pressed[INDICATOR_WIN_MAX] = {EINA_FALSE,EINA_FALSE};
+static Ecore_Timer *hide_timer = NULL;
+int indicator_icon_show_state[INDICATOR_WIN_MAX] = {0,};
+int indicator_icon_backup_state[INDICATOR_WIN_MAX] = {0,};
-int indicator_icon_show_state = 0;
+static int is_quickpanel_opened = 0;
+static int is_apptray_opened = 0;
+static int current_angle = 0;
+Evas_Coord_Point indicator_press_coord = {0,0};
+
+#define STR_ATOM_MV_INDICATOR_GEOMETRY "_E_MOVE_INDICATOR_GEOMETRY"
static void _change_home_padding(void *data, int angle);
static void _change_nonfixed_icon_padding(void *data, Eina_Bool status);
void *event);
-static void _change_home_padding(void *data, int angle)
-{
- struct appdata *ad = (struct appdata *)data;
-
- retif(data == NULL, , "Invalid parameter!");
-
- switch (angle) {
- case 0:
- indicator_signal_emit(data,
- "change,home,pad,2", "elm.rect.*");
- break;
- case 90:
- indicator_signal_emit(data,
- "change,home,pad,1", "elm.rect.*");
- break;
- case 180:
- indicator_signal_emit(data,
- "change,home,pad,2", "elm.rect.*");
- break;
- case 270:
- indicator_signal_emit(data,
- "change,home,pad,1", "elm.rect.*");
- break;
- default:
- indicator_signal_emit(data,
- "change,home,pad,2", "elm.rect.*");
- break;
- }
-}
static void _change_nonfixed_icon_padding(void *data, Eina_Bool status)
{
- struct appdata *ad = (struct appdata *)data;
-
retif(data == NULL, , "Invalid parameter!");
if (status == EINA_TRUE)
static void _indicator_notify_pm_state_cb(keynode_t * node, void *data)
{
- struct appdata *ad = (struct appdata *)data;
int val = -1;
if (data == NULL) {
DBG("PM state Notification!!(%d)",val);
- indicator_util_update_display(data);
+ switch(val)
+ {
+ case VCONFKEY_PM_STATE_LCDOFF:
+ case VCONFKEY_PM_STATE_SLEEP:
+ indicator_util_set_update_flag(0);
+ break;
+ case VCONFKEY_PM_STATE_NORMAL:
+ indicator_util_set_update_flag(1);
+ indicator_wake_up_modules(data);
+ break;
+ case VCONFKEY_PM_STATE_LCDDIM:
+ default:
+ break;
+ }
+
+}
+
+static void _indicator_notify_apptray_state_cb(keynode_t * node, void *data)
+{
+
+ struct appdata *ad = (struct appdata *)data;
+ int val = -1;
+
+ if (data == NULL) {
+ ERR("lockd is NULL");
+ return;
+ }
+
+ if (vconf_get_bool(VCONFKEY_APPTRAY_STATE, &val) < 0) {
+ ERR("Cannot get VCONFKEY_APPTRAY_STATE");
+ return;
+ }
+
+ DBG("_indicator_notify_apptray_state_cb!!(%d)",val);
+
+ switch(val)
+ {
+ case 0:
+ is_apptray_opened = 0;
+ indicator_util_show_hide_icons(&(ad->win[INDICATOR_WIN_LAND]),0,0);
+ if (hide_timer != NULL) {
+ ecore_timer_del(hide_timer);
+ hide_timer = NULL;
+ }
+ break;
+ case 1:
+ is_apptray_opened = 1;
+ indicator_util_show_hide_icons(&(ad->win[INDICATOR_WIN_LAND]),1,0);
+ if (hide_timer != NULL) {
+ ecore_timer_del(hide_timer);
+ hide_timer = NULL;
+ }
+ break;
+ default:
+ break;
+ }
}
static void _rotate_window(void *data, int new_angle)
{
+ retif(data == NULL, , "Invalid parameter!");
+
+ struct appdata *ad = (struct appdata *)data;
+
+ DBG("_rotate_window = %d",new_angle);
+
+ current_angle = new_angle;
+ switch (new_angle)
+ {
+ case 0:
+ case 180:
+ {
+ int mode = 1;
+ int bRepeat = 0;
+ Ecore_Evas *ee_port;
+ ee_port = ecore_evas_ecore_evas_get(evas_object_evas_get(ad->win[INDICATOR_WIN_PORT].win_main));
+ ecore_evas_msg_send(ee_port, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_REPEAT_EVENT, &bRepeat, sizeof(int));
+ ecore_evas_msg_send(ee_port, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_TYPE, &mode, sizeof(int));
+
+ }
+ break;
+ case 90:
+ case 270:
+ if(is_quickpanel_opened == 0&&is_apptray_opened==0)
+ {
+ DBG("hide indicator = %d %d",is_quickpanel_opened,is_apptray_opened);
+ indicator_util_show_hide_icons(&(ad->win[INDICATOR_WIN_LAND]),0,0);
+ if (hide_timer != NULL) {
+ ecore_timer_del(hide_timer);
+ hide_timer = NULL;
+ }
+ }
+ break;
+ default:
+ break;
+ }
}
#ifdef INDICATOR_SUPPORT_OPACITY_MODE
DBG("send signal [%s] to indicator layout", signal);
}
-static void _notification_panel_changed(void *data, int is_open)
+static void _indicator_quickpanel_changed(void *data, int is_open)
{
struct appdata *ad = NULL;
+
retif(data == NULL, , "Invalid parameter!");
+ DBG("_indicator_quickpanel_changed %d %d\n", is_open, current_angle);
+
ad = data;
- if (is_open) {
- indicator_signal_emit(data,"bg.notification", "indicator.prog");
+ if (is_open)
+ {
+ if(is_quickpanel_opened==0)
+ {
+ is_quickpanel_opened = 1;
- DBG("send signal [%s] to indicator layout", "bg.notification");
+ if( current_angle==0 || current_angle == 180)
+ {
+ if(indicator_icon_backup_state[INDICATOR_WIN_PORT]==0)
+ {
+ indicator_util_show_hide_icons(&(ad->win[INDICATOR_WIN_PORT]),1,1);
+ }
+ else
+ {
+ indicator_util_show_hide_icons(&(ad->win[INDICATOR_WIN_PORT]),1,0);
+ }
+ indicator_util_show_hide_icons(&(ad->win[INDICATOR_WIN_LAND]),1,0);
+ }
+ else
+ {
+ indicator_util_show_hide_icons(&(ad->win[INDICATOR_WIN_LAND]),1,0);
+ }
+
+ vconf_set_int(VCONFKEY_BATTERY_DISP_STATE,2);
+
+ if (hide_timer != NULL) {
+ ecore_timer_del(hide_timer);
+ hide_timer = NULL;
+ }
+ }
}
else
- _change_opacity(data, ad->opacity_mode);
-}
+ {
+ if(is_quickpanel_opened==1)
+ {
+ is_quickpanel_opened = 0;
+ if( current_angle==0 || current_angle == 180)
+ {
+ if(indicator_icon_backup_state[INDICATOR_WIN_PORT]==0)
+ indicator_util_show_hide_icons(&(ad->win[INDICATOR_WIN_PORT]),0,1);
+ else
+ indicator_util_show_hide_icons(&(ad->win[INDICATOR_WIN_PORT]),1,0);
+
+ indicator_util_show_hide_icons(&(ad->win[INDICATOR_WIN_LAND]),0,0);
+ }
+ else
+ {
+ indicator_util_show_hide_icons(&(ad->win[INDICATOR_WIN_LAND]),0,1);
+ }
+
+ }
+ }
+}
#endif
static Eina_Bool _indicator_client_message_cb(void *data, int type, void *event)
{
Ecore_X_Event_Client_Message *ev =
(Ecore_X_Event_Client_Message *) event;
- int new_angle;
retif(data == NULL
|| event == NULL, ECORE_CALLBACK_RENEW, "Invalid parameter!");
-#ifdef INDICATOR_SUPPORT_OPACITY_MODE
- if (ev->message_type == ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE) {
- int trans_mode;
-
- if (ev->data.l[0]
- == ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT)
- trans_mode = INDICATOR_OPACITY_TRANSLUCENT;
- else if (ev->data.l[0]
- == ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT)
- trans_mode = INDICATOR_OPACITY_TRANSPARENT;
- else
- trans_mode = INDICATOR_OPACITY_OPAQUE;
-
- _change_opacity(data, trans_mode);
- }
-#endif
if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE) {
-#ifdef INDICATOR_SUPPORT_OPACITY_MODE
if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON)
- _notification_panel_changed(data, 1);
+ _indicator_quickpanel_changed(data, 1);
else if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF)
- _notification_panel_changed(data, 0);
+ _indicator_quickpanel_changed(data, 0);
-#else
- if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF)
- _change_view(ecore_x_window_root_first_get(), data);
-#endif
}
- if (ev->message_type == ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE) {
- }
return ECORE_CALLBACK_RENEW;
}
indicator_minictrl_control_modules(action,name,data);
}
+static void
+_indicator_ecore_evas_msg_parent_handle(Ecore_Evas *ee, int msg_domain, int msg_id, void *data, int size)
+{
+ DBG("Receive msg from clien msg_domain=%x msg_id=%x size=%d\n", msg_domain, msg_id, size);
+ retif(!data, , "data is NULL");
+
+ if (msg_domain == MSG_DOMAIN_CONTROL_INDICATOR)
+ {
+ struct appdata *ad = (struct appdata *)ecore_evas_data_get(ee,"indicator_app_data");
+
+ if ((msg_id == MSG_ID_INDICATOR_ROTATION) && (size == sizeof(int)))
+ {
+ int *rot = data;
+ DBG("Receive msg is portrait rotation . rot=%d \n", *rot);
+ _rotate_window(ad,*rot);
+ }
+ if ((msg_id == MSG_ID_INDICATOR_OPACITY) && (size == sizeof(Elm_Win_Indicator_Opacity_Mode)))
+ {
+ Elm_Win_Indicator_Opacity_Mode *omod;
+ int trans_mode;
+ omod = data;
+ DBG("Receive msg is opacity . opacity=%d \n", *omod);
+ switch(*omod)
+ {
+ case ELM_WIN_INDICATOR_OPAQUE:
+ trans_mode = INDICATOR_OPACITY_OPAQUE;
+ break;
+ case ELM_WIN_INDICATOR_TRANSLUCENT:
+ trans_mode = INDICATOR_OPACITY_TRANSLUCENT;
+ break;
+ case ELM_WIN_INDICATOR_TRANSPARENT:
+ trans_mode = INDICATOR_OPACITY_TRANSPARENT;
+ break;
+ default:
+ trans_mode = INDICATOR_OPACITY_OPAQUE;
+ break;
+ }
+ }
+ }
+
+}
+
+static void
+_indicator_port_ecore_evas_msg_parent_handle(Ecore_Evas *ee, int msg_domain, int msg_id, void *data, int size)
+{
+ DBG("PORT : Receive msg from clien msg_domain=%x msg_id=%x size=%d\n", msg_domain, msg_id, size);
+ retif(!data, , "data is NULL");
+
+ _indicator_ecore_evas_msg_parent_handle(ee,msg_domain,msg_id,data,size);
+}
+
+static void
+_indicator_land_ecore_evas_msg_parent_handle(Ecore_Evas *ee, int msg_domain, int msg_id, void *data, int size)
+{
+ DBG("LAND : Receive msg from clien msg_domain=%x msg_id=%x size=%d\n", msg_domain, msg_id, size);
+ retif(!data, , "data is NULL");
+
+ _indicator_ecore_evas_msg_parent_handle(ee,msg_domain,msg_id,data,size);
+}
static void _register_event_handler_both(win_info *win, void *data)
{
+ Ecore_Evas *ee;
+
retif(win == NULL, , "Invalid parameter!");
+ ee = ecore_evas_ecore_evas_get(evas_object_evas_get(win->win_main));
+
evas_object_smart_callback_add(win->win_main,
"delete,request",
_indicator_window_delete_cb, data);
evas_object_event_callback_add(win->layout_main,
EVAS_CALLBACK_MOUSE_UP,
_indicator_mouse_up_cb, win);
+ if(win->type == INDICATOR_WIN_PORT)
+ {
+ ecore_evas_callback_msg_parent_handle_set(ee, _indicator_port_ecore_evas_msg_parent_handle);
+ }
+ else
+ {
+ ecore_evas_callback_msg_parent_handle_set(ee, _indicator_land_ecore_evas_msg_parent_handle);
+ }
+ ecore_evas_data_set(ee,"indicator_app_data",data);
}
ERR("Fail vconf_notify_key_changed : VCONFKEY_PM_STATE");
}
+ ret = vconf_notify_key_changed(VCONFKEY_APPTRAY_STATE,
+ _indicator_notify_apptray_state_cb, (void *)ad);
+
+ if (ret == -1) {
+ ERR("VCONFKEY_APPTRAY_STATE is failed\n");
+ return;
+ }
+
heynoti_subscribe(ad->notifd, HIBERNATION_ENTER_NOTI,
_indicator_hibernation_enter_cb, (void *)ad);
heynoti_subscribe(ad->notifd, HIBERNATION_LEAVE_NOTI,
vconf_ignore_key_changed(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL,
_indicator_check_battery_percent_on_cb);
+ vconf_ignore_key_changed(VCONFKEY_PM_STATE,
+ _indicator_notify_pm_state_cb);
+
+ vconf_ignore_key_changed(VCONFKEY_APPTRAY_STATE,
+ _indicator_notify_apptray_state_cb);
+
heynoti_unsubscribe(ad->notifd, HIBERNATION_ENTER_NOTI,
_indicator_hibernation_enter_cb);
heynoti_unsubscribe(ad->notifd, HIBERNATION_LEAVE_NOTI,
static void create_win(void* data,int type)
{
- Evas_Object *win_port;
char *indi_name = NULL;
struct appdata *ad = data;
int root_h;
Ecore_X_Window root;
- if(type == INDICATOR_WIN_PORT)
+ root = ecore_x_window_root_first_get();
+ ecore_x_window_size_get(root, &root_w, &root_h);
+ INFO("xwin_size = %d %d", root_w, root_h);
+
+ ad->scale = elm_config_scale_get();
+ INFO("scale = %f", ad->scale);
+
+
+ switch(type)
{
+ case INDICATOR_WIN_PORT:
ad->win[type].win_main = elm_win_add(NULL, "portrait_indicator", ELM_WIN_SOCKET_IMAGE);
indi_name = "elm_indicator_portrait";
- }
- else
- {
+ elm_win_title_set(ad->win[type].win_main, "win sock test:port");
+ ad->win[type].w = root_w;
+ break;
+ case INDICATOR_WIN_LAND:
ad->win[type].win_main = elm_win_add(NULL, "win_socket_test:land", ELM_WIN_SOCKET_IMAGE);
indi_name = "elm_indicator_landscape";
+ elm_win_title_set(ad->win[type].win_main, "win sock test:land");
+ ad->win[type].w = root_h;
+ break;
+ default :
+ break;
}
- retif(ad->win[type].win_main == NULL, FAIL, "elm_win_add failed!");
+ retif(ad->win[type].win_main == NULL, , "elm_win_add failed!");
if (!elm_win_socket_listen(ad->win[type].win_main , indi_name, 0, EINA_FALSE))
{
}
elm_win_alpha_set(ad->win[type].win_main , EINA_TRUE);
- if(type == INDICATOR_WIN_PORT)
- {
- elm_win_title_set(ad->win[type].win_main, "win sock test:port");
- }
- else
- {
- elm_win_title_set(ad->win[type].win_main, "win sock test:land");
- }
-
elm_win_borderless_set(ad->win[type].win_main , EINA_TRUE);
evas_object_size_hint_fill_set(ad->win[type].win_main , EVAS_HINT_EXPAND,
states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
ecore_x_netwm_window_state_set(xwin, states, 2);
- ecore_x_icccm_name_class_set(xwin, "INDICATOR", "INDICATOR");
-
zone = ecore_x_e_illume_zone_get(xwin);
ecore_x_event_mask_set(zone, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE);
ad->win[type].evas = evas_object_evas_get(ad->win[type].win_main );
- ad->win[type].layout_main = load_edj(ad->win[type].win_main , EDJ_FILE, GRP_MAIN);
- retif(ad->win[type].layout_main == NULL, FAIL, "Failed to get layout main!");
- root = ecore_x_window_root_first_get();
- ecore_x_window_size_get(root, &root_w, &root_h);
- INFO("xwin_size = %d %d", root_w, root_h);
-
- ad->scale = elm_config_scale_get();
- INFO("scale = %f", ad->scale);
-
- if(type == INDICATOR_WIN_PORT)
- {
- ad->win[type].w = root_w;
- }
- else
+ switch(type)
{
- ad->win[type].w = root_h;
+ case INDICATOR_WIN_PORT:
+ ad->win[type].layout_main = load_edj(ad->win[type].win_main , EDJ_FILE0, GRP_MAIN);
+ break;
+ case INDICATOR_WIN_LAND:
+ ad->win[type].layout_main = load_edj(ad->win[type].win_main , EDJ_FILE1, GRP_MAIN);
+ break;
+ default :
+ break;
}
+ retif(ad->win[type].layout_main == NULL, , "Failed to get layout main!");
+
ad->win[type].h = (int)(INDICATOR_HEIGHT * ad->scale);
evas_object_resize(ad->win[type].win_main , ad->win[type].w, ad->win[type].h);
evas_object_move(ad->win[type].win_main , 0, 0);
indicator_util_layout_add(&(ad->win[type]));
- if(type == INDICATOR_WIN_LAND)
- {
- Evas_Object *edje;
- edje = elm_layout_edje_get(ad->win[type].layout_main);
- edje_object_signal_emit(edje, "change,home,pad,1", "elm.rect.*");
- }
-
ad->win[type].data = data;
evas_object_show(ad->win[type].layout_main);
return ;
}
+static void create_overlay_win(void* data)
+{
+
+ struct appdata *ad = data;
+ Evas_Object *conform = NULL;
+
+ Evas_Object *eo;
+ int w, h;
+ int indi_h;
+ Ecore_X_Window xwin;
+ Ecore_X_Window zone;
+ Ecore_X_Window_State states[2];
+ Ecore_X_Atom ATOM_MV_INDICATOR_GEOMETRY = 0;
+
+ indi_h = (int)(INDICATOR_HEIGHT * ad->scale);
+
+ eo = elm_win_add(NULL, "INDICATOR", ELM_WIN_BASIC);
+ elm_win_title_set(eo, "INDICATOR");
+ elm_win_borderless_set(eo, EINA_TRUE);
+ ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
+ evas_object_resize(eo, w, (int)(INDICATOR_HEIGHT * ad->scale));
+ evas_object_move(eo , 0, 0);
+ elm_win_alpha_set(eo, EINA_TRUE);
+
+ elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_SHOW);
+ elm_win_indicator_opacity_set(eo, ELM_WIN_INDICATOR_OPAQUE);
+
+ conform = elm_conformant_add(eo);
+
+ evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(eo, conform);
+ evas_object_show(conform);
+
+ xwin = elm_win_xwindow_get(eo);
+ ecore_x_icccm_hints_set(xwin, 0, 0, 0, 0, 0, 0, 0);
+ states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
+ states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
+ ecore_x_netwm_window_state_set(xwin, states, 2);
+
+ ecore_x_icccm_name_class_set(xwin, "INDICATOR", "INDICATOR");
+
+ ecore_x_netwm_window_type_set(xwin, ECORE_X_WINDOW_TYPE_DOCK);
+
+ unsigned int ind_gio_val[16] = { 0, 0, w, indi_h,
+ 0, 0, indi_h, h,
+ 0, h-indi_h, w, indi_h,
+ w-indi_h, 0, indi_h, h };
+
+ ATOM_MV_INDICATOR_GEOMETRY = ecore_x_atom_get(STR_ATOM_MV_INDICATOR_GEOMETRY);
+
+ ecore_x_window_prop_card32_set(xwin,
+ ATOM_MV_INDICATOR_GEOMETRY,
+ ind_gio_val,
+ 16);
+
+ zone = ecore_x_e_illume_zone_get(xwin);
+ ecore_x_event_mask_set(zone, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE);
+ evas_object_show(eo);
+
+ ad->win_overlay = eo;
+
+ return ;
+}
+
static void _indicator_init_wininfo(void * data)
{
int i = 0;
struct appdata *ad = data;
- retif(data == NULL, FAIL, "Invalid parameter!");
+ retif(data == NULL, , "Invalid parameter!");
for(i=0;i<INDICATOR_WIN_MAX;i++)
{
memset(&(ad->win[i]),0x00,sizeof(win_info));
}
+
+ ad->win_overlay = NULL;
}
static int indicator_window_new(void *data)
for(i=0;i<INDICATOR_WIN_MAX;i++)
{
create_win(data,i);
+ indicator_util_show_hide_icons(&(ad->win[i]),0,0);
}
- indicator_util_show_hide_icons(data,0);
+ create_overlay_win(data);
register_event_handler(ad);
return OK;
ad->win[i].win_main = NULL;
}
+ evas_object_del(ad->win_overlay);
+ ad->win_overlay = NULL;
+
if (ad)
free(ad);
#endif
+static void __indicator_launch_apptray(void* data)
+{
+ int lock_state = VCONFKEY_IDLE_UNLOCK;
+ int lock_ret = -1;
+ service_h service;
+ int ret = SERVICE_ERROR_NONE;
+
+ lock_ret = vconf_get_int(VCONFKEY_IDLE_LOCK_STATE,
+ &lock_state);
+ DBG("Check Lock State : %d %d", lock_ret, lock_state);
+
+ if (lock_ret == 0 && lock_state == VCONFKEY_IDLE_LOCK)
+ {
+ goto __CATCH;
+ }
+
+ INFO("[Home Button Released]");
+
+ if (check_system_status() == FAIL)
+ {
+ INFO("check_system_status failed");
+ goto __CATCH;
+ }
+
+ service_create(&service);
+
+ service_set_operation(service, SERVICE_OPERATION_DEFAULT);
+
+ service_set_app_id(service, APP_TRAY_PKG_NAME);
+
+ service_add_extra_data(service, "LONG_PRESS", "0");
+
+ ret = service_send_launch_request(service, NULL, NULL);
+
+ if(ret != SERVICE_ERROR_NONE)
+ {
+ ERR("Cannot launch app");
+ }
+
+ service_destroy(service);
+
+__CATCH:
+ _indicator_home_icon_action(data, 0);
+ home_button_pressed = EINA_FALSE;
+}
+
+static void __indicator_hide_icon_timer_cb(void* data)
+{
+ if (hide_timer != NULL) {
+ ecore_timer_del(hide_timer);
+ hide_timer = NULL;
+ }
+
+ indicator_util_show_hide_icons(data,0,1);
+
+}
+
static void _indicator_mouse_down_cb(void *data, Evas * e, Evas_Object * obj,
void *event)
{
#ifdef HOME_KEY_EMULATION
if(indicator_util_check_indicator_area(win, ev->canvas.x, ev->canvas.y))
{
- show_hide_pressed = EINA_TRUE;
+ if (indicator_util_check_home_icon_area(win, ev->canvas.x, ev->canvas.y))
+ {
+
+ int lock_state = VCONFKEY_IDLE_UNLOCK;
+ int ret = -1;
+ char *menuscreen = NULL;
+
+ ret = vconf_get_int(VCONFKEY_IDLE_LOCK_STATE,&lock_state);
+ DBG("Check Lock State : %d %d", ret, lock_state);
+
+ if (ret != 0 || lock_state == VCONFKEY_IDLE_LOCK)
+ {
+ goto __CATCH;
+ }
+
+ if (check_system_status() == FAIL)
+ {
+ INFO("check_system_status failed");
+ goto __CATCH;
+ }
+ menuscreen = vconf_get_str("db/setting/menuscreen/package_name");
+
+ if(menuscreen!=NULL&&!strncmp(menuscreen,MENUSCREEN_PKG_NAME,strlen(MENUSCREEN_PKG_NAME)))
+ {
+ DBG("package_name: %s", menuscreen);
+ goto __CATCH;
+ }
+
+ if(win->type==INDICATOR_WIN_LAND)
+ {
+ if(indicator_icon_show_state[win->type]==0)
+ {
+ DBG("SKIP APPTRAY: %d", win->type);
+ show_hide_pressed[win->type] = EINA_TRUE;
+ goto __CATCH;
+ }
+ }
+
+ _indicator_home_icon_action(win, 1);
+ home_button_pressed = EINA_TRUE;
+
+
+ }
+ else
+ {
+ if( is_quickpanel_opened == 0 )
+ {
+ show_hide_pressed[win->type] = EINA_TRUE;
+ }
+ else
+ {
+ show_hide_pressed[win->type] = EINA_FALSE;
+ DBG("quick panel is opened : %d", is_quickpanel_opened);
+ }
+ }
+ indicator_press_coord.x = ev->canvas.x;
+ indicator_press_coord.y = ev->canvas.y;
}
+
__CATCH :
return;
#else
retif(data == NULL || event == NULL, , "Invalid parameter!");
ev = event;
-
- if (show_hide_pressed) {
- if (!indicator_util_check_indicator_area(win,ev->cur.canvas.x,ev->cur.canvas.y))
+ if (home_button_pressed) {
+ if (!indicator_util_check_home_icon_area(win,ev->cur.canvas.x,ev->cur.canvas.y))
+ {
+ DBG("_indicator_mouse_move_cb : %d %d canceled", ev->cur.canvas.x, ev->cur.canvas.y);
+ _indicator_home_icon_action(data, 0);
+ home_button_pressed = FALSE;
+ }
+ if(ev->cur.canvas.y - indicator_press_coord.y >= INDICATOR_HIDE_TRIGER_H*elm_config_scale_get())
{
- show_hide_pressed = FALSE;
- DBG("cancel show/hide key");
+ DBG("_indicator_mouse_move_cb : %d %d launch apptray", ev->cur.canvas.x, ev->cur.canvas.y);
+ __indicator_launch_apptray(win->data);
+ home_button_pressed = FALSE;
+ }
+ }
+ if(win->type == INDICATOR_WIN_PORT)
+ {
+ if (show_hide_pressed[win->type]) {
+ if (!indicator_util_check_indicator_area(win,ev->cur.canvas.x,ev->cur.canvas.y)
+ || indicator_util_check_home_icon_area(win,ev->cur.canvas.x,ev->cur.canvas.y))
+ {
+ show_hide_pressed[win->type] = FALSE;
+ DBG("cancel show/hide key");
+ }
+ }
+ }
+ else
+ {
+ if(ev->cur.canvas.y - indicator_press_coord.y >= INDICATOR_HIDE_TRIGER_H*elm_config_scale_get())
+ {
+ DBG("ev->cur.canvas.x(%d) ev->cur.canvas.y(%d)",ev->cur.canvas.x,ev->cur.canvas.y);
+ DBG("indicator_press_coord.x(%d) indicator_press_coord.y(%d)",indicator_press_coord.x,indicator_press_coord.y);
+
+ if(show_hide_pressed[win->type] == EINA_TRUE)
+ {
+ if(indicator_icon_show_state[win->type] == 0)
+ {
+ indicator_util_show_hide_icons(win,1,1);
+ if (hide_timer != NULL) {
+ ecore_timer_del(hide_timer);
+ hide_timer = NULL;
+ }
+
+ hide_timer = ecore_timer_add(3, (void *)__indicator_hide_icon_timer_cb,data);
+
+ show_hide_pressed[win->type] = EINA_FALSE;
+ }
+ }
}
}
}
if(indicator_util_check_indicator_area(win, ev->canvas.x, ev->canvas.y))
{
+ if (indicator_util_check_home_icon_area(win,ev->canvas.x,ev->canvas.y))
{
- if(show_hide_pressed == EINA_TRUE)
+ if(home_button_pressed == EINA_TRUE)
{
- if(indicator_icon_show_state == 0)
- {
- indicator_util_show_hide_icons(win->data,1);
- indicator_icon_show_state = 1;
- }
- else
+ __indicator_launch_apptray(win->data);
+ feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
+ }
+
+ }
+ else
+ {
+ if(win->type == INDICATOR_WIN_PORT)
+ {
+ if(show_hide_pressed[win->type] == EINA_TRUE)
{
- indicator_util_show_hide_icons(win->data,0);
- indicator_icon_show_state = 0;
- }
+ if(indicator_icon_show_state[win->type] == 0)
+ {
+ indicator_icon_backup_state[win->type] = 1;
+ indicator_util_show_hide_icons(win,1,1);
+ }
+ else
+ {
+ indicator_icon_backup_state[win->type] = 0;
+ indicator_util_show_hide_icons(win,0,1);
+ }
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
+ vconf_set_int(VCONFKEY_BATTERY_DISP_STATE,win->type);
+ feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
+ }
}
}
+
}
__CATCH:
_indicator_home_icon_action(data, 0);
home_button_pressed = EINA_FALSE;
- show_hide_pressed = EINA_FALSE;
+ show_hide_pressed[win->type] = EINA_FALSE;
#else
int mouse_up_prio = -1;
int mouse_down_prio = -1;
INFO("[INDICATOR IS STARTED]");
ret = indicator_window_new(data);
- retif(ret != OK, FAIL, "Failed to create a new window!");
+ retif(ret != OK, , "Failed to create a new window!");
_change_view(ecore_x_window_root_first_get(), data);
# define ICONDIR "/usr/apps/com.samsung.indicator/res/icons"
#endif
-#define EDJ_FILE EDJDIR"/"PACKAGE".edj"
+#define EDJ_FILE0 EDJDIR"/"PACKAGE"_port.edj"
+#define EDJ_FILE1 EDJDIR"/"PACKAGE"_land.edj"
#define ICON_THEME_FILE EDJDIR"/"PACKAGE"_icon_theme.edj"
#define ICON_NONFIXED_THEME_FILE EDJDIR"/"PACKAGE"_icon_nonfixed_theme.edj"
#define CALL_NAME "com.samsung.call"
#define VTCALL_NAME "com.samsung.vtmain"
+#define MSG_DOMAIN_CONTROL_INDICATOR 0x10001
+#define MSG_ID_INDICATOR_REPEAT_EVENT 0x10002
+#define MSG_ID_INDICATOR_ROTATION 0x10003
+#define MSG_ID_INDICATOR_OPACITY 0X1004
+#define MSG_ID_INDICATOR_TYPE 0X1005
+
enum _win_type {
TOP_WIN_NORMAL = 0,
TOP_WIN_LOCK_SCREEN,
struct appdata {
win_info win[INDICATOR_WIN_MAX];
+ Evas_Object* win_overlay;
double xscale;
double yscale;
for(i=0;i<INDICATOR_WIN_MAX;i++)
{
- retif(ad->win[i].layout_main == NULL, FAIL, "Invalid parameter!");
+ retif(ad->win[i].layout_main == NULL, , "Invalid parameter!");
edje = elm_layout_edje_get(ad->win[i].layout_main);
edje_object_signal_emit(edje, emission, source);
}
for(i=0;i<INDICATOR_WIN_MAX;i++)
{
- retif(ad->win[i].layout_main == NULL, FAIL, "Invalid parameter!");
+ retif(ad->win[i].layout_main == NULL, , "Invalid parameter!");
edje = elm_layout_edje_get(ad->win[i].layout_main);
edje_object_part_text_set(edje, part, text);
}
}
+void indicator_signal_emit_by_win(void* data, const char *emission, const char *source)
+{
+ win_info *win = (win_info*)data;
+ retif(data == NULL, , "Invalid parameter!");
+ Evas_Object *edje;
+
+ retif(win->layout_main == NULL, , "Invalid parameter!");
+ edje = elm_layout_edje_get(win->layout_main);
+ edje_object_signal_emit(edje, emission, source);
+}
+
+void indicator_part_text_emit_by_win(void* data, const char *part, const char *text)
+{
+ win_info *win = (win_info*)data;
+ retif(data == NULL, , "Invalid parameter!");
+ Evas_Object *edje;
+
+ retif(win->layout_main == NULL, , "Invalid parameter!");
+ edje = elm_layout_edje_get(win->layout_main);
+ edje_object_part_text_set(edje, part, text);
+}
+
extern const char *get_icon_dir(void);
void indicator_signal_emit(void* data, const char *emission, const char *source);
void indicator_part_text_emit(void* data, const char *part, const char *text);
+void indicator_signal_emit_by_win(void* data, const char *emission, const char *source);
+void indicator_part_text_emit_by_win(void* data, const char *part, const char *text);
#endif
@BINDIR@/@PROJECT_NAME@ &\r
-sleep 7\r
+sleep 2\r
<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="@PKGNAME@" version="0.1.47-1" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="@PKGNAME@" version="0.1.69-1" install-location="internal-only">
<label>@PROJECT_NAME@</label>
<author email="yjoo93.park@samsung.com" href="www.samsung.com">Youngjoo Park</author>
<author email="seungtaek.chung@samsung.com" href="www.samsung.com">seungtaek chung</author>
-ADD_CUSTOM_TARGET(indicator.edj
+ADD_CUSTOM_TARGET(indicator_port.edj
COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/icons_edc
- ${CMAKE_CURRENT_SOURCE_DIR}/indicator.edc
- ${CMAKE_CURRENT_BINARY_DIR}/indicator.edj
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/indicator.edc
+ ${CMAKE_CURRENT_SOURCE_DIR}/indicator_port.edc
+ ${CMAKE_CURRENT_BINARY_DIR}/indicator_port.edj
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/indicator_port.edc
)
-ADD_DEPENDENCIES(${PROJECT_NAME} indicator.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} indicator_port.edj)
+
+ADD_CUSTOM_TARGET(indicator_land.edj
+ COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/icons_edc
+ ${CMAKE_CURRENT_SOURCE_DIR}/indicator_land.edc
+ ${CMAKE_CURRENT_BINARY_DIR}/indicator_land.edj
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/indicator_land.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} indicator_land.edj)
ADD_CUSTOM_TARGET(indicator_icon_theme.edj
COMMAND edje_cc
)
ADD_DEPENDENCIES(${PROJECT_NAME} indicator_icon_nonfixed_theme.edj)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/indicator.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/indicator_port.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/indicator_land.edj DESTINATION ${EDJDIR})
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/indicator_icon_theme.edj DESTINATION ${EDJDIR})
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/indicator_icon_nonfixed_theme.edj DESTINATION ${EDJDIR})
name: partName; \
type: SWALLOW; \
mouse_events: 0; \
+ clip_to : slide_clip2; \
+ scale: 1; \
+ description { \
+ state: "default" 0.0; \
+ min: MinWidth MinHeight; \
+ fixed: 1 0; \
+ rel1 { relative: 1.0 -1.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 1.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ align: 0.0 0.5; \
+ visible: 1; \
+ } \
+ description { \
+ state: "show" 0.0; \
+ min: MinWidth MinHeight; \
+ fixed: 1 0; \
+ rel1 { relative: 1.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 1.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ align: 0.0 0.5; \
+ visible: 1; \
+ } \
+ } \
+
+#define SWALLOW_PART_FROM_LEFT_WITH_EFFECT2( partName, rel_x, rel_y, MinWidth, MinHeight) \
+ part { \
+ name: partName; \
+ type: SWALLOW; \
+ mouse_events: 0; \
+ clip_to : slide_clip2; \
scale: 1; \
description { \
state: "default" 0.0; \
name: partName; \
type: SWALLOW; \
mouse_events: 0; \
+ clip_to : slide_clip; \
+ scale: 1; \
+ description { \
+ state: "default" 0.0; \
+ min: MinWidth MinHeight; \
+ fixed: 1 0; \
+ rel1 { relative: 0.0 -1.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 0.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ align: 1.0 0.5; \
+ visible: 1; \
+ } \
+ description { \
+ state: "show" 0.0; \
+ min: MinWidth MinHeight; \
+ fixed: 1 0; \
+ rel1 { relative: 0.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 0.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ align: 1.0 0.5; \
+ visible: 1; \
+ } \
+ } \
+
+#define SWALLOW_PART_FROM_RIGHT_WITH_EFFECT2( partName, rel_x, rel_y, MinWidth, MinHeight) \
+ part { \
+ name: partName; \
+ type: SWALLOW; \
+ mouse_events: 0; \
+ clip_to : slide_clip; \
scale: 1; \
description { \
state: "default" 0.0; \
#define HOME_PADDING_LANDSCAPE 78
#define DEFAULT_NON_FIXED_PADDING 0
-#define INDI_DEFAULT_BG_COLOR 0 0 0 0
-#define INDI_DEFAULT_BG_TRANSLUCENT 0 0 0 50
+#define INDI_DEFAULT_BG_COLOR 52 52 50 255
+#define INDI_DEFAULT_BG_TRANSLUCENT 0 0 0 125
#define INDI_DEFAULT_BG_TRANSPARENT 0 0 0 0
#define ICON_FONT_NAME "Tizen"
#define ICON_FONT_SIZE 20
#define FONT_COLOR 255, 255, 255, 255
+#define INDICATOR_HIDE_TRIGER_H 30
+
#define DEFAULT_LABEL_STRING "<font_size=%d><color=#%02x%02x%02x%02x>%s</color></font_size>"
#define CUSTOM_LABEL_STRING "<font=%s><style=%s><font_size=%d>%s</font_size></style></font>"
--- /dev/null
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "indicator_gui.h"
+#include "indicator_common.edc"
+
+collections {
+ group {
+ name: "indicator";
+ script {
+ public bg_set, badge_set, theme, changepad, changebg, changeHomePad;
+ }
+ styles
+ {
+ style {
+ name: "textblock_style";
+ base: "font=Tizen:style=Medium text_class=tizen color=#FFFFFFFF ";
+ }
+ style {
+ name: "textblock_outline_style";
+ base: "font=Tizen:style=Medium text_class=tizen color=#FFFFFFFF";
+ }
+ style {
+ name: "message_style";
+ base: "font=Tizen:style=Medium text_class=tizen font_size=23 color=#FFFFFFCC valign=middle wrap=none ellipsis=1";
+ }
+ }
+
+ images {
+ image: "B03_Status_bar_line.PNG" COMP;
+ }
+
+ parts {
+ part {
+ name: "background";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 INDICATOR_HEIGHT;
+ color: 0 0 0 0;
+ }
+ }
+ part {
+ name: "padding.top";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: 0 INDICATOR_PADDING_H;
+ fixed: 0 1;
+ rel1 { relative: 0.0 0.0; to: "background"; }
+ rel2 { relative: 1.0 0.0; to: "background"; }
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "padding.bottom";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: 0 INDICATOR_PADDING_H;
+ fixed: 0 1;
+ rel1 { relative: 0.0 1.0; to: "background"; }
+ rel2 { relative: 1.0 1.0; to: "background"; }
+ align: 0.0 1.0;
+ visible: 0;
+ }
+
+ }
+
+ part {
+ name: "padding.left";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: LEFT_PADDING_WIDTH 0;
+ fixed: 1 0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 0.0 1.0;
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "padding.right";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: RIGHT_PADDING_WIDTH 0;
+ fixed: 1 0;
+ rel1.relative: 1.0 0.0;
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "elm.rect.transparent";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: 0 40;
+ fixed: 0 1;
+ rel1 {
+ relative: 0.0 1.0;
+ to: "background";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "background";
+ }
+ color: 0 0 0 0;
+ align: 0.0 1.0;
+ visible: 1;
+ }
+ description {
+ state: "show" 0.0;
+ min: 0 0;
+ fixed: 0 1;
+ rel1 {
+ relative: 0.0 1.0;
+ to: "background";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "background";
+ }
+ color: 0 0 0 0;
+ align: 0.0 1.0;
+ visible: 1;
+ }
+ }
+ part {
+ name: "elm.rect.bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: 0 INDICATOR_HEIGHT;
+ fixed: 0 1;
+ rel1 { relative: 0.0 0.0; to_x: background; to_y: elm.rect.transparent; }
+ rel2 { relative: 1.0 0.0; to_x: background; to_y: elm.rect.transparent; }
+ color: INDI_DEFAULT_BG_TRANSPARENT;
+ align: 0.0 1.0;
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ color: INDI_DEFAULT_BG_COLOR;
+ }
+
+ }
+
+ part {
+ name: "elm.rect.left_con";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: HOME_PADDING_LANDSCAPE 0;
+ visible: 0;
+ fixed: 1 0;
+ rel1 { relative: 0.0 0.0; to: "elm.rect.bg"; }
+ rel2 { relative: 0.0 1.0; to: "elm.rect.bg"; }
+ align: 0.0 0.0;
+ }
+ }
+
+ part {
+ name: "icon_bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ rel1 { relative: 1.0 0.0; to_x: padding.separator; to_y: elm.rect.bg; }
+ rel2 { relative: 0.0 1.0; to_x: padding.separator2; to_y: elm.rect.bg; }
+ align: 0.0 0.0;
+ }
+ }
+
+ part {
+ name: "elm.rect.middle_con";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ rel1 { relative: 0.0 0.0; to: "icon_bg"; }
+ rel2 { relative: 1.0 1.0; to: "icon_bg"; }
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "hide" 0.0;
+ inherit: "default" 0.0;
+ min: 0 INDICATOR_HEIGHT;
+ fixed: 0 1;
+ rel1 { relative: 0.0 0.0; to: "icon_bg"; }
+ rel2 { relative: 1.0 0.0; to: "icon_bg"; }
+ align: 0.0 1.0;
+ }
+
+ }
+
+ part {
+ name: "message.bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ min: 0 INDICATOR_HEIGHT;
+ fixed: 0 1;
+ rel1 { relative: 0.0 1.0; to: "elm.rect.middle_con"; }
+ rel2 { relative: 1.0 1.0; to: "elm.rect.middle_con"; }
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "message.padding.left";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: MESSAGE_PADDING 0;
+ fixed: 1 0;
+ rel1 {
+ relative: 0.0 0.0;
+ to: "message.bg";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to: "message.bg";
+ }
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "message.padding.right";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: MESSAGE_PADDING 0;
+ fixed: 1 0;
+ rel1 {
+ relative: 1.0 0.0;
+ to: "message.bg";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "message.bg";
+ }
+ align: 1.0 0.0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "message.padding.top";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: 0 INDICATOR_PADDING_H;
+ fixed: 0 1;
+ rel1 { relative: 0.0 0.0; to: "message.bg"; }
+ rel2 { relative: 1.0 0.0; to: "message.bg"; }
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "message.padding.bottom";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: 0 INDICATOR_PADDING_H;
+ fixed: 0 1;
+ rel1 { relative: 0.0 1.0; to: "message.bg"; }
+ rel2 { relative: 1.0 1.0; to: "message.bg"; }
+ align: 0.0 1.0;
+ visible: 0;
+ }
+
+ }
+ part {
+ name: "message.text";
+ type: TEXTBLOCK;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ fixed: 1 1;
+ visible: 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "message.padding.left";
+ to_y: "message.bg";
+ }
+
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "message.padding.right";
+ to_y: "message.bg";
+ }
+ text {
+ style: "message_style";
+ min: 0 1;
+ }
+ }
+ }
+
+ part {
+ name: elm.swallow.fixed0;
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: HOME_PADDING_LANDSCAPE APPTRAY_ICON_HEIGHT;
+ fixed: 1 0;
+ rel1 { relative: 1.0 0.0; to_x: padding.left; to_y: elm.rect.left_con; }
+ rel2 { relative: 1.0 1.0; to_x: padding.left; to_y: elm.rect.left_con; }
+ align: 0.0 0.5;
+ visible: 0;
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible : 1;
+ }
+ }
+
+ part {
+ name: "seperator.image";
+ type: IMAGE;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ min: 4 36;
+ fixed: 1 1;
+ image.normal: "B03_Status_bar_line.PNG";
+ rel1 {
+ relative: 1.0 0.5;
+ to_x: "elm.swallow.fixed0";
+ to_y: "elm.rect.bg";
+ }
+ rel2 {
+ relative: 1.0 0.5;
+ to_x: "elm.swallow.fixed0";
+ to_y: "elm.rect.bg";
+ }
+ align: 0.0 0.5;
+ visible : 0;
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible : 0;
+ }
+ }
+
+ part {
+ name: "padding.separator";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: PADDING_WIDTH 0;
+ fixed: 1 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "seperator.image";
+ to_y: "padding.top";
+ }
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "seperator.image";
+ to_y: "padding.bottom";
+ }
+ align: 0.0 0.5;
+ visible: 1;
+ color: 0 0 0 0;
+ }
+ }
+
+ DYNAMIC_RECT_FROM_LEFT( "elm.rect.fixed2", "elm.swallow.fixed3", "elm.rect.middle_con", DEFAULT_ICON_PADDING, FIXED4_DYNAMIC_PADDING, INDI_DEFAULT_BG_COLOR, 0)
+ SWALLOW_PART_FROM_LEFT_WITH_EFFECT2( "elm.swallow.fixed2", "elm.rect.fixed2", "elm.rect.middle_con", DEFAULT_ICON_WIDTH, DEFAULT_ICON_HEIGHT )
+
+ FIXED_RECT_FROM_LEFT( "elm.rect.fixed3", "elm.swallow.fixed2", "elm.rect.middle_con", DEFAULT_ICON_PADDING, INDI_DEFAULT_BG_COLOR, 0)
+ SWALLOW_PART_FROM_LEFT_WITH_EFFECT2( "elm.swallow.fixed1", "elm.rect.fixed3", "elm.rect.middle_con", DEFAULT_ICON_WIDTH, DEFAULT_ICON_HEIGHT )
+
+ FIXED_RECT_FROM_LEFT( "elm.rect.nonfixed", "elm.swallow.fixed1", "elm.rect.middle_con", DEFAULT_ICON_PADDING, INDI_DEFAULT_BG_COLOR, 0)
+ SWALLOW_PART_FROM_LEFT_WITH_EFFECT2( "elm.swallow.nonfixed", "elm.rect.nonfixed", "elm.rect.middle_con", 0, 0)
+
+ SWALLOW_PART_FROM_RIGHT_WITH_EFFECT2( "elm.swallow.noti", "clock.padding.left", "elm.rect.middle_con", 0, 0)
+
+ part {
+ name: elm.swallow.fixed4;
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: HOME_PADDING_LANDSCAPE APPTRAY_ICON_HEIGHT;
+ fixed: 1 0;
+ rel1 { relative: 0.0 0.0; to_x: padding.right; to_y: elm.rect.left_con; }
+ rel2 { relative: 0.0 1.0; to_x: padding.right; to_y: elm.rect.left_con; }
+ align: 1.0 0.5;
+ visible: 0;
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible : 1;
+ }
+ }
+
+ part {
+ name: "seperator.image2";
+ type: IMAGE;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ min: 4 36;
+ fixed: 1 1;
+ image.normal: "B03_Status_bar_line.PNG";
+ rel1 {
+ relative: 0.0 0.5;
+ to_x: "elm.swallow.fixed4";
+ to_y: "elm.rect.bg";
+ }
+ rel2 {
+ relative: 0.0 0.5;
+ to_x: "elm.swallow.fixed4";
+ to_y: "elm.rect.bg";
+ }
+ align: 1.0 0.5;
+ visible : 0;
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible : 0;
+ }
+ }
+
+ part {
+ name: "padding.separator2";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: PADDING_WIDTH 0;
+ fixed: 1 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "seperator.image2";
+ to_y: "padding.top";
+ }
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "seperator.image2";
+ to_y: "padding.bottom";
+ }
+ align: 0.0 0.5;
+ visible: 1;
+ color: 0 0 0 0;
+ }
+ }
+
+ part {
+ name: "clock.padding.left";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 12 0;
+ fixed: 1 0;
+ rel1.to_x: "elm.rect.clock";
+ rel2 { relative: 0.0 1.0; to_x: "elm.rect.clock"; }
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "clock.padding.top";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 116 5;
+ fixed: 1 1;
+ rel1 { relative: 0.5 0.0; to_x: elm.rect.bg; to_y: elm.rect.middle_con; }
+ rel2 { relative: 0.5 0.0; to_x: elm.rect.bg; to_y: elm.rect.middle_con; }
+ visible: 0;
+ }
+ }
+ part {
+ name: "elm.rect.clock";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: CLOCK_WIDTH CLOCK_HEIGHT;
+ fixed: 1 1;
+ rel1 { relative: 0.5 1.0; to: "clock.padding.top"; }
+ rel2 { relative: 0.5 1.0; to: "clock.padding.top"; }
+ align: 0.5 0.0;
+ visible: 0;
+ }
+ description {
+ state: "ampm" 0.0;
+ min: CLOCK_WIDTH CLOCK_HEIGHT;
+ fixed: 1 1;
+ rel1 { relative: 0.5 1.0; to: "clock.padding.top"; }
+ rel2 { relative: 0.5 1.0; to: "clock.padding.top"; }
+ align: 0.5 0.0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "elm.rect.innerclock";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.5 0.5; to: "elm.rect.clock";}
+ rel2 { relative: 0.5 0.5; to: "elm.rect.clock";}
+ }
+ }
+ part {
+ name: "elm.text.clock";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1.to: "elm.rect.innerclock";
+ rel2.to: "elm.rect.innerclock";
+ fixed: 1 1;
+ text {
+ style: "textblock_style";
+ min: 1 1;
+ align: 0.5 0.5;
+ }
+ visible : 0;
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible : 1;
+ }
+ }
+
+ part {
+ name: "elm.swallow.fixed3";
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: BATTERY_ICON_WIDTH BATTERY_ICON_HEIGHT;
+ fixed: 1 1;
+ rel1 { relative: 0.5 0.0; to: "clock.padding.bottom"; }
+ rel2 { relative: 0.5 0.0; to: "clock.padding.bottom"; }
+ align: 0.5 1.0;
+ visible: 1;
+ }
+ }
+
+ part {
+ name: "clock.padding.bottom";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 116 2;
+ fixed: 1 1;
+ rel1 { relative: 0.5 1.0; to: "elm.rect.bg";}
+ rel2 { relative: 0.5 1.0; to: "elm.rect.bg";}
+ align: 0.5 1.0;
+ visible: 0;
+ }
+ description {
+ state: "show" 0.0;
+ min: 116 4;
+ fixed: 1 1;
+ rel1 { relative: 0.5 1.0; to: "elm.rect.bg";}
+ rel2 { relative: 0.5 1.0; to: "elm.rect.bg";}
+ align: 0.5 1.0;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "clock.padding.right";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 12 0;
+ fixed: 1 0;
+ rel1 { relative: 1.0 0.0; to_x: "elm.rect.clock"; }
+ rel2 { relative: 0.0 1.0; to_x: "elm.rect.clock"; }
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "elm.padding.badge.left";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 3 0;
+ fixed: 1 0;
+ rel1.to: "elm.text.badge";
+ rel2 { to: "elm.text.badge"; relative: 0.0 1.0; }
+ align: 1.0 0.5;
+ visible: 1;
+ }
+ }
+
+ part {
+ name: "elm.padding.badge.right";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 3 0;
+ fixed: 1 0;
+ rel1 { to: "elm.text.badge"; relative: 1.0 0.0; }
+ rel2.to: "elm.text.badge";
+ align: 0.0 0.5;
+ visible: 1;
+ }
+ }
+
+ part {
+ name: "elm.image.badge";
+ type: IMAGE;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 18 18;
+ fixed: 1 1;
+ rel1.to: "elm.padding.badge.left";
+ rel2.to: "elm.padding.badge.right";
+ image {
+ border: 8 8 8 8;
+ border_scale: 1;
+ }
+ visible: 0;
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description {
+ state: "show2" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+
+ part {
+ name: "elm.text.badge";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { to: "elm.rect.clock"; relative: 0.95 0.2; }
+ rel2 { to: "elm.rect.clock"; relative: 0.95 0.2; }
+ color: 255 255 255 255;
+ align: 1.0 0.0;
+ text {
+ font: "Tizen";
+ size: 15;
+ min: 1 0;
+ align: 0.5 0.5;
+ }
+ }
+ description {
+ state: "default2" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 255;
+ }
+ }
+ part {
+ name: "slide_clip";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 {
+ relative: 1.0 -1.0;
+ to_x: "seperator.image";
+ to_y: "elm.rect.bg";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to_x: "clock.padding.left";
+ to_y: "elm.rect.bg";
+ }
+ color: 255 255 255 0;
+ }
+ description {
+ state: "show" 0.0;
+ rel1 {
+ relative: 1.0 0.0;
+ to_x: "seperator.image";
+ to_y: "elm.rect.bg";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to_x: "clock.padding.left";
+ to_y: "elm.rect.bg";
+ }
+ color: 255 255 255 255;
+ }
+ }
+ part {
+ name: "slide_clip2";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 {
+ relative: 1.0 -1.0;
+ to_x: "clock.padding.right";
+ to_y: "elm.rect.bg";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "seperator.image2";
+ to_y: "elm.rect.bg";
+ }
+ color: 255 255 255 0;
+ }
+ description {
+ state: "show" 0.0;
+ rel1 {
+ relative: 1.0 0.0;
+ to_x: "clock.padding.right";
+ to_y: "elm.rect.bg";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "seperator.image2";
+ to_y: "elm.rect.bg";
+ }
+ color: 255 255 255 255;
+ }
+ }
+
+ }
+
+ programs {
+ program {
+ name: "change_padding_1";
+ action: STATE_SET "changePad" 0.0;
+ signal: "change,padding,1";
+ source: "elm.rect.*";
+ script {
+ if (get_int(changepad) == 0) {
+ set_int(changepad,1);
+ }
+ }
+ }
+
+ program {
+ name: "change_padding_2";
+ action: STATE_SET "changePad" 0.0;
+ signal: "change,padding,2";
+ source: "elm.rect.*";
+ script {
+ if (get_int(changepad) == 1) {
+ set_int(changepad,0);
+ }
+ }
+ }
+
+ program {
+ name: "home_pressed";
+ signal: "home.pressed";
+ source: "indicator.prog";
+ script {
+ }
+ }
+
+ program {
+ name: "bg_opaque";
+ action: STATE_SET "default" 0.0;
+ signal: "bg.opaque";
+ source: "indicator.prog";
+ script {
+ set_int(bg_set, 0);
+ }
+
+ }
+ program {
+ name: "bg_translucent";
+ action: STATE_SET "default" 0.0;
+ signal: "bg.translucent";
+ source: "indicator.prog";
+ script {
+ set_int(bg_set, 1);
+ }
+
+ }
+ program {
+ name: "bg_transparent";
+ signal: "bg.transparent";
+ source: "indicator.prog";
+ script {
+ set_int(bg_set, 2);
+ }
+
+ }
+ program {
+ name: "bg_notification";
+ signal: "bg.notification";
+ source: "indicator.prog";
+ script {
+ set_int(bg_set, 3);
+ }
+
+ }
+
+ program {
+ name: "clock_size_default";
+ signal: "indicator.clock.default";
+ source: "indicator.prog";
+ script {
+ set_state(PART:"elm.rect.clock", "default", 0.0);
+ }
+
+ }
+ program {
+ name: "clock_size_ampm";
+ signal: "indicator.clock.ampm";
+ source: "indicator.prog";
+ script {
+ set_state(PART:"elm.rect.clock", "ampm", 0.0);
+ }
+
+ }
+
+ program {
+ name: "show.clip.noeffect";
+ in: 0.15 0.0;
+ action: STATE_SET "show" 0.0;
+ signal: "indicator.clip.show.noeffect";
+ source: "indicator.prog";
+ target: "slide_clip";
+ target: "slide_clip2";
+ }
+
+ program {
+ name: "show.clip";
+ in: 0.15 0.0;
+ action: STATE_SET "show" 0.0;
+ signal: "indicator.clip.show";
+ source: "indicator.prog";
+ target: "slide_clip";
+ target: "slide_clip2";
+ transition: LINEAR 0.15;
+ }
+
+ program {
+ name: "hide.clip.noeffect";
+ action: STATE_SET "default" 0.0;
+ signal: "indicator.clip.hide.noeffect";
+ source: "indicator.prog";
+ target: "slide_clip";
+ target: "slide_clip2";
+ }
+
+ program {
+ name: "hide.clip";
+ action: STATE_SET "default" 0.0;
+ signal: "indicator.clip.hide";
+ source: "indicator.prog";
+ target: "slide_clip";
+ target: "slide_clip2";
+ transition: LINEAR 0.15;
+ }
+
+ program {
+ name: "show.noti.noeffect";
+ action: STATE_SET "show" 0.0;
+ signal: "indicator.noti.show.noeffect";
+ source: "indicator.prog";
+ target: "elm.swallow.noti";
+ target: "elm.swallow.nonfixed";
+ target: "elm.swallow.fixed1";
+ target: "elm.swallow.fixed2";
+ target: "elm.rect.transparent";
+ target: "elm.swallow.fixed0";
+ target: "elm.swallow.fixed4";
+ target: "elm.text.clock";
+ target: "clock.padding.bottom";
+ target: "elm.rect.bg";
+ target: "seperator.image2";
+ }
+
+ program {
+ name: "show.noti";
+ action: STATE_SET "show" 0.0;
+ signal: "indicator.noti.show";
+ source: "indicator.prog";
+ target: "elm.swallow.noti";
+ target: "elm.swallow.nonfixed";
+ target: "elm.swallow.fixed1";
+ target: "elm.swallow.fixed2";
+ target: "elm.rect.transparent";
+ target: "elm.swallow.fixed0";
+ target: "elm.swallow.fixed4";
+ target: "elm.text.clock";
+ target: "clock.padding.bottom";
+ target: "elm.rect.bg";
+ target: "seperator.image2";
+ transition: LINEAR 0.3;
+ }
+
+ program {
+ name: "hide.noti.noeffect";
+ action: STATE_SET "default" 0.0;
+ signal: "indicator.noti.hide.noeffect";
+ source: "indicator.prog";
+ target: "elm.swallow.noti";
+ target: "elm.swallow.nonfixed";
+ target: "elm.swallow.fixed1";
+ target: "elm.swallow.fixed2";
+ target: "elm.rect.transparent";
+ target: "elm.swallow.fixed0";
+ target: "elm.swallow.fixed4";
+ target: "elm.text.clock";
+ target: "clock.padding.bottom";
+ target: "elm.rect.bg";
+ target: "seperator.image2";
+ }
+
+ program {
+ name: "hide.noti";
+ action: STATE_SET "default" 0.0;
+ signal: "indicator.noti.hide";
+ source: "indicator.prog";
+ target: "elm.swallow.noti";
+ target: "elm.swallow.nonfixed";
+ target: "elm.swallow.fixed1";
+ target: "elm.swallow.fixed2";
+ target: "elm.rect.transparent";
+ target: "elm.swallow.fixed0";
+ target: "elm.swallow.fixed4";
+ target: "elm.text.clock";
+ target: "clock.padding.bottom";
+ target: "elm.rect.bg";
+ target: "seperator.image2";
+ transition: LINEAR 0.3;
+ }
+
+
+ program {
+ name: "badge_show";
+ signal: "badge,show,1";
+ source: "elm.image.badge";
+ script {
+ if (get_int(badge_set) == 0) {
+ set_int(badge_set, 1);
+ if (get_int(theme) == 2) {
+ set_state(PART:"elm.image.badge", "show2", 0.0);
+ set_state(PART:"elm.text.badge", "default2", 0.0);
+ } else {
+ set_state(PART:"elm.image.badge", "show", 0.0);
+ set_state(PART:"elm.text.badge", "default", 0.0);
+ }
+ }
+ }
+ }
+
+ program {
+ name: "badge_hide";
+ signal: "badge,hide,1";
+ source: "elm.image.badge";
+ script {
+ if (get_int(badge_set) == 1) {
+ set_int(badge_set, 0);
+ set_state(PART:"elm.image.badge", "default", 0.0);
+ }
+ }
+ }
+ }
+ }
+}
}
}
-
part {
name: "padding.right";
type: RECT;
relative: 1.0 1.0;
to: "background";
}
- color: INDI_DEFAULT_BG_COLOR;
+ color: INDI_DEFAULT_BG_TRANSPARENT;
}
description {
state: "opaque" 0.0;
rel2 { relative: 0.0 1.0; to: "elm.rect.bg"; }
align: 0.0 0.0;
}
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: HOME_PADDING_LANDSCAPE 0;
- }
}
part {
align: 0.0 0.5;
visible: 1;
}
- description {
- state: "landscape" 0.0;
- min: HOME_PADDING_LANDSCAPE APPTRAY_ICON_HEIGHT;
- fixed: 1 0;
- rel1 { relative: 1.0 0.0; to_x: padding.left; to_y: elm.rect.left_con; }
- rel2 { relative: 1.0 1.0; to_x: padding.left; to_y: elm.rect.left_con; }
- align: 0.0 0.5;
- visible: 1;
- }
}
part {
align: 0.0 0.5;
visible : 0;
}
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible : 0;
+ }
}
part {
}
}
-
DYNAMIC_RECT_FROM_LEFT( "elm.rect.fixed2", "elm.swallow.fixed3", "elm.rect.middle_con", DEFAULT_ICON_PADDING, FIXED4_DYNAMIC_PADDING, INDI_DEFAULT_BG_COLOR, 0)
SWALLOW_PART_FROM_LEFT_WITH_EFFECT( "elm.swallow.fixed2", "elm.rect.fixed2", "elm.rect.middle_con", DEFAULT_ICON_WIDTH, DEFAULT_ICON_HEIGHT )
align: 1.0 0.5;
visible: 1;
}
- description {
- state: "landscape" 0.0;
- min: HOME_PADDING_LANDSCAPE APPTRAY_ICON_HEIGHT;
- fixed: 1 0;
- rel1 { relative: 0.0 0.0; to_x: padding.right; to_y: elm.rect.left_con; }
- rel2 { relative: 0.0 1.0; to_x: padding.right; to_y: elm.rect.left_con; }
- align: 1.0 0.5;
- visible: 1;
- }
}
part {
align: 1.0 0.5;
visible : 0;
}
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible : 0;
+ }
}
part {
color: 0 0 0 255;
}
}
+ part {
+ name: "slide_clip";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 {
+ relative: 1.0 -1.0;
+ to_x: "seperator.image";
+ to_y: "elm.rect.bg";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to_x: "clock.padding.left";
+ to_y: "elm.rect.bg";
+ }
+ color: 255 255 255 0;
+ }
+ description {
+ state: "show" 0.0;
+ rel1 {
+ relative: 1.0 0.0;
+ to_x: "seperator.image";
+ to_y: "elm.rect.bg";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to_x: "clock.padding.left";
+ to_y: "elm.rect.bg";
+ }
+ color: 255 255 255 255;
+ }
+ }
+ part {
+ name: "slide_clip2";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 {
+ relative: 1.0 -1.0;
+ to_x: "clock.padding.right";
+ to_y: "elm.rect.bg";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "seperator.image2";
+ to_y: "elm.rect.bg";
+ }
+ color: 255 255 255 0;
+ }
+ description {
+ state: "show" 0.0;
+ rel1 {
+ relative: 1.0 0.0;
+ to_x: "clock.padding.right";
+ to_y: "elm.rect.bg";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "seperator.image2";
+ to_y: "elm.rect.bg";
+ }
+ color: 255 255 255 255;
+ }
+ }
+
+ }
programs {
program {
}
}
- program {
- name: "change_home_pad_1";
- action: STATE_SET "changeHomePad" 0.0;
- signal: "change,home,pad,1";
- source: "elm.rect.*";
- script {
- if (get_int(changeHomePad) == 0) {
- set_state(PART:"elm.rect.left_con", "landscape", 0.0);
- set_state(PART:"elm.swallow.fixed0", "landscape", 0.0);
- set_int(changeHomePad,1);
- }
- }
- }
-
- program {
- name: "change_home_pad_2";
- action: STATE_SET "changeHomePad" 0.0;
- signal: "change,home,pad,2";
- source: "elm.rect.*";
- script {
- if (get_int(changeHomePad) == 1) {
- set_state(PART:"elm.rect.left_con", "default", 0.0);
- set_state(PART:"elm.swallow.fixed0", "default", 0.0);
- set_int(changeHomePad, 0);
- }
- }
- }
program {
name: "bg_opaque";
}
program {
+ name: "show.clip.noeffect";
+ in: 0.15 0.0;
+ action: STATE_SET "show" 0.0;
+ signal: "indicator.clip.show.noeffect";
+ source: "indicator.prog";
+ target: "slide_clip";
+ target: "slide_clip2";
+ }
+
+ program {
+ name: "show.clip";
+ in: 0.15 0.0;
+ action: STATE_SET "show" 0.0;
+ signal: "indicator.clip.show";
+ source: "indicator.prog";
+ target: "slide_clip";
+ target: "slide_clip2";
+ transition: LINEAR 0.15;
+ }
+
+ program {
+ name: "hide.clip.noeffect";
+ action: STATE_SET "default" 0.0;
+ signal: "indicator.clip.hide.noeffect";
+ source: "indicator.prog";
+ target: "slide_clip";
+ target: "slide_clip2";
+ }
+
+ program {
+ name: "hide.clip";
+ action: STATE_SET "default" 0.0;
+ signal: "indicator.clip.hide";
+ source: "indicator.prog";
+ target: "slide_clip";
+ target: "slide_clip2";
+ transition: LINEAR 0.15;
+ }
+ program {
+ name: "show.noti.noeffect";
+ action: STATE_SET "show" 0.0;
+ signal: "indicator.noti.show.noeffect";
+ source: "indicator.prog";
+ target: "elm.swallow.noti";
+ target: "elm.swallow.nonfixed";
+ target: "elm.swallow.fixed1";
+ target: "elm.swallow.fixed2";
+ target: "seperator.image";
+ target: "seperator.image2";
+ }
+
+ program {
name: "show.noti";
action: STATE_SET "show" 0.0;
signal: "indicator.noti.show";
target: "elm.swallow.fixed2";
target: "seperator.image";
target: "seperator.image2";
+ transition: LINEAR 0.3;
+ }
+ program {
+ name: "hide.noti.noeffect";
+ action: STATE_SET "default" 0.0;
+ signal: "indicator.noti.hide.noeffect";
+ source: "indicator.prog";
+ target: "elm.swallow.noti";
+ target: "elm.swallow.nonfixed";
+ target: "elm.swallow.fixed1";
+ target: "elm.swallow.fixed2";
+ target: "seperator.image";
+ target: "seperator.image2";
}
program {
name: "hide.noti";
target: "elm.swallow.fixed2";
target: "seperator.image";
target: "seperator.image2";
+ transition: LINEAR 0.3;
}
+
program {
name: "badge_show";
signal: "badge,show,1";
#include <Ecore_X.h>
#include <unicode/udat.h>
#include <unicode/udatpg.h>
+#include <unicode/ustring.h>
#include "common.h"
#include "indicator.h"
#include "indicator_ui.h"
#include "indicator_gui.h"
#include "indicator_icon_util.h"
+#include "indicator_util.h"
#include "modules.h"
#define SYSTEM_RESUME "system_wakeup"
#define LABEL_STRING "<font_size=%d>%s" \
"</font_size></font>"
+#define BATTERY_TIMER_INTERVAL 3
+#define BATTERY_TIMER_INTERVAL_CHARGING 30
+
#define CLOCK_STR_LEN 256
enum {
static int apm_position = 0;
static Ecore_Timer *timer = NULL;
static Ecore_Timer *battery_timer = NULL;
+static Ecore_Timer *battery_charging_timer = NULL;
+static int battery_charging = 0;
+static int battery_charging_first = 0;
static int register_clock_module(void *data);
static int unregister_clock_module(void);
static int hib_leave_clock_module(void *data);
static int language_changed_cb(void *data);
static int region_changed_cb(void *data);
+static int wake_up_cb(void *data);
#define ICON_PRIORITY INDICATOR_PRIORITY_FIXED6
#define MODULE_NAME "clock"
static void indicator_get_time_by_region(char* output, void* data);
static void ICU_set_timezone(const char *timezone);
+static void indicator_clock_display_battery_percentage(void *data,int win_type );
Indicator_Icon_Object sysclock[INDICATOR_WIN_MAX] = {
{
.hib_leave = hib_leave_clock_module,
.lang_changed = NULL,
.region_changed = region_changed_cb,
- .lang_changed = language_changed_cb
+ .lang_changed = language_changed_cb,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.hib_leave = hib_leave_clock_module,
.lang_changed = NULL,
.region_changed = region_changed_cb,
- .lang_changed = language_changed_cb
+ .lang_changed = language_changed_cb,
+ .wake_up = wake_up_cb
}
};
static void indicator_clock_changed_cb(void *data)
{
- struct appdata *ad = (struct appdata *)data;
char time_str[32];
char time_buf[128], ampm_buf[128];
char buf[CLOCK_STR_LEN];
char icu_apm[CLOCK_STR_LEN] = {0,};
- char apm_result[CLOCK_STR_LEN] ={0,};
+
struct tm *ts = NULL;
time_t ctime;
int len;
retif(data == NULL, , "Invalid parameter!");
- if (battery_timer != NULL)
+ if(indicator_util_get_update_flag()==0)
+ {
+ DBG("need to update");
+ return;
+ }
+
+ if (battery_timer != NULL || battery_charging_timer != NULL)
{
DBG("battery is displaying. ignore clock callback");
return;
free(timezone);
}
-static void indicator_clock_battery_changed_cb(keynode_t *node, void *data)
+static void indicator_clock_pm_state_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ vconf_get_int(VCONFKEY_PM_STATE, &status);
+
+ switch(status)
+ {
+ case VCONFKEY_PM_STATE_LCDOFF:
+ if (timer != NULL) {
+ ecore_timer_del(timer);
+ timer = NULL;
+ }
+
+ if (battery_timer != NULL) {
+ ecore_timer_del(battery_timer);
+ battery_timer = NULL;
+ }
+
+ if (battery_charging_timer != NULL) {
+ ecore_timer_del(battery_charging_timer);
+ battery_charging_timer = NULL;
+ }
+ break;
+ default:
+ break;
+ }
+
+}
+
+static void indicator_clock_battery_disp_changed_cb(keynode_t *node, void *data)
{
- indicator_clock_display_battery_percentage(data);
+ int status = 0;
+
+ vconf_get_int(VCONFKEY_BATTERY_DISP_STATE,&status);
+
+ DBG("indicator_clock_battery_disp_changed_cb(%d)",status);
+
+ if(status==2)
+ {
+ indicator_clock_display_battery_percentage(data,0);
+ indicator_clock_display_battery_percentage(data,1);
+ }
+ else
+ {
+ indicator_clock_display_battery_percentage(data,status);
+ }
+}
+
+static void indicator_clock_charging_now_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ int lock_state = 0;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ vconf_get_int(VCONFKEY_IDLE_LOCK_STATE, &lock_state);
+
+ vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, &status);
+
+ battery_charging = status;
+
+ DBG("indicator_clock_charging_now_cb(%d)",status);
+
+ if(lock_state==VCONFKEY_IDLE_LOCK)
+ {
+ DBG("indicator_clock_charging_now_cb:lock_state(%d)",lock_state);
+ return;
+ }
+
+ if(battery_charging_first == 1&&status==1)
+ {
+ DBG("indicator_clock_charging_now_cb : ignore(%d)",status);
+ }
+
+ if(status==1)
+ {
+ battery_charging_first = 1;
+ indicator_clock_display_battery_percentage(data,0);
+ }
+}
+
+static void indicator_clock_battery_capacity_cb(keynode_t *node, void *data)
+{
+ retif(data == NULL, , "Invalid parameter!");
+
+ if(battery_charging==1&&battery_charging_timer!=NULL)
+ {
+ DBG("indicator_clock_battery_capacity_cb:battery_charging(%d)",battery_charging);
+ indicator_clock_display_battery_percentage(data,0);
+ }
+}
+
+
+static void indicator_clock_usb_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ vconf_get_int(VCONFKEY_SYSMAN_USB_STATUS, &status);
+
+ DBG("indicator_clock_usb_cb(%d)",status);
+
+ if(status==VCONFKEY_SYSMAN_USB_DISCONNECTED)
+ {
+ battery_charging_first = 0;
+ if (battery_charging_timer != NULL)
+ {
+ ecore_timer_del(battery_charging_timer);
+ battery_charging_timer = NULL;
+ }
+ indicator_clock_changed_cb(data);
+ }
}
static void indicator_clock_battery_display_cb(void *data)
{
- int ret = 0;
+ INFO("indicator_clock_battery_charging_stop_cb");
if (battery_timer != NULL) {
ecore_timer_del(battery_timer);
battery_timer = NULL;
}
- ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_CAPACITY,
- indicator_clock_battery_changed_cb);
- if (ret != OK)
- ERR("Fail: unregister VCONFKEY_REGIONFORMAT_TIME1224");
+ indicator_clock_changed_cb(data);
+}
+
+static void indicator_clock_battery_charging_stop_cb(void *data)
+{
+
+ INFO("indicator_clock_battery_charging_stop_cb");
+
+ if (battery_charging_timer != NULL) {
+ ecore_timer_del(battery_charging_timer);
+ battery_charging_timer = NULL;
+ }
indicator_clock_changed_cb(data);
}
-void indicator_clock_display_battery_percentage(void *data)
+static void indicator_clock_lock_state_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ vconf_get_int(VCONFKEY_IDLE_LOCK_STATE, &status);
+
+ DBG("indicator_clock_lock_state_cb(%d)",status);
+
+ if(status==VCONFKEY_IDLE_UNLOCK && battery_charging==1)
+ {
+ battery_charging_first = 1;
+ indicator_clock_display_battery_percentage(data,0);
+ }
+
+}
+
+static void indicator_clock_display_battery_percentage(void *data,int win_type )
{
int ret = FAIL;
int status = 0;
int battery_capa = 0;
char buf[256] = {0,};
char temp[256] = {0,};
+ struct appdata *ad = (struct appdata *)data;
+
+
+ if(battery_charging_timer!=NULL)
+ {
+ INFO("30sec timer alive");
+ return;
+ }
ret = vconf_get_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, &status);
if (ret != OK)
INFO("indicator_clock_display_battery_percentage %s", buf);
- indicator_part_text_emit(data,"elm.text.clock", buf);
+ indicator_part_text_emit_by_win(&(ad->win[win_type]),"elm.text.clock", buf);
- ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_CAPACITY,
- indicator_clock_battery_changed_cb, data);
- if (ret != OK) {
- ERR("Fail: register VCONFKEY_REGIONFORMAT_TIME1224");
- return;
+ if(battery_charging == 1)
+ {
+
+ battery_charging_timer = ecore_timer_add(BATTERY_TIMER_INTERVAL_CHARGING, (void *)indicator_clock_battery_charging_stop_cb,data);
}
+ else
+ {
+ if (battery_timer != NULL) {
+ ecore_timer_del(battery_timer);
+ battery_timer = NULL;
+ }
- battery_timer = ecore_timer_add(3, (void *)indicator_clock_battery_display_cb,data);
+ battery_timer = ecore_timer_add(BATTERY_TIMER_INTERVAL, (void *)indicator_clock_battery_display_cb,data);
+ }
}
}
return OK;
}
+static int wake_up_cb(void *data)
+{
+ int status = 0;
+
+ INFO("CLOCK wake_up_cb");
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ vconf_get_int(VCONFKEY_IDLE_LOCK_STATE, &status);
+
+ DBG("wake_up_cb(%d)",status);
+
+ if(status==VCONFKEY_IDLE_UNLOCK && battery_charging==1)
+ {
+ indicator_clock_display_battery_percentage(data,0);
+ }
+ else
+ {
+ indicator_clock_changed_cb(data);
+ }
+ return OK;
+}
+
static int register_clock_module(void *data)
{
int r = 0, ret = -1;
r = r | ret;
}
- ret = vconf_notify_key_changed(VCONFKEY_PM_STATE, indicator_clock_format_changed_cb, (void *)data);
+ ret = vconf_notify_key_changed(VCONFKEY_PM_STATE, indicator_clock_pm_state_change_cb, (void *)data);
if (ret != OK) {
ERR("Fail: register VCONFKEY_PM_STATE");
r = r | ret;
}
+ ret = vconf_notify_key_changed(VCONFKEY_BATTERY_DISP_STATE,
+ indicator_clock_battery_disp_changed_cb, data);
+ if (ret != OK) {
+ ERR("Fail: register VCONFKEY_SETAPPL_TIMEZONE_INT");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_CAPACITY,
+ indicator_clock_battery_capacity_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW,
+ indicator_clock_charging_now_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_USB_STATUS,
+ indicator_clock_usb_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+
+ ret = vconf_notify_key_changed(VCONFKEY_IDLE_LOCK_STATE,
+ indicator_clock_lock_state_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+
indicator_clock_format_changed_cb(NULL, data);
return r;
ERR("Fail: unregister VCONFKEY_SETAPPL_TIMEZONE_INT");
ret = vconf_ignore_key_changed(VCONFKEY_PM_STATE,
- indicator_clock_format_changed_cb);
+ indicator_clock_battery_disp_changed_cb);
if (ret != OK)
ERR("Fail: unregister VCONFKEY_PM_STATE");
+ ret = vconf_ignore_key_changed(VCONFKEY_BATTERY_DISP_STATE,
+ indicator_clock_pm_state_change_cb);
+ if (ret != OK)
+ ERR("Fail: unregister VCONFKEY_BATTERY_DISP_STATE");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_CAPACITY,
+ indicator_clock_battery_capacity_cb);
+ if (ret != OK)
+ ERR("Fail: unregister VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW,
+ indicator_clock_charging_now_cb);
+ if (ret != OK)
+ ERR("Fail: unregister VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_USB_STATUS,
+ indicator_clock_usb_cb);
+ if (ret != OK)
+ ERR("Fail: unregister VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW");
+
+
+ ret = vconf_ignore_key_changed(VCONFKEY_IDLE_LOCK_STATE,
+ indicator_clock_lock_state_cb);
+ if (ret != OK)
+ ERR("Fail: unregister VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW");
+
if (timer != NULL) {
ecore_timer_del(timer);
timer = NULL;
void indicator_get_time_by_region(char* output,void *data)
{
- retif(data == NULL, NULL, "Data parameter is NULL");
- retif(output == NULL, NULL, "output parameter is NULL");
+ retif(data == NULL, , "Data parameter is NULL");
+ retif(output == NULL, , "output parameter is NULL");
UChar customSkeleton[CLOCK_STR_LEN] = { 0, };
static void ICU_set_timezone(const char *timezone)
{
+ if(timezone == NULL)
+ {
+ ERR("TIMEZONE is NULL");
+ return;
+ }
+
DBG("ICU_set_timezone = %s ", timezone);
UErrorCode ec = U_ZERO_ERROR;
UChar *str = uastrcpy(timezone);
static int register_conn_module(void *data);
static int unregister_conn_module(void);
-extern void show_trnsfr_icon(void *data);
-extern void hide_trnsfr_icon(void);
+static int wake_up_cb(void *data);
Indicator_Icon_Object conn[INDICATOR_WIN_MAX] = {
{
.img_obj = {0,},
.obj_exist = EINA_FALSE,
.init = register_conn_module,
- .fini = unregister_conn_module
+ .fini = unregister_conn_module,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.img_obj = {0,},
.obj_exist = EINA_FALSE,
.init = register_conn_module,
- .fini = unregister_conn_module
+ .fini = unregister_conn_module,
+ .wake_up = wake_up_cb
}
};
};
static Eina_Bool dnet_transferring = EINA_FALSE;
+static int updated_while_lcd_off = 0;
+
static void set_app_state(void* data)
{
int ret = 0;
int ps_type = VCONFKEY_TELEPHONY_PSTYPE_NONE;
+ if(indicator_util_get_update_flag()==0)
+ {
+ updated_while_lcd_off = 1;
+ DBG("need to update %d",updated_while_lcd_off);
+ return;
+ }
+ updated_while_lcd_off = 0;
+
retif(data == NULL, , "Invalid parameter!");
ret = vconf_get_int(VCONFKEY_WIFI_STATE, &status);
if (ret == OK) {
INFO("CONNECTION WiFi Status: %d", status);
if ((status == VCONFKEY_WIFI_CONNECTED)) {
- indicator_util_icon_hide(&conn);
+ hide_image_icon();
if (dnet_transferring == EINA_TRUE) {
- hide_trnsfr_icon();
dnet_transferring = EINA_FALSE;
}
return;
INFO("CONNECTION DNET Status: %d", status);
if (status == VCONFKEY_DNET_TRANSFER) {
if (dnet_transferring == EINA_FALSE) {
- show_trnsfr_icon(data);
dnet_transferring = EINA_TRUE;
}
} else {
if (dnet_transferring == EINA_TRUE) {
- hide_trnsfr_icon();
dnet_transferring = EINA_FALSE;
}
}
return;
}
+static int wake_up_cb(void *data)
+{
+ if(updated_while_lcd_off==0)
+ {
+ DBG("ICON WAS NOT UPDATED");
+ return OK;
+ }
+ indicator_conn_change_cb(NULL, data);
+ return OK;
+}
+
static int register_conn_module(void *data)
{
int r = 0, ret = -1;
ERR("Failed to unregister callback!");
if (dnet_transferring == EINA_TRUE) {
- hide_trnsfr_icon();
dnet_transferring = EINA_FALSE;
}
static int register_mobile_hotspot_module(void *data);
static int unregister_mobile_hotspot_module(void);
+static int wake_up_cb(void *data);
Indicator_Icon_Object mobile_hotspot[INDICATOR_WIN_MAX] = {
{
.obj_exist = EINA_FALSE,
.area = INDICATOR_ICON_AREA_NOTI,
.init = register_mobile_hotspot_module,
- .fini = unregister_mobile_hotspot_module
+ .fini = unregister_mobile_hotspot_module,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.obj_exist = EINA_FALSE,
.area = INDICATOR_ICON_AREA_NOTI,
.init = register_mobile_hotspot_module,
- .fini = unregister_mobile_hotspot_module
+ .fini = unregister_mobile_hotspot_module,
+ .wake_up = wake_up_cb
}
};
[MOBILEAP_CONNECTED8] = "Connection/B03_MobileAP_connected_08.png",
[MOBILEAP_CONNECTED9] = "Connection/B03_MobileAP_connected_09.png",
};
+static int updated_while_lcd_off = 0;
static void set_app_state(void* data)
{
int ret;
retif(data == NULL, , "Invalid parameter!");
+
+ if(indicator_util_get_update_flag()==0)
+ {
+ updated_while_lcd_off = 1;
+ DBG("need to update %d",updated_while_lcd_off);
+ return;
+ }
+ updated_while_lcd_off = 0;
+
ret = vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_MODE, &status);
if (ret == OK) {
INFO("mobile_hotspot status: %d", status);
return;
}
+static int wake_up_cb(void *data)
+{
+ if(updated_while_lcd_off==0)
+ {
+ DBG("ICON WAS NOT UPDATED");
+ return OK;
+ }
+
+ indicator_mobile_hotspot_change_cb(NULL, data);
+ return OK;
+}
+
static int register_mobile_hotspot_module(void *data)
{
int r = 0, ret = -1;
static int register_usb_module(void *data);
static int unregister_usb_module(void);
-extern void show_trnsfr_icon(void *data);
-extern void hide_trnsfr_icon(void);
Indicator_Icon_Object usb[INDICATOR_WIN_MAX] = {
{
static int register_wifi_module(void *data);
static int unregister_wifi_module(void);
-extern void show_trnsfr_icon(void *data);
-extern void hide_trnsfr_icon(void);
+static int wake_up_cb(void *data);
Indicator_Icon_Object wifi[INDICATOR_WIN_MAX] = {
{
.obj_exist = EINA_FALSE,
.area = INDICATOR_ICON_AREA_FIXED,
.init = register_wifi_module,
- .fini = unregister_wifi_module
+ .fini = unregister_wifi_module,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.obj_exist = EINA_FALSE,
.area = INDICATOR_ICON_AREA_FIXED,
.init = register_wifi_module,
- .fini = unregister_wifi_module
+ .fini = unregister_wifi_module,
+ .wake_up = wake_up_cb
}
};
};
static Eina_Bool wifi_transferring = EINA_FALSE;
+static int updated_while_lcd_off = 0;
static void set_app_state(void* data)
{
int ret;
retif(data == NULL, , "Invalid parameter!");
+
+ if(indicator_util_get_update_flag()==0)
+ {
+ updated_while_lcd_off = 1;
+ DBG("need to update %d",updated_while_lcd_off);
+ return;
+ }
+ updated_while_lcd_off = 0;
+
ret = vconf_get_int(VCONFKEY_WIFI_STRENGTH, &strength);
if (ret == OK) {
INFO("CONNECTION WiFi Strength: %d", strength);
INFO("CONNECTION WiFi Status: %d", status);
if (status != VCONFKEY_WIFI_TRANSFER) {
if ( wifi_transferring == EINA_TRUE ) {
- hide_trnsfr_icon();
wifi_transferring = EINA_FALSE;
}
}
return;
} else if (status == VCONFKEY_WIFI_TRANSFER) {
if (wifi_transferring != EINA_TRUE) {
- show_trnsfr_icon(data);
wifi_transferring = EINA_TRUE;
}
return;
return;
}
+static int wake_up_cb(void *data)
+{
+ if(updated_while_lcd_off==0)
+ {
+ DBG("ICON WAS NOT UPDATED");
+ return OK;
+ }
+
+ indicator_wifi_change_cb(NULL, data);
+ return OK;
+}
+
static int register_wifi_module(void *data)
{
int r = 0, ret = -1;
#include "modules.h"
#include "indicator_icon_util.h"
-#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_2
+#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_3
#define MODULE_NAME "alarm"
static int register_alarm_module(void *data);
static int register_earphone_module(void *data);
static int unregister_earphone_module(void);
+static int wake_up_cb(void *data);
Indicator_Icon_Object earphone[INDICATOR_WIN_MAX] = {
{
.obj_exist = EINA_FALSE,
.area = INDICATOR_ICON_AREA_NOTI,
.init = register_earphone_module,
- .fini = unregister_earphone_module
+ .fini = unregister_earphone_module,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.obj_exist = EINA_FALSE,
.area = INDICATOR_ICON_AREA_NOTI,
.init = register_earphone_module,
- .fini = unregister_earphone_module
+ .fini = unregister_earphone_module,
+ .wake_up = wake_up_cb
}
};
"Earphone/B03_Earphone.png",
NULL
};
+static int updated_while_lcd_off = 0;
+
static void set_app_state(void* data)
{
retif(data == NULL, , "Invalid parameter!");
+ if(indicator_util_get_update_flag()==0)
+ {
+ updated_while_lcd_off = 1;
+ DBG("need to update %d",updated_while_lcd_off);
+ return;
+ }
+ updated_while_lcd_off = 0;
+
ret = vconf_get_int(VCONFKEY_SYSMAN_EARJACK, &status);
if (ret == FAIL) {
ERR("Failed to get VCONFKEY_MMC_STATE!");
}
}
+static int wake_up_cb(void *data)
+{
+ if(updated_while_lcd_off==0)
+ {
+ DBG("ICON WAS NOT UPDATED");
+ return OK;
+ }
+
+ indicator_earphone_change_cb(NULL, data);
+ return OK;
+}
+
static int register_earphone_module(void *data)
{
int ret;
+++ /dev/null
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <vconf.h>
-#include "common.h"
-#include "indicator.h"
-#include "indicator_icon_util.h"
-#include "modules.h"
-#include "indicator_ui.h"
-
-#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_1
-#define MODULE_NAME "FM_Radio"
-
-static int register_fm_radio_module(void *data);
-static int unregister_fm_radio_module(void);
-
-Indicator_Icon_Object fm_radio[INDICATOR_WIN_MAX] = {
-{
- .win_type = INDICATOR_WIN_PORT,
- .type = INDICATOR_IMG_ICON,
- .name = MODULE_NAME,
- .priority = ICON_PRIORITY,
- .always_top = EINA_TRUE,
- .exist_in_view = EINA_FALSE,
- .txt_obj = {0,},
- .img_obj = {0,},
- .obj_exist = EINA_FALSE,
- .area = INDICATOR_ICON_AREA_NOTI,
- .init = register_fm_radio_module,
- .fini = unregister_fm_radio_module
-},
-{
- .win_type = INDICATOR_WIN_LAND,
- .type = INDICATOR_IMG_ICON,
- .name = MODULE_NAME,
- .priority = ICON_PRIORITY,
- .always_top = EINA_TRUE,
- .exist_in_view = EINA_FALSE,
- .txt_obj = {0,},
- .img_obj = {0,},
- .obj_exist = EINA_FALSE,
- .area = INDICATOR_ICON_AREA_NOTI,
- .init = register_fm_radio_module,
- .fini = unregister_fm_radio_module
-}
-};
-
-static char *icon_path[] = {
- "Background playing/B03_Backgroundplaying_FMradio.png",
- NULL
-};
-
-static void set_app_state(void* data)
-{
- int i = 0;
-
- for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
- {
- fm_radio[i].ad = data;
- }
-}
-
-static void show_image_icon(void *data)
-{
- int i = 0;
- for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
- {
- fm_radio[i].img_obj.data = icon_path[0];
- indicator_util_icon_show(&fm_radio[i]);
- }
-}
-
-static void hide_image_icon(void)
-{
- int i = 0;
- for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
- {
- indicator_util_icon_hide(&fm_radio[i]);
- }
-}
-
-static void indicator_fm_radio_change_cb(keynode_t *node, void *data)
-{
- int status;
- int ret;
-
- retif(data == NULL, , "Invalid parameter!");
-
- ret = vconf_get_int(VCONFKEY_RADIO_STATE, &status);
- if (ret == OK) {
- INFO("FM_RADIO state: %d", status);
- if (status == VCONFKEY_RADIO_PLAY)
- show_image_icon(data);
- else
- hide_image_icon();
- }
- return;
-}
-
-static int register_fm_radio_module(void *data)
-{
- int ret;
-
- retif(data == NULL, FAIL, "Invalid parameter!");
-
- set_app_state(data);
-
- ret = vconf_notify_key_changed(VCONFKEY_RADIO_STATE,
- indicator_fm_radio_change_cb, data);
- if (ret != OK)
- ERR("Failed to register callback!");
- indicator_fm_radio_change_cb(NULL, data);
-
- return ret;
-}
-
-static int unregister_fm_radio_module(void)
-{
- int ret;
-
- ret = vconf_ignore_key_changed(VCONFKEY_RADIO_STATE,
- indicator_fm_radio_change_cb);
- if (ret != OK)
- ERR("Failed to unregister callback!");
-
-// hide_image_icon();
-
- return OK;
-}
static int register_mmc_module(void *data);
static int unregister_mmc_module(void);
+static int wake_up_cb(void *data);
Indicator_Icon_Object mmc[INDICATOR_WIN_MAX] = {
{
.obj_exist = EINA_FALSE,
.area = INDICATOR_ICON_AREA_NOTI,
.init = register_mmc_module,
- .fini = unregister_mmc_module
+ .fini = unregister_mmc_module,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.obj_exist = EINA_FALSE,
.area = INDICATOR_ICON_AREA_NOTI,
.init = register_mmc_module,
- .fini = unregister_mmc_module
+ .fini = unregister_mmc_module,
+ .wake_up = wake_up_cb
}
};
"Background playing/B03_Memorycard.png",
NULL
};
+static int updated_while_lcd_off = 0;
static void set_app_state(void* data)
{
}
}
-
static void indicator_mmc_change_cb(keynode_t *node, void *data)
{
int status = 0;
retif(data == NULL, , "Invalid parameter!");
+ if(indicator_util_get_update_flag()==0)
+ {
+ updated_while_lcd_off = 1;
+ DBG("need to update %d",updated_while_lcd_off);
+ return;
+ }
+ updated_while_lcd_off = 0;
+
ret = vconf_get_int(VCONFKEY_FILEMANAGER_DB_STATUS, &status);
if (ret == FAIL) {
ERR("Failed to get VCONFKEY_MMC_STATE!");
}
}
+static void indicator_mmc_pm_state_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ int ret = 0;
+ retif(data == NULL, , "Invalid parameter!");
+
+ vconf_get_int(VCONFKEY_PM_STATE, &status);
+
+ if(status == VCONFKEY_PM_STATE_LCDOFF)
+ {
+ int sos_status = 0;
+ ret = vconf_get_int(VCONFKEY_FILEMANAGER_DB_STATUS, &sos_status);
+ if (ret < 0)
+ ERR("fail to get [%s]", VCONFKEY_FILEMANAGER_DB_STATUS);
+
+ INFO("mmc STATUS: %d", sos_status);
+ switch (sos_status) {
+ case VCONFKEY_FILEMANAGER_DB_UPDATING:
+ icon_animation_set(ICON_ANI_NONE);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+static int wake_up_cb(void *data)
+{
+ if(updated_while_lcd_off==0 && mmc[0].obj_exist == EINA_FALSE)
+ {
+ DBG("ICON WAS NOT UPDATED");
+ return OK;
+ }
+
+ indicator_mmc_change_cb(NULL, data);
+ return OK;
+}
+
static int register_mmc_module(void *data)
{
int ret;
if (ret != OK)
ERR("Failed to register mmcback!");
+ ret = vconf_notify_key_changed(VCONFKEY_PM_STATE,
+ indicator_mmc_pm_state_change_cb, data);
+ if (ret != OK)
+ ERR("Failed to register callback! : VCONFKEY_PM_STATE");
+
+
indicator_mmc_change_cb(NULL, data);
return ret;
if (ret != OK)
ERR("Failed to unregister mmcback!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_PM_STATE,
+ indicator_mmc_pm_state_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
return OK;
}
static int register_mp3_play_module(void *data);
static int unregister_mp3_play_module(void);
-static void mctrl_monitor_cb(int action, const char *name, void *data);
+static int mctrl_monitor_cb(int action, const char *name, void *data);
+static int wake_up_cb(void *data);
+
+static int mp_registerd = 0;
+static int updated_while_lcd_off = 0;
+
Indicator_Icon_Object mp3_play[INDICATOR_WIN_MAX] = {
{
.area = INDICATOR_ICON_AREA_NOTI,
.init = register_mp3_play_module,
.fini = unregister_mp3_play_module,
- .minictrl_control = mctrl_monitor_cb
+ .minictrl_control = mctrl_monitor_cb,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.area = INDICATOR_ICON_AREA_NOTI,
.init = register_mp3_play_module,
.fini = unregister_mp3_play_module,
- .minictrl_control = mctrl_monitor_cb
+ .minictrl_control = mctrl_monitor_cb,
+ .wake_up = wake_up_cb
}
};
retif(data == NULL, , "Invalid parameter!");
+ if(indicator_util_get_update_flag()==0)
+ {
+ updated_while_lcd_off = 1;
+ DBG("need to update %d",updated_while_lcd_off);
+ return;
+ }
+ updated_while_lcd_off = 0;
+
ret = vconf_get_int(VCONFKEY_MUSIC_STATE, &status);
if (ret == OK) {
INFO("MUSIC state: %d", status);
static void indicator_mp3_play_change_cb(keynode_t *node, void *data)
{
- int status;
- int ret;
-
retif(data == NULL, , "Invalid parameter!");
DBG("indicator_mp3_play_change_cb");
return;
}
-static void mctrl_monitor_cb(int action, const char *name, void *data)
+static int mctrl_monitor_cb(int action, const char *name, void *data)
{
- retif(!data, , "data is NULL");
- retif(!name, , "name is NULL");
+ retif(!data, FAIL, "data is NULL");
+ retif(!name, FAIL, "name is NULL");
if(strncmp(name,MINICONTROL_NAME,strlen(MINICONTROL_NAME))!=0)
{
ERR("_mctrl_monitor_cb:no mp %s",name);
- return;
+ return FAIL;
}
DBG("_mctrl_monitor_cb:%s %d",name,action);
switch (action) {
case MINICONTROL_ACTION_START:
vconf_notify_key_changed(VCONFKEY_MUSIC_STATE, indicator_mp3_play_change_cb, data);
+ mp_registerd = 1;
show_mp_icon(data);
break;
case MINICONTROL_ACTION_STOP:
- hide_image_icon();
+ mp_registerd = 0;
+ if(indicator_util_get_update_flag()==1)
+ {
+ hide_image_icon();
+ return OK;
+ }
vconf_ignore_key_changed(VCONFKEY_MUSIC_STATE, indicator_mp3_play_change_cb);
break;
default:
break;
}
+
+ return OK;
+}
+
+static int wake_up_cb(void *data)
+{
+ if(updated_while_lcd_off==0)
+ {
+ DBG("ICON WAS NOT UPDATED");
+ return OK;
+ }
+
+ if(mp_registerd==1)
+ {
+ indicator_mp3_play_change_cb(NULL, data);
+ }
+ else
+ {
+ hide_image_icon();
+ }
+ return OK;
}
static int register_mp3_play_module(void *data)
#include <stdio.h>
#include <stdlib.h>
+#include <vconf.h>
#include <notification.h>
#include "common.h"
#include "indicator.h"
static Eina_List *status_list;
-static int noti_cnt;
static void set_app_state(void* data)
{
if (data->icon[i])
{
if (data->icon[i]->img_obj.data)
- free((char *)data->icon[i]->img_obj.data);
+ {
+ free(data->icon[i]->img_obj.data);
+ }
+
+ if (data->icon[i]->name)
+ {
+ free(data->icon[i]->name);
+ }
free(data->icon[i]);
}
+
+ }
+
+ if(data!=NULL)
+ {
+ INFO("noti data free!");
+ free(data);
+ data = NULL;
}
}
}
DBG("Get Path of Notication %s : %s",data->icon[0]->name, icon_path);
if (icon_path == NULL
- || !ecore_file_exists(icon_path)) {
+ || !ecore_file_exists(icon_path))
+ {
int i = 0;
for(i=0 ; i<INDICATOR_WIN_MAX ; i++)
{
data->icon[i]->img_obj.data = NULL;
}
- } else {
+ }
+ else
+ {
show_icon_with_path(data, icon_path);
}
}
{
Eina_List *l;
struct noti_status *data;
- int total = 0, noti_count = 0;
EINA_LIST_REVERSE_FOREACH(status_list, l, data) {
if (data) {
{
int i = 0;
DBG("noti_data %x",noti_data);
- retif(noti_data == NULL || data == NULL, NULL, "Invalid parameter!");
+ retif(noti_data == NULL || data == NULL, , "Invalid parameter!");
for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
{
return;
}
-static void _set_noti_cnt(int cnt)
-{
- if (cnt >= 0) {
- noti_cnt = cnt;
- indicator_util_event_count_set(noti_cnt, noti[0].ad);
- }
-}
-
-static int _get_noti_cnt(void)
-{
- return noti_cnt;
-}
-
-static void _update_all_status(void)
+static void _remove_all_noti(void)
{
Eina_List *l;
- struct noti_status *data;
- int total = 0, noti_count = 0;
-
- EINA_LIST_FOREACH(status_list, l, data) {
- if (data) {
- DBG("%s is updated! Cnt : %d",
- data->icon[0]->name, data->cnt);
- notification_get_count(NOTIFICATION_TYPE_NONE, NULL,
- NOTIFICATION_GROUP_ID_NONE,
- NOTIFICATION_PRIV_ID_NONE,
- ¬i_count);
- data->cnt = noti_count;
-
- if (data->cnt == 0)
- hide_image_icon(data);
- else
- total += data->cnt;
- }
+ struct noti_status *n_data;
+ EINA_LIST_FOREACH(status_list, l, n_data) {
+ DBG("Clear Status List : %s", n_data->icon[0]->name);
+ hide_image_icon(n_data);
+ free_image_icon(n_data);
+ status_list = eina_list_remove_list(status_list, l);
}
+ eina_list_free(status_list);
+
}
static void _change_icon_status(void *data, notification_list_h noti_list)
{
- int cnt = 0, new_cnt = 0;
+ int new_cnt = 0;
Eina_List *l = NULL;
notification_h noti = NULL;
struct noti_status *n_data = NULL;
status->noti = noti;
insert_icon_list(status);
status_list = eina_list_append(status_list, status);
- cnt = _get_noti_cnt() + status->cnt;
}
}
}
void update_noti_module_new(void *data, notification_type_e type)
{
notification_list_h list = NULL;
+ notification_list_h noti_list_head = NULL;
notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
int get_event_count = indicator_util_max_visible_event_count(INDICATOR_WIN_LAND);
retif(data == NULL, , "Invalid parameter!");
- noti_err = notification_get_grouping_list(NOTIFICATION_TYPE_NONE,
+ INFO("update_noti_module_new %d", type);
+
+ noti_err = notification_get_list(NOTIFICATION_TYPE_NONE,
get_event_count, &list);
+ noti_list_head = list;
+
if (noti_err != NOTIFICATION_ERROR_NONE || list == NULL) {
- _update_all_status();
+ INFO("update_noti_module_new %d %x", noti_err, list);
+ _remove_all_noti();
+ notification_free_list(noti_list_head);
return;
}
_change_icon_status(data, list);
+
+ notification_free_list(noti_list_head);
}
static int register_voice_recorder_module(void *data);
static int unregister_voice_recorder_module(void);
-static void mctrl_monitor_cb(int action, const char *name, void *data);
+static int mctrl_monitor_cb(int action, const char *name, void *data);
+static int wake_up_cb(void *data);
+
+static int vr_registerd = 0;
+static int updated_while_lcd_off = 0;
Indicator_Icon_Object voice_recorder[INDICATOR_WIN_MAX] = {
{
.area = INDICATOR_ICON_AREA_NOTI,
.init = register_voice_recorder_module,
.fini = unregister_voice_recorder_module,
- .minictrl_control = mctrl_monitor_cb
+ .minictrl_control = mctrl_monitor_cb,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.area = INDICATOR_ICON_AREA_NOTI,
.init = register_voice_recorder_module,
.fini = unregister_voice_recorder_module,
- .minictrl_control = mctrl_monitor_cb
+ .minictrl_control = mctrl_monitor_cb,
+ .wake_up = wake_up_cb
}
};
retif(data == NULL, , "Invalid parameter!");
+ if(indicator_util_get_update_flag()==0)
+ {
+ updated_while_lcd_off = 1;
+ DBG("need to update %d",updated_while_lcd_off);
+ return;
+ }
+ updated_while_lcd_off = 0;
+
ret = vconf_get_int(VCONFKEY_VOICERECORDER_STATE, &status);
if (ret == OK) {
INFO("VOICE RECORDER state: %d", status);
static void indicator_voice_recorder_change_cb(keynode_t *node, void *data)
{
- int status;
- int ret;
-
retif(data == NULL, , "Invalid parameter!");
show_voicerecoder_icon(data);
return;
}
-static void mctrl_monitor_cb(int action, const char *name, void *data)
+static int mctrl_monitor_cb(int action, const char *name, void *data)
{
- retif(!data, , "data is NULL");
- retif(!name, , "name is NULL");
+ retif(!data, FAIL, "data is NULL");
+ retif(!name, FAIL, "name is NULL");
if(strncmp(name,MINICONTROL_NAME,strlen(MINICONTROL_NAME))!=0)
{
ERR("_mctrl_monitor_cb: no VR %s",name);
- return;
+ return FAIL;
}
DBG("_mctrl_monitor_cb:%s %d",name,action);
switch (action) {
case MINICONTROL_ACTION_START:
+ vr_registerd = 1;
vconf_notify_key_changed(VCONFKEY_VOICERECORDER_STATE, indicator_voice_recorder_change_cb, data);
show_voicerecoder_icon(data);
break;
case MINICONTROL_ACTION_STOP:
- hide_image_icon();
+ vr_registerd = 0;
+
+ if(indicator_util_get_update_flag()==1)
+ {
+ hide_image_icon();
+ }
+
vconf_ignore_key_changed(VCONFKEY_VOICERECORDER_STATE, indicator_voice_recorder_change_cb);
break;
default:
break;
}
+
+ return OK;
+}
+
+static int wake_up_cb(void *data)
+{
+ if(updated_while_lcd_off==0)
+ {
+ DBG("ICON WAS NOT UPDATED");
+ return OK;
+ }
+
+ if(vr_registerd==1)
+ {
+ indicator_voice_recorder_change_cb(NULL, data);
+ }
+ else
+ {
+ hide_image_icon();
+ }
+ return OK;
}
+
static int register_voice_recorder_module(void *data)
{
#include "modules.h"
-#define INDICATOR_MODULE_NUMBERS 24
+#define INDICATOR_MODULE_NUMBERS 22
extern Indicator_Icon_Object home[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object rssi[INDICATOR_WIN_MAX];
-extern Indicator_Icon_Object roaming[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object usb[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object wifi[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object mobile_hotspot[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object conn[INDICATOR_WIN_MAX];
-extern Indicator_Icon_Object trnsfr[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object sos[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object call[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object call_divert[INDICATOR_WIN_MAX];
-extern Indicator_Icon_Object active_sync[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object mmc[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object noti[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object useralarm[INDICATOR_WIN_MAX];
-extern Indicator_Icon_Object fm_radio[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object mp3_play[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object voice_recorder[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object silent[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object bluetooth[INDICATOR_WIN_MAX];
-extern Indicator_Icon_Object rotate[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object gps[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object nfc[INDICATOR_WIN_MAX];
extern Indicator_Icon_Object wifi_direct[INDICATOR_WIN_MAX];
static Indicator_Icon_Object *modules[INDICATOR_WIN_MAX][INDICATOR_MODULE_NUMBERS] = {
{
+ &sysclock[0],
+ &battery[0],
+ &wifi[0],
&rssi[0],
- &roaming[0],
&sos[0],
&usb[0],
- &wifi[0],
&mobile_hotspot[0],
&conn[0],
&call[0],
&mmc[0],
¬i[0],
&useralarm[0],
- &fm_radio[0],
&mp3_play[0],
&voice_recorder[0],
&silent[0],
&gps[0],
&nfc[0],
&wifi_direct[0],
- &sysclock[0],
- &battery[0],
&earphone[0],
NULL
},
{
+ &sysclock[1],
+ &battery[1],
+ &wifi[1],
&rssi[1],
- &roaming[1],
&sos[1],
&usb[1],
- &wifi[1],
&mobile_hotspot[1],
&conn[1],
&call[1],
&mmc[1],
¬i[1],
&useralarm[1],
- &fm_radio[1],
&mp3_play[1],
&voice_recorder[1],
&silent[1],
&gps[1],
&nfc[1],
&wifi_direct[1],
- &sysclock[1],
- &battery[1],
&earphone[1],
NULL
}
}
}
}
+
+void indicator_wake_up_modules(void *data)
+{
+ int i;
+ int j = 0;
+
+ for(j=0;j<INDICATOR_WIN_MAX;j++)
+ {
+ for (i = 0; modules[j][i]; i++) {
+ if (modules[j][i]->wake_up)
+ modules[j][i]->wake_up(data);
+ }
+ }
+}
+
void indicator_hib_leave_modules(void *data);
void indicator_lang_changed_modules(void *data);
void indicator_region_changed_modules(void *data);
-
+void indicator_minictrl_control_modules(int action, const char* name, void *data);
+void indicator_wake_up_modules(void *data);
#endif
static int hib_enter_rssi_module(void);
static int hib_leave_rssi_module(void *data);
static int language_changed_cb(void *data);
+static int wake_up_cb(void *data);
Indicator_Icon_Object rssi[INDICATOR_WIN_MAX] = {
{
.fini = unregister_rssi_module,
.hib_enter = hib_enter_rssi_module,
.hib_leave = hib_leave_rssi_module,
- .lang_changed = language_changed_cb
+ .lang_changed = language_changed_cb,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.fini = unregister_rssi_module,
.hib_enter = hib_enter_rssi_module,
.hib_leave = hib_leave_rssi_module,
- .lang_changed = language_changed_cb
+ .lang_changed = language_changed_cb,
+ .wake_up = wake_up_cb
}
};
};
static int bRoaming = 0;
+static int updated_while_lcd_off = 0;
static const char *icon_path[LEVEL_MAX] = {
[LEVEL_RSSI_0] = "RSSI/B03_RSSI_Sim_00.png",
retif(data == NULL, , "Invalid parameter!");
+ if(indicator_util_get_update_flag()==0)
+ {
+ updated_while_lcd_off = 1;
+ DBG("need to update %d",updated_while_lcd_off);
+ return;
+ }
+ updated_while_lcd_off = 0;
+
ret = vconf_get_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, &status);
if (ret == OK && status == TRUE) {
INFO("RSSI Status: Flight Mode");
return OK;
}
+static int wake_up_cb(void *data)
+{
+ if(updated_while_lcd_off==0)
+ {
+ DBG("ICON WAS NOT UPDATED");
+ return OK;
+ }
+
+ indicator_rssi_change_cb(NULL, data);
+ return OK;
+}
+
+
static int register_rssi_module(void *data)
{
int r = 0, ret = -1;
static int register_battery_module(void *data);
static int unregister_battery_module(void);
+static int wake_up_cb(void *data);
Indicator_Icon_Object battery[INDICATOR_WIN_MAX] = {
{
.img_obj = {0,0,BATTERY_ICON_WIDTH,BATTERY_ICON_HEIGHT},
.obj_exist = EINA_FALSE,
.init = register_battery_module,
- .fini = unregister_battery_module
+ .fini = unregister_battery_module,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.img_obj = {0,0,BATTERY_ICON_WIDTH,BATTERY_ICON_HEIGHT},
.obj_exist = EINA_FALSE,
.init = register_battery_module,
- .fini = unregister_battery_module
+ .fini = unregister_battery_module,
+ .wake_up = wake_up_cb
}
};
static int clock_mode = INDICATOR_CLOCK_MODE_12H;
-
enum {
BATTERY_ICON_WIDTH_12H,
BATTERY_ICON_WIDTH_24H,
[BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_20] = "Power/24H/B03_battery_animation_24h_20.png",
};
-static const char *fuel_guage_charging_icon_path[FUEL_GAUGE_LV_NUM] = {
- [FUEL_GAUGE_LV_0] = "Power/battery_20/B03_Power_charging_00.png",
- [FUEL_GAUGE_LV_1] = "Power/battery_20/B03_Power_charging_01.png",
- [FUEL_GAUGE_LV_2] = "Power/battery_20/B03_Power_charging_02.png",
- [FUEL_GAUGE_LV_3] = "Power/battery_20/B03_Power_charging_03.png",
- [FUEL_GAUGE_LV_4] = "Power/battery_20/B03_Power_charging_04.png",
- [FUEL_GAUGE_LV_5] = "Power/battery_20/B03_Power_charging_05.png",
- [FUEL_GAUGE_LV_6] = "Power/battery_20/B03_Power_charging_06.png",
- [FUEL_GAUGE_LV_7] = "Power/battery_20/B03_Power_charging_07.png",
- [FUEL_GAUGE_LV_8] = "Power/battery_20/B03_Power_charging_08.png",
- [FUEL_GAUGE_LV_9] = "Power/battery_20/B03_Power_charging_09.png",
- [FUEL_GAUGE_LV_10] = "Power/battery_20/B03_Power_charging_10.png",
- [FUEL_GAUGE_LV_11] = "Power/battery_20/B03_Power_charging_11.png",
- [FUEL_GAUGE_LV_12] = "Power/battery_20/B03_Power_charging_12.png",
- [FUEL_GAUGE_LV_13] = "Power/battery_20/B03_Power_charging_13.png",
- [FUEL_GAUGE_LV_14] = "Power/battery_20/B03_Power_charging_14.png",
- [FUEL_GAUGE_LV_15] = "Power/battery_20/B03_Power_charging_15.png",
- [FUEL_GAUGE_LV_16] = "Power/battery_20/B03_Power_charging_16.png",
- [FUEL_GAUGE_LV_17] = "Power/battery_20/B03_Power_charging_17.png",
- [FUEL_GAUGE_LV_18] = "Power/battery_20/B03_Power_charging_18.png",
- [FUEL_GAUGE_LV_19] = "Power/battery_20/B03_Power_charging_19.png",
- [FUEL_GAUGE_LV_20] = "Power/battery_20/B03_Power_charging_20.png",
-};
-
struct battery_level_info {
int current_level;
int current_capa;
int min_level;
int max_level;
- const char **icon_path;
- const char **charing_icon_path;
};
static struct battery_level_info _level;
_level.current_level = -1;
_level.current_capa = -1;
_level.max_level = FUEL_GAUGE_LV_MAX;
- _level.icon_path = fuel_guage_icon_path;
- _level.charing_icon_path = fuel_guage_icon_path;
indicator_battery_get_time_format();
}
ERR("Fail to get [%s: %d]",
VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, ret);
-
int i = 0;
for(i=0 ; i<INDICATOR_WIN_MAX ; i++)
{
retif(data == NULL, , "Invalid parameter!");
+ if(indicator_util_get_update_flag()==0)
+ {
+ DBG("need to update");
+ return;
+ }
+
ret = vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CAPACITY, &battery_capa);
if (ret != OK)
{
static void indicator_battery_percentage_option_cb(keynode_t *node, void *data)
{
- hide_battery_icon();
- indicator_battery_check_percentage_option(data);
- show_battery_icon();
+
}
static void indicator_battery_change_cb(keynode_t *node, void *data)
indicator_battery_update_display(data);
}
+static void indicator_battery_pm_state_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ retif(data == NULL, , "Invalid parameter!");
+
+ vconf_get_int(VCONFKEY_PM_STATE, &status);
+
+ if(status == VCONFKEY_PM_STATE_LCDOFF)
+ {
+ delete_timer();
+ }
+}
+
+static int wake_up_cb(void *data)
+{
+ INFO("BATTERY wake_up_cb");
+ indicator_battery_clock_format_changed_cb(NULL, data);
+ return OK;
+}
+
static int register_battery_module(void *data)
{
int r = 0, ret = -1;
ERR("Fail: register VCONFKEY_REGIONFORMAT_TIME1224");
r = r | ret;
}
-
- indicator_battery_update_display(data);
+ ret = vconf_notify_key_changed(VCONFKEY_PM_STATE,
+ indicator_battery_pm_state_change_cb, data);
+ if (ret != OK) {
+ ERR("Fail: register VCONFKEY_REGIONFORMAT_TIME1224");
+ r = r | ret;
+ }
return r;
}
if (ret != OK)
ERR("Failed to unregister callback!");
+ ret = vconf_ignore_key_changed(VCONFKEY_PM_STATE,
+ indicator_battery_pm_state_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
delete_timer();
for(i=0 ; i<INDICATOR_WIN_MAX ; i++)
#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_2
#define MODULE_NAME "active_sync"
+#define TIMER_INTERVAL 0.5
+#define SYNC_ICON_NUM 4
static int register_active_sync_module(void *data);
static int unregister_active_sync_module(void);
static int hib_enter_active_sync_module(void);
static int hib_leave_active_sync_module(void *data);
+static int wake_up_cb(void *data);
Indicator_Icon_Object active_sync[INDICATOR_WIN_MAX] = {
{
.init = register_active_sync_module,
.fini = unregister_active_sync_module,
.hib_enter = hib_enter_active_sync_module,
- .hib_leave = hib_leave_active_sync_module
+ .hib_leave = hib_leave_active_sync_module,
+ .wake_up = wake_up_cb
},
{
.type = INDICATOR_IMG_ICON,
.init = register_active_sync_module,
.fini = unregister_active_sync_module,
.hib_enter = hib_enter_active_sync_module,
- .hib_leave = hib_leave_active_sync_module
+ .hib_leave = hib_leave_active_sync_module,
+ .wake_up = wake_up_cb
}
};
static const char *icon_path[] = {
- "Processing/B03_Processing_Syncing.png",
- "Processing/B03_Processing_Syncerror.png",
+ "Processing/B03_Processing_Syncing_01.png",
+ "Processing/B03_Processing_Syncing_02.png",
+ "Processing/B03_Processing_Syncing_03.png",
+ "Processing/B03_Processing_Syncing_04.png",
NULL
};
+static Ecore_Timer *timer;
+static int icon_index = 0;
+static int updated_while_lcd_off = 0;
+
static void set_app_state(void* data)
{
int i = 0;
}
-static void show_image_icon(void* data)
+static void show_image_icon(void* data, int index)
{
int i = 0;
for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
{
- active_sync[i].img_obj.data = icon_path[0];
+ active_sync[i].img_obj.data = icon_path[index];
indicator_util_icon_show(&active_sync[i]);
- indicator_util_icon_animation_set(&active_sync[i],
- ICON_ANI_ROTATE);
}
}
}
}
+static Eina_Bool show_sync_icon_cb(void* data)
+{
+ DBG("show_sync_icon_cb!, %d",icon_index);
+ show_image_icon(data,icon_index);
+ icon_index = (++icon_index % SYNC_ICON_NUM) ? icon_index : 0;
+
+ return ECORE_CALLBACK_RENEW;
+}
+
+static void show_sync_icon(void* data)
+{
+ if(timer==NULL)
+ {
+ timer = ecore_timer_add(TIMER_INTERVAL, show_sync_icon_cb, data);
+ }
+ else
+ {
+ ERR("show_sync_icon!, timer");
+ }
+}
+
+static void hide_sync_icon(void)
+{
+ DBG("hide_sync_icon!, %d",icon_index);
+ if (timer != NULL) {
+ ecore_timer_del(timer);
+ timer = NULL;
+ icon_index = 0;
+ }
+
+ hide_image_icon();
+}
+
+
static void indicator_active_sync_change_cb(keynode_t *node, void *data)
{
int status = 0;
int ret = 0;
+ int result = 0;
retif(data == NULL, , "Invalid parameter!");
- if (ret == FAIL) {
- ERR("Failed to get VCONFKEY_SYNC_STATE!");
- return;
- }
+}
- if (status == TRUE) {
- INFO("Active sync is set");
- show_image_icon(data);
+static void indicator_active_sync_pm_state_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ retif(data == NULL, , "Invalid parameter!");
+
+ vconf_get_int(VCONFKEY_PM_STATE, &status);
+
+ if(status == VCONFKEY_PM_STATE_LCDOFF)
+ {
+ if (timer != NULL) {
+ ecore_timer_del(timer);
+ timer = NULL;
+ }
+ }
+}
- } else {
- INFO("Active sync is unset");
- hide_image_icon();
+static int wake_up_cb(void *data)
+{
+ if(updated_while_lcd_off==0&&active_sync[0].obj_exist==EINA_FALSE)
+ {
+ DBG("ICON WAS NOT UPDATED");
+ return OK;
}
+
+ indicator_active_sync_change_cb(NULL, data);
+ return OK;
}
static int register_active_sync_module(void *data)
set_app_state(data);
- if (ret != OK)
- ERR("Failed to register callback!");
-
- indicator_active_sync_change_cb(NULL, data);
-
return ret;
}
{
int ret = 0;
- if (ret != OK)
- ERR("Failed to unregister callback!");
-
return OK;
}
{
int ret = 0;
- if (ret != OK)
- ERR("Failed to unregister callback!");
-
return OK;
}
retif(data == NULL, FAIL, "Invalid parameter!");
- retif(ret != OK, FAIL, "Failed to register callback!");
-
- indicator_active_sync_change_cb(NULL, data);
return OK;
}
static int register_call_module(void *data);
static int unregister_call_module(void);
-static void mctrl_monitor_cb(int action, const char *name, void *data);
+static int mctrl_monitor_cb(int action, const char *name, void *data);
Indicator_Icon_Object call[INDICATOR_WIN_MAX] = {
{
}
-static void mctrl_monitor_cb(int action, const char *name, void *data)
+static int mctrl_monitor_cb(int action, const char *name, void *data)
{
int ret = 0;
int status = 0;
- retif(!data, , "data is NULL");
- retif(!name, , "name is NULL");
+ retif(!data, FAIL, "data is NULL");
+ retif(!name, FAIL, "name is NULL");
if(strncmp(name,MINICONTROL_VOICE_NAME,strlen(MINICONTROL_VOICE_NAME))!=0
&&strncmp(name,MINICONTROL_VIDEO_NAME,strlen(MINICONTROL_VIDEO_NAME))!=0)
{
ERR("_mctrl_monitor_cb: no call%s",name);
- return;
+ return FAIL;
}
DBG("_mctrl_monitor_cb:%s %d",name,action);
ret = vconf_get_int(VCONFKEY_CALL_STATE, &status);
if (ret == FAIL) {
ERR("Failed to get VCONFKEY_CALL_STATE!");
- return;
+ return FAIL;
}
INFO("Call state = %d", status);
switch (status) {
default:
break;
}
+ return OK;
}
static int register_call_module(void *data)
#include "modules.h"
#include "indicator_icon_util.h"
-#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_4
+#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_5
#define MODULE_NAME "call_divert"
static int register_call_divert_module(void *data);
static int register_sos_module(void *data);
static int unregister_sos_module(void);
+static int wake_up_cb(void *data);
+
Indicator_Icon_Object sos[INDICATOR_WIN_MAX] = {
{
.obj_exist = EINA_FALSE,
.area = INDICATOR_ICON_AREA_NOTI,
.init = register_sos_module,
- .fini = unregister_sos_module
+ .fini = unregister_sos_module,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.obj_exist = EINA_FALSE,
.area = INDICATOR_ICON_AREA_NOTI,
.init = register_sos_module,
- .fini = unregister_sos_module
+ .fini = unregister_sos_module,
+ .wake_up = wake_up_cb
}
};
"Call/B03_Call_SOSmessge_active.png",
NULL
};
+static int updated_while_lcd_off = 0;
static void set_app_state(void* data)
{
}
}
+static void indicator_sos_pm_state_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ int ret = 0;
+ retif(data == NULL, , "Invalid parameter!");
+
+ vconf_get_int(VCONFKEY_PM_STATE, &status);
+
+ if(status == VCONFKEY_PM_STATE_LCDOFF)
+ {
+ int sos_status = 0;
+ ret = vconf_get_int(VCONFKEY_MESSAGE_SOS_STATE, &sos_status);
+ if (ret < 0)
+ ERR("fail to get [%s]", VCONFKEY_MESSAGE_SOS_STATE);
+
+ INFO("SOS STATUS: %d", sos_status);
+ switch (sos_status) {
+ case VCONFKEY_MESSAGE_SOS_STANDBY:
+ icon_animation_set(ICON_ANI_NONE);
+ break;
+ default:
+ break;
+ }
+ }
+}
static void indicator_sos_change_cb(keynode_t *node, void *data)
{
retif(data == NULL, , "Invalid parameter!");
+ if(indicator_util_get_update_flag()==0)
+ {
+ updated_while_lcd_off = 1;
+ DBG("need to update %d",updated_while_lcd_off);
+ return;
+ }
+ updated_while_lcd_off = 0;
+
ret = vconf_get_bool(VCONFKEY_MESSAGE_SOS_SEND_OPTION, &send_option);
if (ret == FAIL)
ERR("Failed to get VCONFKEY_MESSAGE_SOS_SEND_OPTION!");
else
icon_animation_set(ICON_ANI_NONE);
}
+static int wake_up_cb(void *data)
+{
+ if(updated_while_lcd_off==0&&sos[0].obj_exist==EINA_FALSE)
+ {
+ DBG("ICON WAS NOT UPDATED");
+ return OK;
+ }
+
+ indicator_sos_change_cb(NULL, data);
+ return OK;
+}
static int register_sos_module(void *data)
{
ERR("Failed to register callback! [%s]",
VCONFKEY_MESSAGE_SOS_STATE);
+ ret = vconf_notify_key_changed(VCONFKEY_PM_STATE,
+ indicator_sos_pm_state_change_cb, data);
+ if (ret != OK)
+ ERR("Failed to register callback! : VCONFKEY_PM_STATE");
+
indicator_sos_change_cb(NULL, data);
return ret;
if (ret != OK)
ERR("Failed to unregister callback! [%s]",
VCONFKEY_MESSAGE_SOS_STATE);
+
+ ret = vconf_ignore_key_changed(VCONFKEY_PM_STATE,
+ indicator_sos_pm_state_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
return OK;
}
+++ /dev/null
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <vconf.h>
-#include <Ecore_X.h>
-#include "common.h"
-#include "indicator.h"
-#include "indicator_ui.h"
-#include "modules.h"
-#include "indicator_icon_util.h"
-
-#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_2
-#define MODULE_NAME "transfer"
-#define TIMER_INTERVAL 0.03
-
-static int register_trnsfr_module(void *data);
-static int unregister_trnsfr_module(void);
-
-Indicator_Icon_Object trnsfr[INDICATOR_WIN_MAX] = {
-{
- .win_type = INDICATOR_WIN_PORT,
- .type = INDICATOR_IMG_ICON,
- .name = MODULE_NAME,
- .priority = ICON_PRIORITY,
- .always_top = EINA_FALSE,
- .exist_in_view = EINA_FALSE,
- .txt_obj = {0,},
- .img_obj = {0,},
- .obj_exist = EINA_FALSE,
- .area = INDICATOR_ICON_AREA_NOTI,
- .init = register_trnsfr_module,
- .fini = unregister_trnsfr_module
-},
-{
- .win_type = INDICATOR_WIN_LAND,
- .type = INDICATOR_IMG_ICON,
- .name = MODULE_NAME,
- .priority = ICON_PRIORITY,
- .always_top = EINA_FALSE,
- .exist_in_view = EINA_FALSE,
- .txt_obj = {0,},
- .img_obj = {0,},
- .obj_exist = EINA_FALSE,
- .area = INDICATOR_ICON_AREA_NOTI,
- .init = register_trnsfr_module,
- .fini = unregister_trnsfr_module
-}
-};
-
-static const char *icon_path[] = {
- "Processing/B03_Processing_01.png",
- "Processing/B03_Processing_02.png",
- "Processing/B03_Processing_03.png",
- "Processing/B03_Processing_04.png",
- "Processing/B03_Processing_05.png",
- "Processing/B03_Processing_06.png",
- "Processing/B03_Processing_07.png",
- "Processing/B03_Processing_08.png",
- "Processing/B03_Processing_09.png",
- "Processing/B03_Processing_10.png",
- "Processing/B03_Processing_11.png",
- "Processing/B03_Processing_12.png",
- "Processing/B03_Processing_13.png",
- "Processing/B03_Processing_14.png",
- "Processing/B03_Processing_15.png",
- "Processing/B03_Processing_16.png",
- "Processing/B03_Processing_17.png",
- "Processing/B03_Processing_18.png",
- "Processing/B03_Processing_19.png",
- "Processing/B03_Processing_20.png",
- "Processing/B03_Processing_21.png",
- "Processing/B03_Processing_22.png",
- "Processing/B03_Processing_23.png",
- "Processing/B03_Processing_24.png",
- "Processing/B03_Processing_25.png",
- "Processing/B03_Processing_26.png",
- "Processing/B03_Processing_27.png",
- "Processing/B03_Processing_28.png",
- "Processing/B03_Processing_29.png",
- "Processing/B03_Processing_30.png",
- NULL
-};
-
-static Ecore_Timer *timer = NULL;
-static unsigned int process_req_cnt = 0;
-
-static void delete_timer(void)
-{
- if (timer != NULL) {
- ecore_timer_del(timer);
- timer = NULL;
- }
-}
-
-static void show_image_icon(void *data, int index)
-{
- int i = 0;
-
- for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
- {
- trnsfr[i].img_obj.data = icon_path[index];
- indicator_util_icon_show(&trnsfr[i]);
- }
-}
-
-static void hide_image_icon(void)
-{
- int i = 0;
-
- for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
- {
- indicator_util_icon_hide(&trnsfr[i]);
- }
-}
-
-static Eina_Bool indicator_trnsfr_transfer_cb(void *data)
-{
- static int i = 0;
-
- retif(data == NULL, ECORE_CALLBACK_CANCEL, "Invalid parameter!");
-
- show_image_icon(data, i);
- i = (++i % 30) ? i : 0;
-
- return ECORE_CALLBACK_RENEW;
-}
-
-void show_trnsfr_icon(void *data)
-{
-
- process_req_cnt++;
-}
-
-void hide_trnsfr_icon(void)
-{
- process_req_cnt--;
-
- if (process_req_cnt <= 0) {
- process_req_cnt = 0;
- delete_timer();
- }
-}
-
-static int register_trnsfr_module(void *data)
-{
- return OK;
-}
-
-static int unregister_trnsfr_module(void)
-{
- delete_timer();
- process_req_cnt = 0;
-
- return OK;
-}
#include "modules.h"
#include "indicator_ui.h"
-#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_3
+#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_4
#define MODULE_NAME "bluetooth"
-#define TIMER_INTERVAL 0.3
-
-extern void show_trnsfr_icon(void *data);
-extern void hide_trnsfr_icon(void);
+#define TIMER_INTERVAL 0.5
static int register_bluetooth_module(void *data);
static int unregister_bluetooth_module(void);
static int hib_enter_bluetooth_module(void);
static int hib_leave_bluetooth_module(void *data);
+static int wake_up_cb(void *data);
Indicator_Icon_Object bluetooth[INDICATOR_WIN_MAX] = {
{
.init = register_bluetooth_module,
.fini = unregister_bluetooth_module,
.hib_enter = hib_enter_bluetooth_module,
- .hib_leave = hib_leave_bluetooth_module
+ .hib_leave = hib_leave_bluetooth_module,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.init = register_bluetooth_module,
.fini = unregister_bluetooth_module,
.hib_enter = hib_enter_bluetooth_module,
- .hib_leave = hib_leave_bluetooth_module
+ .hib_leave = hib_leave_bluetooth_module,
+ .wake_up = wake_up_cb
}
};
static Ecore_Timer *timer;
static Eina_Bool bt_transferring = EINA_FALSE;
+static int updated_while_lcd_off = 0;
+
static void set_app_state(void* data)
{
}
if (status & DATA_TRANSFER) {
if(bt_transferring != EINA_TRUE) {
- show_trnsfr_icon(data);
bt_transferring = EINA_TRUE;
}
return;
retif(data == NULL, , "Invalid parameter!");
+ if(indicator_util_get_update_flag()==0)
+ {
+ updated_while_lcd_off = 1;
+ DBG("need to update %d",updated_while_lcd_off);
+ return;
+ }
+ updated_while_lcd_off = 0;
+
ret = vconf_get_int(VCONFKEY_BT_STATUS, &status);
if (ret == OK) {
INFO("BT STATUS: %d", status);
- /* Check transferring Icon animation */
if (!(status & VCONFKEY_BT_STATUS_TRANSFER)) {
if (bt_transferring == EINA_TRUE) {
- hide_trnsfr_icon();
bt_transferring = EINA_FALSE;
}
}
return;
}
+static void indicator_bluetooth_pm_state_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ vconf_get_int(VCONFKEY_PM_STATE, &status);
+
+ if(status == VCONFKEY_PM_STATE_LCDOFF)
+ {
+ if (timer != NULL) {
+ ecore_timer_del(timer);
+ timer = NULL;
+ }
+ }
+}
+
+static int wake_up_cb(void *data)
+{
+ if(updated_while_lcd_off==0&&bluetooth[0].obj_exist==EINA_FALSE)
+ {
+ DBG("ICON WAS NOT UPDATED");
+ return OK;
+ }
+
+ indicator_bluetooth_change_cb(NULL, data);
+ return OK;
+}
+
static int register_bluetooth_module(void *data)
{
int r = 0, ret = -1;
r = r | ret;
}
+ ret = vconf_notify_key_changed(VCONFKEY_PM_STATE,
+ indicator_bluetooth_pm_state_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
indicator_bluetooth_change_cb(NULL, data);
return r;
if (ret != OK)
ERR("Failed to unregister callback!");
+ ret = vconf_ignore_key_changed(VCONFKEY_PM_STATE,
+ indicator_bluetooth_pm_state_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+
delete_timer();
if (bt_transferring == EINA_TRUE) {
- hide_trnsfr_icon();
bt_transferring = EINA_FALSE;
}
static int unregister_gps_module(void);
static int hib_enter_gps_module(void);
static int hib_leave_gps_module(void *data);
+static int wake_up_cb(void *data);
Indicator_Icon_Object gps[INDICATOR_WIN_MAX] = {
{
.init = register_gps_module,
.fini = unregister_gps_module,
.hib_enter = hib_enter_gps_module,
- .hib_leave = hib_leave_gps_module
+ .hib_leave = hib_leave_gps_module,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.init = register_gps_module,
.fini = unregister_gps_module,
.hib_enter = hib_enter_gps_module,
- .hib_leave = hib_leave_gps_module
+ .hib_leave = hib_leave_gps_module,
+ .wake_up = wake_up_cb
}
};
[LEVEL_GPS_ON] = "Bluetooth, NFC, GPS/B03_GPS_On.png",
[LEVEL_GPS_SEARCHING] = "Bluetooth, NFC, GPS/B03_GPS_Searching.png",
};
+static int updated_while_lcd_off = 0;
static void set_app_state(void* data)
{
{
retif(data == NULL, , "Invalid parameter!");
- retif(node == NULL, , "node is NULL");
+
+ if(indicator_util_get_update_flag()==0)
+ {
+ updated_while_lcd_off = 1;
+ DBG("need to update %d",updated_while_lcd_off);
+ return;
+ }
+ updated_while_lcd_off = 0;
indicator_gps_state_icon_set(indicator_gps_state_get(), data);
return;
}
+static void indicator_gps_pm_state_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ int ret = 0;
+ retif(data == NULL, , "Invalid parameter!");
+
+ vconf_get_int(VCONFKEY_PM_STATE, &status);
+
+ if(status == VCONFKEY_PM_STATE_LCDOFF)
+ {
+ int gps_status = 0;
+ ret = vconf_get_int(VCONFKEY_LOCATION_GPS_STATE, &gps_status);
+ if (ret < 0)
+ ERR("fail to get [%s]", VCONFKEY_LOCATION_GPS_STATE);
+
+ INFO("GPS STATUS: %d", gps_status);
+ switch (gps_status) {
+ case IND_POSITION_STATE_SEARCHING:
+ show_image_icon(data, LEVEL_GPS_SEARCHING);
+ icon_animation_set(ICON_ANI_NONE);
+ break;
+ case IND_POSITION_STATE_OFF:
+ case IND_POSITION_STATE_CONNECTED:
+ default:
+ break;
+ }
+ }
+}
+
+static int wake_up_cb(void *data)
+{
+ if(updated_while_lcd_off==0 && gps[0].obj_exist==EINA_FALSE)
+ {
+ DBG("ICON WAS NOT UPDATED");
+ return OK;
+ }
+
+ indicator_gps_change_cb(NULL, data);
+ return OK;
+}
+
static int register_gps_module(void *data)
{
int ret;
if (ret != OK)
ERR("Failed to register callback! : VCONFKEY_LOCATION_GPS_STATE");
+ ret = vconf_notify_key_changed(VCONFKEY_PM_STATE,
+ indicator_gps_pm_state_change_cb, data);
+ if (ret != OK)
+ ERR("Failed to register callback! : VCONFKEY_LOCATION_GPS_STATE");
+
indicator_gps_state_icon_set(indicator_gps_state_get(), data);
return ret;
if (ret != OK)
ERR("Failed to unregister callback!");
+ ret = vconf_ignore_key_changed(VCONFKEY_PM_STATE,
+ indicator_gps_pm_state_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
return OK;
}
#include "modules.h"
#include "indicator_ui.h"
-#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_3
+#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_4
#define MODULE_NAME "nfc"
static int register_nfc_module(void *data);
static int unregister_nfc_module(void);
static int hib_enter_nfc_module(void);
static int hib_leave_nfc_module(void *data);
+static int wake_up_cb(void *data);
+
Indicator_Icon_Object nfc[INDICATOR_WIN_MAX] = {
{
.init = register_nfc_module,
.fini = unregister_nfc_module,
.hib_enter = hib_enter_nfc_module,
- .hib_leave = hib_leave_nfc_module
+ .hib_leave = hib_leave_nfc_module,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.init = register_nfc_module,
.fini = unregister_nfc_module,
.hib_enter = hib_enter_nfc_module,
- .hib_leave = hib_leave_nfc_module
+ .hib_leave = hib_leave_nfc_module,
+ .wake_up = wake_up_cb
}
};
static const char *icon_path[NFC_NUM] = {
[NFC_ON] = "Bluetooth, NFC, GPS/B03_NFC_On.png",
};
+static int updated_while_lcd_off = 0;
static void set_app_state(void* data)
{
retif(data == NULL, , "Invalid parameter!");
+ if(indicator_util_get_update_flag()==0)
+ {
+ updated_while_lcd_off = 1;
+ DBG("need to update %d",updated_while_lcd_off);
+ return;
+ }
+ updated_while_lcd_off = 0;
+
ret = vconf_get_bool(VCONFKEY_NFC_STATE, &status);
if (ret == OK) {
INFO("NFC STATUS: %d", status);
return;
}
+static int wake_up_cb(void *data)
+{
+ if(updated_while_lcd_off==0)
+ {
+ DBG("ICON WAS NOT UPDATED");
+ return OK;
+ }
+
+ indicator_nfc_change_cb(NULL, data);
+ return OK;
+}
+
static int register_nfc_module(void *data)
{
int ret;
+++ /dev/null
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <vconf.h>
-#include "common.h"
-#include "indicator.h"
-#include "indicator_ui.h"
-#include "modules.h"
-#include "indicator_icon_util.h"
-
-#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_2
-#define MODULE_NAME "rotate-lock"
-
-static int register_rotate_module(void *data);
-static int unregister_rotate_module(void);
-static int hib_enter_rotate_module(void);
-static int hib_leave_rotate_module(void *data);
-
-Indicator_Icon_Object rotate[INDICATOR_WIN_MAX] = {
-{
- .win_type = INDICATOR_WIN_PORT,
- .type = INDICATOR_IMG_ICON,
- .name = MODULE_NAME,
- .priority = ICON_PRIORITY,
- .always_top = EINA_FALSE,
- .exist_in_view = EINA_FALSE,
- .txt_obj = {0,},
- .img_obj = {0,},
- .obj_exist = EINA_FALSE,
- .area = INDICATOR_ICON_AREA_NOTI,
- .init = register_rotate_module,
- .fini = unregister_rotate_module,
- .hib_enter = hib_enter_rotate_module,
- .hib_leave = hib_leave_rotate_module
-},
-{
- .win_type = INDICATOR_WIN_LAND,
- .type = INDICATOR_IMG_ICON,
- .name = MODULE_NAME,
- .priority = ICON_PRIORITY,
- .always_top = EINA_FALSE,
- .exist_in_view = EINA_FALSE,
- .txt_obj = {0,},
- .img_obj = {0,},
- .obj_exist = EINA_FALSE,
- .area = INDICATOR_ICON_AREA_NOTI,
- .init = register_rotate_module,
- .fini = unregister_rotate_module,
- .hib_enter = hib_enter_rotate_module,
- .hib_leave = hib_leave_rotate_module
-}
-
-};
-
-static char *icon_path[] = {
- "Rotation locked/B03_Rotationlocked.png",
- NULL
-};
-
-static void set_app_state(void* data)
-{
- int i = 0;
-
- for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
- {
- rotate[i].ad = data;
- }
-}
-
-static void show_image_icon(void *data)
-{
- int i = 0;
-
- for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
- {
- rotate[i].img_obj.data = icon_path[0];
- indicator_util_icon_show(&rotate[i]);
- }
-}
-
-static void hide_image_icon(void)
-{
- int i = 0;
-
- for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
- {
- indicator_util_icon_hide(&rotate[i]);
- }
-}
-
-static void indicator_rotate_change_cb(keynode_t *node, void *data)
-{
- int status = 0;
- int ret;
-
- retif(data == NULL, , "Invalid parameter!");
-
- ret = vconf_get_bool(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, &status);
- if (ret == OK) {
- INFO("VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL: %d", status);
- if (status) {
- show_image_icon(data);
- return;
- }
- hide_image_icon();
- return;
- }
- ERR("Failed to get rotate-lock status!");
- return;
-}
-
-static int register_rotate_module(void *data)
-{
- int ret;
-
- retif(data == NULL, FAIL, "Invalid parameter!");
-
- set_app_state(data);
-
- ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL,
- indicator_rotate_change_cb, data);
- if (ret != OK)
- ERR("Failed to register callback!");
-
- indicator_rotate_change_cb(NULL, data);
-
- return ret;
-}
-
-static int unregister_rotate_module(void)
-{
- int ret;
-
- ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL,
- indicator_rotate_change_cb);
- if (ret != OK)
- ERR("Failed to unregister callback!");
-
- return OK;
-}
-
-static int hib_enter_rotate_module(void)
-{
- int ret;
-
- ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL,
- indicator_rotate_change_cb);
- if (ret != OK)
- ERR("Failed to unregister callback!");
-
- return OK;
-}
-
-static int hib_leave_rotate_module(void *data)
-{
- int ret;
-
- retif(data == NULL, FAIL, "Invalid parameter!");
-
- ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL,
- indicator_rotate_change_cb, data);
- retif(ret != OK, FAIL, "Failed to register callback!");
-
- indicator_rotate_change_cb(NULL, data);
- return OK;
-}
int sound_status = 0;
int vib_status = 0;
int ret;
- const char *selected_image = NULL;
retif(data == NULL, , "Invalid parameter!");
#include "modules.h"
#include "indicator_ui.h"
-#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_3
+#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_4
#define MODULE_NAME "wifi_direct"
-extern void show_trnsfr_icon(void *data);
-extern void hide_trnsfr_icon(void);
-
static int register_wifi_direct_module(void *data);
static int unregister_wifi_direct_module(void);
+static int wake_up_cb(void *data);
+
Indicator_Icon_Object wifi_direct[INDICATOR_WIN_MAX] = {
{
.area = INDICATOR_ICON_AREA_SYSTEM,
.init = register_wifi_direct_module,
.fini = unregister_wifi_direct_module,
+ .wake_up = wake_up_cb
},
{
.win_type = INDICATOR_WIN_LAND,
.area = INDICATOR_ICON_AREA_SYSTEM,
.init = register_wifi_direct_module,
.fini = unregister_wifi_direct_module,
+ .wake_up = wake_up_cb
}
};
static Eina_Bool wifi_direct_transferring = EINA_FALSE;
+static int updated_while_lcd_off = 0;
enum {
WIFI_DIRECT_ACTIVATE = 0,
retif(data == NULL, , "Invalid parameter!");
+ if(indicator_util_get_update_flag()==0)
+ {
+ updated_while_lcd_off = 1;
+ DBG("need to update %d",updated_while_lcd_off);
+ return;
+ }
+ updated_while_lcd_off = 0;
+
ret = vconf_get_int(VCONFKEY_WIFI_DIRECT_STATE, &status);
if (ret == OK) {
return;
}
+static int wake_up_cb(void *data)
+{
+ if(updated_while_lcd_off==0)
+ {
+ DBG("ICON WAS NOT UPDATED");
+ return OK;
+ }
+
+ indicator_wifi_direct_change_cb(NULL, data);
+ return OK;
+}
static void
indicator_wifi_direct_transfer_change_cb(keynode_t *node, void *data)
switch (status) {
case VCONFKEY_WIFI_DIRECT_TRANSFER_START:
if (wifi_direct_transferring != EINA_TRUE) {
- show_trnsfr_icon(data);
wifi_direct_transferring = EINA_TRUE;
}
break;
case VCONFKEY_WIFI_DIRECT_TRANSFER_FAIL:
if (wifi_direct_transferring == EINA_TRUE) {
- hide_trnsfr_icon();
wifi_direct_transferring = EINA_FALSE;
}
break;
case VCONFKEY_WIFI_DIRECT_TRANSFER_FINISH:
if (wifi_direct_transferring == EINA_TRUE) {
- hide_trnsfr_icon();
wifi_direct_transferring = EINA_FALSE;
}
break;
ERR("Failed to unregister callback!");
if (wifi_direct_transferring == EINA_TRUE) {
- hide_trnsfr_icon();
wifi_direct_transferring = EINA_FALSE;
}
Name: org.tizen.indicator
Summary: indicator window
-Version: 0.1.47
+Version: 0.1.69
Release: 1
Group: utils
License: Flora Software License
%build
LDFLAGS+="-Wl,--rpath=%{PREFIX}/lib -Wl,--as-needed";export LDFLAGS
+CFLAGS+=" -fvisibility=hidden -fvisibility-inlines-hidden"; export CFLAGS
+CXXFLAGS+=" -fvisibility=hidden -fvisibility-inlines-hidden"; export CXXFLAGS
+FFLAGS+=" -fvisibility=hidden -fvisibility-inlines-hidden"; export FFLAGS
+
cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX} -DCMAKE_INSTALL_PREFIXRW=%{PREFIXRW}
make %{?jobs:-j%jobs}
rm -rf %{buildroot}
%post
-vconftool set -t int memory/radio/state 0 -i -g 6518
-vconftool set -t int memory/music/state 0 -i -g 6518
-vconftool set -t int memory/private/%{name}/home_pressed 0 -i -g 6518
-vconftool set -t bool memory/private/%{name}/started 0 -i -u 5000
+vconftool set -t int memory/radio/state 0 -i -g 6518 -f
+vconftool set -t int memory/music/state 0 -i -g 6518 -f
+vconftool set -t int memory/private/%{name}/home_pressed 0 -i -g 6518 -f
+vconftool set -t bool memory/private/%{name}/started 0 -i -u 5000 -f
+vconftool set -t int memory/private/%{name}/battery_disp 0 -i -u 5000 -f
%postun -p /sbin/ldconfig