TizenRefApp-6563 [Call UI] Change Keypad edc logic 93/75993/2
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Wed, 22 Jun 2016 09:43:29 +0000 (12:43 +0300)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Wed, 22 Jun 2016 09:48:37 +0000 (12:48 +0300)
Change-Id: Ibe213f47e047be72473aeed00de6d30ad8a3c0ee

edje_src/edc/call_edc/callui-keypad.edc
inc/callui-display.h
src/callui-display.c
src/callui-keypad.c
src/callui-proximity-lock-manager.c
src/callui-view-quickpanel.c
src/callui.c

index a828af9..c143b84 100644 (file)
  *  limitations under the License.
  *
  */
+#define CU_KEYPAD_ANIMATION_DURATION           0.8
+#define CU_KEYPAD_ANIMATION_DELAY                      0.6 0.0
+#define CU_KEYPAD_DOWN_ARW_START_ANIM_MAX_H    3
 
 #define PART_KEYPAD_CUSTOM_ONE_ICON(txt, column, row, left_icon) \
-                       part { \
-                               name: txt; \
-                               type: RECT; \
-                               scale: 1; \
+                       CU_PART_RECT( txt, \
                                mouse_events: 1; \
-                               description { \
-                                       state: "default" 0.0; \
+                               description { state: "default" 0.0; \
                                        visible: 1; \
                                        rel1 {relative: (column*(KEYPAD_EACH_BTN_W+KEYPAD_DIVIDER_SIZE)/MAIN_SCREEN_W) (row*(KEYPAD_EACH_BTN_H+KEYPAD_DIVIDER_SIZE)/KEYPAD_H); to:"keypad_btns_rect";} \
                                        rel2 {relative: (((column+1)*KEYPAD_EACH_BTN_W+column*KEYPAD_DIVIDER_SIZE)/MAIN_SCREEN_W) (((row+1)*KEYPAD_EACH_BTN_H+row*KEYPAD_DIVIDER_SIZE)/KEYPAD_H); to:"keypad_btns_rect"; } \
                                        fixed: 1 1; \
                                        color_class: "AO005_C"; \
                                } \
-                               description { \
-                                       state: "pressed" 0.0; \
+                               description { state: "pressed" 0.0; \
                                        inherit: "default" 0.0; \
                                        visible: 1; \
                                        color_class: "AO005P"; \
                                } \
-                               description { \
-                                       state: "hide" 0.0; \
+                               description { state: "hide" 0.0; \
                                        inherit: "default" 0.0; \
                                        visible: 0; \
                                } \
-                       } \
-                       part { \
-                               name: txt"_left"; \
-                               type: IMAGE; \
-                               scale: 1; \
+                       ) \
+                       CU_PART_IMAGE( txt"_left", \
                                mouse_events: 0; \
                                repeat_events: 1; \
-                               description { \
-                                       state: "default" 0.0; \
+                               description { state: "default" 0.0; \
                                        aspect: 0.0 1.0; \
                                        aspect_preference: SOURCE; \
                                        rel1 { relative: (KEYPAD_BTN_OFFSET_X/KEYPAD_EACH_BTN_W) (KEYPAD_BTN_OFFSET_Y/KEYPAD_EACH_BTN_H); to: txt;} \
                                        rel2 { relative: ((KEYPAD_BTN_OFFSET_X+KEYPAD_BTN_ICON_W)/KEYPAD_EACH_BTN_W) ((KEYPAD_BTN_OFFSET_Y+KEYPAD_BTN_NUMBER_H)/KEYPAD_EACH_BTN_H); to: txt;} \
-                                       align: 0.5 0.5; \
                                        image.normal: left_icon;\
                                        color_class: "AO003"; \
                                        aspect_preference: SOURCE; \
                                        visible: 1; \
                                } \
-                               description { \
-                                       state: "hide" 0.0; \
+                               description { state: "hide" 0.0; \
                                        inherit: "default" 0.0; \
                                        visible: 0; \
                                } \
-                       } \
-                       part { name: "over_"txt; \
-                               type: RECT; \
+                       ) \
+                       CU_PART_RECT( "over_"txt, \
                                mouse_events: 1; \
                                repeat_events: 1; \
                                ignore_flags: ON_HOLD; \
                                        rel2 { relative: 1 1; to: txt; } \
                                        color: COLOR_BG_ALPHA; \
                                } \
-                       }
+                       )
 
 #define PART_KEYPAD_CUSTOM_TWO_ICON(txt, column, row, left_icon, right_icon) \
-                       part { \
-                               name: txt; \
-                               type: RECT; \
-                               scale: 1; \
+                       CU_PART_RECT( txt, \
                                mouse_events: 1; \
-                               description { \
-                                       state: "default" 0.0; \
+                               description { state: "default" 0.0; \
                                        visible: 1; \
                                        rel1 { relative: (column*(KEYPAD_EACH_BTN_W+KEYPAD_DIVIDER_SIZE)/MAIN_SCREEN_W) (row*(KEYPAD_EACH_BTN_H+KEYPAD_DIVIDER_SIZE)/KEYPAD_H); to:"keypad_btns_rect";} \
                                        rel2 { relative: (((column+1)*KEYPAD_EACH_BTN_W+column*KEYPAD_DIVIDER_SIZE)/MAIN_SCREEN_W) (((row+1)*KEYPAD_EACH_BTN_H+row*KEYPAD_DIVIDER_SIZE)/KEYPAD_H); to:"keypad_btns_rect"; } \
                                        fixed: 1 1; \
                                        color_class: "AO005_C"; \
                                } \
-                               description { \
-                                       state: "pressed" 0.0; \
+                               description { state: "pressed" 0.0; \
                                        inherit: "default" 0.0; \
                                        visible: 1; \
                                        color_class: "AO005P"; \
                                } \
-                               description { \
-                                       state: "hide" 0.0; \
+                               description { state: "hide" 0.0; \
                                        inherit: "default" 0.0; \
                                        visible: 0; \
                                } \
-                       } \
-                       part { \
-                               name: txt"_left"; \
-                               type: IMAGE; \
-                               scale: 1; \
+                       ) \
+                       CU_PART_IMAGE( txt"_left", \
                                mouse_events: 0; \
                                repeat_events: 1; \
                                description { \
                                        aspect_preference: SOURCE; \
                                        visible: 1; \
                                } \
-                               description { \
-                                       state: "hide" 0.0; \
+                               description { state: "hide" 0.0; \
                                        inherit: "default" 0.0; \
                                        visible: 0; \
                                } \
-                       } \
-                       part { \
-                               name: txt"_right"; \
-                               type: IMAGE; \
-                               scale: 1; \
+                       ) \
+                       CU_PART_IMAGE( txt"_right", \
                                mouse_events: 0; \
                                repeat_events: 1; \
-                               description { \
-                                       state: "default" 0.0; \
+                               description { state: "default" 0.0; \
                                        aspect: 1.0 1.0; \
                                        aspect_preference: SOURCE; \
                                        rel1 { relative: (KEYPAD_BTN_OFFSET_X/KEYPAD_EACH_BTN_W) ((KEYPAD_BTN_OFFSET_Y+KEYPAD_BTN_NUMBER_H)/KEYPAD_EACH_BTN_H); to: txt;} \
                                        rel2 { relative: ((KEYPAD_BTN_OFFSET_X+KEYPAD_BTN_ICON_W)/KEYPAD_EACH_BTN_W) ((KEYPAD_BTN_OFFSET_Y+KEYPAD_BTN_NUMBER_H+KEYPAD_BTN_LETTERS_H)/KEYPAD_EACH_BTN_H); to: txt;} \
-                                       align: 0.5 0.5; \
                                        image.normal: right_icon; \
                                        color_class: "AO004_C"; \
                                        aspect_preference: SOURCE; \
                                        visible: 1; \
                                } \
-                               description { \
-                                       state: "hide" 0.0; \
+                               description { state: "hide" 0.0; \
                                        inherit: "default" 0.0; \
                                        visible: 0; \
                                } \
-                       } \
-                       part { name: "over_"txt; \
-                               type: RECT; \
+                       ) \
+                       CU_PART_RECT( "over_"txt, \
                                mouse_events: 1; \
                                repeat_events: 1; \
                                ignore_flags: ON_HOLD; \
                                        rel2 { relative: 1 1; to: txt; } \
                                        color: COLOR_BG_ALPHA; \
                                } \
-                       }
+                       )
 
 #define PROG_KEYPAD(txt) \
-       program { \
-               name: "down_"txt; \
+       program { name: "down_"txt; \
                signal: "mouse,down,*"; \
                source: "over_"txt; \
                script { \
                        emit("pad_down", txt); \
                } \
        } \
-       program { \
-               name: "ani_"txt; \
+       program { name: "ani_"txt; \
                signal: "ani"; \
                source: "over_"txt; \
                action: STATE_SET "default" 0.0; \
                transition: SINUSOIDAL 0.1; \
                target: txt; \
        } \
-       program { \
-               name: "up_"txt; \
+       program { name: "up_"txt; \
                signal: "mouse,up,1"; \
                source: "over_"txt; \
                script { \
                        emit("ani", "over_"txt); \
                } \
        } \
-       program { \
-               name: "clicked_"txt; \
+       program { name: "clicked_"txt; \
                signal: "mouse,clicked,1"; \
                source: "over_"txt; \
                script { \
                } \
        }
 
-group{
-       name: "keypad_layout";
+group{ name: "keypad_layout";
        parts {
-               part { name: "bg";
-                       type: SPACER;
+               CU_PART_SPACER( "bg",
                        mouse_events:1;
                        repeat_events: 1;
                        description {
                                state: "default" 0.0;
                        }
-               }
-               part { name: "keypad.pad.bottom";
-                       type: SPACER;
+               )
+               CU_PART_SPACER( "keypad.pad.bottom",
                        mouse_events: 1;
                        repeat_events: 1;
                        description {
@@ -221,62 +188,46 @@ group{
                                fixed: 0 1;
                                align: 0 1;
                        }
-               }
-               part { name: "swallow.textarea";
-                       type: SWALLOW;
-                       scale: 1;
-                       description {
-                               state: "default" 0.0;
+               )
+               CU_PART_SWALLOW( "swallow.textarea",
+                       description { state: "default" 0.0;
                                visible: 0;
-                               rel1.relative: 0.0 0.0;
-                               rel2 {
-                                       relative: 1.0 0.0;
-                                       to: "keypad.pad.bottom";
-                               }
+                               rel1 { relative: 0.0 0.0; to: "bg"; }
+                               rel2 { relative: 1.0 0.0; to: "keypad.pad.bottom"; }
                        }
-                       description {
-                               state: "show" 0.0;
+                       description { state: "show" 0.0;
                                inherit: "default" 0.0;
                                visible: 1;
                        }
-                       description {
-                               state: "hide" 0.0;
+                       description { state: "hide" 0.0;
                                inherit: "default" 0.0;
-                               visible: 0;
                        }
-               }
-               part { name: "swallow.keypad_region";
-                       type: SWALLOW;
-                       scale: 1;
-                       description {
-                               state: "default" 0.0;
+               )
+               CU_PART_SWALLOW( "swallow.keypad_region",
+                       description { state: "default" 0.0;
                                visible: 0;
-                               rel1.relative: 0.0 1.0;
-                               rel2.relative: 1.0 2.0;
+                               rel1 { relative: 0.0 1.0; to: "bg"; }
+                               rel2 { relative: 1.0 2.0; to: "bg"; }
                        }
-                       description {
-                               state: "show" 0.0;
+                       description { state: "show" 0.0;
                                inherit: "default" 0.0;
                                visible: 1;
-                               rel1.relative: 0.0 0.0;
-                               rel2.relative: 1.0 1.0;
+                               rel1 { relative: 0.0 0.0; to: "bg"; }
+                               rel2 { relative: 1.0 1.0; to: "bg"; }
                        }
-                       description {
-                               state: "hide" 0.0;
+                       description { state: "hide" 0.0;
                                inherit: "default" 0.0;
-                               visible: 0;
                        }
-               }
+               )
        }
        programs {
                program { name: "show_keypadbtn_anim";
                        signal: "show";
-                       source: "keypad_btn";
+                       source: "keypad_layout";
                        after: "show_entry";
                        after: "show_keypadbtn";
                }
-               program {
-                       name: "show_entry";
+               program { name: "show_entry";
                        action: STATE_SET "show" 0.0;
                        target: "swallow.textarea";
                }
@@ -287,33 +238,29 @@ group{
                }
                program { name: "hide_keypadbtn_anim";
                        signal: "hide";
-                       source: "keypad_btn";
+                       source: "keypad_layout";
                        after: "hide_keypadbtn_with_anim";
                }
                program { name: "hide_keypadbtn_no_anim";
                        signal: "quick_hide";
-                       source: "keypad_btn";
+                       source: "keypad_layout";
                        after: "hide_keypadbtn_without_anim";
                }
-               program {
-                       name: "hide_complete_notify";
+               program { name: "hide_complete_notify";
                        action: SIGNAL_EMIT "hide_completed" "*";
                }
-               program {
-                       name: "hide_entry";
+               program { name: "hide_entry";
                        action: STATE_SET "hide" 0.0;
                        target: "swallow.textarea";
                }
-               program {
-                       name: "hide_keypadbtn_with_anim";
+               program { name: "hide_keypadbtn_with_anim";
                        action: STATE_SET "default" 0.0;
                        transition: LINEAR 0.25;
                        target: "swallow.keypad_region";
                        after: "hide_entry";
                        after: "hide_complete_notify";
                }
-               program {
-                       name: "hide_keypadbtn_without_anim";
+               program { name: "hide_keypadbtn_without_anim";
                        action: STATE_SET "default" 0.0;
                        target: "swallow.keypad_region";
                        after: "hide_entry";
@@ -322,116 +269,67 @@ group{
        }
 }
 
-group{
-       name: "keypad";
-               parts {
-                       part { name: "background";
-                       type: RECT;
-                       description {
-                               state: "default" 0.0;
-                               color: COLOR_BG_ALPHA;
-                       }
-               }
-
-               part {
-                       name: "keypad_arrow_bg";
-                       type: RECT;
-                       description {
-                               state: "default" 0.0;
-                               visible: 1;
+group{ name: "keypad";
+       parts {
+               CU_PART_SPACER( "bg",
+                       description { state: "default" 0.0; }
+               )
+               CU_PART_RECT( "keypad_arrow_bg",
+                       description { state: "default" 0.0;
                                color_class: "keypad_btn_bg";
-                               rel1 { relative: 0.0 KEYPAD_ARROW_BG_T; to: "background";}
-                               rel2 { relative: 1.0 KEYPAD_ARROW_BG_B; to: "background";}
+                               rel1 { relative: 0.0 KEYPAD_ARROW_BG_T; to: "bg";}
+                               rel2 { relative: 1.0 KEYPAD_ARROW_BG_B; to: "bg";}
                        }
-                       description {
-                               state: "show" 0.0;
-                               inherit: "default" 0.0;
-                               visible: 1;
-                       }
-                       description {
-                               state: "hide" 0.0;
-                               inherit: "default" 0.0;
-                               visible: 0;
-                       }
-               }
-
-               part {
-                       name: "sweep_area";
-                       type: RECT;
+               )
+               CU_PART_RECT( "sweep_area",
                        mouse_events: 1;
                        description {
                                state: "default" 0.0;
                                color: COLOR_BG_ALPHA;
-                               rel1 { relative: 0.0 KEYPAD_SWEEP_AREA_T; to: "background";}
-                               rel2 { relative: 1.0 KEYPAD_SWEEP_AREA_B; to: "background";}
+                               rel1 { relative: 0.0 KEYPAD_SWEEP_AREA_T; to: "bg";}
+                               rel2 { relative: 1.0 KEYPAD_SWEEP_AREA_B; to: "bg";}
                        }
-               }
-
-               part {
-                       name: "keypad_arrow_rect";
-                       type: SPACER;
+               )
+               CU_PART_SPACER( "keypad_arrow_rect",
                        mouse_events:1;
                        repeat_events: 1;
                        description {
                                state: "default" 0.0;
-                               rel1 { relative: KEYPAD_ARROW_L KEYPAD_ARROW_T; to: "keypad_arrow_bg";}
-                               rel2 { relative: KEYPAD_ARROW_R KEYPAD_ARROW_B; to: "keypad_arrow_bg";}
+                               rel1 { relative: KEYPAD_ARROW_L KEYPAD_ARROW_T; to: "keypad_arrow_bg";}
+                               rel2 { relative: KEYPAD_ARROW_R KEYPAD_ARROW_B; to: "keypad_arrow_bg";}
                        }
-               }
-
-               part {
-                       name: "keypad_down_arw";
-                       type: IMAGE;
+               )
+               CU_PART_IMAGE( "keypad_down_arw",
                        mouse_events:1;
                        repeat_events: 1;
-                       description {
-                               state: "default" 0.0;
+                       description { state: "default" 0.0;
                                rel1 {relative: 0.0 0.0; to: "keypad_arrow_rect";}
                                rel2 {relative: 1.0 1.0; to: "keypad_arrow_rect";}
                                align: 0.5 0.0;
-                               image {
-                                       normal: IMG_SRC_DIR/"call_open_arrow_01.png";
-                               }
-                               max: -1 3;
+                               image.normal: IMG_SRC_DIR/"call_open_arrow_01.png";
+                               max: -1 CU_KEYPAD_DOWN_ARW_START_ANIM_MAX_H;
                                fixed: 0 1;
                                aspect_preference: HORIZONTAL;
                                visible: 1;
                        }
-                       description {
-                               state: "move" 0.0;
+                       description { state: "move" 0.0;
                                rel1 { relative: 0.0 0.0; to: "keypad_arrow_rect";}
                                rel2 { relative: 1.0 1.0; to: "keypad_arrow_rect";}
-                               image {
-                                       normal: IMG_SRC_DIR/"call_open_arrow_01.png";
-                               }
+                               image.normal: IMG_SRC_DIR/"call_open_arrow_01.png";
                                aspect_preference: SOURCE;
                                align: 0.5 1.0;
                        }
-               }
-
-               part {  name: "keypad_btns_rect";
-                       type: RECT;
+               )
+               CU_PART_RECT( "keypad_btns_rect",
                        mouse_events: 0;
                        scale: 1;
-                       description {
-                               state: "default" 0.0;
-                               rel1 { relative: 0.0 KEYPAD_BTNS_LAYOUT_T; to: "background"; }
-                               rel2 { relative: 1.0 KEYPAD_BTNS_LAYOUT_B; to: "background"; }
+                       description { state: "default" 0.0;
+                               rel1 { relative: 0.0 KEYPAD_BTNS_LAYOUT_T; to: "bg"; }
+                               rel2 { relative: 1.0 KEYPAD_BTNS_LAYOUT_B; to: "bg"; }
                                color_class: "AO008";
                                visible: 1;
                        }
-                       description {
-                               state: "show" 0.0;
-                               inherit: "default" 0.0;
-                               visible: 1;
-                       }
-                       description {
-                               state: "hide" 0.0;
-                               inherit: "default" 0.0;
-                               visible: 0;
-                       }
-               }
-
+               )
                PART_KEYPAD_CUSTOM_ONE_ICON("1", 0, 0, IMG_SRC_DIR/"keypad_number_01.png")
                PART_KEYPAD_CUSTOM_TWO_ICON("2", 1, 0, IMG_SRC_DIR/"keypad_number_02.png", IMG_SRC_DIR/"keypad_english_01.png")
                PART_KEYPAD_CUSTOM_TWO_ICON("3", 2, 0, IMG_SRC_DIR/"keypad_number_03.png", IMG_SRC_DIR/"keypad_english_02.png")
@@ -445,63 +343,50 @@ group{
                PART_KEYPAD_CUSTOM_ONE_ICON("0", 1, 3, IMG_SRC_DIR/"keypad_number_00.png")
                PART_KEYPAD_CUSTOM_ONE_ICON("sharp", 2, 3, IMG_SRC_DIR/"keypad_number_sharp.png")
        }
-
-       programs{
+       programs {
                script {
-                       public animation_cnt;
+                       public resize_down_arrow_cnt;
                }
-
                program { name: "show_keypadbtn";
-                       signal: "SHOW";
-                       source: "KEYPADBTN";
-                       action: STATE_SET "show" 0.0;
-                       target: "keypad_arrow_bg";
-                       target: "keypad_btns_rect";
+                       signal: "show";
+                       source: "keypad";
+                       after: "init_down_arrow_anim";
+                       after: "start_down_arrow_anim";
                }
-
-               program {
-                       name: "init_animation";
-                       signal: "init";
-                       source: "down_arrow";
-                       action: STATE_SET "default" 0.0;
-                       target: "keypad_down_arw";
+               program { name: "init_down_arrow_anim";
                        script {
-                               set_int(animation_cnt, 0);
+                               set_int(resize_down_arrow_cnt, 0);
                        }
                }
-
-               program {
-                       name: "start_animation";
-                       signal: "start_animation";
-                       source: "down_arrow";
+               program { name: "start_down_arrow_anim";
                        action: STATE_SET "default" 0.0;
                        target: "keypad_down_arw";
-                       after: "move_arrow";
+                       after: "resize_down_arrow";
                }
-
-               program {
-                       name: "move_arrow";
+               program { name: "start_down_arrow_anim_w_delay";
+                       in: CU_KEYPAD_ANIMATION_DELAY;
+                       after: "start_down_arrow_anim";
+               }
+               program { name: "resize_down_arrow";
                        signal: "move";
                        source: "down_arrow";
                        action: STATE_SET "move" 0.0;
                        target: "keypad_down_arw";
-                       transition: DECELERATE 0.6;
+                       transition: DECELERATE CU_KEYPAD_ANIMATION_DURATION;
                        after: "repeat";
                }
-
-               program {
-                       name: "repeat";
+               program { name: "repeat";
                        script {
-                               set_int(animation_cnt, get_int(animation_cnt)+1);
-                               if (get_int(animation_cnt) >= 2) {
-                                       set_int(animation_cnt, 0);
+                               set_int(resize_down_arrow_cnt, get_int(resize_down_arrow_cnt)+1);
+                               if (get_int(resize_down_arrow_cnt) >= 2) {
+                                       set_int(resize_down_arrow_cnt, 0);
+                                       run_program(PROGRAM:"start_down_arrow_anim_w_delay");
                                }
                                else {
-                                       run_program(PROGRAM:"start_animation");
+                                       run_program(PROGRAM:"start_down_arrow_anim");
                                }
                        }
                }
-
                PROG_KEYPAD("1")
                PROG_KEYPAD("2")
                PROG_KEYPAD("3")
index 8367b7e..f38a470 100644 (file)
@@ -49,6 +49,6 @@ callui_result_e _callui_display_set_timeout(callui_display_h disp, callui_displa
 
 callui_result_e _callui_display_set_control_state(callui_display_h disp, callui_display_control_e state);
 
-callui_result_e _callui_display_get_control_state(callui_display_h disp, callui_display_control_e *state);
+bool _callui_display_is_turned_on(callui_display_h display);
 
 #endif /* __CALLUI_DISPLAY_H__ */
index fc04649..a96db90 100644 (file)
@@ -262,27 +262,20 @@ callui_result_e _callui_display_set_control_state(callui_display_h display, call
        return CALLUI_RESULT_OK;
 }
 
-callui_result_e _callui_display_get_control_state(callui_display_h display, callui_display_control_e *state)
+bool _callui_display_is_turned_on(callui_display_h display)
 {
-       CALLUI_RETURN_VALUE_IF_FAIL(display, CALLUI_RESULT_INVALID_PARAM);
+       CALLUI_RETURN_VALUE_IF_FAIL(display, false);
 
        display_state_e disp_state = DISPLAY_STATE_NORMAL;
        int res = device_display_get_state(&disp_state);
-       if (res != DEVICE_ERROR_NONE) {
-               err("device_display_get_state() failed. res[%d]", res);
-               return CALLUI_RESULT_FAIL;
-       }
+       CALLUI_RETURN_VALUE_IF_FAIL(res == DEVICE_ERROR_NONE, false);
 
        switch (disp_state) {
-       case DISPLAY_STATE_SCREEN_OFF:
-               *state = CALLUI_DISPLAY_OFF;
-               break;
        case DISPLAY_STATE_NORMAL:
        case DISPLAY_STATE_SCREEN_DIM:
+               return true;
+       case DISPLAY_STATE_SCREEN_OFF:
        default:
-               *state = CALLUI_DISPLAY_ON;
-               break;
+               return false;
        }
-
-       return CALLUI_RESULT_OK;
 }
index dd4f1f9..31e2962 100755 (executable)
 #define CALLUI_PART_SWALLOW_KEYPAD_LAYOUT_AREA "swallow.keypad_layout_area"
 
 #define CALLUI_KEYPAD_ENTRY_FONT       "<font='Samsung Sans Num47:style=Light'>%s</>"
-#define CALLUI_KEYAD_ENTRY_STYLE       "DEFAULT='align=center color=#ffffffff font_size=76'"
+#define CALLUI_KEYPAD_ENTRY_STYLE      "DEFAULT='align=center color=#ffffffff font_size=76'"
 
-#define VC_AUTO_SPACING_TIMEOUT_SEC 5.0
+#define CALLUI_KEYPAD_AUTOSPACE_TIMEOUT_SEC    5.0
+
+#define CALLUI_KEYPAD_GEST_Y_COORD_MIN         100
+#define CALLUI_KEYPAD_GEST_MOMENTUM_MIN                500
 
 static int     __callui_keypad_init(callui_keypad_h keypad, callui_app_data_t *appdata);
 static void __callui_keypad_deinit(callui_keypad_h keypad);
@@ -49,19 +52,16 @@ static void __on_key_up_click_event(void *data, Evas_Object *obj, const char *em
 static Evas_Object *__create_single_line_scrolled_entry(Evas_Object *content);
 static int __create_entry(callui_keypad_h keypad);
 static void __clear_entry(callui_keypad_h keypad);
-static Eina_Bool __down_arrow_animation_timeout_cb(void *data);
 static void __hide_keypad(callui_keypad_h keypad, Eina_Bool is_immediately);
 static void __on_hide_completed(void *data, Evas_Object *obj, const char *emission, const char *source);
 
 struct _callui_keypad {
-
        Evas_Object *main_layout;
-
        Evas_Object *btns_layout;
        Evas_Object *entry;
+       Evas_Object *gesture_layer;
 
        Eina_Bool is_keypad_show;
-       Evas_Object *gesture_layer;
        int gesture_start_y;
        int gesture_momentum_y;
 
@@ -70,7 +70,6 @@ struct _callui_keypad {
        show_state_change_cd cb_func;
        void *cb_data;
 
-       Ecore_Timer *anim_timer;
        Ecore_Timer *auto_spacing_timer;
 };
 
@@ -103,8 +102,6 @@ static int __callui_keypad_init(callui_keypad_h keypad, callui_app_data_t *appda
 
 static void __callui_keypad_deinit(callui_keypad_h keypad)
 {
-       DELETE_ECORE_TIMER(keypad->anim_timer);
-
        DELETE_ECORE_TIMER(keypad->auto_spacing_timer);
 
        if (keypad->main_layout) {
@@ -166,15 +163,6 @@ static Evas_Event_Flags __arrow_flick_gesture_event_cb(void *data, void *event_i
        callui_keypad_h keypad_data = (callui_keypad_h)data;
        Elm_Gesture_Line_Info *info = (Elm_Gesture_Line_Info *)event_info;
 
-       dbg("*********************************************");
-       dbg("info->angle = %lf", info->angle);
-       dbg("info->momentum.mx = %d, info->momentum.my = %d", info->momentum.mx, info->momentum.my);
-       dbg("info->momentum.n = %d", info->momentum.n);
-       dbg("info->momentum.tx = %d, info->momentum.ty = %d", info->momentum.tx, info->momentum.ty);
-       dbg("info->momentum.x1 = %d, info->momentum.x2 = %d", info->momentum.x1, info->momentum.x2);
-       dbg("info->momentum.y1 = %d, info->momentum.y2 = %d", info->momentum.y1, info->momentum.y2);
-       dbg("*********************************************");
-
        keypad_data->gesture_momentum_y = info->momentum.my;
 
        return EVAS_EVENT_FLAG_NONE;
@@ -199,7 +187,8 @@ static void __arrow_mouse_up_event_cb(void *data, Evas *evas, Evas_Object *obj,
        callui_keypad_h keypad_data = (callui_keypad_h)data;
        Evas_Event_Mouse_Move *ev = event_info;
 
-       if (((ev->cur.canvas.y-keypad_data->gesture_start_y) > 100) && (keypad_data->gesture_momentum_y > 500)) {
+       if (((ev->cur.canvas.y-keypad_data->gesture_start_y) > CALLUI_KEYPAD_GEST_Y_COORD_MIN)
+                       && (keypad_data->gesture_momentum_y > CALLUI_KEYPAD_GEST_MOMENTUM_MIN)) {
                __hide_keypad( keypad_data, EINA_FALSE);
        }
 }
@@ -249,8 +238,6 @@ static void __on_hide_completed(void *data, Evas_Object *obj, const char *emissi
 
        eext_object_event_callback_del(main_ly, EEXT_CALLBACK_BACK, __back_button_click_cb);
 
-       DELETE_ECORE_TIMER(keypad->anim_timer);
-
        keypad->main_layout = elm_object_part_content_unset(main_ly,
                        CALLUI_PART_SWALLOW_KEYPAD_LAYOUT_AREA);
 
@@ -350,7 +337,7 @@ static void __on_key_up_click_event(void *data, Evas_Object *obj, const char *em
        }
 
        DELETE_ECORE_TIMER(keypad->auto_spacing_timer);
-       keypad->auto_spacing_timer = ecore_timer_add(VC_AUTO_SPACING_TIMEOUT_SEC, __auto_spacing_timer_cb, keypad);
+       keypad->auto_spacing_timer = ecore_timer_add(CALLUI_KEYPAD_AUTOSPACE_TIMEOUT_SEC, __auto_spacing_timer_cb, keypad);
 }
 
 static Evas_Object *__create_single_line_scrolled_entry(Evas_Object *content)
@@ -381,7 +368,7 @@ static Evas_Object *__create_single_line_scrolled_entry(Evas_Object *content)
        evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
-       elm_entry_text_style_user_push(en, CALLUI_KEYAD_ENTRY_STYLE);
+       elm_entry_text_style_user_push(en, CALLUI_KEYPAD_ENTRY_STYLE);
 
        evas_object_show(en);
 
@@ -406,19 +393,6 @@ static int __create_entry(callui_keypad_h keypad)
        return CALLUI_RESULT_OK;
 }
 
-static Eina_Bool __down_arrow_animation_timeout_cb(void *data)
-{
-       CALLUI_RETURN_VALUE_IF_FAIL(data, ECORE_CALLBACK_CANCEL);
-
-       callui_keypad_h keypad_data = (callui_keypad_h)data;
-
-       if (keypad_data->btns_layout) {
-               elm_object_signal_emit(keypad_data->btns_layout, "start_animation", "down_arrow");
-       }
-
-       return ECORE_CALLBACK_RENEW;
-}
-
 void _callui_keypad_show(callui_keypad_h keypad)
 {
        CALLUI_RETURN_IF_FAIL(keypad);
@@ -430,12 +404,9 @@ void _callui_keypad_show(callui_keypad_h keypad)
        elm_object_part_content_set(main_ly, CALLUI_PART_SWALLOW_KEYPAD_LAYOUT_AREA, keypad->main_layout);
        evas_object_show(keypad->main_layout);
 
-       elm_object_signal_emit(keypad->btns_layout, "SHOW", "KEYPADBTN");
+       elm_object_signal_emit(keypad->btns_layout, "show", "keypad");
 
-       elm_object_signal_emit(keypad->btns_layout, "init", "down_arrow");
-       elm_object_signal_emit(keypad->btns_layout, "start_animation", "down_arrow");
-
-       elm_object_signal_emit(keypad->main_layout, "show", "keypad_btn");
+       elm_object_signal_emit(keypad->main_layout, "show", "keypad_layout");
 
        keypad->is_keypad_show = EINA_TRUE;
 
@@ -443,9 +414,6 @@ void _callui_keypad_show(callui_keypad_h keypad)
 
        eext_object_event_callback_add(main_ly, EEXT_CALLBACK_BACK, __back_button_click_cb, keypad);
 
-       ecore_timer_del(keypad->anim_timer);
-       keypad->anim_timer = ecore_timer_add(2.0, __down_arrow_animation_timeout_cb, keypad);
-
        if (keypad->cb_func) {
                keypad->cb_func(keypad->cb_data, keypad->is_keypad_show);
        }
@@ -462,9 +430,9 @@ static void __hide_keypad(callui_keypad_h keypad, Eina_Bool is_immediately)
        keypad->is_keypad_show = EINA_FALSE;
 
        if (is_immediately) {
-               elm_object_signal_emit(keypad->main_layout, "quick_hide", "keypad_btn");
+               elm_object_signal_emit(keypad->main_layout, "quick_hide", "keypad_layout");
        } else {
-               elm_object_signal_emit(keypad->main_layout, "hide", "keypad_btn");
+               elm_object_signal_emit(keypad->main_layout, "hide", "keypad_layout");
        }
 }
 
index 1920921..5acdb9a 100644 (file)
@@ -125,7 +125,7 @@ static void __callui_proximity_lock_manager_cb(sensor_h sensor, sensor_event_s *
        callui_app_data_t *ad = _callui_get_app_data();
 
        if (value > 0) {
-               if (proximity_h->state == CALLUI_PLM_LCD_OFF) {
+               if (!_callui_display_is_turned_on(ad->display)) {
                        _callui_display_set_control_state(ad->display, CALLUI_DISPLAY_ON);
                        proximity_h->state = CALLUI_PLM_LCD_ON;
                        if (proximity_h->unlock_cb) {
@@ -135,9 +135,7 @@ static void __callui_proximity_lock_manager_cb(sensor_h sensor, sensor_event_s *
                        }
                }
        } else {
-               callui_display_control_e state;
-               if (_callui_display_get_control_state(ad->display, &state) == CALLUI_RESULT_OK &&
-                               CALLUI_DISPLAY_ON == state) {
+               if (_callui_display_is_turned_on(ad->display)) {
                        _callui_display_set_control_state(ad->display, CALLUI_DISPLAY_OFF);
                        proximity_h->state = CALLUI_PLM_LCD_OFF;
                }
index 4681f36..3a4a821 100755 (executable)
@@ -31,7 +31,6 @@
 
 #define CALLUI_GROUP_QUICKPANEL        "quickpanel"
 
-#define CALLUI_BUF_TIMER_TXT_LEN       26
 #define CALLUI_CALL_NUMBER_ONE         1
 
 typedef enum {
@@ -371,8 +370,8 @@ static void __set_split_call_duration_time(struct tm *time, Evas_Object *obj, co
                snprintf(dur, CALLUI_BUFF_SIZE_TINY, "%02d:%02d", time->tm_min, time->tm_sec);
        }
 
-       char buf[CALLUI_BUF_TIMER_TXT_LEN] = {0};
-       char buf_tmp[CALLUI_BUF_TIMER_TXT_LEN] = {0};
+       char buf[CALLUI_BUFF_SIZE_SML] = {0};
+       char buf_tmp[CALLUI_BUFF_SIZE_SML] = {0};
        snprintf(buf_tmp, sizeof(buf_tmp), "%s / %s", dur, _("IDS_CALL_BODY_PD_ON_HOLD_M_STATUS_ABB"));
        snprintf(buf, sizeof(buf), buf_tmp, CALLUI_CALL_NUMBER_ONE);
 
index 2afe218..74c2aa4 100755 (executable)
@@ -598,11 +598,7 @@ static Eina_Bool __hard_key_up_cb(void *data, int type, void *event)
                int is_powerkey_enabled = _callui_common_is_powerkey_mode_on();
                dbg("[KEY]KEY_POWER pressed, is_powerkey_enabled(%d)", is_powerkey_enabled);
 
-               callui_display_control_e state = CALLUI_DISPLAY_OFF;
-               callui_result_e res = _callui_display_get_control_state(ad->display, &state);
-               CALLUI_RETURN_VALUE_IF_FAIL(res == CALLUI_RESULT_OK, EINA_FALSE);
-
-               if (is_powerkey_enabled && state == CALLUI_DISPLAY_ON) {
+               if (is_powerkey_enabled && _callui_display_is_turned_on(ad->display)) {
                        if (view_type == CALLUI_VIEW_DIALLING) {
                                if (active) {
                                        _callui_manager_end_call(ad->call_manager, active->call_id,