# install manifest file & icon
INSTALL(FILES ${PROJECT_FILES_DIR}/res/images/call_button_icon_01.png DESTINATION ${IMG_DIR})
INSTALL(FILES ${PROJECT_FILES_DIR}/res/images/call_button_icon_03.png DESTINATION ${IMG_DIR})
-INSTALL(FILES ${PROJECT_FILES_DIR}/res/images/call_button_icon_04.png DESTINATION ${IMG_DIR})
-
image: IMG_SRC_DIR/"call_multi_hold_bg.png" COMP;
image: IMG_SRC_DIR/"call_multi_hold_btn_merge_bg.png" COMP;
image: IMG_SRC_DIR/"call_multi_hold_btn_swap_bg.png" COMP;
- image: IMG_SRC_DIR/"background.png" COMP;
}
styles {
*
*/
-styles {
- style {
- name: "active_call_name";
- base: "font=Tizen:style=Regular align=left font_size=40 color=#FFFFFF ellipsis=1.0";
- }
- style {
- name: "active_call_number";
- base: "font=Tizen:style=Regular align=left font_size=32 color=#FFFFFF ellipsis=1.0";
- }
-}
-
-#define IAC_REC_MAIN_INFO 144
-#define IAC_SPACE_ICON 23
-#define IAC_ICON_H 98
-#define IAC_SPACE_ICON_W 32
-#define IAC_REC_BTN_H 120
-#define IAC_BTN_H 78
-#define IAC_IAC_SWAP_BTN_Y 46
-
-#define IAC_MAIN_HEIGHT (INDICATOR_HEIGHT+IAC_REC_MAIN_INFO+IAC_REC_BTN_H+IAC_IAC_SWAP_BTN_Y) // 350
-#define IAC_MAIN_WIDTH MAIN_SCREEN_W
-#define IAC_MAIN_HEIGHT_REJECT MAIN_SCREEN_H
-#define IAC_MAIN_HEIGHT_RECT_REJECT IAC_MAIN_HEIGHT
-
-#define IAH_SPACE_BTN 186
-#define IAC_SPACE_BETWEEN_BTNS 16
-#define IAH_SPACE_BTN_Y 21
-
-#define IAC_BTN_SIZE_X_LITTLE 208
-#define IAC_BTN_SIZE_X_BIG 320
-#define IAC_BTN_SIZE_Y 78
-
-#define IAC_IAC_CONTACT_NAME_H 56
-#define IAC_IAC_CONTACT_NUMBER_H 43
-#define IAC_BTN_RJ_MSG 20
-#define IAC_BTN_RJ_MSG_OFFSET 22
-
-#define IAC_CONTACT_IMG_X0 (IAC_SPACE_ICON_W/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_IMG_Y0 ((INDICATOR_HEIGHT+IAC_SPACE_ICON)/IAC_MAIN_HEIGHT)
-#define IAC_CONTACT_IMG_X1 ((IAC_SPACE_ICON_W+IAC_ICON_H)/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_IMG_Y1 ((INDICATOR_HEIGHT+IAC_SPACE_ICON+IAC_ICON_H)/IAC_MAIN_HEIGHT)
+#define AN_MAX_W MAIN_SCREEN_W
-#define IAC_CONTACT_INFO_Y1 (1.0)
+#define AN_CONTACT_INFO_BG_SIZE AN_MAX_W ACTIVE_NOTI_CONTACT_INFO_BG_H
+#define AN_HANDLER_H 42
-#define IAC_CONTACT_INFO_Y_REJECT ((IAC_MAIN_HEIGHT_RECT_REJECT)/IAC_MAIN_HEIGHT_REJECT)
+#define AN_ACTION_BG_W_REJECT_MSG_SIZE AN_MAX_W ACTIVE_NOTI_ACTION_BG_W_REJ_MSG_H
+#define AN_ACTION_BG_WO_REJECT_MSG_SIZE AN_MAX_W ACTIVE_NOTI_ACTION_BG_WO_REJ_MSG_H
+#define AN_ANSW_REJECT_BTN_SIZE 320 78
+#define AN_REJECT_MSG_BTN_SIZE 656 78
-#define IAC_CONTACT_REJ_MSG_X0 (0.0)
-#define IAC_CONTACT_REJ_MSG_Y0 ((IAC_MAIN_HEIGHT_RECT_REJECT)/IAC_MAIN_HEIGHT_REJECT)
-#define IAC_CONTACT_REJ_MSG_X1 (1.0)
-#define IAC_CONTACT_REJ_MSG_Y1 (1.0)
+#define AN_ANSW_REJECT_PAD_TOP 14
+#define AN_ANSW_REJECT_PAD_BOTTOM 14
+#define AN_REJECT_MSG_PAD_BOTTOM 14
-#define IAC_CONTACT_REJ_MSG_BTN_X0 ((IAC_SPACE_ICON_W)/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_REJ_MSG_BTN_Y0 ((IAC_BTN_RJ_MSG)/(IAC_MAIN_HEIGHT_REJECT-IAC_MAIN_HEIGHT_RECT_REJECT))
-#define IAC_CONTACT_REJ_MSG_BTN_X1 ((IAC_MAIN_WIDTH-IAC_SPACE_ICON_W)/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_REJ_MSG_BTN_Y1 ((IAC_BTN_RJ_MSG+IAC_BTN_H)/(IAC_MAIN_HEIGHT_REJECT-IAC_MAIN_HEIGHT_RECT_REJECT))
+#define AN_PAD_LEFT 32
+#define AN_PAD_RIGHT 32
+#define AN_HANDLER_ICON_SIZE 40 18
-#define IAC_CONTACT_REJ_MSG_GENLIST_Y1 ((IAC_BTN_RJ_MSG+IAC_BTN_H+IAC_BTN_RJ_MSG_OFFSET)/(IAC_MAIN_HEIGHT_REJECT-IAC_MAIN_HEIGHT_RECT_REJECT))
+#define AN_CONT_ICON_PAD_BOTTOM 30
+#define AN_CONT_ICON_SIZE 96 96
+#define AN_CONT_ICON_PAD_RIGHT 32
-#define IAC_CONTACT_CALL_BTN_X0 ((IAC_SPACE_ICON_W)/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_BTN_Y0 (IAH_SPACE_BTN/IAC_MAIN_HEIGHT)
-#define IAC_CONTACT_CALL_BTN_X1 ((IAC_SPACE_ICON_W+IAC_BTN_SIZE_X_LITTLE)/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_BTN_Y1 ((IAH_SPACE_BTN+IAC_BTN_SIZE_Y)/IAC_MAIN_HEIGHT)
+#define AN_CONT_INFO_TXT_PAD_TOP_2LINES 46
+#define AN_CONT_INFO_TXT_PAD_TOP_3LINES 24
-#define IAC_CONTACT_CALL_BTN_BIG_X0 (IAC_SPACE_ICON_W/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_CALL_BTN_BIG_Y0 IAC_CONTACT_BTN_Y0
-#define IAC_CONTACT_CALL_BTN_BIG_X1 ((IAC_SPACE_ICON_W+IAC_BTN_SIZE_X_BIG)/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_CALL_BTN_BIG_Y1 IAC_CONTACT_BTN_Y1
+#define AN_STATUS_TXT_H 43
+#define AN_CONTACT_NAME_TXT_H 53
+#define AN_CONTACT_NUMBER_TXT_H 43
-#define IAC_CONTACT_RJ_MSG_BTN_X0 ((IAC_SPACE_ICON_W+IAC_SPACE_BETWEEN_BTNS+IAC_BTN_SIZE_X_LITTLE)/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_RJ_MSG_BTN_Y0 IAC_CONTACT_BTN_Y0
-#define IAC_CONTACT_RJ_MSG_BTN_X1 ((IAC_SPACE_ICON_W+IAC_SPACE_BETWEEN_BTNS+IAC_BTN_SIZE_X_LITTLE+IAC_BTN_SIZE_X_LITTLE)/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_RJ_MSG_BTN_Y1 IAC_CONTACT_BTN_Y1
+#define AN_CALL_ICON_PAD_BOTTOM 6
+#define AN_CALL_ICON_PAD_LEFT 9
+#define AN_CALL_ICON_SIZE 45 45
-#define IAC_CONTACT_END_BTN_X0 ((IAC_MAIN_WIDTH-IAC_SPACE_ICON_W-IAC_BTN_SIZE_X_LITTLE)/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_END_BTN_Y0 IAC_CONTACT_BTN_Y0
-#define IAC_CONTACT_END_BTN_X1 ((IAC_MAIN_WIDTH-IAC_SPACE_ICON_W)/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_END_BTN_Y1 IAC_CONTACT_BTN_Y1
+#define AN_RM_ITEM_PAD_LEFT 32
+#define AN_RM_ITEM_PAD_RIGHT 32
+#define AN_RM_ITEM_ADD_ICON_PAD_RIGHT 17
+#define AN_RM_ITEM_ADD_ICON_PAD_LEFT 32
+#define AN_RM_ITEM_ADD_ICON_SIZE 80 80
-#define IAC_CONTACT_END_BTN_BIG_X0 ((IAC_MAIN_WIDTH-IAC_SPACE_ICON_W-IAC_BTN_SIZE_X_BIG)/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_END_BTN_BIG_Y0 IAC_CONTACT_BTN_Y0
-#define IAC_CONTACT_END_BTN_BIG_X1 ((IAC_MAIN_WIDTH-IAC_SPACE_ICON_W)/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_END_BTN_BIG_Y1 IAC_CONTACT_BTN_Y1
+#define AO024 0 0 0 77
+#define AO026 0 0 0 26
+#define AO028 0 0 0 26
+#define AO033P 0 0 0 77
-#define IAC_SWAP_X0 (((IAC_MAIN_WIDTH/2)-IAC_SPACE_ICON)/IAC_MAIN_WIDTH)
-#define IAC_SWAP_Y0 ((IAC_MAIN_HEIGHT-IAC_IAC_SWAP_BTN_Y)/IAC_MAIN_HEIGHT)
-#define IAC_SWAP_X1 (((IAC_MAIN_WIDTH/2)+IAC_SPACE_ICON)/IAC_MAIN_WIDTH)
-#define IAC_SWAP_Y1 ((IAC_MAIN_HEIGHT-IAC_IAC_SWAP_BTN_Y/2)/IAC_MAIN_HEIGHT)
-
-#define IAC_CONTACT_NAME_X0 ((IAC_SPACE_ICON_W+IAC_ICON_H+IAC_SPACE_BETWEEN_BTNS)/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_NAME_Y0 ((INDICATOR_HEIGHT+IAC_SPACE_ICON)/IAC_MAIN_HEIGHT)
-#define IAC_CONTACT_NAME_X1 (1.0)
-#define IAC_CONTACT_NAME_Y1 ((INDICATOR_HEIGHT+IAC_SPACE_ICON+IAC_IAC_CONTACT_NAME_H)/IAC_MAIN_HEIGHT)
-
-#define IAC_CONTACT_NUMBER_X0 ((IAC_SPACE_ICON_W+IAC_ICON_H+IAC_SPACE_BETWEEN_BTNS)/IAC_MAIN_WIDTH)
-#define IAC_CONTACT_NUMBER_Y0 ((INDICATOR_HEIGHT+IAC_SPACE_ICON+IAC_IAC_CONTACT_NAME_H)/IAC_MAIN_HEIGHT)
-#define IAC_CONTACT_NUMBER_X1 (1.0)
-#define IAC_CONTACT_NUMBER_Y1 ((INDICATOR_HEIGHT+IAC_SPACE_ICON+IAC_IAC_CONTACT_NAME_H+IAC_IAC_CONTACT_NUMBER_H)/IAC_MAIN_HEIGHT)
+styles {
+ style { name: "active_call_name";
+ base: "font=Tizen:style=Regular align=left font_size=40 color=#FFFFFF ellipsis=1.0";
+ }
+ style { name: "active_call_number";
+ base: "font=Tizen:style=Regular align=left font_size=32 color=#FFFFFF ellipsis=1.0";
+ }
+ style { name: "reject_msg_txt";
+ base: "font=Tizen:style=Regular align=left font_size=40 color=#FFFFFF ellipsis=1.0";
+ }
+}
group {
- name: "main_button_ly";
+ name: "reject_msg_item";
parts {
- part { name: "image_bg";
- type: IMAGE;
- scale: 1;
+ CU_PART_BASE_WH(AN_MAX_W, ACTIVE_NOTI_RM_ITEM_HEIGHT)
+ CU_SWALLOW_BG
+ CU_PART_PADDING_LEFT(AN_RM_ITEM_PAD_LEFT)
+ CU_PART_PADDING_RIGHT(AN_RM_ITEM_PAD_RIGHT)
+ CU_PART_RECT( "press_rect",
description { state: "default" 0.0;
- image {
- normal: IMG_SRC_DIR/"button_edit_bg_new.png";
- }
- color: 0 0 0 54;
+ rel1 { relative: 0.0 0.0; to_x: "base"; }
+ rel2 { relative: 1.0 1.0; to_x: "base"; }
+ color: COLOR_BG_ALPHA;
}
- description { state: "clicked" 0.0;
+ description { state: "press" 0.0;
inherit: "default" 0.0;
- color: 0 0 0 77;
+ color: AO033P;
}
- }
-
- part { name: "swallow.icon";
- type: SWALLOW;
- scale: 1;
+ )
+ CU_PART_TEXTBLOCK( "callui.text.main",
description { state: "default" 0.0;
align: 0.5 0.5;
- rel1 { relative: 0.0 0.0; to: "image_bg";}
- rel2 { relative: 1.0 1.0; to: "image_bg";}
+ rel1 { relative: 1.0 0.0; to_x: "padding.left"; }
+ rel2 { relative: 0.0 1.0; to_x: "padding.right"; }
+ min: 0 AN_STATUS_TXT_H;
+ fixed: 0 1;
+ text.style:"reject_msg_txt";
}
- }
+ description { state: "icon_enable" 0.0;
+ align: 0.5 0.5;
+ rel1 { relative: 1.0 0.0; to_x: "padding.left"; }
+ rel2 { relative: 0.0 1.0; to_x: "add_icon.pad.left"; }
+ min: 0 AN_STATUS_TXT_H;
+ fixed: 0 1;
+ text.style:"active_call_name";
+ }
+ )
+ CU_PART_SPACER("add_icon.pad.right",
+ description { state: "default" 0.0;
+ min: AN_RM_ITEM_ADD_ICON_PAD_RIGHT 0;
+ fixed: 1 0;
+ rel1.relative: 1.0 0.0;
+ align: 1.0 0.0;
+ }
+ )
+ CU_PART_IMAGE( "add_icon",
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 1.0 0.5;
+ aspect_preference: BOTH;
+ rel1 { relative: 0.0 0.0; to_x: "add_icon.pad.right"; }
+ rel2 { relative: 0.0 1.0; to_x: "add_icon.pad.right"; }
+ min: AN_RM_ITEM_ADD_ICON_SIZE;
+ max: AN_RM_ITEM_ADD_ICON_SIZE;
+ image.normal: IMG_SRC_DIR/"core_button_add.png";
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ )
+ CU_PART_SPACER( "add_icon.pad.left",
+ description { state: "default" 0.0;
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 0.0; to_x: "add_icon"; }
+ rel2 { relative: 0.0 1.0; to_x: "add_icon"; }
+ min: AN_RM_ITEM_ADD_ICON_PAD_LEFT 0;
+ fixed: 1 0;
+ }
+ )
+ CU_PART_RECT( "ec.events",
+ mouse_events: 1;
+ repeat_events: 1;
+ description {
+ state: "default" 0.0;
+ color: COLOR_BG_ALPHA;
+ }
+ )
}
- programs{
- program { name: "button_unpress";
+ programs {
+ program { name: "mouse_down";
+ signal: "mouse,down,*";
+ source: "ec.events";
+ action: STATE_SET "press" 0.0;
+ target: "press_rect";
+ }
+ program { name: "mouse_up";
signal: "mouse,up,*";
- source: "*";
+ source: "ec.events";
action: STATE_SET "default" 0.0;
- target: "image_bg";
+ target: "press_rect";
}
- program { name: "button_press";
- signal: "mouse,down,*";
- source: "*";
- action: STATE_SET "clicked" 0.0;
- target: "image_bg";
+ program { name: "mouse_move";
+ signal: "mouse,move,*";
+ source: "ec.events";
+ action: STATE_SET "default" 0.0;
+ target: "press_rect";
}
- }
-}
-
-group {
- name: "swipe_call_button_ly";
- parts {
- part { name: "swipe_call_button";
- type: IMAGE;
- scale: 1;
- description { state: "default" 0.0;
- fixed: 1 1;
- image {
- normal: IMG_SRC_DIR/"call_inline_btn_open.png";
- }
- }
+ program { name: "clicked";
+ signal: "mouse,clicked,1";
+ source: "ec.events";
+ action: SIGNAL_EMIT "cu,action,clicked" "main_active_noti_call";
+ }
+ program { name: "change_text_pos_with_icon";
+ action: STATE_SET "icon_enable" 0.0;
+ target: "callui.text.main";
+ }
+ program { name: "show_add_icon";
+ signal: "show_add_icon";
+ source: "";
+ action: STATE_SET "show" 0.0;
+ target: "add_icon";
+ after: "change_text_pos_with_icon";
}
}
}
group {
- name: "reject_msg_ly";
+ name: "reject_msg_scroller_bg";
parts {
- part { name: "bg";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 IAC_CONTACT_REJ_MSG_GENLIST_Y1;}
- color: 255 255 255 255;
- }
- }
-
- part { name: "swallow.button";
- type: SWALLOW;
- scale: 1;
+ CU_PART_IMAGE( "bg",
+ clip_to: "bg.clipper";
description { state: "default" 0.0;
- fixed: 0 1;
- rel1 { relative: IAC_CONTACT_REJ_MSG_BTN_X0 IAC_CONTACT_REJ_MSG_BTN_Y0;}
- rel2 { relative: IAC_CONTACT_REJ_MSG_BTN_X1 IAC_CONTACT_REJ_MSG_BTN_Y1;}
+ image.normal: IMG_SRC_DIR/"background.png";
+ rel1 { relative: 0.0 0.0; to: "bg.clipper"; }
+ fill {
+ type: TILE;
+ origin {
+ relative: 0.0 -0.3;
+ offset: MAIN_SCREEN_W MAIN_SCREEN_H;
+ }
+ size {
+ relative: 0.0 0.0;
+ offset: MAIN_SCREEN_W MAIN_SCREEN_H;
+ }
+ }
}
- }
-
- part { name: "swallow.content";
- type: SWALLOW;
- scale: 1;
+ )
+ CU_PART_RECT( "bg.clipper",
description { state: "default" 0.0;
- align: 0.0 0.0;
- rel1 { relative: 0.0 IAC_CONTACT_REJ_MSG_GENLIST_Y1;}
- rel2 { relative: 1.0 1.0;}
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
}
- }
+ )
}
}
group {
name: "main_active_noti_call";
parts {
- part { name: "screen_bg";
- type: RECT;
- scale: 1;
+ CU_PART_IMAGE( "bg",
+ clip_to: "bg.clipper";
description { state: "default" 0.0;
- color: 0 0 0 77;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 IAC_CONTACT_INFO_Y1;}
+ image.normal: IMG_SRC_DIR/"background.png";
+ rel1 { relative: 0.0 0.0; to: "contact_info"; }
+ fill {
+ type: TILE;
+ size {
+ relative: 0.0 0.0;
+ offset: MAIN_SCREEN_W MAIN_SCREEN_H;
+ }
+ }
}
- }
-
- part { name: "bg";
- type: RECT;
- scale: 1;
+ )
+ CU_PART_RECT( "bg.clipper",
description { state: "default" 0.0;
- visible: 1;
- color: 61 185 204 255;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 IAC_CONTACT_INFO_Y1;}
+ rel1 { relative: 0.0 0.0; to: "contact_info"; }
+ rel2 { relative: 1.0 1.0; to: "stroke"; }
}
- description { state: "small" 0.0;
- inherit: "default" 0.0;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 IAC_CONTACT_INFO_Y1;}
+ description { state: "reject_msg_list_open" 0.0;
+ rel1 { relative: 0.0 0.0; to: "contact_info"; }
+ rel2 { relative: 1.0 1.0; to: "action_bg"; }
}
- description { state: "big" 0.0;
+ description { state: "reject_msg_list_closed" 0.0;
inherit: "default" 0.0;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 IAC_CONTACT_INFO_Y_REJECT;}
}
- }
-
- part { name: "swallow.caller_id";
- type: SWALLOW;
- scale: 1;
+ )
+ CU_PART_RECT( "contact_info",
description { state: "default" 0.0;
- rel1 { relative: IAC_CONTACT_IMG_X0 IAC_CONTACT_IMG_Y0; to: "bg";}
- rel2 { relative: IAC_CONTACT_IMG_X1 IAC_CONTACT_IMG_Y1; to: "bg";}
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 0.0; }
+ align: 0.5 0.0;
+ min: AN_CONTACT_INFO_BG_SIZE;
+ max: AN_CONTACT_INFO_BG_SIZE;
+ fixed: 0 1;
+ color: AO026;
}
- }
-
- part { name: "swallow.reject_msg";
- type: SWALLOW;
- scale: 1;
+ )
+ CU_PART_RECT( "action_bg",
description { state: "default" 0.0;
- visible: 0;
- rel1 { relative: IAC_CONTACT_REJ_MSG_X0 IAC_CONTACT_REJ_MSG_Y0;}
- rel2 { relative: IAC_CONTACT_REJ_MSG_X1 IAC_CONTACT_REJ_MSG_Y1;}
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 1.0; to: "contact_info"; }
+ rel2 { relative: 1.0 1.0; to: "contact_info"; }
+ min: AN_ACTION_BG_W_REJECT_MSG_SIZE;
+ fixed: 0 1;
+ color: AO024;
}
- description { state: "hide" 0.0;
+ description { state: "reject_msg_btn_enable" 0.0;
inherit: "default" 0.0;
- visible: 0;
+ }
+ description { state: "reject_msg_btn_disable" 0.0;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 1.0; to: "contact_info"; }
+ rel2 { relative: 1.0 1.0; to: "contact_info"; }
+ min: AN_ACTION_BG_WO_REJECT_MSG_SIZE;
+ fixed: 0 1;
+ color: AO024;
+ }
+ )
+ CU_PART_RECT( "handler",
+ description { state: "default" 0.0;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 1.0; to: "action_bg"; }
+ rel2 { relative: 1.0 1.0; to: "action_bg"; }
+ min: AN_MAX_W AN_HANDLER_H;
+ fixed: 0 1;
+ color: AO024;
}
description { state: "show" 0.0;
inherit: "default" 0.0;
- visible: 1;
}
- }
-
- part { name: "swallow.swipe_button";
- type: SWALLOW;
- scale: 1;
+ description { state: "hide" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ )
+ CU_PART_RECT( "stroke",
description { state: "default" 0.0;
- visible: 1;
- rel1 { relative: IAC_SWAP_X0 IAC_SWAP_Y0; to: "bg";}
- rel2 { relative: IAC_SWAP_X1 IAC_SWAP_Y1; to: "bg";}
+ align: 0.0 0.0;
+ rel1 { relative: 0.0 1.0; to: "handler"; }
+ rel2 { relative: 1.0 1.0; }
+ min: AN_MAX_W ACTIVE_NOTI_STROKE_H;
+ max: AN_MAX_W ACTIVE_NOTI_STROKE_H;
+ color: AO028;
}
description { state: "show" 0.0;
inherit: "default" 0.0;
- visible: 1;
}
description { state: "hide" 0.0;
inherit: "default" 0.0;
visible: 0;
}
- }
+ )
+
+ CU_PART_PADDING_TOP_TO( "answer_reject_btn.pad.top", "contact_info", AN_ANSW_REJECT_PAD_TOP)
- part { name: "text.contact_name";
- type: TEXTBLOCK;
- scale: 1;
+ CU_PART_SPACER( "padding.left",
description { state: "default" 0.0;
- rel1 { relative: IAC_CONTACT_NAME_X0 IAC_CONTACT_NAME_Y0; to: "bg";}
- rel2 { relative: IAC_CONTACT_NAME_X1 IAC_CONTACT_NAME_Y1; to: "bg";}
- align: 0.0 0.5;
- text {
- ellipsis: 0.0;
- fit: 0 1;
- style:"active_call_name";
- }
+ align: 0.0 0.0;
+ rel1 { relative: 0.0 0.0; to: "action_bg"; }
+ rel2 { relative: 0.0 1.0; to: "action_bg"; }
+ min: AN_PAD_LEFT 0;
+ fixed: 1 0;
}
- description { state: "show" 0.0;
+ )
+ CU_PART_SPACER( "padding.right",
+ description { state: "default" 0.0;
+ align: 1 0;
+ rel1 { relative: 1.0 0.0; to: "action_bg"; }
+ rel2 { relative: 1.0 1.0; to: "action_bg"; }
+ min: AN_PAD_LEFT 0;
+ fixed: 1 0;
+ }
+ )
+ CU_PART_SWALLOW( "swallow.call_accept_btn",
+ description { state: "default" 0.0;
+ align: 0 0;
+ rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "answer_reject_btn.pad.top"; }
+ min: AN_ANSW_REJECT_BTN_SIZE;
+ max: AN_ANSW_REJECT_BTN_SIZE;
+ fixed: 1 1;
+ }
+ )
+ CU_PART_SWALLOW( "swallow.call_reject_btn",
+ description { state: "default" 0.0;
+ align: 1.0 0.0;
+ rel1 { relative: 0.0 1.0; to_x: "padding.right"; to_y: "answer_reject_btn.pad.top"; }
+ rel2 { relative: 0.0 1.0; to_x: "padding.right"; to_y: "answer_reject_btn.pad.top"; }
+ min: AN_ANSW_REJECT_BTN_SIZE;
+ fixed: 1 1;
+ }
+ )
+ CU_PART_PADDING_BOTTOM_TO("reject_msg_btn.pad.bottom", "handler", AN_REJECT_MSG_PAD_BOTTOM);
+
+ CU_PART_SWALLOW( "swallow.reject_msg_btn",
+ description { state: "default" 0.0;
+ align: 0.5 1.0;
+ rel1 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "reject_msg_btn.pad.bottom"; }
+ rel2 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "reject_msg_btn.pad.bottom"; }
+ min: AN_REJECT_MSG_BTN_SIZE;
+ fixed: 1 1;
+ }
+ description { state: "reject_msg_btn_enable" 0.0;
inherit: "default" 0.0;
- visible: 1;
}
- description { state: "hide" 0.0;
+ description { state: "reject_msg_btn_disable" 0.0;
inherit: "default" 0.0;
visible: 0;
}
- }
+ )
+
+ // SWIPE ICON
- part { name: "text.contact_number";
- type: TEXTBLOCK;
- scale: 1;
+ CU_PART_IMAGE( "swipe_icon",
description { state: "default" 0.0;
- rel1 { relative: IAC_CONTACT_NUMBER_X0 IAC_CONTACT_NUMBER_Y0; to: "bg";}
- rel2 { relative: IAC_CONTACT_NUMBER_X1 IAC_CONTACT_NUMBER_Y1; to: "bg";}
- align: 0.0 0.5;
- text {
- ellipsis: 1.0;
- style:"active_call_number";
- }
+ rel1 { relative: 0.0 0.0; to: "handler"; }
+ rel2 { relative: 1.0 1.0; to: "handler"; }
+ min: AN_HANDLER_ICON_SIZE;
+ max: AN_HANDLER_ICON_SIZE;
+ image.normal: IMG_SRC_DIR/"call_inline_btn_open.png";
+ fixed: 1 1;
}
description { state: "show" 0.0;
inherit: "default" 0.0;
- visible: 1;
}
description { state: "hide" 0.0;
inherit: "default" 0.0;
visible: 0;
}
- }
+ description { state: "move" 0.0;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 0.0; to: "handler"; }
+ rel2 { relative: 1.0 1.0; to: "handler"; }
+ min: AN_HANDLER_ICON_SIZE;
+ max: AN_HANDLER_ICON_SIZE;
+ image.normal: IMG_SRC_DIR/"call_inline_btn_open.png";
+ fixed: 1 1;
+ color: 255 255 255 50;
+ }
+ )
+
+ // CALLER ICON
+
+ CU_PART_SPACER( "contact_icon.pad.bottom",
+ description { state: "default" 0.0;
+ align: 0.5 1.0;
+ rel1 { relative: 0.0 1.0; to: "contact_info"; }
+ rel2 { relative: 1.0 1.0; to: "contact_info"; }
+ min: 0 AN_CONT_ICON_PAD_BOTTOM;
+ fixed: 0 1;
+ }
+ )
+ CU_PART_SPACER( "contact_icon.base",
+ description { state: "default" 0.0;
+ align: 0.0 1.0;
+ rel1 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "contact_icon.pad.bottom"; }
+ rel2 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "contact_icon.pad.bottom"; }
+ min: AN_CONT_ICON_SIZE;
+ max: AN_CONT_ICON_SIZE;
+ fixed: 1 1;
+ }
+ )
+ CU_PART_SWALLOW( "swallow.caller_id",
+ description { state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; to: "contact_icon.base"; }
+ rel2 { relative: 1.0 1.0; to: "contact_icon.base"; }
+ fixed: 1 1;
+ }
+ )
+
+ // CALL APP ICON
+
+ CU_PART_SPACER( "caller_id.pad.bottom",
+ description { state: "default" 0.0;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 1.0; to_y: "contact_icon.base"; }
+ rel2 { relative: 1.0 1.0; to_y: "contact_icon.base"; }
+ min: 0 AN_CALL_ICON_PAD_BOTTOM;
+ fixed: 0 1;
+ }
+ )
+ CU_PART_SPACER( "caller_id.pad.left",
+ description { state: "default" 0.0;
+ align: 0.0 0.5;
+ rel1 { relative: 1.0 0.0; to_x: "contact_icon.base"; }
+ rel2 { relative: 1.0 1.0; to_x: "contact_icon.base"; }
+ min: AN_CALL_ICON_PAD_LEFT 0;
+ fixed: 1 0;
+ }
+ )
+ CU_PART_IMAGE( "caller_id",
+ description { state: "default" 0.0;
+ aspect: 1 1;
+ aspect_preference: BOTH;
+ align: 1.0 1.0;
+ rel1 { relative: 1.0 1.0; to_x: "caller_id.pad.left"; to_y: "caller_id.pad.bottom"; }
+ rel2 { relative: 1.0 1.0; to_x: "caller_id.pad.left"; to_y: "caller_id.pad.bottom"; }
+ min: AN_CALL_ICON_SIZE;
+ image.normal: IMG_SRC_DIR/"call_active_ic_call.png";
+ }
+ )
+
+ // TEXT COMPONENTS
- part { name: "swallow.call_button";
- type: SWALLOW;
- scale: 1;
+ CU_PART_SPACER( "contact_icon.pad.right",
description { state: "default" 0.0;
- rel1 { relative: IAC_CONTACT_CALL_BTN_X0 IAC_CONTACT_BTN_Y0; to: "bg";}
- rel2 { relative: IAC_CONTACT_CALL_BTN_X1 IAC_CONTACT_BTN_Y1; to: "bg";}
- color: 255 0 0 255;
+ align: 0.5 1;
+ rel1 { relative: 1.0 0.0; to_x: "contact_icon.base"; }
+ rel2 { relative: 1.0 1.0; to_x: "contact_icon.base"; }
+ min: AN_CONT_ICON_PAD_RIGHT 0;
+ fixed: 1 1;
+ }
+ )
+ CU_PART_SPACER( "text_info.pad.top",
+ description { state: "default" 0.0;
+ fixed: 0 1;
+ min: 0 AN_CONT_INFO_TXT_PAD_TOP_3LINES;
+ rel1 { relative: 0.0 0.0; to: "contact_info"; }
+ rel2 { relative: 1.0 0.0; to: "contact_info"; }
+ align: 0.5 0;
}
- description { state: "big" 0.0;
+ description { state: "two_lines" 0.0;
inherit: "default" 0.0;
- rel1 { relative: IAC_CONTACT_CALL_BTN_BIG_X0 IAC_CONTACT_CALL_BTN_BIG_Y0; to: "bg";}
- rel2 { relative: IAC_CONTACT_CALL_BTN_BIG_X1 IAC_CONTACT_CALL_BTN_BIG_Y1; to: "bg";}
+ min: 0 AN_CONT_INFO_TXT_PAD_TOP_2LINES;
+ fixed: 0 1;
}
- description { state: "small" 0.0;
+ description { state: "three_lines" 0.0;
inherit: "default" 0.0;
- rel1 { relative: IAC_CONTACT_CALL_BTN_X0 IAC_CONTACT_BTN_Y0; to: "bg";}
- rel2 { relative: IAC_CONTACT_CALL_BTN_X1 IAC_CONTACT_BTN_Y1; to: "bg";}
}
- }
-
- part { name: "swallow.rj_msg_button";
- type: SWALLOW;
- scale: 1;
+ )
+ CU_PART_TEXTBLOCK ( "text.status",
description { state: "default" 0.0;
- visible: 0;
- rel1 { relative: IAC_CONTACT_RJ_MSG_BTN_X0 IAC_CONTACT_RJ_MSG_BTN_Y0; to: "bg";}
- rel2 { relative: IAC_CONTACT_RJ_MSG_BTN_X1 IAC_CONTACT_RJ_MSG_BTN_Y1; to: "bg";}
- color: 255 0 0 255;
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 1.0; to_x: "contact_icon.pad.right"; to_y: "text_info.pad.top"; }
+ rel2 { relative: 0.0 1.0; to_x: "padding.right"; to_y: "text_info.pad.top"; }
+ min: 0 AN_STATUS_TXT_H;
+ fixed: 0 1;
+ text.style:"active_call_number";
+ }
+ )
+ CU_PART_TEXTBLOCK ( "text.contact_name",
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 1.0; to_x: "contact_icon.pad.right"; to_y: "text.status"; }
+ rel2 { relative: 0.0 1.0; to_x: "padding.right"; to_y: "text.status"; }
+ min: 0 AN_CONTACT_NAME_TXT_H;
+ fixed: 0 1;
+ text.style:"active_call_name";
+ }
+ )
+ CU_PART_TEXTBLOCK ( "text.contact_number",
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 1.0; to_x: "contact_icon.pad.right"; to_y: "text.contact_name"; }
+ rel2 { relative: 0.0 1.0; to_x: "padding.right"; to_y: "text.contact_name"; }
+ min: 0 AN_CONTACT_NUMBER_TXT_H;
+ fixed: 0 1;
+ text.style:"active_call_number";
}
description { state: "show" 0.0;
inherit: "default" 0.0;
- visible: 1;
}
description { state: "hide" 0.0;
inherit: "default" 0.0;
visible: 0;
}
- }
-
- part { name: "swallow.end_call_button";
- type: SWALLOW;
- scale: 1;
+ )
+ CU_PART_RECT( "contact_info.click_area",
+ mouse_events: 1;
+ repeat_events: 1;
description { state: "default" 0.0;
- rel1 { relative: IAC_CONTACT_END_BTN_X0 IAC_CONTACT_BTN_Y0; to: "bg";}
- rel2 { relative: IAC_CONTACT_END_BTN_X1 IAC_CONTACT_BTN_Y1; to: "bg";}
- color: 255 0 0 255;
- }
- description { state: "big" 0.0;
- inherit: "default" 0.0;
- rel1 { relative: IAC_CONTACT_END_BTN_X0 IAC_CONTACT_BTN_Y0; to: "bg";}
- rel2 { relative: IAC_CONTACT_END_BTN_X1 IAC_CONTACT_BTN_Y1; to: "bg";}
+ rel1 { relative: 0.0 0.0; to: "contact_info"; }
+ rel2 { relative: 1.0 1.0; to: "contact_info"; }
+ fixed: 1 1;
+ color: COLOR_BG_ALPHA;
}
- description { state: "small" 0.0;
- inherit: "default" 0.0;
- rel1 { relative: IAC_CONTACT_END_BTN_X0 IAC_CONTACT_BTN_Y0; to: "bg";}
- rel2 { relative: IAC_CONTACT_END_BTN_X1 IAC_CONTACT_BTN_Y1; to: "bg";}
+ )
+ CU_PART_SWALLOW( "swallow.reject_msg_gl_anchor",
+ description { state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; to: "handler"; }
+ rel2 { relative: 1.0 0.0; to: "handler"; }
+ min: MAIN_SCREEN_W 0;
+ fixed: 1 0;
}
- }
+ )
}
-
- programs{
- program {
- name: "small_main_ly";
- signal: "small_main_ly";
- source: "main_active_noti_call";
- action: STATE_SET "small" 0.0;
- target: "bg";
- after: "hide_reject_msg";
- after: "show_swipe_call";
+ programs {
+ program { name: "contact_info_area_clicked";
+ signal: "mouse,clicked,1";
+ source: "contact_info.click_area";
+ action: SIGNAL_EMIT "contact_info.clicked" "main_active_noti_call";
}
- program {
- name: "show_reject_msg";
- signal: "show_reject_msg";
- source: "main_active_noti_call";
+ // CONTAT INFO LOGIC
+ program { name: "hide_contact_number";
+ action: STATE_SET "hide" 0.0;
+ target: "text.contact_number";
+ }
+ program { name: "show_contact_number";
action: STATE_SET "show" 0.0;
- target: "swallow.reject_msg";
+ target: "text.contact_number";
}
- program {
- name: "hide_reject_msg";
- signal: "hide_reject_msg";
+ program { name: "show_two_lines";
+ signal: "show_two_lines";
source: "main_active_noti_call";
- action: STATE_SET "hide" 0.0;
- target: "swallow.reject_msg";
+ action: STATE_SET "two_lines" 0.0;
+ target: "text_info.pad.top";
+ after: "hide_contact_number";
}
- program {
- name: "big_main_ly";
- signal: "big_main_ly";
+ program { name: "show_three_lines";
+ signal: "show_three_lines";
source: "main_active_noti_call";
- action: STATE_SET "big" 0.0;
- target: "bg";
- after: "show_reject_msg";
- after: "hide_swipe_call";
+ action: STATE_SET "three_lines" 0.0;
+ target: "text_info.pad.top";
+ after: "show_contact_number";
}
- program {
- name: "show_swipe_call";
- signal: "show_swipe_call";
+ // SWIP ICON ANIMATION
+ program { name: "start_swipe_anim";
+ signal: "start_swipe_anim";
source: "main_active_noti_call";
- action: STATE_SET "show" 0.0;
- target: "swallow.swipe_button";
+ action: STATE_SET "default" 0.0;
+ target: "swipe_icon";
+ after: "move_arrow";
+ }
+ program { name: "move_arrow";
+ action: STATE_SET "move" 0.0;
+ target: "swipe_icon";
+ transition: DECELERATE 0.6;
+ after: "start_swipe_anim";
}
- program {
- name: "hide_swipe_call";
- signal: "hide_swipe_call";
+ // SHOW/HIDE SWIP AND HANDLER
+ program { name: "hide_swipe";
+ signal: "hide_swipe";
source: "main_active_noti_call";
action: STATE_SET "hide" 0.0;
- target: "swallow.swipe_button";
- after: "show_reject_msg";
+ target: "swipe_icon";
+ target: "handler";
+ target: "stroke";
+ after: "clip_bg_with_rm_list";
}
- program {
- name: "big_buttons";
- signal: "big_buttons";
+ program { name: "show_swipe";
+ signal: "show_swipe";
source: "main_active_noti_call";
- action: STATE_SET "big" 0.0;
- target: "swallow.call_button";
- target: "swallow.end_call_button";
- after: "hide_swallow.rj_msg_button";
+ action: STATE_SET "show" 0.0;
+ target: "swipe_icon";
+ target: "handler";
+ target: "stroke";
+ after: "clip_bg_without_rm_list";
+ after: "start_swipe_anim";
}
- program {
- name: "hide_swallow.rj_msg_button";
- signal: "hide_swallow.rj_msg_button";
- source: "main_active_noti_call";
- action: STATE_SET "hide" 0.0;
- target: "swallow.rj_msg_button";
+ program { name: "clip_bg_with_rm_list";
+ action: STATE_SET "reject_msg_list_open" 0.0;
+ target: "bg.clipper";
}
- program {
- name: "small_buttons";
- signal: "small_buttons";
+ program { name: "clip_bg_without_rm_list";
+ action: STATE_SET "reject_msg_list_closed" 0.0;
+ target: "bg.clipper";
+ }
+ // SHOW/HIDE REJECT MESSAGE BUTTON
+ program { name: "show_reject_msg_btn";
+ signal: "show_reject_msg_btn";
source: "main_active_noti_call";
- action: STATE_SET "small" 0.0;
- target: "swallow.call_button";
- target: "swallow.end_call_button";
- after: "show_swallow.rj_msg_button";
+ action: STATE_SET "reject_msg_btn_enable" 0.0;
+ target: "action_bg";
+ target: "swallow.reject_msg_btn";
}
- program {
- name: "show_swallow.rj_msg_button";
- signal: "show_swallow.rj_msg_button";
+ program { name: "hide_reject_msg_btn";
+ signal: "hide_reject_msg_btn";
source: "main_active_noti_call";
- action: STATE_SET "show" 0.0;
- target: "swallow.rj_msg_button";
+ action: STATE_SET "reject_msg_btn_disable" 0.0;
+ target: "action_bg";
+ target: "swallow.reject_msg_btn";
}
}
}
} \
)
-#define E_SWALLOW_BG \
- CU_PART_SWALLOW("email.swallow.bg", \
+#define CU_SWALLOW_BG \
+ CU_PART_SWALLOW("callui.swallow.bg", \
mouse_events: 0; \
description { state: "default" 0.0; \
} \
--- /dev/null
+/*
+ * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ *
+ */
+
+#ifndef __CALLUI_COLOR_BOX__
+#define __CALLUI_COLOR_BOX__
+
+#include <Elementary.h>
+
+#include "callui-common-types.h"
+/*
+ * In order to use this functionality first create background
+ * under the scroller object: "background.png".
+ * Size of the background should match the size of the scroller.
+ *
+ * Second, each item of the box should be a layout with "email.swallow.bg" part.
+ * If the object is not a elm layout or has no such part it will be skipped.
+ *
+ */
+
+Evas_Object *_callui_color_box_add(Evas_Object *scroller, callui_rgb_color_t *color, double opacity);
+
+#endif /* __CALLUI_COLOR_BOX__ */
} \
} while (0)
+#undef DELETE_ECORE_IDLE_ENTERER
+#define DELETE_ECORE_IDLE_ENTERER(x) \
+ do { \
+ if (x != NULL) { \
+ ecore_idle_enterer_del(x); \
+ x = NULL; \
+ } \
+ } while (0)
+
+#undef DELETE_ELM_TRANSIT_HARD
+#define DELETE_ELM_TRANSIT_HARD(x) \
+ do { \
+ if (x != NULL) { \
+ elm_transit_del_cb_set(x, NULL, NULL); \
+ elm_transit_del(x); \
+ x = NULL; \
+ } \
+ } while (0)
+
+#undef DELETE_ELM_TRANSIT_SOFT
+#define DELETE_ELM_TRANSIT_SOFT(x) \
+ do { \
+ if (x != NULL) { \
+ elm_transit_del(x); \
+ x = NULL; \
+ } \
+ } while (0)
+
#undef STRING_EMPTY
#define STRING_EMPTY(x) !(x && x[0] != '\0')
} callui_result_e;
+typedef struct rgb_color_data {
+ int r;
+ int g;
+ int b;
+} callui_rgb_color_t;
+
#endif /* __CALLUI_COMMON_TYPES_H__ */
const char *_callui_common_get_call_theme_path();
/**
+ * @brief Gets reject message count
+ *
+ * @param[out] count Reject message count
+ *
+ * @return CALLUI_RESULT_OK on success or CALLUI_RESULT_FAIL otherwise
+ */
+callui_result_e _callui_common_get_reject_msg_count(int *count);
+/**
* @brief Gets reject message text by index
* @param[in] index index of the reject message
* @return reject message text
#define ENDCALL_BTN_B REL_ENDCALL_BTN_BG_H(ENDCALL_BTN_T_OFFSET+ENDCALL_BTN_SIZE)
/* ACTIVE NOTIFICATION */
-#define ACTIVE_NOTI_L_PAD ELM_SCALE_SIZE(32)
+#define ACTIVE_NOTI_LANDSCAPE_L_PAD ELM_SCALE_SIZE(32)
+#define ACTIVE_NOTI_CONTACT_INFO_BG_H 172
+#define ACTIVE_NOTI_ACTION_BG_W_REJ_MSG_H 198
+#define ACTIVE_NOTI_ACTION_BG_WO_REJ_MSG_H 106
+#define ACTIVE_NOTI_STROKE_H 1
+#define ACTIVE_NOTI_RM_ITEM_HEIGHT 120
#endif /*_CALLUI_VIEW_LAYOUT_H_*/
image: IMG_SRC_DIR/"background.png" COMP;
image: IMG_SRC_DIR/"background_dim.png" COMP;
image: IMG_SRC_DIR/"call_button_add.png" COMP;
+ image: IMG_SRC_DIR/"call_active_ic_call.png" COMP;
+ image: IMG_SRC_DIR/"core_button_add.png" COMP;
image: CALLID_IMG_SRC_DIR/"call_active_photo_id_bg.png" COMP;
image: CALLID_IMG_SRC_DIR/"call_active_photo_id_default.png" COMP;
#define BUTTON_BOTTOM_ICON_OFFSET_L (BUTTON_BOTTOM_ICON_OFFSET/BUTTON_BOTTOM_ICON_SIZE)
#define BUTTON_BOTTOM_ICON_OFFSET_R ((BUTTON_BOTTOM_ICON_SIZE - BUTTON_BOTTOM_ICON_OFFSET)/BUTTON_BOTTOM_ICON_SIZE)
+// ACTIVE NOTIFICATION BUTTON
+
+#define GLIDE_EASE_OUT(duration) CUBIC_BEZIER (duration) 0.25 0.46 0.45 1.0
+#define BUTTON_MIN_WIDTH_INC 50
+#define BUTTON_MIN_HEIGHT_INC 78
+#define BUTTON_CORNER_RADIUS_INC "39"
+
+#define BUTTON_PADDING_ICON_RIGHT_INC 14
+#define BUTTON_PADDING_LEFT_RIGHT_INC 22
+#define BUTTON_PADDING_LEFT_ICON_TEXT_INC 56
+#define BUTTON_PADDING_TOP_HEIGHT_INC 0
+#define BUTTON_PADDING_BOTTOM_HEIGHT_INC 4
+#define BUTTON_ICON_HEIGHT_INC 80
+#define BUTTON_ICON_WIDTH_INC 80
+#define BUTTON_ICON_MIN_RADIUS_INC 113
+#define BUTTON_ICON_DEFAULT_HEIGHT_INC 60
+#define BUTTON_ICON_DEFAULT_WIDTH_INC 60
+
+#define AO037 89 176 58 255
+#define AO038 214 49 49 255
+#define AO025 0 0 0 64
+#define AO025P 0 0 0 77
+
+#define STYLE_TAGS \
+ tag: "br" "\n";\
+ tag: "ps" "ps";\
+ tag: "tab" "\t";\
+ tag: "b" "+ font_weight=Bold";
+
+styles {
+ style { name: "ATO013";
+ base: "align=center valign=center color=#ffffffff font=Tizen:style=Regular font_size=40 text_class=tizen ellipsis=1.0";
+ tag: "br" "\n";
+ tag: "ps" "ps";
+ tag: "tab" "\t";
+ tag: "b" "+ font_weight=Bold";
+ }
+}
+
#define ACTION_BTN(grp_name, img1, color_code, value, vis_value) \
group { name: "elm/button/base/"grp_name; \
images { \
}
}
}
+
+
+// ACTIVE NOTIFICATION BUTTON
+
+group { name: "elm/button/base/answer_call_noti";
+ data.item: "vector_ux" "default";
+ data.item: "corner_radius" BUTTON_CORNER_RADIUS_INC;
+ script {
+ public mouse_down = 0;
+ public multi_down = 0;
+ public disabled = 0;
+ public text = 0;
+ public content = 0;
+ public animate = 0;
+ public selected = 0;
+ public minw = 0;
+ public minh = 0;
+ public get_effect_min_size(base_effect, Float:ratio, min_w, min_h) {
+ new x, y, w, h;
+ get_geometry(base_effect, x, y, w, h);
+ if (w > h) {
+ set_float(min_w, (w - h * (1 - ratio)) / w);
+ set_float(min_h, ratio);
+ } else {
+ set_float(min_w, ratio);
+ set_float(min_h, (h - w * (1 - ratio)) / h);
+ }
+ }
+ }
+ parts {
+ part { name: "base";
+ scale: 1;
+ type: SPACER;
+ description { state: "default" 0.0;
+ min: BUTTON_MIN_WIDTH_INC BUTTON_MIN_HEIGHT_INC;
+ }
+ }
+ //Base Shape Part
+ part { name: "tizen_vg_shape";
+ type: SWALLOW;
+ clip_to: "tizen_vg_shape_clipper";
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 0 BUTTON_MIN_HEIGHT_INC;
+ rel1.relative: 0 0.0;
+ rel2.relative: 1 1.0;
+ }
+ }
+ part { name: "tizen_vg_shape_clipper";
+ type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ color: AO037;
+ }
+ description { state: "disabled" 0.0;
+ color: AO037;
+ }
+ }
+ part { name: "effect_spacer";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "tizen_vg_shape";
+ rel2.to: "tizen_vg_shape";
+ }
+ }
+ //Effect Shape Part
+ part { name: "tizen_vg_shape2";
+ type: SWALLOW;
+ clip_to: "tizen_vg_shape_clipper2";
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.relative: 0.5 0.5;
+ rel2.relative: 0.5 0.5;
+ }
+ description { state: "ready" 0.0;
+ rel1.to: "effect_spacer";
+ rel2.to: "effect_spacer";
+ }
+ description { state: "pressed" 0.0;
+ inherit: "ready" 0.0;
+ }
+ }
+ part { name: "tizen_vg_shape_clipper2";
+ type: RECT;
+ description { state: "default" 0.0;
+ visible: 0;
+ color: 0 0 0 0;
+ }
+ description { state: "ready" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "pressed" 0.0;
+ color: AO025P;
+ }
+ }
+ part { name: "padding_left_top";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel2.relative: 0.0 0.0;
+ min: BUTTON_PADDING_LEFT_RIGHT_INC BUTTON_PADDING_TOP_HEIGHT_INC;
+ fixed: 1 1;
+ }
+ }
+ part { name: "padding_right_bottom";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "tizen_vg_shape";
+ rel2.to: "tizen_vg_shape";
+ align: 1.0 1.0;
+ rel1.relative: 1.0 1.0;
+ min: BUTTON_PADDING_LEFT_RIGHT_INC BUTTON_PADDING_BOTTOM_HEIGHT_INC;
+ fixed: 1 1;
+ }
+ }
+ part { name: "icon_rect";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ align: 0.0 0.5;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "padding_right_bottom";
+ }
+ min: 0 BUTTON_ICON_DEFAULT_HEIGHT_INC;
+ fixed: 1 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: BUTTON_ICON_DEFAULT_WIDTH_INC BUTTON_ICON_DEFAULT_HEIGHT_INC;
+ max: BUTTON_ICON_DEFAULT_WIDTH_INC BUTTON_ICON_DEFAULT_HEIGHT_INC;
+ fixed: 1 1;
+ }
+ description { state: "icon_only" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "icon_text_padding";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ align: 1.0 0.5;
+ min: 0 0;
+ rel1 {
+ relative: 0.0 0.0;
+ to: "elm.text";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to: "elm.text";
+ }
+ fixed: 1 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: BUTTON_PADDING_ICON_RIGHT_INC 0;
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "clipper";
+ description { state: "default" 0.0;
+ align: 0.0 1.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to_x: "padding_left_top";
+ to_y: "padding_right_bottom";
+ }
+ min: 0 BUTTON_ICON_DEFAULT_HEIGHT_INC;
+ fixed: 1 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ align: 1.0 0.5;
+ rel1 {
+ relative: 0.0 1.0;
+ to_x: "icon_text_padding";
+ to_y: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "icon_text_padding";
+ to_y: "padding_right_bottom";
+ }
+ min: BUTTON_ICON_DEFAULT_WIDTH_INC BUTTON_ICON_DEFAULT_HEIGHT_INC;
+ fixed: 1 1;
+ }
+ description { state: "icon_only" 0.0;
+ rel1.to: "tizen_vg_shape";
+ rel2.to: "tizen_vg_shape";
+ min: BUTTON_ICON_DEFAULT_WIDTH_INC BUTTON_ICON_DEFAULT_HEIGHT_INC;
+ max: BUTTON_ICON_DEFAULT_WIDTH_INC BUTTON_ICON_DEFAULT_HEIGHT_INC;
+ align: 0.5 0.5;
+ fixed: 1 1;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "icon_rect";
+ to_y: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ text {
+ style: "ATO013";
+ max: 1 0;
+ }
+ color: 250 250 250 255;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ text.style: "ATO013";
+ color: 250 250 250 255;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text.style: "ATO013";
+ color: 250 250 250 163;
+ }
+ }
+ part { name: "clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ }
+ description { state: "pressed" 0.0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 163;
+ }
+ }
+ part { name: "event";
+ type: RECT;
+ description { state: "default" 0.0;
+ rel1.to: "tizen_vg_shape";
+ rel2.to: "tizen_vg_shape";
+ color: 0 0 0 0;
+ }
+ }
+ }
+ programs {
+ program { name: "pressed_effect";
+ action: STATE_SET "ready" 0.0;
+ target: "tizen_vg_shape_clipper2";
+ action: STATE_SET "custom" 0.0;
+ target: "tizen_vg_shape2";
+ after: "pressed_effect2";
+ }
+ program { name: "pressed_effect2";
+ action: STATE_SET "pressed" 0.0;
+ target: "elm.text";
+ target: "clipper";
+ target: "tizen_vg_shape2";
+ target: "tizen_vg_shape_clipper2";
+ transition: GLIDE_EASE_OUT(0.15);
+ after: "pressed_effect3";
+ }
+ program { name: "pressed_effect3";
+ script {
+ set_int(animate, 0);
+ }
+ }
+ program { name: "delay_unpressed_effect";
+ in: 0.1 0.0;
+ after: "unpressed_effect";
+ }
+ program { name: "unpressed_effect";
+ script {
+ if (get_int(disabled) == 0) {
+ run_program(PROGRAM:"unpressed_effect2");
+ run_program(PROGRAM:"unpressed_effect3");
+ } else {
+ run_program(PROGRAM:"disabled_effect");
+ run_program(PROGRAM:"disabled_effect2");
+ run_program(PROGRAM:"disabled_effect3");
+ }
+ }
+ }
+ program { name: "unpressed_effect2";
+ action: STATE_SET "ready" 0.0;
+ target: "tizen_vg_shape2";
+ target: "tizen_vg_shape_clipper2";
+ transition: GLIDE_EASE_OUT(0.45);
+ }
+ program { name: "unpressed_effect3";
+ action: STATE_SET "default" 0.0;
+ target: "elm.text";
+ transition: GLIDE_EASE_OUT(0.45);
+ after: "unpressed_effect4";
+ }
+ program { name: "unpressed_effect4";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
+ after: "finished_animation";
+ }
+ program { name: "disabled_effect";
+ action: STATE_SET "ready" 0.0;
+ target: "tizen_vg_shape2";
+ target: "tizen_vg_shape_clipper2";
+ transition: GLIDE_EASE_OUT(0.45);
+ }
+ program { name: "disabled_effect2";
+ action: STATE_SET "disabled" 0.0;
+ target: "elm.text";
+ transition: GLIDE_EASE_OUT(0.45);
+ }
+ program { name: "disabled_effect3";
+ action: STATE_SET "disabled" 0.0;
+ target: "clipper";
+ target: "tizen_vg_shape_clipper";
+ transition: GLIDE_EASE_OUT(0.45);
+ after: "finished_animation";
+ }
+ program { name: "finished_animation";
+ action: STATE_SET "default" 0.0;
+ target: "tizen_vg_shape2";
+ target: "tizen_vg_shape_clipper2";
+ }
+ program { name: "pressed";
+ signal: "mouse,down,1*";
+ source: "event";
+ script {
+ if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0) && (get_int(disabled) == 0)) {
+ new Float:rel_w, Float:rel_h;
+ stop_program(PROGRAM:"delay_unpressed_effect");
+ set_int(mouse_down, 1);
+ set_int(animate, 1);
+ custom_state(PART:"tizen_vg_shape2", "default", 0.0);
+ get_effect_min_size(PART:"effect_spacer", 0.7, minw, minh);
+ rel_w = (1 - get_float(minw)) / 2;
+ rel_h = (1 - get_float(minh)) / 2;
+ set_state_val(PART:"tizen_vg_shape2", STATE_REL1, rel_w, rel_h);
+ set_state_val(PART:"tizen_vg_shape2", STATE_REL2, 1 - rel_w, 1 - rel_h);
+ emit("elm,action,press", "");
+ run_program(PROGRAM:"pressed_effect");
+ }
+ }
+ }
+ program { name: "unpressed";
+ signal: "mouse,up,1";
+ source: "event";
+ script {
+ if (get_int(mouse_down) == 1) {
+ set_int(mouse_down, 0);
+ if (get_int(disabled) == 0) {
+ if (get_int(animate) == 0) {
+ run_program(PROGRAM:"unpressed_effect");
+ } else {
+ set_state(PART:"elm.text", "pressed", 0.0);
+ set_state(PART:"clipper", "pressed", 0.0);
+ set_state(PART:"tizen_vg_shape2", "pressed", 0.0);
+ set_state(PART:"tizen_vg_shape_clipper2", "pressed", 0.0);
+ set_int(animate, 0);
+ run_program(PROGRAM:"delay_unpressed_effect");
+ }
+ emit("elm,action,unpress", "");
+ }
+ }
+ }
+ }
+ program { name: "touch_snd";
+ signal: "mouse,clicked,1";
+ source: "event";
+ script {
+ if (get_int(multi_down) == 0) {
+ if (get_int(disabled) == 0) {
+ run_program(PROGRAM:"touch_sound");
+ run_program(PROGRAM:"clicked_signal");
+ }
+ }
+ }
+ }
+ program { name: "touch_sound";
+ action: RUN_PLUGIN "touch_sound";
+ }
+ program { name: "clicked_signal";
+ in: 0.001 0.0;
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible";
+ source: "elm";
+ script {
+ set_int(content, 1);
+ set_state(PART:"icon_text_padding", "visible", 0.0);
+ if (get_int(text) == 1) {
+ set_state(PART:"icon_rect", "visible", 0.0);
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ } else {
+ set_state(PART:"icon_rect", "icon_only", 0.0);
+ set_state(PART:"elm.swallow.content", "icon_only", 0.0);
+ set_state(PART:"padding_left_top", "icon_only", 0.0);
+ }
+ }
+ }
+ program { name: "icon_hide";
+ signal: "elm,state,icon,hidden";
+ source: "elm";
+ script {
+ set_int(content, 0);
+ set_state(PART:"icon_text_padding", "default", 0.0);
+ set_state(PART:"icon_rect", "default", 0.0);
+ set_state(PART:"elm.swallow.content", "default", 0.0);
+ }
+ }
+ program { name: "text_show";
+ signal: "elm,state,text,visible";
+ source: "elm";
+ script {
+ set_int(text, 1);
+ if (get_int(content) == 1) {
+ set_state(PART:"icon_rect", "visible", 0.0);
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ }
+ }
+ }
+ program { name: "text_hide";
+ signal: "elm,state,text,hidden";
+ source: "elm";
+ script {
+ set_int(text, 0);
+ if (get_int(content) == 1) {
+ set_state(PART:"icon_rect", "icon_only", 0.0);
+ set_state(PART:"elm.swallow.content", "icon_only", 0.0);
+ }
+ }
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ script {
+ set_int(disabled, 1);
+ if (get_int(animate) == 1) return;
+ set_state(PART:"clipper", "disabled", 0.0);
+ set_state(PART:"tizen_vg_shape_clipper", "disabled", 0.0);
+ set_state(PART:"elm.text", "disabled", 0.0);
+ }
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ script {
+ set_int(disabled, 0);
+ set_state(PART:"clipper", "default", 0.0);
+ set_state(PART:"tizen_vg_shape_clipper", "default", 0.0);
+ set_state(PART:"elm.text", "default", 0.0);
+ }
+ }
+ program { name: "multi_down";
+ signal: "elm,action,multi,down";
+ source: "elm";
+ script {
+ set_int(multi_down, 1);
+ }
+ }
+ program { name: "multi_up";
+ signal: "elm,action,multi,up";
+ source: "elm";
+ script {
+ set_int(multi_down, 0);
+ }
+ }
+ program { name: "pass_event_enable";
+ signal: "elm,event,pass,enabled";
+ source: "elm";
+ script {
+ set_mouse_events(PART:"event", 0);
+ }
+ }
+ program { name: "pass_event_disable";
+ signal: "elm,event,pass,disabled";
+ source:"elm";
+ script {
+ set_mouse_events(PART:"event", 1);
+ }
+ }
+ program { name: "repeat_event_enable";
+ signal: "elm,event,repeat,enabled";
+ source: "elm";
+ script {
+ set_repeat_events(PART:"event", 1);
+ }
+ }
+ program { name: "repeat_event_disable";
+ signal: "elm,event,repeat,disabled";
+ source:"elm";
+ script {
+ set_repeat_events(PART:"event", 0);
+ }
+ }
+ }
+}
+
+group { name: "elm/button/base/reject_call_noti";
+ inherit: "elm/button/base/answer_call_noti";
+ parts {
+ part { name: "tizen_vg_shape_clipper";
+ type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ color: AO038;
+ }
+ description { state: "disabled" 0.0;
+ color: AO038;
+ }
+ }
+ }
+}
+
+group { name: "elm/button/base/reject_msg_noti";
+ inherit: "elm/button/base/answer_call_noti";
+ parts {
+ part { name: "tizen_vg_shape_clipper";
+ type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ color: AO025;
+ }
+ description { state: "disabled" 0.0;
+ color: AO025;
+ }
+ }
+ }
+}
}
--- /dev/null
+/*
+ * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "callui-color-box.h"
+#include "callui-debug.h"
+#include "callui-common-def.h"
+
+#define CALLUI_COLOR_BOX_BG_PART_NAME "callui.swallow.bg"
+#define CALLUI_COLOR_BOX_TIMER_INTERVAL_SEC 0.067
+#define CALLUI_COLOR_BOX_ALPHA_STEP -0.04
+
+#define FULL_ALPHA 0xFF
+
+struct __callui_color_box_data {
+ Evas_Object *box;
+ Evas_Object *scroller;
+ Ecore_Timer *timer;
+ Eina_Bool update_on_timer;
+ Eina_Bool calculating;
+
+ double initial_opacity;
+ callui_rgb_color_t initial_color;
+};
+
+typedef struct __callui_color_box_data callui_color_box_t;
+
+static void __callui_color_box_update_colors_with_calculate(callui_color_box_t *cbd);
+static void __callui_color_box_update_colors_with_timer(callui_color_box_t *cbd);
+static void __callui_color_box_update_colors(callui_color_box_t *cbd);
+
+static Eina_Bool __callui_color_box_evas_calculate(callui_color_box_t *cbd);
+
+static Eina_Bool __callui_color_box_update_colors_timer_cb(void *data);
+
+static void __callui_color_box_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __callui_color_box_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __callui_color_box_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+
+static void __callui_color_box_scroller_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __callui_color_box_scroller_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __callui_color_box_scroller_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+
+Evas_Object *_callui_color_box_add(Evas_Object *scroller, callui_rgb_color_t *color, double opacity)
+{
+ debug_enter();
+ CALLUI_RETURN_NULL_IF_FAIL(scroller);
+ CALLUI_RETURN_NULL_IF_FAIL(color);
+
+ Evas_Object *box = NULL;
+ callui_color_box_t *cbd = NULL;
+
+ box = elm_box_add(scroller);
+ CALLUI_RETURN_NULL_IF_FAIL(box);
+
+ cbd = calloc(1, sizeof(callui_color_box_t));
+ if (!cbd) {
+ err("Memory allocation failed failed!");
+ evas_object_del(box);
+ return NULL;
+ }
+
+ cbd->box = box;
+ cbd->scroller = scroller;
+ cbd->initial_opacity = opacity;
+ cbd->initial_color.r = color->r;
+ cbd->initial_color.g = color->g;
+ cbd->initial_color.b = color->b;
+
+ evas_object_event_callback_add(box, EVAS_CALLBACK_MOVE, __callui_color_box_move_cb, cbd);
+ evas_object_event_callback_add(box, EVAS_CALLBACK_RESIZE, __callui_color_box_resize_cb, cbd);
+ evas_object_event_callback_add(box, EVAS_CALLBACK_FREE, __callui_color_box_free_cb, cbd);
+
+ evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOVE, __callui_color_box_scroller_move_cb, cbd);
+ evas_object_event_callback_add(scroller, EVAS_CALLBACK_RESIZE, __callui_color_box_scroller_resize_cb, cbd);
+ evas_object_event_callback_add(scroller, EVAS_CALLBACK_FREE, __callui_color_box_scroller_free_cb, cbd);
+
+ return box;
+}
+
+void __callui_color_box_update_colors_with_calculate(callui_color_box_t *cbd)
+{
+ debug_enter();
+
+ if (cbd->scroller && __callui_color_box_evas_calculate(cbd)) {
+ __callui_color_box_update_colors(cbd);
+ }
+}
+
+void __callui_color_box_update_colors_with_timer(callui_color_box_t *cbd)
+{
+ if (!cbd->scroller) {
+ return;
+ }
+
+ if (!cbd->timer) {
+ dbg("Starting update timer");
+ cbd->timer = ecore_timer_add(CALLUI_COLOR_BOX_TIMER_INTERVAL_SEC,
+ __callui_color_box_update_colors_timer_cb, cbd);
+ }
+
+ cbd->update_on_timer = EINA_TRUE;
+}
+
+void __callui_color_box_update_colors(callui_color_box_t *cbd)
+{
+ int scroller_y = 0;
+ int scroller_h = 0;
+
+ Eina_List *children = NULL;
+ Eina_List *l = NULL;
+ Evas_Object *subobj = NULL;
+
+ double alpha = cbd->initial_opacity;
+
+ evas_object_geometry_get(cbd->scroller, NULL, &scroller_y, NULL, &scroller_h);
+
+ children = elm_box_children_get(cbd->box);
+ EINA_LIST_FOREACH(children, l, subobj) {
+ if (elm_object_widget_check(subobj)) {
+ Evas_Object *edje = elm_layout_edje_get(subobj);
+ if (edje_object_part_exists(edje, CALLUI_COLOR_BOX_BG_PART_NAME)) {
+
+ int subobj_y = 0;
+ int subobj_h = 0;
+ int r = (int)(alpha * cbd->initial_color.r + 0.5);
+ int g = (int)(alpha * cbd->initial_color.g + 0.5);
+ int b = (int)(alpha * cbd->initial_color.b + 0.5);
+ int a = (int)(alpha * FULL_ALPHA + 0.5);
+ Evas_Object *bg = elm_object_part_content_get(subobj, CALLUI_COLOR_BOX_BG_PART_NAME);
+
+ if (!bg) {
+ bg = evas_object_rectangle_add(evas_object_evas_get(subobj));
+ elm_object_part_content_set(subobj, CALLUI_COLOR_BOX_BG_PART_NAME, bg);
+ evas_object_show(bg);
+ }
+ evas_object_color_set(bg, r, g, b, a);
+
+ evas_object_geometry_get(subobj, NULL, &subobj_y, NULL, &subobj_h);
+ if ((subobj_y + subobj_h > scroller_y) && (subobj_y < scroller_y + scroller_h)) {
+ alpha += CALLUI_COLOR_BOX_ALPHA_STEP;
+ }
+ }
+ }
+ }
+ eina_list_free(children);
+}
+
+Eina_Bool __callui_color_box_evas_calculate(callui_color_box_t *cbd)
+{
+ if (cbd->calculating) {
+ return EINA_FALSE;
+ }
+
+ cbd->calculating = EINA_TRUE;
+ evas_smart_objects_calculate(evas_object_evas_get(cbd->box));
+ cbd->calculating = EINA_FALSE;
+
+ return EINA_TRUE;
+}
+
+Eina_Bool __callui_color_box_update_colors_timer_cb(void *data)
+{
+ callui_color_box_t *cbd = data;
+
+ if (cbd->update_on_timer) {
+ __callui_color_box_update_colors(cbd);
+ cbd->update_on_timer = EINA_FALSE;
+ return ECORE_CALLBACK_RENEW;
+ }
+
+ cbd->timer = NULL;
+
+ return ECORE_CALLBACK_CANCEL;
+}
+
+void __callui_color_box_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ callui_color_box_t *cbd = data;
+
+ __callui_color_box_update_colors_with_timer(cbd);
+}
+
+void __callui_color_box_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ callui_color_box_t *cbd = data;
+
+ __callui_color_box_update_colors_with_calculate(cbd);
+}
+
+void __callui_color_box_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ debug_enter();
+ callui_color_box_t *cbd = data;
+
+ if (cbd->scroller) {
+ evas_object_event_callback_del(cbd->scroller, EVAS_CALLBACK_MOVE, __callui_color_box_move_cb);
+ evas_object_event_callback_del(cbd->scroller, EVAS_CALLBACK_RESIZE, __callui_color_box_resize_cb);
+ evas_object_event_callback_del(cbd->scroller, EVAS_CALLBACK_FREE, __callui_color_box_scroller_free_cb);
+ }
+
+ DELETE_ECORE_TIMER(cbd->timer);
+
+ free(cbd);
+}
+
+void __callui_color_box_scroller_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ callui_color_box_t *cbd = data;
+
+ __callui_color_box_update_colors_with_timer(cbd);
+}
+
+void __callui_color_box_scroller_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ callui_color_box_t *cbd = data;
+
+ __callui_color_box_update_colors(cbd);
+}
+
+void __callui_color_box_scroller_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ debug_enter();
+ callui_color_box_t *cbd = data;
+
+ cbd->scroller = NULL;
+
+ DELETE_ECORE_TIMER(cbd->timer);
+}
return parsed_message;
}
+callui_result_e _callui_common_get_reject_msg_count(int *count)
+{
+ int res = vconf_get_int(VCONFKEY_CISSAPPL_REJECT_CALL_MSG_INT, count);
+ if (res != 0) {
+ *count = 0;
+ return CALLUI_RESULT_FAIL;
+ }
+ return CALLUI_RESULT_OK;
+}
+
char *_callui_common_get_reject_msg_by_index(int index)
{
char *message = NULL;
#include "callui-manager.h"
#include "callui-state-provider.h"
#include "callui-sound-manager.h"
+#include "callui-color-box.h"
#define CALLUI_DURING_ICON "call_button_icon_03.png"
-#define CALLUI_REJECT_ICON "call_button_icon_04.png"
#define CALLUI_END_ICON "call_button_icon_01.png"
-#define CALLUI_REJ_MSG_GENLIST_DATA "VIEW_DATA"
+#define CALLUI_MOVE_TRANSITION_TIME_SEC 0.3
-struct _callui_view_incoming_call_noti {
- call_view_data_base_t base_view;
+#define CALLUI_REJ_MSG_GENLIST_DATA "VIEW_DATA"
+#define CALLUI_REJ_MSG_ADD_BTN_SIZE 60
+#define CALLUI_REJ_MSG_ADD_BTN_COLOR 255, 255, 255, 255
+
+#define CALLUI_REJ_MSG_ANIM_PATH 10000.0
+#define CALLUI_REJ_MSG_ANIM_TIME 4.0
+#define CALLUI_REJ_MSG_ANIM_VELOCITY (CALLUI_REJ_MSG_ANIM_PATH / CALLUI_REJ_MSG_ANIM_TIME)
+
+#define CALLUI_AN_CONTACT_INFO_BG_H ELM_SCALE_SIZE(ACTIVE_NOTI_CONTACT_INFO_BG_H)
+#define CALLUI_AN_ACTION_BG_W_REJECT_MSG_H ELM_SCALE_SIZE(ACTIVE_NOTI_ACTION_BG_W_REJ_MSG_H)
+#define CALLUI_AN_STROKE_H ELM_SCALE_SIZE(ACTIVE_NOTI_STROKE_H)
+
+#define CALLUI_REJ_MSG_SCREEN_USED_H (CALLUI_AN_CONTACT_INFO_BG_H + CALLUI_AN_ACTION_BG_W_REJECT_MSG_H + CALLUI_AN_STROKE_H)
+#define CALLUI_REJ_MSG_FLICK_TIME_LIMIT_MS 500
+
+#define CALLUI_REJ_MSG_DIMMER_ALFA_START 0
+#define CALLUI_REJ_MSG_DIMMER_ALFA_END 77
+#define CALLUI_REJ_MSG_DIMMER_COLOR 0, 0, 0
+
+#define CALLUI_REJ_MSG_OPACITY (0.3 - 0.04)
+
+#define AO028 0, 0, 0, 26
+#define AO024_WO_A 0, 0, 0
- Evas_Object *reject_msg_layout;
- Evas_Object *reject_msg_genlist;
+typedef enum {
+ CALLUI_REJ_MSG_UPDATE_GL_HINT = 0x01,
+ CALLUI_REJ_MSG_UPDATE_AVAILABLE_SIZE = 0x02
+} _callui_rm_update_params_e;
- Elm_Genlist_Item_Class *reject_msg_itc;
- char reject_msg[CALLUI_REJ_MSG_MAX_LENGTH];
+typedef enum {
+ CALLUI_REJ_MSG_HIDDEN,
+ CALLUI_REJ_MSG_HIDE_REQ,
+ CALLUI_REJ_MSG_HIDE_IN_PROG,
+ CALLUI_REJ_MSG_SHOWN,
+ CALLUI_REJ_MSG_SHOW_REQ,
+ CALLUI_REJ_MSG_SHOW_IN_PROG,
+} _callui_rm_state;
- bool rej_msg_list_visible;
+struct _callui_view_incoming_call_noti {
+ call_view_data_base_t base_view;
+
+ Evas_Object *parent;
+
+ Evas_Object *box;
+ Evas_Object *layout;
+
+ Evas_Object *rm_scroller;
+ Evas_Object *rm_scroller_anchor;
+ Evas_Object *rm_scroller_stroke;
+ Evas_Object *rm_scroller_bg;
+
+ Ecore_Idle_Enterer *transit_effect_idler;
+ Elm_Transit *transit;
+ bool appear_anim_init;
+
+ bool rm_turned_on;
+ int rm_scroller_max_h;
+ int rm_scroller_anim_start_h;
+ int rm_scroller_anim_start_w;
+ int rm_scroller_x;
+ int rm_scroller_y;
+ double rm_anim_path;
+ _callui_rm_state rm_state;
+ int rm_scroller_available_h;
+ int rm_actualize_state;
+
+ Ecore_Animator *rm_animator;
+ int rm_dimmer_alfa;
+ int rm_dimmer_alfa_start;
};
typedef struct _callui_view_incoming_call_noti _callui_view_incoming_call_noti_t;
static callui_result_e __callui_view_incoming_call_noti_oncreate(call_view_data_base_t *view_data, Evas_Object *parent, void *appdata);
-static callui_result_e __callui_view_incoming_call_noti_onupdate(call_view_data_base_t *view_data);
static callui_result_e __callui_view_incoming_call_noti_ondestroy(call_view_data_base_t *view_data);
+static void __reset_params_after_transit(callui_view_incoming_call_noti_h vd);
+static void __appear_transit_del_cb(void *data, Elm_Transit *transit);
+static void __disappear_transit_del_cb(void *data, Elm_Transit *transit);
+static Eina_Bool __appear_effect_activated_cb(void *data);
+static Eina_Bool __disappear_effect_activated_cb(void *data);
+static void __show_reject_msg_btn_click_cb(void *data, Evas_Object *obj, void *event_info);
+static void __box_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+
+static void __call_action_btn_click_cb(void *data, Evas_Object *obj, void *event_info);
+static Evas_Event_Flags __gesture_layer_flick_end_cb(void *data, void *event_info);
+static Evas_Object *__create_gesture_layer(callui_view_incoming_call_noti_h vd);
+static void __contact_info_click_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
static callui_result_e __create_main_content(callui_view_incoming_call_noti_h vd, Evas_Object *parent);
+static Evas_Object *__create_btn(callui_view_incoming_call_noti_h vd,
+ const char *style, const char *icon_name, const char *txt, Evas_Smart_Cb click_cb, void *cb_data);
static callui_result_e __update_displayed_data(callui_view_incoming_call_noti_h vd);
-
-static void __reject_msg_genlist_item_click_cb(void *data, Evas_Object *obj, void *event_info);
-static void __reject_msg_genlist_add(callui_view_incoming_call_noti_h vd);
-static char *__reject_msg_genlist_item_txt_cb(void *data, Evas_Object *obj, const char *part);
-static void __reject_msg_genlist_init_item_class(callui_view_incoming_call_noti_h vd);
-static void __reject_msg_genlist_deinit_item_class(callui_view_incoming_call_noti_h vd);
-static Elm_Object_Item *__reject_msg_genlist_append_item(Evas_Object *msg_glist, Elm_Genlist_Item_Class * itc_reject_msg, int index);
-static int __reject_msg_genlist_fill(callui_view_incoming_call_noti_h vd);
-
-static void __swipe_layout_mouse_move_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info);
-static Eina_Bool __reject_msg_close_effect_activated_cb(void *data);
-static void __show_reject_msg_btn_click_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info);
-
-static void __create_reject_msg_content(callui_view_incoming_call_noti_h vd);
-static void __destroy_reject_msg_content(callui_view_incoming_call_noti_h vd);
-
-static void __launch_btn_click_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info);
-
-static callui_result_e __create_custom_button(char *icon_name, char *part, Evas_Object_Event_Cb func, void *data, void *data_bt_cb);
+static void __move_active_noti(callui_view_incoming_call_noti_h vd);
+static void __parent_resize_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info);
+
+static void __rm_create_content(callui_view_incoming_call_noti_h vd);
+static void __rm_destroy_content(callui_view_incoming_call_noti_h vd);
+
+static void __rm_reset_status_flags(callui_view_incoming_call_noti_h vd);
+static void __rm_get_scroller_cur_size(callui_view_incoming_call_noti_h vd, int *w, int *h);
+static void __rm_close_cb(callui_view_incoming_call_noti_h vd);
+static void __rm_box_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __rm_scroller_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __rm_reset_anim_params(callui_view_incoming_call_noti_h vd);
+static void __reject_msg_animation_end_cb(callui_view_incoming_call_noti_h vd);
+static Eina_Bool __rm_animation_cb(void *data, double pos);
+static void __rm_scroller_anchor_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+
+static void _rm_message_item_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
+static void _rm_compose_item_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
+static callui_result_e __rm_create_message_items(callui_view_incoming_call_noti_h vd, Evas_Object *box, int *insert_item_count);
+static callui_result_e __rm_create_compose_item(callui_view_incoming_call_noti_h vd, Evas_Object *box);
+static int __rm_fill_box(callui_view_incoming_call_noti_h vd, Evas_Object *box);
+
+static void __rm_prepare_animator(callui_view_incoming_call_noti_h vd);
+static void __rm_recalculate(callui_view_incoming_call_noti_h vd);
+static void __rm_show_animated(callui_view_incoming_call_noti_h vd);
+static void __rm_hide_animated(callui_view_incoming_call_noti_h vd);
+static void __rm_hide_instantly(callui_view_incoming_call_noti_h vd);
+static void __rm_show_instantly(callui_view_incoming_call_noti_h vd);
+static void __rm_try_actualize(callui_view_incoming_call_noti_h vd);
+static void __rm_calc_available_size(callui_view_incoming_call_noti_h vd);
+
+static Evas_Object *__create_btn(callui_view_incoming_call_noti_h vd,
+ const char *style,
+ const char *icon_name,
+ const char *txt,
+ Evas_Smart_Cb click_cb,
+ void *cb_data);
callui_view_incoming_call_noti_h _callui_view_incoming_call_noti_new()
{
CALLUI_RETURN_NULL_IF_FAIL(incoming_call_noti);
incoming_call_noti->base_view.create = __callui_view_incoming_call_noti_oncreate;
- incoming_call_noti->base_view.update = __callui_view_incoming_call_noti_onupdate;
+ incoming_call_noti->base_view.update = NULL;
incoming_call_noti->base_view.destroy = __callui_view_incoming_call_noti_ondestroy;
return incoming_call_noti;
return __update_displayed_data(vd);
}
-static callui_result_e __callui_view_incoming_call_noti_onupdate(call_view_data_base_t *view_data)
-{
- CALLUI_RETURN_VALUE_IF_FAIL(view_data, CALLUI_RESULT_INVALID_PARAM);
-
- return __update_displayed_data((callui_view_incoming_call_noti_h)view_data);
-}
-
static callui_result_e __callui_view_incoming_call_noti_ondestroy(call_view_data_base_t *view_data)
{
callui_view_incoming_call_noti_h vd = (callui_view_incoming_call_noti_h)view_data;
}
#endif
- DELETE_EVAS_OBJECT(vd->base_view.contents);
+ evas_object_event_callback_del_full(vd->parent, EVAS_CALLBACK_RESIZE, __parent_resize_cb, vd);
+
+ DELETE_ECORE_IDLE_ENTERER(vd->transit_effect_idler);
+ DELETE_ELM_TRANSIT_HARD(vd->transit);
+ DELETE_EVAS_OBJECT(vd->box);
_callui_window_set_size_type(ad->window, CALLUI_WIN_SIZE_FULLSCREEN);
_callui_window_set_rotation_locked(ad->window, true);
return CALLUI_RESULT_OK;
}
-static void __reject_msg_genlist_item_click_cb(void *data, Evas_Object *obj, void *event_info)
+static void __reset_params_after_transit(callui_view_incoming_call_noti_h vd)
{
- int index = CALLUI_SAFE_C_CAST(int, data);
- dbg("index: %d", index);
-
- callui_view_incoming_call_noti_h vd = (callui_view_incoming_call_noti_h)evas_object_data_get(obj, CALLUI_REJ_MSG_GENLIST_DATA);
- CALLUI_RETURN_IF_FAIL(vd);
- callui_app_data_t *ad = vd->base_view.ad;
+ vd->transit = NULL;
+ evas_object_freeze_events_set(vd->box, EINA_FALSE);
+}
- elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
+static void __appear_transit_del_cb(void *data, Elm_Transit *transit)
+{
+ CALLUI_RETURN_IF_FAIL(data);
+ __reset_params_after_transit(data);
+}
- if (index != -1) {
- char *ret_str = _callui_common_get_reject_msg_by_index(index);
- if (ret_str) {
- char *reject_msg = elm_entry_markup_to_utf8(ret_str); /*send utf8 text to MSG */
- if (reject_msg != NULL) {
- snprintf(vd->reject_msg, sizeof(vd->reject_msg), "%s", reject_msg);
- free(reject_msg);
- }
- free(ret_str);
- }
+static void __disappear_transit_del_cb(void *data, Elm_Transit *transit)
+{
+ CALLUI_RETURN_IF_FAIL(data);
+ __reset_params_after_transit(data);
- callui_result_e res = _callui_manager_reject_call(ad->call_manager);
- if (res != CALLUI_RESULT_OK) {
- err("cm_reject_call() is failed. res[%d]", res);
- } else {
- _callui_common_send_reject_msg(ad, vd->reject_msg);
- }
- }
+ callui_view_incoming_call_noti_h vd = data;
+ _callui_window_set_top_level_priority(vd->base_view.ad->window, false);
+ _callui_window_minimize(vd->base_view.ad->window);
}
-static void __swipe_layout_mouse_move_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+static Eina_Bool __appear_effect_activated_cb(void *data)
{
- CALLUI_RETURN_IF_FAIL(data);
+ CALLUI_RETURN_VALUE_IF_FAIL(data, ECORE_CALLBACK_CANCEL);
- callui_view_incoming_call_noti_h vd = (callui_view_incoming_call_noti_h)data;
- callui_app_data_t *ad = vd->base_view.ad;
+ callui_view_incoming_call_noti_h vd = data;
- ecore_idle_enterer_before_add(__reject_msg_close_effect_activated_cb, vd);
+ int height = 0;
+ evas_object_geometry_get(vd->box, NULL, NULL, NULL, &height);
+
+ DELETE_ELM_TRANSIT_HARD(vd->transit);
+ vd->transit = elm_transit_add();
+ if (!vd->transit) {
+ err("transit is NULL");
+ vd->transit_effect_idler = NULL;
+ return ECORE_CALLBACK_CANCEL;
+ }
+ elm_transit_del_cb_set(vd->transit, __appear_transit_del_cb, vd);
+ elm_transit_object_add(vd->transit, vd->box);
+ elm_transit_effect_translation_add(vd->transit, 0, -height, 0, 0);
+ elm_transit_duration_set(vd->transit, CALLUI_MOVE_TRANSITION_TIME_SEC);
+ elm_transit_objects_final_state_keep_set(vd->transit, EINA_TRUE);
+ elm_transit_go(vd->transit);
-// evas_object_resize(ad->win, 0, 0);
- _callui_window_minimize(ad->window);
+ vd->transit_effect_idler = NULL;
+ evas_object_freeze_events_set(vd->box, EINA_TRUE);
+
+ return ECORE_CALLBACK_DONE;
}
-static Eina_Bool __reject_msg_close_effect_activated_cb(void *data)
+static Eina_Bool __disappear_effect_activated_cb(void *data)
{
CALLUI_RETURN_VALUE_IF_FAIL(data, ECORE_CALLBACK_CANCEL);
- callui_view_incoming_call_noti_h vd = (callui_view_incoming_call_noti_h)data;
+ callui_view_incoming_call_noti_h vd = data;
- Evas_Object *screen_ly = NULL;
- Elm_Transit *transit = NULL;
int xpos = 0;
int ypos = 0;
int width = 0;
int height = 0;
- int transit_y = 0;
-
- screen_ly = vd->base_view.contents;
- transit = elm_transit_add();
- elm_transit_object_add(transit, screen_ly);
- evas_object_geometry_get(screen_ly, &xpos, &ypos, &width, &height);
- transit_y = -(height + ypos);
- elm_transit_effect_translation_add(transit, 0, 0, 0, transit_y);
- elm_transit_duration_set(transit, 0.5);
- evas_object_show(screen_ly);
- elm_transit_objects_final_state_keep_set(transit, EINA_TRUE);
- elm_transit_go(transit);
+ evas_object_geometry_get(vd->box, &xpos, &ypos, &width, &height);
+ int transit_y = -(height + ypos);
+
+ DELETE_ELM_TRANSIT_HARD(vd->transit);
+ vd->transit = elm_transit_add();
+ if (!vd->transit) {
+ err("transit is NULL");
+ vd->transit_effect_idler = NULL;
+ return ECORE_CALLBACK_CANCEL;
+ }
+ elm_transit_del_cb_set(vd->transit, __disappear_transit_del_cb, vd);
+ elm_transit_object_add(vd->transit, vd->box);
+ elm_transit_effect_translation_add(vd->transit, xpos, ypos, xpos, transit_y);
+ elm_transit_duration_set(vd->transit, CALLUI_MOVE_TRANSITION_TIME_SEC);
+ elm_transit_objects_final_state_keep_set(vd->transit, EINA_TRUE);
+ elm_transit_go(vd->transit);
+
+ vd->transit_effect_idler = NULL;
+ evas_object_freeze_events_set(vd->box, EINA_TRUE);
return ECORE_CALLBACK_CANCEL;
}
-static void __show_reject_msg_btn_click_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+static void __rm_reset_status_flags(callui_view_incoming_call_noti_h vd)
+{
+ vd->rm_actualize_state |= CALLUI_REJ_MSG_UPDATE_GL_HINT;
+ vd->rm_actualize_state |= CALLUI_REJ_MSG_UPDATE_AVAILABLE_SIZE;
+}
+
+static void __show_reject_msg_btn_click_cb(void *data, Evas_Object *obj, void *event_info)
{
CALLUI_RETURN_IF_FAIL(data);
- callui_view_incoming_call_noti_h vd = (callui_view_incoming_call_noti_h)data;
+ callui_view_incoming_call_noti_h vd = data;
callui_app_data_t *ad = vd->base_view.ad;
- if (vd->rej_msg_list_visible) {
- _callui_window_set_size_type(ad->window, CALLUI_WIN_SIZE_ACTIVE_NOTI);
- elm_object_signal_emit(vd->base_view.contents, "small_main_ly", "main_active_noti_call");
- __destroy_reject_msg_content(vd);
+ if (vd->rm_turned_on) {
+ dbg("Hide reject messages request");
+
+ __rm_reset_anim_params(vd);
+ if (vd->rm_state == CALLUI_REJ_MSG_SHOW_IN_PROG ||
+ vd->rm_state == CALLUI_REJ_MSG_SHOW_REQ) {
+ dbg("Show animation in progress...");
+ } else {
+ dbg("No show animation in progress...");
+ }
+ vd->rm_state = CALLUI_REJ_MSG_HIDE_REQ;
+ __rm_try_actualize(vd);
} else {
- _callui_window_set_size_type(ad->window, CALLUI_WIN_SIZE_FULLSCREEN);
- elm_object_signal_emit(vd->base_view.contents, "big_main_ly", "main_active_noti_call");
- __create_reject_msg_content(vd);
+ dbg("Show reject messages request");
+
+ __rm_reset_anim_params(vd);
+ if (vd->rm_state == CALLUI_REJ_MSG_HIDE_IN_PROG ||
+ vd->rm_state == CALLUI_REJ_MSG_HIDE_REQ) {
+ dbg("Hide animation in progress...");
+ vd->rm_actualize_state &= ~CALLUI_REJ_MSG_UPDATE_AVAILABLE_SIZE;
+ } else {
+ dbg("No hide animation in progress...");
+ __rm_reset_status_flags(vd);
+ _callui_window_set_size_type(ad->window, CALLUI_WIN_SIZE_FULLSCREEN);
+ elm_object_signal_emit(vd->layout, "hide_swipe", "main_active_noti_call");
+ __rm_create_content(vd);
+ __move_active_noti(vd);
+ }
+ vd->rm_state = CALLUI_REJ_MSG_SHOW_REQ;
+ __rm_try_actualize(vd);
}
- vd->rej_msg_list_visible = !vd->rej_msg_list_visible;
+ vd->rm_turned_on = !vd->rm_turned_on;
}
-static void __reject_msg_genlist_add(callui_view_incoming_call_noti_h vd)
+static void __rm_get_scroller_cur_size(callui_view_incoming_call_noti_h vd, int *w, int *h)
{
- if (vd->reject_msg_genlist) {
- evas_object_del(vd->reject_msg_genlist);
- vd->reject_msg_genlist = NULL;
+ evas_object_geometry_get(vd->rm_scroller, NULL, NULL, w, h);
+ dbg("RM scroller size - w[%d] h[%d]", *w, *h);
+}
+
+static void __box_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ CALLUI_RETURN_IF_FAIL(data);
+ callui_view_incoming_call_noti_h vd = data;
+
+ if (vd->appear_anim_init) {
+ return;
}
- vd->reject_msg_genlist = elm_genlist_add(vd->base_view.contents);
- CALLUI_RETURN_IF_FAIL(vd->reject_msg_genlist);
- evas_object_data_set(vd->reject_msg_genlist, CALLUI_REJ_MSG_GENLIST_DATA, vd);
+ vd->appear_anim_init = true;
+ vd->transit_effect_idler = ecore_idle_enterer_before_add(__appear_effect_activated_cb, vd);
+}
- evas_object_size_hint_weight_set(vd->reject_msg_genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(vd->reject_msg_genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+static void __rm_close_cb(callui_view_incoming_call_noti_h vd)
+{
+ __rm_destroy_content(vd);
- elm_object_part_content_set(vd->reject_msg_layout, "swallow.content", vd->reject_msg_genlist);
+ elm_object_signal_emit(vd->layout, "show_swipe", "main_active_noti_call");
+ _callui_window_set_size_type(vd->base_view.ad->window, CALLUI_WIN_SIZE_ACTIVE_NOTI);
+ __move_active_noti(vd);
}
-static char *__reject_msg_genlist_item_txt_cb(void *data, Evas_Object *obj, const char *part)
+static void __rm_box_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
- int index = CALLUI_SAFE_C_CAST(int, data);
- char *msg_str = NULL;
+ CALLUI_RETURN_IF_FAIL(data);
- if (!strcmp(part, "elm.text")) {
- if (index != -1) {
- msg_str = _callui_common_get_reject_msg_by_index(index);
- sec_dbg("msg_str(%s)", msg_str);
- return msg_str; /* Send markup text to draw the genlist */
- } else {
- warn("invalid index: %d", index);
- msg_str = _("IDS_CALL_BODY_NO_MESSAGES");
- return strdup(msg_str);
- }
+ callui_view_incoming_call_noti_h vd = data;
+ Evas_Coord w, h;
+ w = h = 0;
+ evas_object_size_hint_min_get(obj, &w, &h);
+ dbg("RM box hint min - w[%d]h[%d]", w, h);
+
+ vd->rm_scroller_max_h = h;
+ vd->rm_actualize_state &= ~CALLUI_REJ_MSG_UPDATE_GL_HINT;
+
+ __rm_try_actualize(vd);
+}
+
+static void __rm_scroller_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ CALLUI_RETURN_IF_FAIL(data);
+
+ callui_view_incoming_call_noti_h vd = data;
+ Evas_Coord w, h;
+ w = h = 0;
+ evas_object_geometry_get(obj, NULL, NULL, &w, &h);
+
+ dbg("RM scroller resize - w[%d]h[%d]", w, h);
+
+ if (h == 0 && vd->rm_state == CALLUI_REJ_MSG_HIDDEN) {
+ dbg("RM scroller height is 0");
+ __rm_close_cb(vd);
+ }
+}
+
+static void __rm_reset_anim_params(callui_view_incoming_call_noti_h vd)
+{
+ if (vd->rm_animator) {
+ ecore_animator_del(vd->rm_animator);
+ vd->rm_animator = NULL;
}
- return NULL;
+ evas_object_freeze_events_set(vd->rm_scroller, EINA_FALSE);
}
-static void __reject_msg_genlist_init_item_class(callui_view_incoming_call_noti_h vd)
+static void __reject_msg_animation_end_cb(callui_view_incoming_call_noti_h vd)
{
- Elm_Genlist_Item_Class *item_class = elm_genlist_item_class_new();
- CALLUI_RETURN_IF_FAIL(item_class);
+ vd->rm_animator = NULL;
+
+ if (vd->rm_state == CALLUI_REJ_MSG_SHOW_IN_PROG) {
+ evas_object_freeze_events_set(vd->rm_scroller, EINA_FALSE);
+ vd->rm_state = CALLUI_REJ_MSG_SHOWN;
+ } else if (vd->rm_state == CALLUI_REJ_MSG_HIDE_IN_PROG) {
+ vd->rm_state = CALLUI_REJ_MSG_HIDDEN;
+ __rm_close_cb(vd);
+ }
+}
- item_class->item_style = "type1";
- item_class->func.text_get = __reject_msg_genlist_item_txt_cb;
- item_class->func.content_get = NULL;
- item_class->func.state_get = NULL;
- item_class->func.del = NULL;
- vd->reject_msg_itc = item_class;
+static int dtoi(double value) {
+ if (value > 0) {
+ return (value + 0.5);
+ } else {
+ return (value - 0.5);
+ }
}
-static void __reject_msg_genlist_deinit_item_class(callui_view_incoming_call_noti_h vd)
+static Eina_Bool __rm_animation_cb(void *data, double pos)
{
- elm_genlist_item_class_free(vd->reject_msg_itc);
- vd->reject_msg_itc = NULL;
+ debug_enter();
+ CALLUI_RETURN_VALUE_IF_FAIL(data, ECORE_CALLBACK_CANCEL);
+
+ callui_view_incoming_call_noti_h vd = data;
+
+ Evas_Coord path_step = dtoi((vd->rm_anim_path) * pos);
+ Evas_Coord new_scroller_h = 0;
+
+ int dim_step = 0;
+ if (CALLUI_REJ_MSG_DIMMER_ALFA_END == vd->rm_dimmer_alfa_start) {
+ dim_step = dtoi(CALLUI_REJ_MSG_DIMMER_ALFA_END * pos);
+ } else {
+ dim_step = dtoi((CALLUI_REJ_MSG_DIMMER_ALFA_END - vd->rm_dimmer_alfa_start) * pos);
+ }
+
+ if (vd->rm_state == CALLUI_REJ_MSG_SHOW_IN_PROG) {
+ new_scroller_h = vd->rm_scroller_anim_start_h + path_step;
+ vd->rm_dimmer_alfa = vd->rm_dimmer_alfa_start + dim_step;
+ } else if (vd->rm_state == CALLUI_REJ_MSG_HIDE_IN_PROG) {
+ new_scroller_h = vd->rm_scroller_anim_start_h - path_step;
+ vd->rm_dimmer_alfa = vd->rm_dimmer_alfa_start - dim_step;
+ } else {
+ err("Invalid state for animation. rm_state[%d]", vd->rm_state);
+ __rm_reset_anim_params(vd);
+ return ECORE_CALLBACK_CANCEL;
+ }
+ dbg("anim pos[%f], RM scroller new size [%d][%d]", pos, vd->rm_scroller_anim_start_w, new_scroller_h);
+
+ evas_object_color_set(vd->base_view.contents, CALLUI_REJ_MSG_DIMMER_COLOR, vd->rm_dimmer_alfa);
+
+ evas_object_resize(vd->rm_scroller, vd->rm_scroller_anim_start_w, new_scroller_h);
+ evas_object_geometry_set(vd->rm_scroller_bg, vd->rm_scroller_x, vd->rm_scroller_y, vd->rm_scroller_anim_start_w, new_scroller_h);
+ evas_object_move(vd->rm_scroller_stroke, vd->rm_scroller_x, vd->rm_scroller_y + new_scroller_h);
+
+ if (pos == 1.0) {
+ __reject_msg_animation_end_cb(vd);
+ }
+
+ return ECORE_CALLBACK_RENEW;
}
-static Elm_Object_Item *__reject_msg_genlist_append_item(Evas_Object *msg_glist, Elm_Genlist_Item_Class * itc_reject_msg, int index)
+static void __rm_scroller_anchor_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
- Elm_Object_Item *item = NULL;
- item = elm_genlist_item_append(msg_glist, itc_reject_msg,
- CALLUI_SAFE_C_CAST(void *, index), NULL, ELM_GENLIST_ITEM_NONE,
- __reject_msg_genlist_item_click_cb, CALLUI_SAFE_C_CAST(void *, index));
- return item;
+ callui_view_incoming_call_noti_h vd = data;
+
+ Evas_Coord x = 0;
+ Evas_Coord y = 0;
+ evas_object_geometry_get(obj, &x, &y, NULL, NULL);
+ dbg("RM scroller anchor geometry - x[%d] y[%d]", x, y);
+
+ vd->rm_scroller_x = x;
+ vd->rm_scroller_y = y;
+ evas_object_move(vd->rm_scroller, x, y);
}
-static int __reject_msg_genlist_fill(callui_view_incoming_call_noti_h vd)
+static void _rm_compose_item_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
{
- int msg_cnt = 0;
- if (0 != vconf_get_int(VCONFKEY_CISSAPPL_REJECT_CALL_MSG_INT, &msg_cnt)) {
- warn("vconf_get_int failed.");
+ CALLUI_RETURN_IF_FAIL(data);
+
+ callui_app_data_t *ad = (callui_app_data_t *)data;
+
+ const callui_call_data_t *incom = _callui_stp_get_call_data(ad->state_provider, CALLUI_CALL_DATA_INCOMING);
+ CALLUI_RETURN_IF_FAIL(incom);
+
+ _callui_common_launch_msg_composer(ad, incom->call_num);
+
+ callui_result_e res = _callui_manager_reject_call(ad->call_manager);
+ if (res != CALLUI_RESULT_OK) {
+ err("_callui_manager_reject_call() failed. res[%d]", res);
}
- dbg("msg_cnt: %d", msg_cnt);
+}
+
+static void _rm_message_item_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+ int index = CALLUI_SAFE_C_CAST(int, data);
- int index = 0;
- if (msg_cnt == 0) {
- index = -1;
- Elm_Object_Item * item = __reject_msg_genlist_append_item(vd->reject_msg_genlist, vd->reject_msg_itc, index);
- if (item) {
- elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ callui_view_incoming_call_noti_h vd = (callui_view_incoming_call_noti_h)evas_object_data_get(obj, CALLUI_REJ_MSG_GENLIST_DATA);
+ CALLUI_RETURN_IF_FAIL(vd);
+ callui_app_data_t *ad = vd->base_view.ad;
+
+ if (index != -1) {
+ char *rm_markup_str = NULL;
+ char *rm_str = _callui_common_get_reject_msg_by_index(index);
+ if (rm_str) {
+ rm_markup_str = elm_entry_markup_to_utf8(rm_str); /*send utf8 text to MSG */
+ free(rm_str);
}
- } else {
- for (index = 0; index < msg_cnt; index++) {
- __reject_msg_genlist_append_item(vd->reject_msg_genlist, vd->reject_msg_itc, index);
+
+ callui_result_e res = _callui_manager_reject_call(ad->call_manager);
+ if (res != CALLUI_RESULT_OK) {
+ err("cm_reject_call() is failed. res[%d]", res);
+ } else {
+ _callui_common_send_reject_msg(ad, rm_markup_str);
}
+ free(rm_markup_str);
}
- return msg_cnt;
}
-static void __create_reject_msg_content(callui_view_incoming_call_noti_h vd)
+static callui_result_e __rm_create_message_items(callui_view_incoming_call_noti_h vd, Evas_Object *box, int *insert_item_count)
{
- callui_app_data_t *ad = vd->base_view.ad;
+ int item_count = 0;
+ callui_result_e res = _callui_common_get_reject_msg_count(&item_count);
+ CALLUI_RETURN_VALUE_IF_FAIL(res == CALLUI_RESULT_OK, -1);
+
+ for (int i = 0; i < item_count; i++) {
+ Evas_Object *item_ly = _callui_load_edj(box, EDJ_NAME, "reject_msg_item");
+ CALLUI_RETURN_VALUE_IF_FAIL(item_ly, CALLUI_RESULT_FAIL);
+
+ evas_object_size_hint_weight_set(item_ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(item_ly, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_layout_signal_callback_add(item_ly, "cu,action,clicked", "main_active_noti_call", _rm_message_item_clicked_cb, CALLUI_SAFE_C_CAST(void *, i));
+
+ char *txt = _callui_common_get_reject_msg_by_index(i);
+ elm_object_part_text_set(item_ly, "callui.text.main", txt);
+ free(txt);
- vd->reject_msg_layout = _callui_load_edj(vd->base_view.contents, EDJ_NAME, "reject_msg_ly");
- elm_object_part_content_set(vd->base_view.contents, "swallow.reject_msg", vd->reject_msg_layout);
+ evas_object_data_set(item_ly, CALLUI_REJ_MSG_GENLIST_DATA, vd);
- // TODO: possibly can be replaced in common part. Need investigate
- __reject_msg_genlist_add(vd);
- __reject_msg_genlist_init_item_class(vd);
- int msg_cnt = __reject_msg_genlist_fill(vd);
- __reject_msg_genlist_deinit_item_class(vd);
+ evas_object_show(item_ly);
+ elm_box_pack_end(box, item_ly);
+ }
+ *insert_item_count = item_count;
+ return res;
+}
+
+static callui_result_e __rm_create_compose_item(callui_view_incoming_call_noti_h vd, Evas_Object *box)
+{
+ Evas_Object *item_ly = _callui_load_edj(vd->box, EDJ_NAME, "reject_msg_item");
+ CALLUI_RETURN_VALUE_IF_FAIL(item_ly, CALLUI_RESULT_FAIL);
+
+ evas_object_size_hint_weight_set(item_ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(item_ly, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_object_signal_emit(item_ly, "show_add_icon", "");
+ elm_layout_signal_callback_add(item_ly, "cu,action,clicked", "main_active_noti_call", _rm_compose_item_clicked_cb, vd->base_view.ad);
+
+ elm_object_translatable_part_text_set(item_ly, "callui.text.main", "IDS_CALL_BUTTON_COMPOSE_MESSAGE_TO_SEND_ABB");
+
+ evas_object_show(item_ly);
+ elm_box_pack_end(box, item_ly);
+
+ return CALLUI_RESULT_OK;
+}
+
+static int __rm_fill_box(callui_view_incoming_call_noti_h vd, Evas_Object *box)
+{
+ int item_count = 0;
+
+ callui_result_e res = __rm_create_message_items(vd, box, &item_count);
+ CALLUI_RETURN_VALUE_IF_FAIL(res == CALLUI_RESULT_OK, -1);
+
+ res = __rm_create_compose_item(vd, box);
+ CALLUI_RETURN_VALUE_IF_FAIL(res == CALLUI_RESULT_OK, -1);
+
+ return ++item_count;
+}
+
+static void __rm_create_content(callui_view_incoming_call_noti_h vd)
+{
+ /* Reject message list background gradient color layout */
+ vd->rm_scroller_bg = _callui_load_edj(vd->box, EDJ_NAME, "reject_msg_scroller_bg");
+ CALLUI_RETURN_IF_FAIL(vd->rm_scroller_bg);
+ evas_object_show(vd->rm_scroller_bg);
+
+ /* Reject message scroller */
+ vd->rm_scroller = elm_scroller_add(vd->box);
+ if (!vd->rm_scroller) {
+ err("rm_scroller is NULL");
+ return __rm_destroy_content(vd);
+ }
+ // TODO: ELM_SCALE_SIZE is use to set size according to error edje element calculation
+ // need to delete it after fix in EDJE library
+ evas_object_resize(vd->rm_scroller, ELM_SCALE_SIZE(vd->base_view.ad->root_w), 0);
+ evas_object_event_callback_add(vd->rm_scroller, EVAS_CALLBACK_RESIZE, __rm_scroller_resize_cb, vd);
+ evas_object_show(vd->rm_scroller);
+
+ /* Reject message box */
+ callui_rgb_color_t item_init_color = { AO024_WO_A };
+ Evas_Object *box = _callui_color_box_add(vd->rm_scroller, &item_init_color, CALLUI_REJ_MSG_OPACITY);
+ if (!box) {
+ err("box is NULL");
+ return __rm_destroy_content(vd);
+ }
+ evas_object_event_callback_add(box, EVAS_CALLBACK_CHANGED_SIZE_HINTS, __rm_box_changed_hints_cb, vd);
+ evas_object_show(box);
+
+ int rm_item_count = __rm_fill_box(vd, box);
+ if (rm_item_count < 0) {
+ err("rm_item_count is %d", rm_item_count);
+ return __rm_destroy_content(vd);
+ }
+
+ elm_object_content_set(vd->rm_scroller, box);
- _callui_create_reject_msg_button(ad, vd->reject_msg_layout, "swallow.button");
+ /* Reject message scroller bottom stroke */
+ vd->rm_scroller_stroke = evas_object_rectangle_add(evas_object_evas_get(vd->rm_scroller));
+ if (!vd->rm_scroller_stroke) {
+ return __rm_destroy_content(vd);
+ }
+ evas_object_color_set(vd->rm_scroller_stroke, AO028);
+ evas_object_resize(vd->rm_scroller_stroke, vd->base_view.ad->root_w, CALLUI_AN_STROKE_H);
+ evas_object_show(vd->rm_scroller_stroke);
+
+ /* Reject message scroller/list background EDJE anchor */
+ vd->rm_scroller_anchor = evas_object_rectangle_add(evas_object_evas_get(vd->layout));
+ if (!vd->rm_scroller_anchor) {
+ return __rm_destroy_content(vd);
+ }
+ evas_object_event_callback_add(vd->rm_scroller_anchor, EVAS_CALLBACK_MOVE, __rm_scroller_anchor_move_cb, vd);
+ evas_object_color_set(vd->rm_scroller_anchor, 0, 0, 0, 0);
+ elm_object_part_content_set(vd->layout, "swallow.reject_msg_gl_anchor", vd->rm_scroller_anchor);
- elm_object_tree_focus_allow_set(vd->reject_msg_genlist, EINA_FALSE);
- evas_object_size_hint_min_set(vd->reject_msg_genlist, ad->root_w, 0);
- evas_object_size_hint_max_set(vd->reject_msg_genlist, ad->root_w, ELM_SCALE_SIZE(MTLOCK_REJECT_MSG_LIST_1ITEM_NEW_HEIGHT * msg_cnt));
- evas_object_show(vd->reject_msg_layout);
- evas_object_show(vd->reject_msg_genlist);
+ vd->rm_scroller_max_h = ELM_SCALE_SIZE(ACTIVE_NOTI_RM_ITEM_HEIGHT) * rm_item_count;
+ vd->rm_actualize_state &= ~CALLUI_REJ_MSG_UPDATE_GL_HINT;
}
-static void __destroy_reject_msg_content(callui_view_incoming_call_noti_h vd)
+static void __rm_destroy_content(callui_view_incoming_call_noti_h vd)
{
- DELETE_EVAS_OBJECT(vd->reject_msg_layout);
- vd->reject_msg_genlist = NULL;
+ DELETE_EVAS_OBJECT(vd->rm_scroller_bg);
+ DELETE_EVAS_OBJECT(vd->rm_scroller);
+ DELETE_EVAS_OBJECT(vd->rm_scroller_stroke);
+ DELETE_EVAS_OBJECT(vd->rm_scroller_anchor);
+ vd->rm_scroller_max_h = 0;
}
-static void __launch_btn_click_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+static void __call_action_btn_click_cb(void *data, Evas_Object *obj, void *event_info)
{
CALLUI_RETURN_IF_FAIL(data);
}
}
-static callui_result_e __create_main_content(callui_view_incoming_call_noti_h vd, Evas_Object *parent)
+static Evas_Event_Flags __gesture_layer_flick_end_cb(void *data, void *event_info)
{
- vd->base_view.contents = _callui_load_edj(parent, EDJ_NAME, "main_active_noti_call");
- CALLUI_RETURN_VALUE_IF_FAIL(vd->base_view.contents, CALLUI_RESULT_ALLOCATION_FAIL);
- elm_object_part_content_set(parent, "elm.swallow.content", vd->base_view.contents);
+ CALLUI_RETURN_VALUE_IF_FAIL(data, EVAS_EVENT_FLAG_NONE);
- callui_result_e res = __create_custom_button(CALLUI_DURING_ICON, "swallow.call_button",
- __launch_btn_click_cb, vd, (void *)APP_CONTROL_OPERATION_DURING_CALL);
- CALLUI_RETURN_VALUE_IF_FAIL(res == CALLUI_RESULT_OK, res);
+ callui_view_incoming_call_noti_h vd = data;
+ Elm_Gesture_Line_Info *line_info = (Elm_Gesture_Line_Info *)event_info;
- res = __create_custom_button(CALLUI_REJECT_ICON, "swallow.rj_msg_button",
- __show_reject_msg_btn_click_cb, vd, (void *)vd);
- CALLUI_RETURN_VALUE_IF_FAIL(res == CALLUI_RESULT_OK, res);
+ if (((line_info->angle >= 340. && line_info->angle <= 360.) ||
+ (line_info->angle >= 0. && line_info->angle <= 20.)) && !vd->rm_turned_on) {
+ DELETE_ECORE_IDLE_ENTERER(vd->transit_effect_idler);
+ vd->transit_effect_idler = ecore_idle_enterer_before_add(__disappear_effect_activated_cb, vd);
+ }
+ return EVAS_EVENT_FLAG_ON_HOLD;
+}
- res = __create_custom_button(CALLUI_END_ICON, "swallow.end_call_button",
- __launch_btn_click_cb, vd, (void *)APP_CONTROL_OPERATION_END_CALL);
- CALLUI_RETURN_VALUE_IF_FAIL(res == CALLUI_RESULT_OK, res);
+static Evas_Object *__create_gesture_layer(callui_view_incoming_call_noti_h vd)
+{
+ Evas_Object *gesture_layer = elm_gesture_layer_add(vd->layout);
+ CALLUI_RETURN_NULL_IF_FAIL(gesture_layer);
- Evas_Object *swipe_layout = elm_layout_add(vd->base_view.contents);
- CALLUI_RETURN_VALUE_IF_FAIL(swipe_layout, CALLUI_RESULT_ALLOCATION_FAIL);
- elm_layout_file_set(swipe_layout, EDJ_NAME, "swipe_call_button_ly");
- evas_object_event_callback_add(swipe_layout, EVAS_CALLBACK_MOUSE_MOVE, __swipe_layout_mouse_move_cb, vd);
- elm_object_part_content_set(vd->base_view.contents, "swallow.swipe_button", swipe_layout);
+ elm_gesture_layer_attach(gesture_layer, vd->layout);
+ elm_gesture_layer_flick_time_limit_ms_set(gesture_layer, CALLUI_REJ_MSG_FLICK_TIME_LIMIT_MS);
+ elm_gesture_layer_cb_set(gesture_layer, ELM_GESTURE_N_LINES , ELM_GESTURE_STATE_END, __gesture_layer_flick_end_cb, vd);
+ evas_object_show(gesture_layer);
- return res;
+ return gesture_layer;
}
-static callui_result_e __create_custom_button(char *icon_name, char *part, Evas_Object_Event_Cb func, void * data, void * data_bt_cb)
+static void __contact_info_click_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
{
- CALLUI_RETURN_VALUE_IF_FAIL(data, CALLUI_RESULT_INVALID_PARAM);
+ CALLUI_RETURN_IF_FAIL(data);
- callui_view_incoming_call_noti_h vd = (callui_view_incoming_call_noti_h)data;
- callui_app_data_t *ad = vd->base_view.ad;
+ callui_view_incoming_call_noti_h vd = data;
+
+ _callui_vm_change_view(vd->base_view.ad->view_manager, CALLUI_VIEW_INCOMING_CALL);
+}
+
+static callui_result_e __create_main_content(callui_view_incoming_call_noti_h vd, Evas_Object *parent)
+{
+ vd->base_view.contents = evas_object_rectangle_add(evas_object_evas_get(parent));
+ CALLUI_RETURN_VALUE_IF_FAIL(vd->base_view.contents, CALLUI_RESULT_ALLOCATION_FAIL);
+ evas_object_size_hint_weight_set(vd->base_view.contents, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(vd->base_view.contents, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_color_set(vd->base_view.contents, CALLUI_REJ_MSG_DIMMER_COLOR, CALLUI_REJ_MSG_DIMMER_ALFA_START);
+ elm_object_part_content_set(parent, "elm.swallow.content", vd->base_view.contents);
+ evas_object_show(vd->base_view.contents);
+
+ vd->box = elm_box_add(vd->base_view.contents);
+ CALLUI_RETURN_VALUE_IF_FAIL(vd->box, CALLUI_RESULT_ALLOCATION_FAIL);
+ evas_object_event_callback_add(vd->box, EVAS_CALLBACK_CHANGED_SIZE_HINTS, __box_changed_hints_cb, vd);
+ elm_box_horizontal_set(vd->box, EINA_FALSE);
+ evas_object_show(vd->box);
+
+ vd->layout = _callui_load_edj(vd->box, EDJ_NAME, "main_active_noti_call");
+ CALLUI_RETURN_VALUE_IF_FAIL(vd->layout, CALLUI_RESULT_ALLOCATION_FAIL);
+ evas_object_size_hint_weight_set(vd->layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(vd->layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
- Evas_Object *button_call = elm_layout_add(vd->base_view.contents);
- CALLUI_RETURN_VALUE_IF_FAIL(button_call, CALLUI_RESULT_ALLOCATION_FAIL);
+ elm_object_signal_callback_add(vd->layout, "contact_info.clicked",
+ "main_active_noti_call", __contact_info_click_cb, vd);
- elm_layout_file_set(button_call, EDJ_NAME, "main_button_ly");
- Evas_Object *icon = elm_image_add(button_call);
- CALLUI_RETURN_VALUE_IF_FAIL(icon, CALLUI_RESULT_ALLOCATION_FAIL);
+ elm_box_pack_end(vd->box, vd->layout);
- elm_image_file_set(icon, EDJ_NAME, icon_name);
- elm_object_part_content_set(button_call, "swallow.icon", icon);
- elm_object_part_content_set(vd->base_view.contents, part, button_call);
- evas_object_data_set(button_call, "app_data", ad);
- evas_object_event_callback_add(button_call, EVAS_CALLBACK_MOUSE_UP, func, data_bt_cb);
+ Evas_Object *answer_btn = __create_btn(vd, "answer_call_noti", CALLUI_DURING_ICON,
+ NULL, __call_action_btn_click_cb, APP_CONTROL_OPERATION_DURING_CALL);
+ CALLUI_RETURN_VALUE_IF_FAIL(answer_btn, CALLUI_RESULT_ALLOCATION_FAIL);
+ elm_object_part_content_set(vd->layout, "swallow.call_accept_btn", answer_btn);
+
+ Evas_Object *reject_btn = __create_btn(vd, "reject_call_noti", CALLUI_END_ICON,
+ NULL, __call_action_btn_click_cb, APP_CONTROL_OPERATION_END_CALL);
+ CALLUI_RETURN_VALUE_IF_FAIL(reject_btn, CALLUI_RESULT_ALLOCATION_FAIL);
+ elm_object_part_content_set(vd->layout, "swallow.call_reject_btn", reject_btn);
+
+ CALLUI_RETURN_VALUE_IF_FAIL(__create_gesture_layer(vd), CALLUI_RESULT_ALLOCATION_FAIL);
+
+ elm_object_signal_emit(vd->layout, "start_swipe_anim", "main_active_noti_call");
+
+ vd->rm_state = CALLUI_REJ_MSG_HIDDEN;
+ vd->parent = parent;
+ evas_object_event_callback_add(vd->parent, EVAS_CALLBACK_RESIZE, __parent_resize_cb, vd);
return CALLUI_RESULT_OK;
}
+static Evas_Object *__create_btn(callui_view_incoming_call_noti_h vd,
+ const char *style,
+ const char *icon_name,
+ const char *txt,
+ Evas_Smart_Cb click_cb,
+ void *cb_data)
+{
+ Evas_Object *button = elm_button_add(vd->layout);
+ CALLUI_RETURN_NULL_IF_FAIL(button);
+ elm_object_style_set(button, style);
+ evas_object_smart_callback_add(button, "clicked", click_cb, cb_data);
+
+ if (icon_name) {
+ Evas_Object *icon = elm_image_add(button);
+ CALLUI_RETURN_NULL_IF_FAIL(icon);
+ elm_image_file_set(icon, EDJ_NAME, icon_name);
+ elm_object_part_content_set(button, "elm.swallow.content", icon);
+ }
+ if (txt) {
+ elm_object_translatable_part_text_set(button, "elm.text", txt);
+ }
+ return button;
+}
+
static callui_result_e __update_displayed_data(callui_view_incoming_call_noti_h vd)
{
callui_app_data_t *ad = vd->base_view.ad;
const callui_call_data_t *call_data = _callui_stp_get_call_data(ad->state_provider, CALLUI_CALL_DATA_INCOMING);
CALLUI_RETURN_VALUE_IF_FAIL(call_data, CALLUI_RESULT_FAIL);
- elm_object_signal_emit(vd->base_view.contents, "small_main_ly", "main_active_noti_call");
+ elm_object_signal_emit(vd->layout, "small_main_ly", "main_active_noti_call");
const char *call_name = call_data->call_ct_info.call_disp_name;
const char *call_number = NULL;
call_number = call_data->call_num;
}
- if (STRING_EMPTY(call_name) && STRING_EMPTY(call_number)) {
- elm_object_signal_emit(vd->base_view.contents, "big_buttons", "main_active_noti_call");
- elm_object_translatable_part_text_set(vd->base_view.contents, "text.contact_name", "IDS_CALL_BODY_UNKNOWN");
- } else if (STRING_EMPTY(call_name)) {
- elm_object_signal_emit(vd->base_view.contents, "small_buttons", "main_active_noti_call");
- elm_object_part_text_set(vd->base_view.contents, "text.contact_name", call_number);
+ elm_object_translatable_part_text_set(vd->layout, "text.status", "IDS_CALL_BODY_INCOMING_CALL");
+
+ bool is_unknown = false;
+ if (!(call_name && call_name[0] != '\0') && !(call_number && call_number[0] != '\0')) {
+ elm_object_signal_emit(vd->layout, "show_two_lines", "main_active_noti_call");
+ elm_object_signal_emit(vd->layout, "hide_reject_msg_btn", "main_active_noti_call");
+ elm_object_translatable_part_text_set(vd->layout, "text.contact_name", "IDS_CALL_BODY_UNKNOWN");
+ is_unknown = true;
+ } else if (!(call_name && call_name[0] != '\0')) {
+ elm_object_signal_emit(vd->layout, "show_two_lines", "main_active_noti_call");
+ elm_object_part_text_set(vd->layout, "text.contact_name", call_number);
} else {
- elm_object_signal_emit(vd->base_view.contents, "small_buttons", "main_active_noti_call");
- elm_object_part_text_set(vd->base_view.contents, "text.contact_name", call_name);
- elm_object_part_text_set(vd->base_view.contents, "text.contact_number", call_number);
+ elm_object_signal_emit(vd->layout, "show_three_lines", "main_active_noti_call");
+ elm_object_part_text_set(vd->layout, "text.contact_name", call_name);
+ elm_object_part_text_set(vd->layout, "text.contact_number", call_number);
+ }
+
+ if (!is_unknown) {
+ Evas_Object *reject_msg_btn = __create_btn(vd, "reject_msg_noti", NULL,
+ "IDS_VCALL_BUTTON2_REJECT_CALL_WITH_MESSAGE", __show_reject_msg_btn_click_cb, vd);
+ CALLUI_RETURN_VALUE_IF_FAIL(reject_msg_btn, CALLUI_RESULT_ALLOCATION_FAIL);
+ elm_object_part_content_set(vd->layout, "swallow.reject_msg_btn", reject_msg_btn);
}
- CALLUI_RETURN_VALUE_IF_FAIL(_callui_show_caller_id(vd->base_view.contents, call_data), CALLUI_RESULT_FAIL);
+ CALLUI_RETURN_VALUE_IF_FAIL(_callui_show_caller_id(vd->layout, call_data), CALLUI_RESULT_FAIL);
- evas_object_show(vd->base_view.contents);
+ evas_object_show(vd->layout);
return CALLUI_RESULT_OK;
}
+
+static void __rm_prepare_animator(callui_view_incoming_call_noti_h vd)
+{
+ double anim_time = vd->rm_anim_path / CALLUI_REJ_MSG_ANIM_VELOCITY;
+
+ dbg("Animation start params: path[%f], time[%f], w[%d], h[%d]",
+ vd->rm_anim_path, anim_time, vd->rm_scroller_anim_start_w, vd->rm_scroller_anim_start_h);
+
+ vd->rm_dimmer_alfa_start = vd->rm_dimmer_alfa;
+ vd->rm_animator = ecore_animator_timeline_add(anim_time, __rm_animation_cb, vd);
+ if (!vd->rm_animator) {
+ err("Failed to create animator.");
+ }
+}
+
+static void __rm_show_animated(callui_view_incoming_call_noti_h vd)
+{
+ vd->rm_state = CALLUI_REJ_MSG_SHOW_IN_PROG;
+ evas_object_freeze_events_set(vd->rm_scroller, EINA_TRUE);
+
+ if (vd->rm_scroller_max_h > vd->rm_scroller_available_h) {
+ vd->rm_anim_path = vd->rm_scroller_available_h;
+ } else {
+ vd->rm_anim_path = vd->rm_scroller_max_h;
+ }
+
+ __rm_get_scroller_cur_size(vd, &vd->rm_scroller_anim_start_w, &vd->rm_scroller_anim_start_h);
+ vd->rm_anim_path = vd->rm_anim_path - vd->rm_scroller_anim_start_h;
+
+ __rm_prepare_animator(vd);
+}
+
+static void __rm_hide_animated(callui_view_incoming_call_noti_h vd)
+{
+ vd->rm_state = CALLUI_REJ_MSG_HIDE_IN_PROG;
+ evas_object_freeze_events_set(vd->rm_scroller, EINA_TRUE);
+
+ __rm_get_scroller_cur_size(vd, &vd->rm_scroller_anim_start_w, &vd->rm_scroller_anim_start_h);
+ vd->rm_anim_path = vd->rm_scroller_anim_start_h;
+
+ __rm_prepare_animator(vd);
+}
+
+static void __rm_recalculate(callui_view_incoming_call_noti_h vd)
+{
+ debug_enter();
+
+ int new_height = 0;
+ if (vd->rm_scroller_max_h > vd->rm_scroller_available_h) {
+ new_height = vd->rm_scroller_available_h;
+ } else {
+ new_height = vd->rm_scroller_max_h;
+ }
+
+ int width = 0;
+ int height = 0;
+ __rm_get_scroller_cur_size(vd, &width, &height);
+
+ evas_object_resize(vd->rm_scroller, width, new_height);
+ evas_object_geometry_set(vd->rm_scroller_bg, vd->rm_scroller_x, vd->rm_scroller_y, width, new_height);
+ evas_object_move(vd->rm_scroller_stroke, vd->rm_scroller_x, vd->rm_scroller_y + new_height);
+}
+
+static void __rm_hide_instantly(callui_view_incoming_call_noti_h vd)
+{
+ __rm_reset_anim_params(vd);
+
+ vd->rm_dimmer_alfa = CALLUI_REJ_MSG_DIMMER_ALFA_START;
+ evas_object_color_set(vd->base_view.contents, CALLUI_REJ_MSG_DIMMER_COLOR, vd->rm_dimmer_alfa);
+
+ __rm_close_cb(vd);
+
+ vd->rm_state = CALLUI_REJ_MSG_HIDDEN;
+}
+
+static void __rm_show_instantly(callui_view_incoming_call_noti_h vd)
+{
+ __rm_reset_anim_params(vd);
+
+ vd->rm_dimmer_alfa = CALLUI_REJ_MSG_DIMMER_ALFA_END;
+ evas_object_color_set(vd->base_view.contents, CALLUI_REJ_MSG_DIMMER_COLOR, vd->rm_dimmer_alfa);
+
+ __rm_recalculate(vd);
+
+ vd->rm_state = CALLUI_REJ_MSG_SHOWN;
+}
+
+static void __rm_try_actualize(callui_view_incoming_call_noti_h vd)
+{
+ dbg("rm_actualize_state[%d] rm_state[%d]", vd->rm_actualize_state, vd->rm_state);
+
+ if (!vd->rm_actualize_state) {
+
+ vd->rm_actualize_state |= CALLUI_REJ_MSG_UPDATE_AVAILABLE_SIZE;
+
+ switch (vd->rm_state) {
+ case CALLUI_REJ_MSG_HIDDEN:
+ return;
+ case CALLUI_REJ_MSG_SHOWN:
+ __rm_recalculate(vd);
+ break;
+ case CALLUI_REJ_MSG_SHOW_REQ:
+ __rm_show_animated(vd);
+ break;
+ case CALLUI_REJ_MSG_HIDE_IN_PROG:
+ __rm_hide_instantly(vd);
+ break;
+ case CALLUI_REJ_MSG_SHOW_IN_PROG:
+ __rm_show_instantly(vd);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (vd->rm_state == CALLUI_REJ_MSG_HIDE_REQ) {
+ __rm_hide_animated(vd);
+ }
+}
+
+static void __rm_calc_available_size(callui_view_incoming_call_noti_h vd)
+{
+ vd->rm_scroller_available_h = 0;
+ callui_app_data_t *ad = vd->base_view.ad;
+
+ int rotation = _callui_window_get_rotation(ad->window);
+ switch (rotation) {
+ case 0:
+ case 180:
+ vd->rm_scroller_available_h = ad->root_h - CALLUI_REJ_MSG_SCREEN_USED_H;
+ break;
+ case 90:
+ case 270:
+ vd->rm_scroller_available_h = ad->root_w - CALLUI_REJ_MSG_SCREEN_USED_H;
+ break;
+ default:
+ return;
+ break;
+ }
+ dbg("Available RM scroller height - [%d]", vd->rm_scroller_available_h);
+}
+
+static void __move_active_noti(callui_view_incoming_call_noti_h vd)
+{
+ callui_app_data_t *ad = vd->base_view.ad;
+ int rotation = _callui_window_get_rotation(ad->window);
+ int new_x = 0;
+ if (vd->rm_scroller) {
+ if (rotation == 90 || rotation == 270)
+ new_x = (ad->root_h - ad->root_w - ACTIVE_NOTI_LANDSCAPE_L_PAD);
+ }
+ evas_object_move(vd->box, new_x, 0);
+}
+
+static void __parent_resize_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+ CALLUI_RETURN_IF_FAIL(data);
+
+ callui_view_incoming_call_noti_h vd = data;
+
+ __move_active_noti(vd);
+ __rm_calc_available_size(vd);
+
+ vd->rm_actualize_state &= ~CALLUI_REJ_MSG_UPDATE_AVAILABLE_SIZE;
+ __rm_try_actualize(vd);
+}
#include "callui-debug.h"
#include "callui-view-layout.h"
-#define CALLUI_WIN_ACT_NOTI_HEIGHT ELM_SCALE_SIZE(350)
+#define CALLUI_WIN_ACT_NOTI_HEIGHT ELM_SCALE_SIZE(413)
#define CALLUI_WIN_ACT_NOTI_ROTATION_COUNT 4
#define CALLUI_WIN_NORM_ROTATION_COUNT 1
if (win_handler->size_type != CALLUI_WIN_SIZE_FULLSCREEN) {
switch (angle) {
case 90:
- move_y = ACTIVE_NOTI_L_PAD;
+ move_y = ACTIVE_NOTI_LANDSCAPE_L_PAD;
break;
case 180:
move_y = ad->root_h - win_h;
break;
case 270:
move_x = ad->root_w - win_h;
- move_y = ad->root_h - win_w - ACTIVE_NOTI_L_PAD;
+ move_y = ad->root_h - win_w - ACTIVE_NOTI_LANDSCAPE_L_PAD;
break;
default:
break;
CALLUI_RESULT_ALREADY_REGISTERED);
if (elm_win_wm_rotation_supported_get(win_handler->win)) {
- //win_handler->rotation_locked = is_locked;
- //TODO: Temporary solution as Active Notification is not ready to support rotation
- win_handler->rotation_locked = true;
+ win_handler->rotation_locked = is_locked;
if (win_handler->rotation_locked) {
int rotate_angles[CALLUI_WIN_NORM_ROTATION_COUNT] = { 0 };