4 * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 //#include <Ecore_X.h>
29 #include "indicator_gui.h"
35 #define FIXED_BOX_PART_NAME "elm.swallow.fixed"
36 #define SYSTEM_BOX_PART_NAME "elm.swallow.system"
37 #define MINICTRL_BOX_PART_NAME "elm.swallow.minictrl"
38 #define NOTI_BOX_PART_NAME "elm.swallow.noti"
39 #define DIGIT_BOX_PART_NAME "percentage.digit.box"
42 #define MORE_NOTI "more_notify"
44 Eina_List *_view_fixed_list;
45 Eina_List *_view_system_list;
46 Eina_List *_view_minictrl_list;
47 Eina_List *_view_noti_list;
48 Eina_List *_view_alarm_list;
54 static int icon_show_state = 0;
55 int previous_noti_count = 0;
59 static Evas_Object *_box_add(Evas_Object * parent)
61 Evas_Object *obj = NULL;
63 retv_if(!parent, NULL);
65 obj = elm_box_add(parent);
67 evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
68 evas_object_size_hint_fill_set(obj, EVAS_HINT_FILL, EVAS_HINT_FILL);
70 /* Align to left-top */
71 elm_box_horizontal_set(obj, EINA_TRUE);
72 evas_object_show(obj);
79 static void _update_window(win_info *win)
82 Ecore_X_Window xwin, root;
84 retif(win == NULL, , "Invalid parameter!");
86 xwin = elm_win_xwindow_get(win->win);
88 root = ecore_x_window_root_get(xwin);
90 ecore_x_window_size_get(root, &root_w, &root_h);
92 if (win->angle == 0 || win->angle == 180) win->w = root_w;
97 ecore_x_window_shape_input_rectangle_set(xwin, root_w - win->w, 0, win->w, win->h);
100 ecore_x_window_shape_input_rectangle_set(xwin, 0, 0, win->h, win->w);
103 ecore_x_window_shape_input_rectangle_set(xwin, 0, 0, win->w, win->h);
106 ecore_x_window_shape_input_rectangle_set(xwin, 0, root_h - win->w, win->h, win->w);
115 void box_delete_noti_icon_all(win_info *win)
120 elm_box_unpack_all(win->_noti_box);
122 EINA_LIST_FOREACH(_view_noti_list, l, icon) {
123 if (icon->obj_exist == EINA_TRUE) {
124 if (icon_del(icon) == EINA_TRUE) {
125 icon->obj_exist = EINA_FALSE;
133 static void _fixed_box_pack_icon(win_info *win, icon_s *icon)
138 switch (icon->type) {
139 case INDICATOR_IMG_ICON:
140 evas_object_show(icon->img_obj.obj);
141 elm_box_pack_start(win->_fixed_box[icon->priority], icon->img_obj.obj);
143 case INDICATOR_TXT_ICON:
145 case INDICATOR_TXT_WITH_IMG_ICON:
147 case INDICATOR_DIGIT_ICON:
148 switch(icon->digit_area) {
150 evas_object_show(icon->img_obj.obj);
151 elm_box_pack_end(win->_digit_box, icon->img_obj.obj);
154 evas_object_show(icon->img_obj.obj);
155 elm_box_pack_end(win->_digit_box, icon->img_obj.obj);
157 case DIGIT_DOZENS_UNITY:
158 evas_object_show(icon->img_obj.obj);
159 elm_box_pack_end(win->_digit_box, icon->img_obj.obj);
162 evas_object_show(icon->img_obj.obj);
163 elm_box_pack_end(win->_digit_box, icon->img_obj.obj);
174 #ifdef _SUPPORT_SCREEN_READER
175 util_icon_access_register(icon);
181 static void _box_pack_icon(icon_s *icon, Evas_Object *box)
186 switch (icon->type) {
187 case INDICATOR_IMG_ICON:
188 evas_object_show(icon->img_obj.obj);
189 elm_box_pack_end(box, icon->img_obj.obj);
191 case INDICATOR_TXT_ICON:
193 case INDICATOR_TXT_WITH_IMG_ICON:
195 case INDICATOR_DIGIT_ICON:
196 evas_object_show(icon->img_obj.obj);
197 elm_box_pack_end(box, icon->img_obj.obj);
203 #ifdef _support_screen_reader
204 util_icon_access_register(icon);
206 if (icon->area == INDICATOR_ICON_AREA_NOTI || icon->area == INDICATOR_ICON_AREA_ALARM) {
207 util_start_noti_ani(icon);
213 static void _create_img_obj(icon_s *icon)
215 Evas_Object *img_eo = NULL;
219 img_eo = evas_object_data_get(icon->img_obj.obj, DATA_KEY_IMG_ICON);
220 evas_object_size_hint_min_set(img_eo, ELM_SCALE_SIZE(icon->img_obj.width), ELM_SCALE_SIZE(icon->img_obj.height));
221 box_handle_animated_gif(icon);
226 static void _update_icon(win_info *win, Eina_List *list)
234 EINA_LIST_FOREACH(list, l, icon) {
235 if (icon->obj_exist == EINA_FALSE) {
239 if (icon->obj_exist == EINA_TRUE) {
240 if (icon->area == INDICATOR_ICON_AREA_FIXED
241 && icon->priority <= INDICATOR_PRIORITY_FIXED_MAX) {
242 _create_img_obj(icon);
243 _fixed_box_pack_icon(win, icon);
245 if (icon->area == INDICATOR_ICON_AREA_SYSTEM
246 && icon->priority >= INDICATOR_PRIORITY_SYSTEM_MIN
247 && icon->priority <= INDICATOR_PRIORITY_SYSTEM_MAX) {
248 _create_img_obj(icon);
249 _box_pack_icon(icon, win->_non_fixed_box);
251 if (icon->area == INDICATOR_ICON_AREA_MINICTRL
252 && icon->priority >= INDICATOR_PRIORITY_MINICTRL_MIN
253 && icon->priority <= INDICATOR_PRIORITY_MINICTRL_MAX) {
254 _create_img_obj(icon);
255 _box_pack_icon(icon, win->_minictrl_box);
257 if (icon->area == INDICATOR_ICON_AREA_NOTI) {
258 _create_img_obj(icon);
259 _box_pack_icon(icon, win->_noti_box);
261 if (icon->area == INDICATOR_ICON_AREA_ALARM) {
262 _create_img_obj(icon);
263 _box_pack_icon(icon, win->_alarm_box);
271 extern unsigned int box_get_count(Box_List list)
277 count = eina_list_count(_view_fixed_list);
280 count = eina_list_count(_view_system_list);
283 count = eina_list_count(_view_minictrl_list);
286 count = eina_list_count(_view_noti_list);
289 _D("List dose not exist");
298 static void _update_display(win_info *win)
304 if (box_get_count(SYSTEM_LIST)) {
305 util_signal_emit(win->data, "indicator.system.show", "indicator.prog");
307 util_signal_emit(win->data, "indicator.system.hide", "indicator.prog");
310 if (box_get_count(MINICTRL_LIST)) {
311 util_signal_emit(win->data, "indicator.minictrl.show", "indicator.prog");
313 util_signal_emit(win->data, "indicator.minictrl.hide", "indicator.prog");
316 if (box_get_count(NOTI_LIST)) {
317 util_signal_emit(win->data, "indicator.noti.show", "indicator.prog");
319 util_signal_emit(win->data, "indicator.noti.hide", "indicator.prog");
323 if (message_ani_playing_check() == 1) {
327 for (i = 0; i < FIXED_COUNT; ++i) {
328 elm_box_unpack_all(win->_fixed_box[i]);
331 elm_box_unpack_all(win->_non_fixed_box);
332 elm_box_unpack_all(win->_minictrl_box);
333 elm_box_unpack_all(win->_noti_box);
334 elm_box_unpack_all(win->_alarm_box);
335 elm_box_unpack_all(win->_digit_box);
337 _update_icon(win, _view_fixed_list);
338 _update_icon(win, _view_system_list);
339 _update_icon(win, _view_minictrl_list);
340 _update_icon(win, _view_noti_list);
341 _update_icon(win, _view_alarm_list);
344 if (win) _update_window(win);
350 extern void box_update_display(win_info *win)
358 _update_display(win);
359 icon_handle_more_notify_icon(win);
364 extern int box_pack(icon_s *icon)
366 struct appdata *ad = NULL;
371 ad = (struct appdata*)icon->ad;
373 if (box_exist_icon(icon)) return OK;
375 if (INDICATOR_ICON_AREA_FIXED == icon->area) {
376 icon->exist_in_view = EINA_TRUE;
377 _view_fixed_list = eina_list_append(_view_fixed_list, icon);
378 } else if(INDICATOR_ICON_AREA_SYSTEM == icon->area) {
382 EINA_LIST_FOREACH(_view_system_list, l, data) {
383 if (data->priority <= icon->priority) {
384 icon->exist_in_view = EINA_TRUE;
385 _view_system_list = eina_list_append_relative_list(_view_system_list, icon, l);
386 DBG("System (eina_list_append_relative_list) %s",icon->name);
391 /* if finding condition is failed, append it at tail */
392 icon->exist_in_view = EINA_TRUE;
393 _view_system_list = eina_list_prepend(_view_system_list, icon);
394 DBG("System prepend (Priority low) : %s",icon->name);
395 } else if(INDICATOR_ICON_AREA_MINICTRL == icon->area) {
396 INFO("Pack to MINICTRL list : %s", icon->name);
400 EINA_LIST_FOREACH(_view_minictrl_list, l, data) {
401 if (data->priority <= icon->priority) {
402 icon->exist_in_view = EINA_TRUE;
403 _view_minictrl_list = eina_list_append_relative_list(_view_minictrl_list, icon, l);
408 /* if finding condition is failed, append it at tail */
409 icon->exist_in_view = EINA_TRUE;
410 _view_minictrl_list = eina_list_append(_view_minictrl_list, icon);
411 } else if(INDICATOR_ICON_AREA_NOTI == icon->area) {
412 if(strncmp(icon->name, MORE_NOTI, strlen(MORE_NOTI))==0)
414 icon->exist_in_view = EINA_TRUE;
415 _view_noti_list = eina_list_prepend(_view_noti_list, icon);
419 /* if finding condition is failed, append it at tail */
420 icon->exist_in_view = EINA_TRUE;
421 _view_noti_list = eina_list_append(_view_noti_list, icon);
423 icon->exist_in_view = EINA_TRUE;
424 _view_alarm_list = eina_list_append(_view_alarm_list, icon);
428 previous_noti_count = noti_count;
429 if (icon->area == INDICATOR_ICON_AREA_NOTI
430 || icon->area == INDICATOR_ICON_AREA_SYSTEM
431 || icon->area == INDICATOR_ICON_AREA_MINICTRL) {
435 if (ad->opacity_mode == INDICATOR_OPACITY_TRANSPARENT
437 util_send_status_message_start(ad,2.5);
446 extern int box_pack_append(icon_s *icon)
453 if (box_exist_icon(icon)) return OK;
455 switch (icon->area) {
456 case INDICATOR_ICON_AREA_FIXED:
457 icon->exist_in_view = EINA_TRUE;
458 _view_fixed_list = eina_list_append(_view_fixed_list, icon);
460 case INDICATOR_ICON_AREA_SYSTEM:
461 icon->exist_in_view = EINA_TRUE;
462 _view_system_list = eina_list_append(_view_system_list, icon);
464 case INDICATOR_ICON_AREA_MINICTRL:
465 icon->exist_in_view = EINA_TRUE;
466 _view_minictrl_list = eina_list_append(_view_minictrl_list, icon);
468 case INDICATOR_ICON_AREA_NOTI:
469 EINA_LIST_FOREACH(_view_noti_list, l, data) {
470 if (strncmp(data->name, MORE_NOTI, strlen(MORE_NOTI)) == 0) {
471 icon->exist_in_view = EINA_TRUE;
472 _view_noti_list = eina_list_append_relative_list(_view_noti_list, icon, l);
476 icon->exist_in_view = EINA_TRUE;
477 _view_noti_list = eina_list_append(_view_noti_list, icon);
480 _D("Icon area does not exists");
489 int box_unpack(icon_s *icon)
493 SECURE_DBG("[box_unpack] %s!",icon->name);
494 switch (icon->area) {
495 case INDICATOR_ICON_AREA_FIXED:
496 icon->exist_in_view = EINA_FALSE;
497 _view_fixed_list = eina_list_remove(_view_fixed_list, icon);
499 case INDICATOR_ICON_AREA_SYSTEM:
500 icon->exist_in_view = EINA_FALSE;
501 _view_system_list = eina_list_remove(_view_system_list, icon);
503 case INDICATOR_ICON_AREA_MINICTRL:
504 icon->exist_in_view = EINA_FALSE;
505 _view_minictrl_list = eina_list_remove(_view_minictrl_list, icon);
507 case INDICATOR_ICON_AREA_NOTI:
508 icon->exist_in_view = EINA_FALSE;
509 _view_noti_list = eina_list_remove(_view_noti_list, icon);
511 case INDICATOR_ICON_AREA_ALARM:
512 icon->exist_in_view = EINA_FALSE;
513 _view_alarm_list = eina_list_remove(_view_alarm_list, icon);
516 _D("icon area dose not exists");
523 noti_count = box_get_count(NOTI_LIST);
524 if (noti_count > 0) {
525 util_signal_emit(_win->data, "indicator.noti.show", "indicator.prog");
527 DBG("Need to stop blink animation and hide icon");
528 util_signal_emit_by_win(_win->data,"indicator.noti.hide", "indicator.prog");
531 #ifdef _SUPPORT_SCREEN_READER
532 util_icon_access_unregister(icon);
535 if (icon->obj_exist == EINA_TRUE) {
536 if (icon_del(icon) == EINA_TRUE) {
537 icon->obj_exist = EINA_FALSE;
546 extern void box_init(win_info *win)
548 char *str_text = NULL;
553 /* Make Fixed Box Object */
554 for (i = 0; i < FIXED_COUNT; ++i) {
555 if (win->_fixed_box[i] == NULL) {
556 win->_fixed_box[i] = _box_add(win->layout);
557 ret_if(!(win->_fixed_box[i]));
559 Eina_Strbuf *temp_str = eina_strbuf_new();
560 eina_strbuf_append_printf(temp_str, "%s%d", FIXED_BOX_PART_NAME, i);
561 str_text = eina_strbuf_string_steal(temp_str);
563 edje_object_part_swallow(elm_layout_edje_get(win->layout), str_text, win->_fixed_box[i]);
564 eina_strbuf_free(temp_str);
569 /* Make Non Fixed Box(SYSTEM) Object */
570 win->_non_fixed_box = _box_add(win->layout);
571 ret_if(!(win->_non_fixed_box));
573 evas_object_size_hint_align_set(win->_non_fixed_box, EVAS_HINT_FILL, EVAS_HINT_FILL);
574 edje_object_part_swallow(elm_layout_edje_get(win->layout), SYSTEM_BOX_PART_NAME, win->_non_fixed_box);
576 /* Make Non Fixed Box(MINICTRL) Object */
577 win->_minictrl_box = _box_add(win->layout);
578 ret_if(!(win->_minictrl_box));
580 evas_object_size_hint_align_set(win->_minictrl_box, EVAS_HINT_FILL, EVAS_HINT_FILL);
581 edje_object_part_swallow(elm_layout_edje_get(win->layout), MINICTRL_BOX_PART_NAME, win->_minictrl_box);
583 /* Make Non Fixed Box(NOTI) Box Object */
584 win->_noti_box = _box_add(win->layout);
585 ret_if(!(win->_noti_box));
587 evas_object_size_hint_align_set(win->_noti_box, EVAS_HINT_FILL, EVAS_HINT_FILL);
588 edje_object_part_swallow(elm_layout_edje_get(win->layout), NOTI_BOX_PART_NAME, win->_noti_box);
590 win->_alarm_box = _box_add(win->layout);
591 ret_if(!(win->_alarm_box));
593 evas_object_size_hint_align_set(win->_alarm_box, EVAS_HINT_FILL, EVAS_HINT_FILL);
594 edje_object_part_swallow(elm_layout_edje_get(win->layout), "indicator.alarm.icon", win->_alarm_box);
596 win->_digit_box = _box_add(win->layout);
597 ret_if(!(win->_digit_box));
599 evas_object_size_hint_align_set(win->_digit_box, EVAS_HINT_FILL, EVAS_HINT_FILL);
600 edje_object_part_swallow(elm_layout_edje_get(win->layout), DIGIT_BOX_PART_NAME, win->_digit_box);
608 extern void box_fini(win_info *win)
613 ret_if(!(win->layout));
615 if (win->_digit_box != NULL) {
616 edje_object_part_unswallow(elm_layout_edje_get(win->layout), win->_digit_box);
617 elm_box_unpack_all(win->_digit_box);
618 evas_object_del(win->_digit_box);
619 win->_digit_box = NULL;
622 if (win->_non_fixed_box != NULL) {
623 edje_object_part_unswallow(elm_layout_edje_get(win->layout), win->_non_fixed_box);
624 elm_box_unpack_all(win->_non_fixed_box);
625 evas_object_del(win->_non_fixed_box);
626 win->_non_fixed_box = NULL;
629 if (win->_minictrl_box != NULL) {
630 edje_object_part_unswallow(elm_layout_edje_get(win->layout), win->_minictrl_box);
631 elm_box_unpack_all(win->_minictrl_box);
632 evas_object_del(win->_minictrl_box);
633 win->_minictrl_box = NULL;
636 if (win->_noti_box != NULL) {
637 edje_object_part_unswallow(elm_layout_edje_get(win->layout), win->_noti_box);
638 elm_box_unpack_all(win->_noti_box);
639 evas_object_del(win->_noti_box);
640 win->_noti_box = NULL;
643 if (win->_alarm_box != NULL) {
644 edje_object_part_unswallow(elm_layout_edje_get(win->layout), win->_alarm_box);
645 elm_box_unpack_all(win->_alarm_box);
646 evas_object_del(win->_alarm_box);
647 win->_alarm_box = NULL;
650 for (i = 0; i < FIXED_COUNT; ++i) {
651 if (win->_fixed_box[i] != NULL) {
652 edje_object_part_unswallow(elm_layout_edje_get(win->layout), win->_fixed_box[i]);
653 elm_box_unpack_all(win->_fixed_box[i]);
654 evas_object_del(win->_fixed_box[i]);
655 win->_fixed_box[i] = NULL;
664 unsigned int box_get_count_in_noti_list_except_minictrl(void)
670 EINA_LIST_FOREACH(_view_noti_list, l, data) {
671 if (data->priority != INDICATOR_PRIORITY_NOTI_1) {
681 int box_get_enabled_noti_count(void)
683 int enabled_noti_cnt = 0;
685 int system_cnt = box_get_count(SYSTEM_LIST);
686 int minictrl_cnt = box_get_count(MINICTRL_LIST);
687 DBG("System Count : %d, Minictrl Count : %d", system_cnt, minictrl_cnt);
689 enabled_noti_cnt = MAX_NOTI_ICONS_PORT - system_cnt - minictrl_cnt;
690 if(enabled_noti_cnt <= 0) {
691 enabled_noti_cnt = 1; // Notification icon must show at least 1.
694 DBG("Notification icon enabled_noti_cnt %d",enabled_noti_cnt);
696 return enabled_noti_cnt;
701 int box_get_enabled_system_count(void)
704 int noti_cnt = box_get_count(NOTI_LIST);
705 int minictrl_cnt = box_get_count(MINICTRL_LIST);
707 _D("Noti count : %d , MiniCtrl count : %d", noti_cnt, minictrl_cnt);
709 system_cnt = PORT_SYSTEM_ICON_COUNT; // MAX = 5.
712 system_cnt--; // Notification icon must show at least 1.
715 if(minictrl_cnt > 0) {
716 system_cnt--; // Minictrl icon must show at least 1.
724 int box_get_minictrl_list(void)
727 int noti_count = box_get_count(NOTI_LIST);
728 int system_count = box_get_count(SYSTEM_LIST);
730 icon_count = PORT_MINICTRL_ICON_COUNT; // = 2. MIN (1) / MAX (3)
732 if(noti_count) { // noti_count >= 1
733 if(system_count >= 3) {
734 icon_count--; // icon_count = 2 -> 1
735 } else if(system_count <= 1) {
736 icon_count++; // icon_count = 2 -> 3
738 } else { // noti_count == 0
739 if(system_count >= 4) {
740 icon_count--; // icon_count = 2 -> 1
741 } else if(system_count <= 2) {
742 icon_count++; // icon_count = 2 -> 3
746 _D("Noti count : %d, System count : %d, Minictrl count : %d", noti_count, system_count, icon_count);
753 int box_get_max_count_in_non_fixed_list(void)
759 if (OK != vconf_get_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, &status)) {
760 _E("Fail to get vconfkey");
763 if (status == EINA_TRUE) {
764 added_count = BATTERY_TEXT_ON_COUNT;
766 added_count = BATTERY_TEXT_OFF_COUNT;
769 icon_count = PORT_NONFIXED_ICON_COUNT + added_count;
776 Icon_AddType box_is_enable_to_insert_in_non_fixed_list(icon_s *obj)
783 int same_top_cnt = 0;
785 int noti_cnt = box_get_count(NOTI_LIST);
786 Eina_List * tmp_list = NULL;
791 case INDICATOR_ICON_AREA_SYSTEM:
792 tmp_list = _view_system_list;
794 case INDICATOR_ICON_AREA_MINICTRL:
795 tmp_list = _view_minictrl_list;
797 case INDICATOR_ICON_AREA_NOTI:
798 tmp_list = _view_noti_list;
801 _D("obj area does not exists");
805 EINA_LIST_FOREACH(tmp_list, l, icon) {
806 /* If same Icon exist in non-fixed view list, it need not to add icon */
807 if (!strcmp(icon->name, obj->name)) {
811 if (icon->priority > obj->priority) {
813 } else if (icon->priority == obj->priority) {
815 if (icon->always_top == EINA_TRUE) {
823 if (obj->area == INDICATOR_ICON_AREA_SYSTEM) {
824 if (higher_cnt + same_cnt + lower_cnt >= box_get_enabled_system_count()) {
825 if (obj->always_top == EINA_TRUE) {
826 if(same_top_cnt >= box_get_enabled_system_count()) {
829 return CAN_ADD_WITH_DEL_SYSTEM;
832 if (higher_cnt >= box_get_enabled_system_count()) {
834 } else if (higher_cnt+same_cnt >= box_get_enabled_system_count()) {
835 return CAN_ADD_WITH_DEL_SYSTEM;
837 return CAN_ADD_WITH_DEL_SYSTEM;
841 return CAN_ADD_WITHOUT_DEL;
843 } else if (obj->area == INDICATOR_ICON_AREA_MINICTRL) {
844 if (higher_cnt + same_cnt + lower_cnt >= box_get_minictrl_list()) {
845 if (obj->always_top == EINA_TRUE) {
846 if (same_top_cnt >= box_get_minictrl_list()) {
849 return CAN_ADD_WITH_DEL_MINICTRL;
852 if (higher_cnt >= box_get_minictrl_list()) {
854 } else if (higher_cnt+same_cnt >= box_get_minictrl_list()) {
855 return CAN_ADD_WITH_DEL_MINICTRL;
857 return CAN_ADD_WITH_DEL_MINICTRL;
861 return CAN_ADD_WITHOUT_DEL;
864 if (noti_cnt > MAX_NOTI_ICONS_PORT) {
865 return CAN_ADD_WITH_DEL_NOTI;
867 return CAN_ADD_WITHOUT_DEL;
876 int box_get_priority_in_move_area(win_info *win, Evas_Coord curr_x, Evas_Coord curr_y)
878 Evas_Coord x, y, h, w;
880 /* Home Area Check for launching home */
881 evas_object_geometry_get(win->_fixed_box[INDICATOR_PRIORITY_FIXED1], &x, &y, &h, &w);
883 if (curr_x >= x - CORRECTION && curr_x <= x+h + CORRECTION) {
885 return INDICATOR_PRIORITY_FIXED1;
886 } else if (curr_y >= y - CORRECTION && curr_y <= y+h + CORRECTION) {
887 return INDICATOR_PRIORITY_FIXED1;
891 /* Non Fixed Area check for show/hide quickpanel */
897 int box_check_indicator_area(win_info *win, Evas_Coord curr_x, Evas_Coord curr_y)
899 Evas_Coord x, y, w, h;
901 /* Home Area Check for launching home */
902 evas_object_geometry_get(win->layout, &x, &y, &w, &h);
904 if (curr_x >= x && curr_x < x + w && curr_y >= y && curr_y < y + h) {
913 int box_check_home_icon_area(win_info *win, Evas_Coord curr_x, Evas_Coord curr_y)
915 Evas_Coord x, y, w, h;
917 /* Home Area Check for launching home */
918 evas_object_geometry_get(win->_fixed_box[INDICATOR_PRIORITY_FIXED7], &x, &y, &w, &h);
920 if (curr_x >= x && curr_x < x + w && curr_y >= y && curr_y < y + h) {
929 int box_check_more_icon_area(win_info *win, Evas_Coord curr_x, Evas_Coord curr_y)
931 Evas_Coord x, y, w, h;
933 /* Home Area Check for launching home */
934 evas_object_geometry_get(win->_fixed_box[INDICATOR_PRIORITY_FIXED11], &x, &y, &w, &h);
936 if (curr_x >= x && curr_x < x + w && curr_y >= y && curr_y < y + h) {
945 void box_icon_state_set(int bShow, char* file, int line)
947 icon_show_state = bShow;
952 int box_icon_state_get(void)
954 return icon_show_state;
959 extern Eina_Bool box_exist_icon(icon_s *obj)
961 retv_if(!obj, ECORE_CALLBACK_CANCEL);
964 case INDICATOR_ICON_AREA_FIXED:
965 if (eina_list_data_find(_view_fixed_list, obj)) {
971 case INDICATOR_ICON_AREA_SYSTEM:
972 if (eina_list_data_find(_view_system_list, obj)) {
978 case INDICATOR_ICON_AREA_MINICTRL:
979 if (eina_list_data_find(_view_minictrl_list, obj)) {
985 case INDICATOR_ICON_AREA_NOTI:
986 if (eina_list_data_find(_view_noti_list, obj)) {
1001 int box_handle_animated_gif(icon_s *icon)
1005 Evas_Object *icon_eo = evas_object_data_get(icon->img_obj.obj, DATA_KEY_IMG_ICON);
1007 retif(icon == NULL, FAIL, "Invalid parameter!");
1009 if (elm_image_animated_available_get(icon_eo) == EINA_FALSE) {
1013 if (vconf_get_int(VCONFKEY_PM_STATE, &val) < 0) {
1018 case VCONFKEY_PM_STATE_LCDOFF : //LCD OFF
1021 case VCONFKEY_PM_STATE_NORMAL : //LCD ON
1029 if (bPlay == true) {
1030 if (elm_image_animated_get(icon_eo)==EINA_FALSE) {
1031 elm_image_animated_set(icon_eo,EINA_TRUE);
1034 if (elm_image_animated_play_get(icon_eo) == EINA_FALSE) {
1035 elm_image_animated_play_set(icon_eo, EINA_TRUE);
1038 if(elm_image_animated_play_get(icon_eo) == EINA_TRUE) {
1039 elm_image_animated_play_set(icon_eo, EINA_FALSE);
1048 void box_noti_ani_handle(int bStart)
1053 EINA_LIST_FOREACH(_view_noti_list, l, icon) {
1054 if (icon->obj_exist == EINA_TRUE) {
1056 util_start_noti_ani(icon);
1058 util_stop_noti_ani(icon);