TizenRefApp-6016 [Call UI] Implement Action Bar instead of Six Button Layout 34/64534/1
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Wed, 30 Mar 2016 09:31:37 +0000 (12:31 +0300)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Fri, 1 Apr 2016 14:12:01 +0000 (17:12 +0300)
Change-Id: If5afe94391186487867a0c9eff412c7762d26d0f

21 files changed:
inc/callui-action-bar.h [new file with mode: 0644]
inc/callui-common.h
inc/callui-keypad.h
inc/callui-view-caller-info-defines.h
inc/callui-view-elements.h
inc/callui-view-layout.h
inc/callui.h
res/edje/call_theme.edc
res/edje_src/edc/call_edc/callui-view-caller-info.edc
res/edje_src/edc/call_edc/callui-view-main-layout.edc
res/edje_src/edc/call_edc/callui-view-one-hold-in-conference.edc
src/callui-action-bar.c [new file with mode: 0644]
src/callui-common.c
src/callui-keypad.c
src/callui-view-dialing.c
src/callui-view-elements.c
src/callui-view-multi-call-conf.c
src/callui-view-multi-call-split.c
src/callui-view-quickpanel.c
src/callui-view-single-call.c
src/callui.c

diff --git a/inc/callui-action-bar.h b/inc/callui-action-bar.h
new file mode 100644 (file)
index 0000000..170f797
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * 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_ACTION_BAR_H_
+#define _CALLUI_ACTION_BAR_H_
+
+#include <Elementary.h>
+
+typedef struct _callui_action_bar *callui_action_bar_h;
+
+typedef struct appdata callui_app_data_t;
+
+/**
+ * @brief Create action bar
+ *
+ * @param[in]  appdata         Application data
+ *
+ * @return Action bar instance
+ *
+ */
+callui_action_bar_h _callui_action_bar_create(callui_app_data_t *appdata);
+
+/**
+ * @brief Delete action bar
+ *
+ * @param[in]  action_bar      Action bar handler
+ *
+ */
+void _callui_action_bar_destroy(callui_action_bar_h action_bar);
+
+/**
+ * @brief Show action bar
+ *
+ * @param[in]  action_bar      Action bar handler
+ *
+ */
+void _callui_action_bar_show(callui_action_bar_h action_bar);
+
+/**
+ * @brief Hide action bar
+ *
+ * @param[in]  action_bar      Action bar handler
+ *
+ */
+void _callui_action_bar_hide(callui_action_bar_h action_bar);
+
+#endif /* _CALLUI_ACTION_BAR_H_ */
index 35d050a..4568ba7 100644 (file)
@@ -260,7 +260,6 @@ bool _callui_is_on_background();
 /**
  * @brief Set call duration time into text part of Evas object
  * @param[in] cur_time         source time data
- * @param[in] func                     Evas Object updater function
  * @param[in] obj                      Evas object to set call duration
  * @param[in] part                     Evas object text part name
  */
index d4cbab2..1279ac0 100755 (executable)
@@ -25,16 +25,16 @@ typedef struct _callui_keypad *callui_keypad_h;
 
 typedef void (*show_state_change_cd)(void *data, Eina_Bool visibility);
 
+typedef struct appdata callui_app_data_t;
 /**
  * @brief Create keypad layout
  *
- * @param[in]  parent          Parent evas object
  * @param[in]  appdata         Application data
  *
- * @return CALLUI_RESULT_OK on success or error code otherwise
+ * @return Keypad instance
  *
  */
-callui_keypad_h _callui_keypad_create(Evas_Object *parent, void *appdata);
+callui_keypad_h _callui_keypad_create(callui_app_data_t *appdata);
 
 /**
  * @brief Delete keypad layout
index 54a0f56..4cf28bb 100644 (file)
@@ -46,7 +46,6 @@
 #define PART_SWALLOW_MERGE                                     "swallow.merge"
 #define PART_SWALLOW_SWAP                                      "swallow.swap"
 #define PART_SWALLOW_ACTIVE_INFO                       "swallow.active_info"
-#define PART_SWALLOW_BTN_REGION                                "btn_region"
 
 #define GROUP_SPLIT                                                    "split"
 #define PART_SWALLOW_CALL_INFO                         "swallow.call_info"
index e5ea9af..26c9c41 100644 (file)
@@ -56,126 +56,6 @@ Evas_Object *_callui_load_edj(Evas_Object *parent, const char *file, const char
 Evas_Object *_callui_edje_object_part_get(Evas_Object *parent, const char *part);
 
 /**
- * @brief Create top first button
- *
- * @param[in]    ad       App data
- *
- * @return layout
- *
- */
-Evas_Object *_callui_create_top_first_button(callui_app_data_t *ad);
-
-/**
- * @brief Create disabled top first button
- *
- * @param[in]    ad       App data
- *
- * @return layout
- *
- */
-Evas_Object *_callui_create_top_first_button_disabled(callui_app_data_t *ad);
-
-/**
- * @brief Create top second button
- *
- * @param[in]    ad       App data
- *
- * @return layout
- *
- */
-Evas_Object *_callui_create_top_second_button(callui_app_data_t *ad);
-
-/**
- * @brief Create disabled top second button
- *
- * @param[in]    ad       App data
- *
- * @return layout
- *
- */
-Evas_Object *_callui_create_top_second_button_disabled(callui_app_data_t *ad);
-
-/**
- * @brief Create top third button
- *
- * @param[in]    ad       App data
- *
- * @return layout
- *
- */
-Evas_Object *_callui_create_top_third_button(callui_app_data_t *ad);
-
-/**
- * @brief Create disabled top third button
- *
- * @param[in]    ad       App data
- *
- * @return layout
- *
- */
-Evas_Object *_callui_create_top_third_button_disabled(callui_app_data_t *ad);
-
-/**
- * @brief Create bottom first button
- *
- * @param[in]    ad       App data
- *
- * @return layout
- *
- */
-Evas_Object *_callui_create_bottom_first_button(callui_app_data_t *ad);
-
-/**
- * @brief Create disabled bottom first button
- *
- * @param[in]    ad        App data
- *
- * @return layout
- *
- */
-Evas_Object *_callui_create_bottom_first_button_disabled(callui_app_data_t *ad);
-
-/**
- * @brief Create bottom second button
- *
- * @param[in]    ad        App data
- *
- * @return layout
- *
- */
-Evas_Object *_callui_create_bottom_second_button(callui_app_data_t *ad);
-
-/**
- * @brief Create disabled bottom second button
- *
- * @param[in]    ad        App data
- *
- * @return layout
- *
- */
-Evas_Object *_callui_create_bottom_second_button_disabled(callui_app_data_t *ad);
-
-/**
- * @brief Create bottom third button
- *
- * @param[in]    ad        App data
- *
- * @return layout
- *
- */
-Evas_Object *_callui_create_bottom_third_button(callui_app_data_t *ad);
-
-/**
- * @brief Create disabled bottom third button
- *
- * @param[in]    ad        App data
- *
- * @return layout
- *
- */
-Evas_Object *_callui_create_bottom_third_button_disabled(callui_app_data_t *ad);
-
-/**
  * @brief Create end call button
  *
  * @param[in]    parent    Parent object
@@ -188,24 +68,6 @@ Evas_Object *_callui_create_bottom_third_button_disabled(callui_app_data_t *ad);
 Evas_Object *_callui_create_end_call_button(Evas_Object *parent, Evas_Smart_Cb cb_func, void *data);
 
 /**
- * @brief Destroy end call button
- *
- * @param[in]    parent    Parent object
- *
- */
-void _callui_destroy_end_call_button(Evas_Object *parent);
-
-/**
- * @brief Create bg layout
- *
- * @param[in]    parent     Parent layout
- *
- * @return layout
- *
- */
-Evas_Object *_callui_create_bg_layout(Evas_Object *parent);
-
-/**
  * @brief Create thumbnail
  *
  * @param[in]    parent     Parent layout
@@ -304,26 +166,6 @@ void _callui_load_bluetooth_popup(callui_app_data_t *ad);
 void _callui_create_toast_message(char *string);
 
 /**
- * @brief Speaker button callback
- *
- * @param[in]    data         Application data
- * @param[in]    obj          Parent object
- * @param[in]    event_info   The event's name string
- *
- */
-void _callui_spk_btn_cb(void *data, Evas_Object *obj, void *event_info);
-
-/**
- * @brief Mute button callback
- *
- * @param[in]    data         Application data
- * @param[in]    obj          Parent object
- * @param[in]    event_info   The event's name string
- *
- */
-void _callui_mute_btn_cb(void *data, Evas_Object *obj, void *event_info);
-
-/**
  * @brief Create and set background layout
  *
  * @param[in]    app_data              Application data pointer
index cf74dfa..4947c8a 100755 (executable)
 /* Bottom reject call button*/
 #define BOTTOM_BTN_BG_L_PAD            0
 #define BOTTOM_BTN_BG_WIDTH            MAIN_SCREEN_W
-#define BOTTOM_BTN_BG_T_PAD            (CALLER_INFO_HEIGHT+SIX_BTN_LAYOUT_HEIGHT)
+#define BOTTOM_BTN_BG_T_PAD            (CALLER_INFO_HEIGHT+ACTION_BAR_LAYOUT_HEIGHT)
 #define BOTTOM_BTN_BG_HEIGHT   ENDCALL_BTN_BG_H
 
 /* Six buttons layout*/
-#define SIX_BTN_LAYOUT_L_PAD   0
-#define SIX_BTN_LAYOUT_WIDTH   MAIN_SCREEN_W
-#define SIX_BTN_LAYOUT_T_PAD   (CALLER_INFO_HEIGHT)
-#define SIX_BTN_LAYOUT_HEIGHT  376
+#define ACTION_BAR_LAYOUT_L_PAD        0
+#define ACTION_BAR_LAYOUT_WIDTH        MAIN_SCREEN_W
+#define ACTION_BAR_LAYOUT_T_PAD        (CALLER_INFO_HEIGHT)
+#define ACTION_BAR_LAYOUT_HEIGHT       376
 
 /* Six buttons layout - single button*/
 #define BTN_LAYOUT_SINGLE_BTN_WIDTH            240
 #define REL_QP_BTN_H(y)                ((y)/QP_CALL_ICON_HEIGHT)
 
 /* Relative X & Y positions of buttons w.r.t. Six-Button layout */
-#define REL_BTN_LY_W(x)                ((x)/SIX_BTN_LAYOUT_WIDTH)
-#define REL_BTN_LY_H(y)                ((y)/SIX_BTN_LAYOUT_HEIGHT)
+#define REL_BTN_LY_W(x)                ((x)/ACTION_BAR_LAYOUT_WIDTH)
+#define REL_BTN_LY_H(y)                ((y)/ACTION_BAR_LAYOUT_HEIGHT)
 
 /* Relative X & Y postions of elements w.r.t. Caller info layout */
 #define REL_CALLER_INFO_W(y)   ((y)/CALLER_INFO_WIDTH)
  */
 
 /*
- * SIX BUTTON Layout
+ * Action Bar Button Layout
  * In Portrait mode
  */
 #define TOP_FIRST_BUTTON_L             REL_BTN_LY_W(BTN_LAYOUT_TOP_FIRST_BTN_L_PAD)
 #define BOTTOM_THIRD_BUTTON_T  REL_BTN_LY_H(BTN_LAYOUT_BOTTOM_BTNS_T_PAD)
 #define BOTTOM_THIRD_BUTTON_B  BOTTOM_FIRST_BUTTON_B
 
-#define SIX_BTN_LAYOUT_L       REL_W(SIX_BTN_LAYOUT_L_PAD)
-#define SIX_BTN_LAYOUT_R       REL_W(SIX_BTN_LAYOUT_L_PAD+SIX_BTN_LAYOUT_WIDTH)
-#define SIX_BTN_LAYOUT_T       REL_H(SIX_BTN_LAYOUT_T_PAD)
-#define SIX_BTN_LAYOUT_B       REL_H(SIX_BTN_LAYOUT_T_PAD+SIX_BTN_LAYOUT_HEIGHT)
+#define ACTION_BAR_LAYOUT_L    REL_W(ACTION_BAR_LAYOUT_L_PAD)
+#define ACTION_BAR_LAYOUT_R    REL_W(ACTION_BAR_LAYOUT_L_PAD+ACTION_BAR_LAYOUT_WIDTH)
+#define ACTION_BAR_LAYOUT_T    REL_H(ACTION_BAR_LAYOUT_T_PAD)
+#define ACTION_BAR_LAYOUT_B    REL_H(ACTION_BAR_LAYOUT_T_PAD+ACTION_BAR_LAYOUT_HEIGHT)
 /*
- * End of SIX Button Layout
+ * End of Action Bar Button Layout
  */
 
 /*
index eb7d3ae..f916826 100755 (executable)
@@ -25,6 +25,7 @@
 #include "callui-keypad.h"
 #include "callui-manager.h"
 #include "callui-view-quickpanel.h"
+#include "callui-action-bar.h"
 
 struct appdata {
        Evas_Object *win;
@@ -62,6 +63,7 @@ struct appdata {
        Ecore_Timer *earset_key_longpress_timer;
 
        callui_keypad_h keypad;
+       callui_action_bar_h action_bar;
 
        callui_manager_h call_manager;
        callui_state_provider_h state_provider;
index b951315..27cfac7 100644 (file)
@@ -32,7 +32,7 @@
 #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)
 
-#define STYLE_CALL_SIX_BUTTON(grp_name, img1, color_code, value, vis_value) \
+#define ACTION_BTN(grp_name, img1, color_code, value, vis_value) \
        group { name: "elm/button/base/"grp_name; \
                images { \
                        image: img1 COMP; \
                } \
        }
 
-#define STYLE_CALL_SIX_BUTTON_DISABLED(grp_name, img1, color_code, value, vis_value) \
+#define ACTION_BTN_DISABLED(grp_name, img1, color_code, value, vis_value) \
        group { name: "elm/button/base/"grp_name; \
                images { \
                        image: img1 COMP; \
                } \
        }
 
-#define STYLE_CALL_SIX_BUTTON_TOGGLE(grp_name, img1, color_code, value, vis_value) \
+#define ACTION_BTN_TOGGLE(grp_name, img1, color_code, value, vis_value) \
        group { name: "elm/button/base/"grp_name; \
                images { \
                        image: img1 COMP; \
                } \
        }
 
-#define STYLE_CALL_SIX_BUTTON_TOGGLE_PRESSED(grp_name, img1, color_code, value, vis_value) \
+#define ACTION_BTN_TOGGLE_PRESSED(grp_name, img1, color_code, value, vis_value) \
        group { name: "elm/button/base/"grp_name; \
                images { \
                        image: img1 COMP; \
                } \
        }
 
-#define STYLE_CALL_SIX_BUTTON_TOGGLE_DISABLED(grp_name, img1, color_code, value, vis_value) \
+#define ACTION_BTN_TOGGLE_DISABLED(grp_name, img1, color_code, value, vis_value) \
        group { name: "elm/button/base/"grp_name; \
                images { \
                        image: img1 COMP; \
                } \
        }
 
-#define STYLE_CALL_END_CONTACT_BUTTONS(grp_name, bg_image_color, pressed_bg_image_color, icon_top_pad, icon_height, icon_color, text_top_pad, text_height, text_color, button_height, img1) \
-       group { name: "elm/button/base/"grp_name; \
-               images { \
-                       image: img1 COMP; \
-               } \
-               script { \
-                       public button_state = 0; \
-               } \
-               parts { \
-                       part { name: "button_image"; \
-                               type: RECT; \
-                               mouse_events: 1; \
-                               scale: 1; \
-                               description { state: "default" 0.0; \
-                                       visible: 1; \
-                                       color_class: bg_image_color; \
-                               } \
-                               description { state: "disabled" 0.0; \
-                                       inherit: "default" 0.0; \
-                               } \
-                               description { state: "focused" 0.0; \
-                                       inherit: "default" 0.0; \
-                               } \
-                       } \
-                       part { name: "highlight"; \
-                               type: RECT; \
-                               mouse_events: 1; \
-                               scale: 1; \
-                               description { state: "default" 0.0; \
-                                       visible: 1; \
-                                       color: COLOR_BG_ALPHA; \
-                               } \
-                               description { state: "clicked" 0.0; \
-                                       visible: 1; \
-                                       color_class: AO010P; \
-                               } \
-                       } \
-                       part { name: "content_image"; \
-                               description { state: "default" 0.0; \
-                                       visible: 1; \
-                                       image { \
-                                               normal: img1; \
-                                       } \
-                                       align: 0.5 0.5; \
-                                       aspect: 0.5 1.0; \
-                                       rel1.relative: 0.0 (icon_top_pad/button_height); \
-                                       rel2.relative: 1.0 ((icon_top_pad+icon_height)/button_height); \
-                                       aspect_preference: VERTICAL; \
-                                       color_class: icon_color;\
-                                       visible: 1; \
-                                       min: icon_height icon_height; \
-                                       max: icon_height icon_height; \
-                               } \
-                       } \
-                       part { name: "elm.text"; \
-                               type: TEXT; \
-                               mouse_events: 0; \
-                               scale: 1; \
-                               description { state: "default" 0.0; \
-                                       visible: 1; \
-                                       fixed: 1 1; \
-                                       rel1 { relative: 0.0 text_top_pad/button_height; to: "button_image";} \
-                                       rel2 { relative: 1.0 ((text_top_pad+text_height)/button_height); to: "button_image";} \
-                                       text { \
-                                               text_class: text_color; \
-                                               min: 0 1; \
-                                               align: 0.5 0.5; \
-                                       } \
-                                       color_class: text_color; \
-                               } \
-                               description { state: "visible" 0.0; \
-                                       inherit: "default" 0.0; \
-                                       visible: 1; \
-                               } \
-                               description { state: "clicked" 0.0; \
-                                       inherit: "default" 0.0; \
-                                       visible: 1; \
-                               } \
-                               description { state: "disabled" 0.0; \
-                                       inherit: "default" 0.0; \
-                               } \
-                               description { state: "disabled_visible" 0.0; \
-                                       inherit: "default" 0.0; \
-                                       visible: 1; \
-                               } \
-                               description { state: "focused" 0.0; \
-                                       inherit: "default" 0.0; \
-                                       visible: 1; \
-                               } \
-                       } \
-                       part { name: "over2"; \
-                               type: RECT; \
-                               mouse_events: 1; \
-                               repeat_events: 1; \
-                               ignore_flags: ON_HOLD; \
-                               description { state: "default" 0.0; \
-                                       color: COLOR_BG_ALPHA; \
-                                       rel1 { relative: 0 0; } \
-                                       rel2 { relative: 1 1; } \
-                               } \
-                       } \
-                       part { name: "over3"; \
-                               type: RECT; \
-                               mouse_events: 1; \
-                               repeat_events: 1; \
-                               description { state: "default" 0.0; \
-                                       color: COLOR_BG_ALPHA; \
-                                       rel1 { relative: 0 0; } \
-                                       rel2 { relative: 1 1; } \
-                               } \
-                       } \
-                       part { name: "disabler"; \
-                               type: RECT; \
-                               description { state: "default" 0.0; \
-                                       color: COLOR_BG_ALPHA; \
-                                       visible: 0; \
-                               } \
-                               description { state: "disabled" 0.0; \
-                                       inherit: "default" 0.0; \
-                                       visible: 1; \
-                               } \
-                       } \
-               } \
-               programs { \
-                       program { name: "button_click"; \
-                               signal: "mouse,down,1"; \
-                               source: "over2"; \
-                               action: SIGNAL_EMIT "elm,action,press" ""; \
-                               after: "button_click_anim"; \
-                       } \
-                       program { name: "button_click_anim"; \
-                               action: STATE_SET "clicked" 0.0; \
-                               target: "highlight"; \
-                               target: "elm.text"; \
-                       } \
-                       program { name: "button_double_click"; \
-                               signal: "mouse,down,1,double"; \
-                               source: "over2"; \
-                               after: "button_click_anim"; \
-                       } \
-                       program { name: "button_unpress"; \
-                               action: SIGNAL_EMIT "elm,action,unpress" ""; \
-                       } \
-                       program { name: "button_mouseout_clicked"; \
-                               signal: "mouse,up,1"; \
-                               source: "over3"; \
-                               script { \
-                                       if (get_int(button_state) != 1) \
-                                               set_state(PART:"highlight", "default", 0.0); \
-                                               set_state(PART:"elm.text", "default", 0.0); \
-                                       } \
-                               after: button_unpress; \
-                       } \
-                       program { name: "touch_snd"; \
-                               signal: "mouse,clicked,1"; \
-                               source: "over2"; \
-                               action: RUN_PLUGIN "touch_sound"; \
-                               after: button_unclick3; \
-                       } \
-                       program { name: "button_unclick3"; \
-                               action: SIGNAL_EMIT "elm,action,click" ""; \
-                       } \
-                       program { name: "disable"; \
-                               signal: "elm,state,disabled"; \
-                               source: "elm"; \
-                               action: STATE_SET "disabled" 0.0; \
-                               target: "button_image"; \
-                               target: "elm.text"; \
-                               target: "disabler"; \
-                       } \
-                       program { name: "enable"; \
-                               signal: "elm,state,enabled"; \
-                               source: "elm"; \
-                               action: STATE_SET "default" 0.0; \
-                               target: "button_image"; \
-                               target: "elm.text"; \
-                               target: "disabler"; \
-                       } \
-                       program { name: "action_focus"; \
-                               signal: "elm,action,focus_highlight,show"; \
-                               source: "elm"; \
-                               action: STATE_SET "focused" 0.0; \
-                               target: "button_image"; \
-                               target: "elm.text"; \
-                       } \
-                       program { name: "action_unfocus"; \
-                               signal: "elm,action,focus_highlight,hide"; \
-                               source: "elm"; \
-                               action: STATE_SET "default" 0.0; \
-                               target: "button_image"; \
-                               target: "elm.text"; \
-                       } \
-               } \
-       }
-
-#define STYLE_CALL_TOGGLE_BUTTON(grp_name, bg_cc, bg_cc_p, img, img_cc, img_cc_p) \
+#define TOGGLE_BTN(grp_name, bg_cc, bg_cc_p, img, img_cc, img_cc_p) \
        group { name: "elm/button/base/"grp_name; \
                data { \
                        item: "focus_highlight" "on"; \
@@ -1507,55 +1312,45 @@ collections {
            }
        }
 
-////////////// elm/button/base/default -disabled  //////////////////////////////////////////////
-//////This is disabled effect for buttons of Six buttons layout and disabled effect is when making MO call////
-       STYLE_CALL_SIX_BUTTON_DISABLED("style_call_sixbtn_disabled_add", ICON_IMG_PATH"/call_btn_addcall.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON_DISABLED("style_call_sixbtn_disabled_keypad", ICON_IMG_PATH"/call_btn_keypad.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON_DISABLED("style_call_sixbtn_disabled_keypad_hide", ICON_IMG_PATH"/call_btn_keypad.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON_TOGGLE_DISABLED("style_call_sixbtn_disabled_speaker", ICON_IMG_PATH"/call_btn_volume.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON_TOGGLE_DISABLED("style_call_sixbtn_disabled_mute", ICON_IMG_PATH"/call_btn_mute.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON_TOGGLE_DISABLED("style_call_sixbtn_disabled_headset", ICON_IMG_PATH"/call_btn_bluetooth.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON_DISABLED("style_call_sixbtn_disabled_contacts", ICON_IMG_PATH"/call_btn_contacts.png", "AO008", 1, 1)
-
-////////////// elm/button/base/default  //////////////////////////////////////////////
-//////This effect is for buttons of Six buttons layout when they are enabled//////
-       STYLE_CALL_SIX_BUTTON("style_call_sixbtn_add", ICON_IMG_PATH"/call_btn_addcall.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON("style_call_sixbtn_keypad", ICON_IMG_PATH"/call_btn_keypad.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON("style_call_sixbtn_keypad_hide", ICON_IMG_PATH"/call_btn_keypad.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON_TOGGLE("style_call_sixbtn_speaker", ICON_IMG_PATH"/call_btn_volume.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON_TOGGLE_PRESSED("style_call_sixbtn_speaker_on", ICON_IMG_PATH"/call_btn_volume.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON_TOGGLE("style_call_sixbtn_mute", ICON_IMG_PATH"/call_btn_mute.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON_TOGGLE_PRESSED("style_call_sixbtn_mute_on", ICON_IMG_PATH"/call_btn_mute.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON_TOGGLE("style_call_sixbtn_headset", ICON_IMG_PATH"/call_btn_bluetooth.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON_TOGGLE_PRESSED("style_call_sixbtn_headset_on", ICON_IMG_PATH"/call_btn_bluetooth.png", "AO008", 1, 1)
-       STYLE_CALL_SIX_BUTTON("style_call_sixbtn_contacts", ICON_IMG_PATH"/call_btn_contacts.png", "AO008", 1, 1)
-
-////////////// elm/button/base/style_call_icon_only_end  //////////////////////////////////////////////
-/////////////This style is for End button in quickpanel view//////////////////////////////////////////////////////////
-       STYLE_CALL_TOGGLE_BUTTON(style_call_icon_only_qp_end, "AO013", "AO013P", ICON_IMG_PATH"/icon_end_call.png", "ATO017", "ATO017");
-       STYLE_CALL_TOGGLE_BUTTON(style_call_icon_only_qp_call, "AO012P1", "AO012P", ICON_IMG_PATH"/icon_call.png", "ATO017", "ATO017");
+/* elm/button/base/default - disabled*/
+/* This is disabled effect for buttons of Six buttons layout and disabled effect is when making MO call */
+       ACTION_BTN_DISABLED("callui_action_btn_add_disabled", ICON_IMG_PATH"/call_btn_addcall.png", "AO008", 1, 1)
+       ACTION_BTN_DISABLED("callui_action_btn_keypad_disabled", ICON_IMG_PATH"/call_btn_keypad.png", "AO008", 1, 1)
+       ACTION_BTN_TOGGLE_DISABLED("callui_action_btn_speaker_disabled", ICON_IMG_PATH"/call_btn_volume.png", "AO008", 1, 1)
+       ACTION_BTN_TOGGLE_DISABLED("callui_action_btn_mute_disabled", ICON_IMG_PATH"/call_btn_mute.png", "AO008", 1, 1)
+       ACTION_BTN_TOGGLE_DISABLED("callui_action_btn_headset_disabled", ICON_IMG_PATH"/call_btn_bluetooth.png", "AO008", 1, 1)
+       ACTION_BTN_DISABLED("callui_action_btn_contacts_disabled", ICON_IMG_PATH"/call_btn_contacts.png", "AO008", 1, 1)
 
-////////////// elm/button/base/style_call_icon_only_qp_mute //////////////////////////////////////////////
-/////////////This style is for mute/unhold button in quickpanel view//////////////////////////////////////////////////////////
-       STYLE_CALL_TOGGLE_BUTTON(style_call_icon_only_qp_mute, "AO001", "AO014P", ICON_IMG_PATH"/icon_mic.png", "AO019", "AO019P");
-       STYLE_CALL_TOGGLE_BUTTON(style_call_icon_only_qp_mute_on, "AO001", "AO014P", ICON_IMG_PATH"/icon_mic.png", "AO018", "AO018P");
+/* elm/button/base/default */
+/* This effect is for buttons of Six buttons layout when they are enabled */
+       ACTION_BTN("callui_action_btn_add", ICON_IMG_PATH"/call_btn_addcall.png", "AO008", 1, 1)
+       ACTION_BTN("callui_action_btn_keypad", ICON_IMG_PATH"/call_btn_keypad.png", "AO008", 1, 1)
+       ACTION_BTN_TOGGLE("callui_action_btn_speaker", ICON_IMG_PATH"/call_btn_volume.png", "AO008", 1, 1)
+       ACTION_BTN_TOGGLE_PRESSED("callui_action_btn_speaker_on", ICON_IMG_PATH"/call_btn_volume.png", "AO008", 1, 1)
+       ACTION_BTN_TOGGLE("callui_action_btn_mute", ICON_IMG_PATH"/call_btn_mute.png", "AO008", 1, 1)
+       ACTION_BTN_TOGGLE_PRESSED("callui_action_btn_mute_on", ICON_IMG_PATH"/call_btn_mute.png", "AO008", 1, 1)
+       ACTION_BTN_TOGGLE("callui_action_btn_headset", ICON_IMG_PATH"/call_btn_bluetooth.png", "AO008", 1, 1)
+       ACTION_BTN_TOGGLE_PRESSED("callui_action_btn_headset_on", ICON_IMG_PATH"/call_btn_bluetooth.png", "AO008", 1, 1)
+       ACTION_BTN("callui_action_btn_contacts", ICON_IMG_PATH"/call_btn_contacts.png", "AO008", 1, 1)
 
-////////////// elm/button/base/style_call_icon_only_qp_speaker //////////////////////////////////////////////
-/////////////This style is for speaker/unhold button in quickpanel view//////////////////////////////////////////////////////////
-       STYLE_CALL_TOGGLE_BUTTON(style_call_icon_only_qp_speaker, "AO001", "AO014P", ICON_IMG_PATH"/icon_speaker.png", "AO019", "AO019P");
-       STYLE_CALL_TOGGLE_BUTTON(style_call_icon_only_qp_speaker_on, "AO001", "AO014P", ICON_IMG_PATH"/icon_speaker.png", "AO018", "AO018P");
+/* elm/button/base/style_call_icon_only_end */
+/* This style is for End button in quickpanel view */
+       TOGGLE_BTN(callui_qp_btn_end, "AO013", "AO013P", ICON_IMG_PATH"/icon_end_call.png", "ATO017", "ATO017");
+       TOGGLE_BTN(callui_qp_btn_call, "AO012P1", "AO012P", ICON_IMG_PATH"/icon_call.png", "ATO017", "ATO017");
 
-/////////////This style is for speaker/resume button in quickpanel view//////////////////////////////////////////////////////////
-       STYLE_CALL_TOGGLE_BUTTON(style_call_icon_only_qp_resume, "AO001", "AO014P", ICON_IMG_PATH"/call_btn_resume.png", "AO019", "AO019P");
-       STYLE_CALL_TOGGLE_BUTTON(style_call_icon_only_qp_resume_on, "AO001", "AO014P", ICON_IMG_PATH"/call_btn_resume.png", "AO018", "AO018P");
+/* elm/button/base/callui_qp_btn_mute */
+/* This style is for mute/unhold button in quickpanel view */
+       TOGGLE_BTN(callui_qp_btn_mute, "AO001", "AO014P", ICON_IMG_PATH"/icon_mic.png", "AO019", "AO019P");
+       TOGGLE_BTN(callui_qp_btn_mute_on, "AO001", "AO014P", ICON_IMG_PATH"/icon_mic.png", "AO018", "AO018P");
 
-////////////// elm/button/base/text_only/call_end_grey  //////////////////////////////////////////////
-///////////// This style is for add to contacts button in end call view//////////////////////////////
-       STYLE_CALL_END_CONTACT_BUTTONS("style_call_end_create_contact_button", "AO026L1", "AO026P", 15, 60, "AO049", 79, 30, "ATO008", 130, ICON_IMG_PATH"/call_btn_end_03.png")
-       STYLE_CALL_END_CONTACT_BUTTONS("style_call_end_update_contact_button", "AO026L2", "AO026P", 15, 60, "AO049", 79, 30, "ATO008", 130, ICON_IMG_PATH"/call_btn_end_02.png")
-       STYLE_CALL_END_CONTACT_BUTTONS("style_call_end_view_contact_button", "AO026L1", "AO026P", 15, 60, "AO049", 79, 30, "ATO008", 130, ICON_IMG_PATH"/call_btn_end_01.png")
+/* elm/button/base/callui_qp_btn_speaker */
+/* This style is for speaker/unhold button in quickpanel view */
+       TOGGLE_BTN(callui_qp_btn_speaker, "AO001", "AO014P", ICON_IMG_PATH"/icon_speaker.png", "AO019", "AO019P");
+       TOGGLE_BTN(callui_qp_btn_speaker_on, "AO001", "AO014P", ICON_IMG_PATH"/icon_speaker.png", "AO018", "AO018P");
 
-       //STYLE_CALL_END_CONTACT_BUTTONS("style_call_end_contact_button_ln", A026L1, ICON_IMG_PATH"/call_btn_end_01.png")
+/* This style is for speaker/resume button in quickpanel view */
+       TOGGLE_BTN(callui_qp_btn_resume, "AO001", "AO014P", ICON_IMG_PATH"/call_btn_resume.png", "AO019", "AO019P");
+       TOGGLE_BTN(callui_qp_btn_resume_on, "AO001", "AO014P", ICON_IMG_PATH"/call_btn_resume.png", "AO018", "AO018P");
 
 group { name: "elm/button/base/call_icon_only";
       script {
index b5a28ef..07ca5ac 100644 (file)
@@ -280,6 +280,7 @@ group{
                        scale: 1;
                        description {
                                state: "default" 0.0;
+                               visible: 1;
                                rel1 { relative: MANAGE_BTN_L MANAGE_BTN_T; to: "background";}
                                rel2 { relative: MANAGE_BTN_R MANAGE_BTN_B; to: "background";}
                        }
@@ -417,6 +418,20 @@ group{
                                action: STATE_SET "dim" 0.0;
                                target: "caller_id_bg";
                        }
+                       program {
+                               name: "show_arrow";
+                               signal: "show,arrow";
+                               source: "";
+                               action: STATE_SET "default" 0.0;
+                               target: "manage_calls_icon_swallow";
+                       }
+                       program {
+                               name: "hide_arrow";
+                               signal: "hide,arrow";
+                               source: "";
+                               action: STATE_SET "hide" 0.0;
+                               target: "manage_calls_icon_swallow";
+                       }
                }
        }
 }
index ba8775f..2cdb1f4 100644 (file)
@@ -43,6 +43,16 @@ group {
                                state: "default" 0.0;
                        }
                }
+               part { name: "action_bar";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1{ relative: ACTION_BAR_LAYOUT_L ACTION_BAR_LAYOUT_T; }
+                               rel2{ relative: ACTION_BAR_LAYOUT_R ACTION_BAR_LAYOUT_B; }
+                               align: 0.5 0.0;
+                       }
+               }
                part { name: "keypadarea.clipper";
                        type: RECT;
                        mouse_events: 0;
@@ -147,50 +157,6 @@ group {
                        }
                }
 
-               part { name: "btn_area";
-                       type: RECT;
-                       scale: 1;
-                       description {
-                               state: "default" 0.0;
-                               visible: 1;
-                               rel1{ relative: SIX_BTN_LAYOUT_L SIX_BTN_LAYOUT_T; to: "background";}
-                               rel2{ relative: SIX_BTN_LAYOUT_R SIX_BTN_LAYOUT_B; to: "background";}
-                               color: COLOR_BG_ALPHA;
-                               align: 0.5 0.0;
-                       }
-                       description {
-                               state: "show" 0.0;
-                               inherit: "default" 0.0;
-                               visible: 1;
-                       }
-                       description {
-                               state: "hide" 0.0;
-                               inherit: "default" 0.0;
-                               visible: 0;
-                       }
-               }
-
-               part { name: "btn_region";
-                       type: SWALLOW;
-                       scale: 1;
-                       description {
-                               state: "default" 0.0;
-                               visible: 0;
-                               rel1 { relative: 0.0 0.0; to: "btn_area";}
-                               rel2 { relative: 1.0 1.0; to: "btn_area";}
-                               align: 0.5 0.0;
-                       }
-                       description {
-                               state: "show" 0.0;
-                               inherit: "default" 0.0;
-                               visible: 1;
-                       }
-                       description {
-                               state: "hide" 0.0;
-                               inherit: "default" 0.0;
-                               visible: 0;
-                       }
-               }
                part { name: "end_btn_area";
                        type: RECT;
                        scale: 1;
@@ -220,25 +186,6 @@ group {
        }
 
        programs {
-               program { name: "show_effect_allbtn";
-                       signal: "SHOW_EFFECT";
-                       source: "ALLBTN";
-                       action: STATE_SET "show" 0.0;
-                       transition: DECELERATE 0.5; //LINEAR 1.0;
-                       target: "btn_region";
-               }
-               program { name: "show_no_effect_allbtn";
-                       signal: "SHOW_NO_EFFECT";
-                       source: "ALLBTN";
-                       action: STATE_SET "show" 0.0;
-                       target: "btn_region";
-               }
-               program { name: "hide_btn_ly";
-                       signal: "HIDE_BTN_LY";
-                       source: "ALLBTN";
-                       action: STATE_SET "hide" 0.0;
-                       target: "btn_region";
-               }
                program { name: "show_keypadbtn_no_effect";
                        signal: "SHOW";
                        source: "KEYPAD_BTN";
@@ -260,7 +207,6 @@ group {
                        action: STATE_SET "default" 0.0;
                        target: "background";
                        target: "caller_info";
-                       target: "btn_region";
                }
        }
 }
index c9b9b74..434b03a 100644 (file)
@@ -343,15 +343,6 @@ group {
                        }
                }
                part {
-                       name: PART_SWALLOW_BTN_REGION;
-                       type: SWALLOW;
-                       description {
-                               state: "default" 0.0;
-                               rel1.relative: 0.0 SIX_BTN_LAYOUT_T;
-                               rel2.relative: 1.0 SIX_BTN_LAYOUT_B;
-                       }
-               }
-               part {
                        name: "end_btn_area";
                        type: RECT;
                        scale: 1;
diff --git a/src/callui-action-bar.c b/src/callui-action-bar.c
new file mode 100644 (file)
index 0000000..a60bd7c
--- /dev/null
@@ -0,0 +1,568 @@
+/*
+ * 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 <stdbool.h>
+#include <bluetooth_type.h>
+#include <bluetooth.h>
+
+#include "callui-action-bar.h"
+#include "callui-common-types.h"
+#include "callui-debug.h"
+#include "callui-view-elements.h"
+#include "callui-keypad.h"
+#include "callui-common.h"
+#include "callui-sound-manager.h"
+#include "callui-state-provider.h"
+#include "callui-view-caller-info-defines.h"
+
+#define PART_SWALLOW_ACTION_BAR "action_bar"
+
+typedef enum {
+       ACTION_BTN_TYPE_SPEAKER = 0,
+       ACTION_BTN_TYPE_KEYPAD,
+       ACTION_BTN_TYPE_BT,
+       ACTION_BTN_TYPE_ADD_CALL,
+       ACTION_BTN_TYPE_MUTE,
+       ACTION_BTN_TYPE_CONTACT,
+       ACTION_BTN_TYPE_MAX
+} callui_btn_type_e;
+
+struct _callui_action_bar {
+       Evas_Object *main_layout;
+       Evas_Object *buttons[ACTION_BTN_TYPE_MAX];
+       bool is_available[ACTION_BTN_TYPE_MAX];
+       callui_app_data_t *ad;
+};
+typedef struct _callui_action_bar _callui_action_bar_t;
+
+struct __action_btn_style {
+       char *normal;
+       char *active;
+       char *disable;
+};
+typedef struct __action_btn_style _action_btn_style_t;
+
+typedef callui_result_e (*action_btn_update_func)(callui_action_bar_h action_bar);
+
+struct __action_btn_params {
+       char *txt;
+       char *part;
+       action_btn_update_func update_func;
+       Evas_Smart_Cb click_cb_func;
+       _action_btn_style_t style;
+};
+typedef struct __action_btn_params __action_btn_params_t;
+
+static void __speaker_btn_click_cb(void *data, Evas_Object *obj, void *event_info);
+static void __keypad_btn_click_cb(void *data, Evas_Object *obj, void *event_info);
+static void __bluetooth_btn_click_cb(void *data, Evas_Object *obj, void *event_info);
+static void __add_call_btn_click_cb(void *data, Evas_Object *obj, void *event_info);
+static void __mute_btn_click_cb(void *data, Evas_Object *obj, void *event_info);
+static void __contacts_btn_click_cb(void *data, Evas_Object *obj, void *event_info);
+
+static callui_result_e __update_speaker_btn(callui_action_bar_h action_bar);
+static callui_result_e __update_keypad_btn(callui_action_bar_h action_bar);
+static callui_result_e __update_bluetooth_btn(callui_action_bar_h action_bar);
+static callui_result_e __update_add_call_btn(callui_action_bar_h action_bar);
+static callui_result_e __update_mute_btn(callui_action_bar_h action_bar);
+static callui_result_e __update_contacts_btn(callui_action_bar_h action_bar);
+
+static __action_btn_params_t btn_params[ACTION_BTN_TYPE_MAX] = {
+               {
+                               "IDS_CALL_BUTTON_SPEAKER", PART_TOP_FIRST_BTN,
+                               __update_speaker_btn, __speaker_btn_click_cb,
+                               {
+                                               "callui_action_btn_speaker",
+                                               "callui_action_btn_speaker_on",
+                                               "callui_action_btn_speaker_disabled"
+                               }
+               },
+               {
+                               "IDS_CALL_SK3_KEYPAD", PART_TOP_SECOND_BTN,
+                               __update_keypad_btn, __keypad_btn_click_cb,
+                               {
+                                               "callui_action_btn_keypad",
+                                               NULL,
+                                               "callui_action_btn_keypad_disabled"
+                               }
+               },
+               {
+                               "IDS_CALL_BUTTON_BLUETOOTH_ABB", PART_TOP_THIRD_BTN,
+                               __update_bluetooth_btn, __bluetooth_btn_click_cb,
+                               {
+                                               "callui_action_btn_headset",
+                                               "callui_action_btn_headset_on",
+                                               "callui_action_btn_headset_disabled"
+                               }
+               },
+               {
+                               "IDS_CALL_BUTTON_ADD_CALL", PART_BOTTOM_FIRST_BTN,
+                               __update_add_call_btn, __add_call_btn_click_cb,
+                               {
+                                               "callui_action_btn_add",
+                                               NULL,
+                                               "callui_action_btn_add_disabled"
+                               }
+               },
+               {
+                               "IDS_CALL_BUTTON_MUTE_ABB", PART_BOTTOM_SECOND_BTN,
+                               __update_mute_btn, __mute_btn_click_cb,
+                               {
+                                               "callui_action_btn_mute",
+                                               "callui_action_btn_mute_on",
+                                               "callui_action_btn_mute_disabled"
+                               }
+               },
+               {
+                               "IDS_CALL_BUTTON_CONTACTS", PART_BOTTOM_THIRD_BTN,
+                               __update_contacts_btn, __contacts_btn_click_cb,
+                               {
+                                               "callui_action_btn_contacts",
+                                               NULL,
+                                               "callui_action_btn_contacts_disabled"
+                               }
+               }
+};
+
+static callui_result_e __callui_action_bar_init(callui_action_bar_h action_bar, callui_app_data_t *ad);
+static void __callui_action_bar_deinit(callui_action_bar_h action_bar);
+
+static void __main_layout_del_cb(void *data, Evas *evas, Evas_Object *obj,void *event_info);
+static Evas_Object *__create_main_layout(callui_action_bar_h action_bar, Evas_Object *parent);
+static Evas_Object *__create_action_button( callui_action_bar_h action_bar, callui_btn_type_e type);
+
+static void __disable_action_button(Evas_Object *action_btn, callui_btn_type_e type);
+
+static void __update_btns_state(callui_action_bar_h action_bar);
+static void __update_all_btns(callui_action_bar_h action_bar);
+
+static void __call_state_event_cb(void *user_data, callui_call_event_type_e call_event_type, unsigned int call_id, callui_sim_slot_type_e sim_type);
+static void __audio_state_changed_cb(void *user_data, callui_audio_state_type_e state);
+static void __mute_state_changed_cb(void *user_data, bool is_enable);
+
+static void __disable_action_button(Evas_Object *action_btn, callui_btn_type_e type)
+{
+       elm_object_style_set(action_btn, btn_params[type].style.disable);
+       elm_object_disabled_set(action_btn, EINA_TRUE);
+}
+
+static void __speaker_btn_click_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALLUI_RETURN_IF_FAIL(data);
+
+       callui_app_data_t *ad = (callui_app_data_t *)data;
+       callui_result_e res = CALLUI_RESULT_FAIL;
+
+       callui_audio_state_type_e audio_state = _callui_sdm_get_audio_state(ad->sound_manager);
+       bool speaker_status = false;
+       if (audio_state == CALLUI_AUDIO_STATE_SPEAKER) {
+               speaker_status = true;
+       }
+
+       res = _callui_sdm_set_speaker_state(ad->sound_manager, !speaker_status);
+       if (res != CALLUI_RESULT_OK) {
+               err("_callui_sdm_set_speaker_state() failed. res[%d]", res);
+       }
+}
+
+static void __keypad_btn_click_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALLUI_RETURN_IF_FAIL(data);
+
+       callui_app_data_t *ad = (callui_app_data_t *)data;
+
+       if (_callui_keypad_get_show_status(ad->keypad)) {
+               _callui_keypad_hide(ad->keypad);
+       } else {
+               _callui_keypad_show(ad->keypad);
+       }
+}
+
+static void __bluetooth_btn_click_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALLUI_RETURN_IF_FAIL(data);
+
+       callui_app_data_t *ad = (callui_app_data_t *)data;
+
+       callui_audio_state_type_e audio_state = _callui_sdm_get_audio_state(ad->sound_manager);
+       switch (audio_state) {
+       case CALLUI_AUDIO_STATE_BT:
+               _callui_sdm_set_bluetooth_state(ad->sound_manager, false);
+               break;
+       case CALLUI_AUDIO_STATE_NONE:
+               err("Invalid audio state");
+               return;
+       default:
+               if (_callui_common_is_headset_conected(ad)) {
+                       _callui_sdm_set_bluetooth_state(ad->sound_manager, true);
+               } else {
+                       bt_adapter_state_e bt_state = BT_ADAPTER_DISABLED;
+                       int ret_code = bt_adapter_get_state(&bt_state);
+                       if (ret_code == BT_ERROR_NONE) {
+                               info("BT status value: %d", bt_state);
+                               if (bt_state == BT_ADAPTER_DISABLED) {
+                                       _callui_load_bluetooth_popup(ad);
+                               } else {
+                                       _callui_common_launch_bt_app(ad);
+                               }
+                       } else {
+                               err("Fail to get vconf key: %d", ret_code);
+                       }
+               }
+       }
+}
+
+static void __add_call_btn_click_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALLUI_RETURN_IF_FAIL(data);
+
+       _callui_common_launch_dialer(data);
+}
+
+static void __mute_btn_click_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALLUI_RETURN_IF_FAIL(data);
+
+       callui_app_data_t *ad = (callui_app_data_t *)data;
+
+       callui_result_e res = _callui_sdm_set_mute_state(ad->sound_manager,
+                       !_callui_sdm_get_mute_state(ad->sound_manager));
+       if (res != CALLUI_RESULT_OK) {
+               err("_callui_sdm_set_mute_state() failed. res[%d]", res);
+       }
+}
+
+static void __contacts_btn_click_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALLUI_RETURN_IF_FAIL(data);
+
+       _callui_common_launch_contacts(data);
+}
+
+static callui_result_e __update_speaker_btn(callui_action_bar_h action_bar)
+{
+       callui_app_data_t *ad = action_bar->ad;
+       Evas_Object *btn = action_bar->buttons[ACTION_BTN_TYPE_SPEAKER];
+       CALLUI_RETURN_VALUE_IF_FAIL(btn, CALLUI_RESULT_FAIL);
+
+       if (!action_bar->is_available[ACTION_BTN_TYPE_SPEAKER]) {
+               __disable_action_button(btn, ACTION_BTN_TYPE_SPEAKER);
+               return CALLUI_RESULT_OK;
+       }
+
+       callui_audio_state_type_e audio_state = _callui_sdm_get_audio_state(ad->sound_manager);
+       if (audio_state == CALLUI_AUDIO_STATE_SPEAKER) {
+               elm_object_style_set(btn, btn_params[ACTION_BTN_TYPE_SPEAKER].style.active);
+       } else {
+               elm_object_style_set(btn, btn_params[ACTION_BTN_TYPE_SPEAKER].style.normal);
+       }
+       elm_object_disabled_set(btn, EINA_FALSE);
+
+       return CALLUI_RESULT_OK;
+}
+
+static callui_result_e __update_keypad_btn(callui_action_bar_h action_bar)
+{
+       Evas_Object *btn = action_bar->buttons[ACTION_BTN_TYPE_KEYPAD];
+       CALLUI_RETURN_VALUE_IF_FAIL(btn, CALLUI_RESULT_FAIL);
+
+       if (!action_bar->is_available[ACTION_BTN_TYPE_KEYPAD]) {
+               __disable_action_button(btn, ACTION_BTN_TYPE_KEYPAD);
+               return CALLUI_RESULT_OK;
+       }
+
+       elm_object_style_set(btn, btn_params[ACTION_BTN_TYPE_KEYPAD].style.normal);
+       elm_object_disabled_set(btn, EINA_FALSE);
+
+       return CALLUI_RESULT_OK;
+}
+
+static callui_result_e __update_bluetooth_btn(callui_action_bar_h action_bar)
+{
+       callui_app_data_t *ad = action_bar->ad;
+       Evas_Object *btn = action_bar->buttons[ACTION_BTN_TYPE_BT];
+       CALLUI_RETURN_VALUE_IF_FAIL(btn, CALLUI_RESULT_FAIL);
+
+       if (!action_bar->is_available[ACTION_BTN_TYPE_BT]) {
+               __disable_action_button(btn, ACTION_BTN_TYPE_BT);
+               return CALLUI_RESULT_OK;
+       }
+
+       callui_audio_state_type_e audio_state = _callui_sdm_get_audio_state(ad->sound_manager);
+       if (audio_state == CALLUI_AUDIO_STATE_BT) {
+               elm_object_style_set(btn, btn_params[ACTION_BTN_TYPE_BT].style.active);
+       } else {
+               elm_object_style_set(btn, btn_params[ACTION_BTN_TYPE_BT].style.normal);
+       }
+       elm_object_disabled_set(btn, EINA_FALSE);
+
+       return CALLUI_RESULT_OK;
+}
+
+static callui_result_e __update_add_call_btn(callui_action_bar_h action_bar)
+{
+       Evas_Object *btn = action_bar->buttons[ACTION_BTN_TYPE_ADD_CALL];
+       CALLUI_RETURN_VALUE_IF_FAIL(btn, CALLUI_RESULT_FAIL);
+
+       if (!action_bar->is_available[ACTION_BTN_TYPE_ADD_CALL]) {
+               __disable_action_button(btn, ACTION_BTN_TYPE_ADD_CALL);
+               return CALLUI_RESULT_OK;
+       }
+
+       elm_object_style_set(btn, btn_params[ACTION_BTN_TYPE_ADD_CALL].style.normal);
+       elm_object_disabled_set(btn, EINA_FALSE);
+
+       return CALLUI_RESULT_OK;
+}
+
+static callui_result_e __update_mute_btn(callui_action_bar_h action_bar)
+{
+       callui_app_data_t *ad = action_bar->ad;
+       Evas_Object *btn = action_bar->buttons[ACTION_BTN_TYPE_MUTE];
+       CALLUI_RETURN_VALUE_IF_FAIL(btn, CALLUI_RESULT_FAIL);
+
+       if (!action_bar->is_available[ACTION_BTN_TYPE_MUTE]) {
+               __disable_action_button(btn, ACTION_BTN_TYPE_MUTE);
+               return CALLUI_RESULT_OK;
+       }
+
+       if (_callui_sdm_get_mute_state(ad->sound_manager)) {
+               elm_object_style_set(btn, btn_params[ACTION_BTN_TYPE_MUTE].style.active);
+       } else {
+               elm_object_style_set(btn, btn_params[ACTION_BTN_TYPE_MUTE].style.normal);
+       }
+       elm_object_disabled_set(btn, EINA_FALSE);
+
+       return CALLUI_RESULT_OK;
+}
+
+static callui_result_e __update_contacts_btn(callui_action_bar_h action_bar)
+{
+       Evas_Object *btn = action_bar->buttons[ACTION_BTN_TYPE_CONTACT];
+       CALLUI_RETURN_VALUE_IF_FAIL(btn, CALLUI_RESULT_FAIL);
+
+       if (!action_bar->is_available[ACTION_BTN_TYPE_CONTACT]) {
+               __disable_action_button(btn, ACTION_BTN_TYPE_CONTACT);
+               return CALLUI_RESULT_OK;
+       }
+
+       elm_object_style_set(btn, btn_params[ACTION_BTN_TYPE_CONTACT].style.normal);
+       elm_object_disabled_set(btn, EINA_FALSE);
+
+       return CALLUI_RESULT_OK;
+}
+
+static void __main_layout_del_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       CALLUI_RETURN_IF_FAIL(data);
+
+       callui_action_bar_h action_bar = data;
+
+       action_bar->main_layout = NULL;
+       _callui_action_bar_destroy(action_bar);
+}
+
+static Evas_Object *__create_main_layout(callui_action_bar_h action_bar, Evas_Object *parent)
+{
+       debug_enter();
+       Evas_Object *layout = _callui_load_edj(parent, EDJ_NAME, GRP_BUTTON_LAYOUT);
+       CALLUI_RETURN_NULL_IF_FAIL(layout);
+       evas_object_event_callback_add(layout, EVAS_CALLBACK_DEL, __main_layout_del_cb, action_bar);
+
+       return layout;
+}
+
+static Evas_Object *__create_action_button(
+               callui_action_bar_h action_bar,
+               callui_btn_type_e type)
+{
+       Evas_Object *parent = action_bar->main_layout;
+
+       Evas_Object *btn = elm_button_add(parent);
+       CALLUI_RETURN_NULL_IF_FAIL(btn);
+       action_bar->buttons[type] = btn;
+
+       if (btn_params[type].update_func) {
+               int res = btn_params[type].update_func(action_bar);
+               CALLUI_RETURN_NULL_IF_FAIL(res == CALLUI_RESULT_OK);
+       }
+
+       elm_object_domain_translatable_text_set(btn, CALLUI_TEXT_DOMAIN, btn_params[type].txt);
+       evas_object_smart_callback_add(btn, "clicked", btn_params[type].click_cb_func, action_bar->ad);
+       elm_object_part_content_set(parent, btn_params[type].part, btn);
+       evas_object_show(btn);
+
+       return btn;
+}
+
+static void __audio_state_changed_cb(void *user_data, callui_audio_state_type_e state)
+{
+       CALLUI_RETURN_IF_FAIL(user_data);
+
+       callui_action_bar_h action_bar = user_data;
+
+       __update_speaker_btn(action_bar);
+       __update_bluetooth_btn(action_bar);
+}
+
+static void __mute_state_changed_cb(void *user_data, bool is_enable)
+{
+       CALLUI_RETURN_IF_FAIL(user_data);
+
+       callui_action_bar_h action_bar = user_data;
+
+       __update_mute_btn(action_bar);
+}
+
+static void __update_btns_state(callui_action_bar_h action_bar)
+{
+       int i = 0;
+       for (; i < ACTION_BTN_TYPE_MAX; i++) {
+               action_bar->is_available[i] = true;
+       }
+
+       const callui_call_state_data_t *active =
+                       _callui_stp_get_call_data(action_bar->ad->state_provider, CALLUI_CALL_DATA_TYPE_ACTIVE);
+       const callui_call_state_data_t *held =
+                       _callui_stp_get_call_data(action_bar->ad->state_provider, CALLUI_CALL_DATA_TYPE_HELD);
+
+       if (active && active->is_dialing) {
+               action_bar->is_available[ACTION_BTN_TYPE_ADD_CALL] = false;
+               action_bar->is_available[ACTION_BTN_TYPE_MUTE] = false;
+               action_bar->is_available[ACTION_BTN_TYPE_CONTACT] = false;
+       } else if (active && held) {
+               action_bar->is_available[ACTION_BTN_TYPE_ADD_CALL] = false;
+       } else if (held) {
+               action_bar->is_available[ACTION_BTN_TYPE_KEYPAD] = false;
+               action_bar->is_available[ACTION_BTN_TYPE_MUTE] = false;
+       }
+}
+
+static void __update_all_btns(callui_action_bar_h action_bar)
+{
+       int i = 0;
+       for (; i < ACTION_BTN_TYPE_MAX; i++) {
+               if (btn_params[i].update_func) {
+                       btn_params[i].update_func(action_bar);
+               }
+       }
+}
+
+static void __call_state_event_cb(void *user_data,
+               callui_call_event_type_e call_event_type,
+               unsigned int call_id,
+               callui_sim_slot_type_e sim_type)
+{
+       debug_enter();
+       CALLUI_RETURN_IF_FAIL(user_data);
+
+       callui_action_bar_h action_bar = user_data;
+
+       __update_btns_state(action_bar);
+
+       __update_all_btns(action_bar);
+}
+
+static callui_result_e __callui_action_bar_init(callui_action_bar_h action_bar,        callui_app_data_t *ad)
+{
+       CALLUI_RETURN_VALUE_IF_FAIL(ad->sound_manager, CALLUI_RESULT_FAIL);
+       action_bar->ad = ad;
+       Evas_Object *parent = ad->main_ly;
+
+       _callui_sdm_add_audio_state_changed_cb(ad->sound_manager, __audio_state_changed_cb, action_bar);
+       _callui_sdm_add_mute_state_changed_cb(ad->sound_manager, __mute_state_changed_cb, action_bar);
+       _callui_stp_add_call_state_event_cb(ad->state_provider, __call_state_event_cb, action_bar);
+
+       __update_btns_state(action_bar);
+
+       action_bar->main_layout = __create_main_layout(action_bar, parent);
+       CALLUI_RETURN_VALUE_IF_FAIL(action_bar->main_layout, CALLUI_RESULT_ALLOCATION_FAIL);
+
+       Evas_Object *btn;
+       int i = 0;
+       for (; i < ACTION_BTN_TYPE_MAX; i++) {
+               btn = __create_action_button(action_bar, i);
+               CALLUI_RETURN_VALUE_IF_FAIL(btn, CALLUI_RESULT_ALLOCATION_FAIL);
+       }
+
+       return CALLUI_RESULT_OK;
+}
+
+callui_action_bar_h _callui_action_bar_create(callui_app_data_t *appdata)
+{
+       CALLUI_RETURN_NULL_IF_FAIL(appdata);
+
+       callui_action_bar_h action_bar = calloc(1, sizeof(_callui_action_bar_t));
+       CALLUI_RETURN_NULL_IF_FAIL(action_bar);
+
+       int res = __callui_action_bar_init(action_bar, appdata);
+       if (res != CALLUI_RESULT_OK) {
+               err("Init action bar failed. res[%d]", res);
+               _callui_action_bar_destroy(action_bar);
+               action_bar = NULL;
+       }
+       return action_bar;
+}
+
+static void __callui_action_bar_deinit(callui_action_bar_h action_bar)
+{
+       callui_app_data_t *ad = action_bar->ad;
+
+       evas_object_event_callback_del_full(action_bar->main_layout,
+                       EVAS_CALLBACK_DEL, __main_layout_del_cb, action_bar);
+
+       _callui_sdm_remove_audio_state_changed_cb(ad->sound_manager, __audio_state_changed_cb, action_bar);
+       _callui_sdm_remove_mute_state_changed_cb(ad->sound_manager, __mute_state_changed_cb, action_bar);
+       _callui_stp_remove_call_state_event_cb(ad->state_provider, __call_state_event_cb, action_bar);
+
+       int i = 0;
+       for (; i < ACTION_BTN_TYPE_MAX; i++) {
+               evas_object_smart_callback_del_full(action_bar->buttons[i], "clicked",
+                               btn_params[i].click_cb_func, ad);
+       }
+
+       evas_object_del(action_bar->main_layout);
+}
+
+void _callui_action_bar_destroy(callui_action_bar_h action_bar)
+{
+       CALLUI_RETURN_IF_FAIL(action_bar);
+
+       __callui_action_bar_deinit(action_bar);
+
+       free(action_bar);
+}
+
+void _callui_action_bar_show(callui_action_bar_h action_bar)
+{
+       CALLUI_RETURN_IF_FAIL(action_bar);
+
+       Evas_Object *parent = action_bar->ad->main_ly;
+
+       elm_object_part_content_set(parent, PART_SWALLOW_ACTION_BAR, action_bar->main_layout);
+       evas_object_show(action_bar->main_layout);
+}
+
+void _callui_action_bar_hide(callui_action_bar_h action_bar)
+{
+       CALLUI_RETURN_IF_FAIL(action_bar);
+
+       Evas_Object *parent = action_bar->ad->main_ly;
+
+       elm_object_part_content_unset(parent, PART_SWALLOW_ACTION_BAR);
+       evas_object_hide(action_bar->main_layout);
+}
index ab07397..9557e01 100755 (executable)
@@ -932,7 +932,6 @@ int _callui_common_send_reject_msg(void *appdata, char *reject_msg)
 bool _callui_is_on_handsfree_mode()
 {
        callui_app_data_t *ad = _callui_get_app_data();
-       //return (ad->speaker_status || ad->headset_status || ad->earphone_status);
 
        callui_audio_state_type_e type = _callui_sdm_get_audio_state(ad->sound_manager);
        return (type != CALLUI_AUDIO_STATE_RECEIVER && type != CALLUI_AUDIO_STATE_NONE);
index 6650537..ed16a38 100755 (executable)
@@ -30,7 +30,7 @@
 #define VC_KEYPAD_ENTRY_FONT "<font='Samsung Sans Num47:style=Light'>%s</>"
 #define VC_KEYAD_ENTRY_STYLE "DEFAULT='align=center color=#ffffffff font_size=76'"
 
-int __callui_keypad_init(callui_keypad_h keypad, Evas_Object *parent, callui_app_data_t *appdata);
+int __callui_keypad_init(callui_keypad_h keypad, callui_app_data_t *appdata);
 void __callui_keypad_deinit(callui_keypad_h keypad);
 
 static void __back_button_click_cb(void *data, Evas_Object *obj, void *event_info);
@@ -53,7 +53,6 @@ struct _callui_keypad {
 
        Evas_Object *btns_layout;
        Evas_Object *entry;
-       Evas_Object *parent;
 
        Eina_Bool is_keypad_show;
        Ecore_Timer *anim_timer;
@@ -70,10 +69,10 @@ struct _callui_keypad {
 
 typedef struct _callui_keypad _callui_keypad_t;
 
-int __callui_keypad_init(callui_keypad_h keypad, Evas_Object *parent, callui_app_data_t *appdata)
+int __callui_keypad_init(callui_keypad_h keypad, callui_app_data_t *appdata)
 {
        keypad->ad = appdata;
-       keypad->parent = parent;
+       Evas_Object *parent = appdata->main_ly;
 
        keypad->main_layout = _callui_load_edj(parent, EDJ_NAME, "keypad_layout");
        CALLUI_RETURN_VALUE_IF_FAIL(keypad->main_layout, CALLUI_RESULT_ALLOCATION_FAIL);
@@ -105,15 +104,14 @@ void __callui_keypad_deinit(callui_keypad_h keypad)
        }
 }
 
-callui_keypad_h _callui_keypad_create(Evas_Object *parent, void *appdata)
+callui_keypad_h _callui_keypad_create(callui_app_data_t *appdata)
 {
-       CALLUI_RETURN_NULL_IF_FAIL(parent);
        CALLUI_RETURN_NULL_IF_FAIL(appdata);
 
        callui_keypad_h keypad = calloc(1, sizeof(_callui_keypad_t));
        CALLUI_RETURN_NULL_IF_FAIL(keypad);
 
-       int res = __callui_keypad_init(keypad, parent, appdata);
+       int res = __callui_keypad_init(keypad, appdata);
        if (res != CALLUI_RESULT_OK) {
                err("Init keypad failed");
                _callui_keypad_destroy(keypad);
@@ -244,7 +242,8 @@ static void __on_hide_completed(void *data, Evas_Object *obj, const char *emissi
        _callui_common_dvc_set_lcd_timeout(LCD_TIMEOUT_SET);
 #endif
 
-       eext_object_event_callback_del(keypad->parent, EEXT_CALLBACK_BACK,      __back_button_click_cb);
+       Evas_Object *parent = ad->main_ly;
+       eext_object_event_callback_del(parent, EEXT_CALLBACK_BACK,      __back_button_click_cb);
 
        DELETE_ECORE_TIMER(keypad->anim_timer);
 
@@ -425,8 +424,8 @@ void _callui_keypad_show(callui_keypad_h keypad)
 #ifdef _DBUS_DVC_LSD_TIMEOUT_
        _callui_common_dvc_set_lcd_timeout(LCD_TIMEOUT_KEYPAD_SET);
 #endif
-
-       eext_object_event_callback_add(keypad->parent, EEXT_CALLBACK_BACK, __back_button_click_cb, keypad);
+       Evas_Object *parent = ad->main_ly;
+       eext_object_event_callback_add(parent, EEXT_CALLBACK_BACK, __back_button_click_cb, keypad);
 
        ecore_timer_del(keypad->anim_timer);
        keypad->anim_timer = ecore_timer_add(2.0, __down_arrow_animation_timeout_cb, keypad);
index 5b71f26..e1c5afa 100644 (file)
@@ -81,14 +81,12 @@ static callui_result_e __create_main_content(callui_view_dialing_h vd)
        CALLUI_RETURN_VALUE_IF_FAIL(vd->base_view.contents, CALLUI_RESULT_ALLOCATION_FAIL);
        elm_object_part_content_set(ad->main_ly, "elm.swallow.content", vd->base_view.contents);
 
-       Evas_Object *btn_layout = _callui_load_edj(vd->base_view.contents, EDJ_NAME, GRP_BUTTON_LAYOUT);
-       CALLUI_RETURN_VALUE_IF_FAIL(btn_layout, CALLUI_RESULT_ALLOCATION_FAIL);
-       elm_object_part_content_set(vd->base_view.contents, "btn_region", btn_layout);
-
        vd->caller_info = _callui_load_edj(vd->base_view.contents, EDJ_NAME, GRP_CALLER_INFO);
        CALLUI_RETURN_VALUE_IF_FAIL(vd->caller_info, CALLUI_RESULT_ALLOCATION_FAIL);
        elm_object_part_content_set(vd->base_view.contents, "caller_info", vd->caller_info);
 
+       _callui_action_bar_show(ad->action_bar);
+
        _callui_keypad_clear_input(ad->keypad);
        _callui_keypad_show_status_change_callback_set(ad->keypad, __keypad_show_state_change_cd, vd);
 
@@ -112,6 +110,8 @@ static callui_result_e __callui_view_dialing_ondestroy(call_view_data_base_t *vi
        callui_view_dialing_h vd = (callui_view_dialing_h)view_data;
        callui_app_data_t *ad = vd->base_view.ad;
 
+       _callui_action_bar_hide(ad->action_bar);
+
        _callui_keypad_hide_immediately(ad->keypad);
        _callui_keypad_show_status_change_callback_set(ad->keypad, NULL, NULL);
 
@@ -177,21 +177,6 @@ static callui_result_e __update_displayed_data(callui_view_dialing_h vd)
 
        _callui_show_caller_info_status(ad, _("IDS_CALL_POP_DIALLING"));
 
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_top_first_button(ad), CALLUI_RESULT_FAIL);
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_top_second_button(ad), CALLUI_RESULT_FAIL);
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_top_third_button(ad), CALLUI_RESULT_FAIL);
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_bottom_first_button_disabled(ad), CALLUI_RESULT_FAIL);
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_bottom_second_button_disabled(ad), CALLUI_RESULT_FAIL);
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_bottom_third_button_disabled(ad), CALLUI_RESULT_FAIL);
-
-       elm_object_signal_emit(vd->base_view.contents, "SHOW_EFFECT", "ALLBTN");
-
        if (now_call_data->is_emergency == EINA_TRUE) {
                elm_object_signal_emit(vd->caller_info, "set_emergency_mode", "");
        } else {
@@ -200,6 +185,8 @@ static callui_result_e __update_displayed_data(callui_view_dialing_h vd)
                }
        }
 
+       elm_object_signal_emit(vd->base_view.contents, "SHOW_EFFECT", "ALLBTN");
+
        evas_object_show(vd->base_view.contents);
 
        evas_object_hide(ad->main_ly);
index 84d4e60..e9648b9 100755 (executable)
@@ -112,455 +112,6 @@ static Evas_Object *__callui_get_caller_info_layout(void *data)
        return caller_info;
 }
 
-static Evas_Object *__callui_create_button_style(void *data, Evas_Object **p_button, char *part_name)
-{
-       Evas_Object *layout = NULL;
-       Evas_Object *btn_ly = NULL;
-       Evas_Object *sw = NULL;
-       callui_app_data_t *ad = (callui_app_data_t *)data;
-       CALLUI_RETURN_VALUE_IF_FAIL(ad, NULL);
-
-       layout = elm_object_part_content_get(ad->main_ly, "elm.swallow.content");
-       CALLUI_RETURN_VALUE_IF_FAIL(layout, NULL);
-
-       btn_ly = elm_object_part_content_get(layout, "btn_region");
-       CALLUI_RETURN_VALUE_IF_FAIL(btn_ly, NULL);
-
-       sw = elm_object_part_content_get(btn_ly, part_name);
-       if (sw) {
-               dbg("Object Already Exists, so Update Only");
-               *p_button = sw;
-       } else {
-               *p_button = elm_button_add(btn_ly);
-               elm_object_part_content_set(btn_ly, part_name, *p_button);
-       }
-
-       return btn_ly;
-}
-
-void _callui_spk_btn_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       CALLUI_RETURN_IF_FAIL(data);
-
-       callui_app_data_t *ad = (callui_app_data_t *)data;
-       callui_result_e res = CALLUI_RESULT_FAIL;
-
-       callui_audio_state_type_e audio_state = _callui_sdm_get_audio_state(ad->sound_manager);
-       bool speaker_status = false;
-       if (audio_state == CALLUI_AUDIO_STATE_SPEAKER) {
-               speaker_status = true;
-       }
-
-       res = _callui_sdm_set_speaker_state(ad->sound_manager, !speaker_status);
-       if (res != CALLUI_RESULT_OK) {
-               err("_callui_sdm_set_speaker_state() failed. res[%d]", res);
-               return;
-       }
-}
-
-static void __callui_contacts_btn_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       CALLUI_RETURN_IF_FAIL(data);
-
-       callui_app_data_t *ad = (callui_app_data_t *)data;
-
-       __callui_unload_more_option(ad);
-       _callui_common_launch_contacts(ad);
-}
-
-void _callui_mute_btn_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       CALLUI_RETURN_IF_FAIL(data);
-
-       callui_app_data_t *ad = (callui_app_data_t *)data;
-
-       callui_result_e res = _callui_sdm_set_mute_state(ad->sound_manager,
-                       !_callui_sdm_get_mute_state(ad->sound_manager));
-       if (res != CALLUI_RESULT_OK) {
-               err("_callui_sdm_set_mute_state() failed. res[%d]", res);
-               return;
-       }
-}
-
-static void __callui_headset_btn_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       CALLUI_RETURN_IF_FAIL(data);
-
-       callui_app_data_t *ad = (callui_app_data_t *)data;
-       Eina_Bool bupdate_btn = EINA_FALSE;
-
-       callui_audio_state_type_e audio_state = _callui_sdm_get_audio_state(ad->sound_manager);
-
-       switch (audio_state) {
-       case CALLUI_AUDIO_STATE_BT:
-               _callui_sdm_set_bluetooth_state(ad->sound_manager, false);
-               bupdate_btn = EINA_TRUE;
-               break;
-       case CALLUI_AUDIO_STATE_NONE:
-               err("Invalid audio state");
-               return;
-       default:
-               if (_callui_common_is_headset_conected(ad)) {
-                       _callui_sdm_set_bluetooth_state(ad->sound_manager, true);
-                       bupdate_btn = EINA_TRUE;
-               } else {
-                       bt_adapter_state_e bt_state = BT_ADAPTER_DISABLED;
-                       int ret_code = bt_adapter_get_state(&bt_state);
-                       if (ret_code == BT_ERROR_NONE) {
-                               info("BT status value: %d", bt_state);
-                               if (bt_state == BT_ADAPTER_DISABLED) {
-                                       _callui_load_bluetooth_popup(ad);
-                               } else {
-                                       _callui_common_launch_bt_app(ad);
-                               }
-                       } else {
-                               err("Fail to get vconf key: %d", ret_code);
-                       }
-                       bupdate_btn = EINA_FALSE;
-               }
-       }
-
-       if (bupdate_btn) {
-               /* Update Headset/Speaker buttons */
-               _callui_create_top_first_button(ad);
-               _callui_create_top_third_button(ad);
-               _callui_create_bottom_third_button(ad);
-       }
-}
-
-static void __callui_addcall_btn_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       CALLUI_RETURN_IF_FAIL(data);
-
-       _callui_common_launch_dialer(data);
-}
-
-static void __callui_keypad_btn_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       CALLUI_RETURN_IF_FAIL(data);
-
-       callui_app_data_t *ad = (callui_app_data_t *)data;
-
-       if (_callui_keypad_get_show_status(ad->keypad)) {
-               _callui_keypad_hide(ad->keypad);
-       } else {
-               _callui_keypad_show(ad->keypad);
-       }
-}
-
-static void __top_first_audio_st_changed_cb(void *user_data, callui_audio_state_type_e state)
-{
-       CALLUI_RETURN_IF_FAIL(user_data);
-
-       Evas_Object *btn = (Evas_Object *)user_data;
-       if (state == CALLUI_AUDIO_STATE_SPEAKER) {
-               elm_object_style_set(btn, "style_call_sixbtn_speaker_on");
-       } else {
-               elm_object_style_set(btn, "style_call_sixbtn_speaker");
-       }
-}
-
-static void __top_first_button_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
-       CALLUI_RETURN_IF_FAIL(data);
-
-       callui_app_data_t *ad = (callui_app_data_t *)data;
-       _callui_sdm_remove_audio_state_changed_cb(ad->sound_manager, __top_first_audio_st_changed_cb, obj);
-}
-
-/* Speaker Button ENABLED */
-Evas_Object *_callui_create_top_first_button(callui_app_data_t *ad)
-{
-       Evas_Object *btn = NULL;
-       CALLUI_RETURN_VALUE_IF_FAIL(ad != NULL, NULL);
-       __callui_create_button_style(ad, &btn, PART_TOP_FIRST_BTN);
-
-       callui_audio_state_type_e audio_state = _callui_sdm_get_audio_state(ad->sound_manager);
-       if (audio_state == CALLUI_AUDIO_STATE_SPEAKER) {
-               elm_object_style_set(btn, "style_call_sixbtn_speaker_on");
-       } else {
-               elm_object_style_set(btn, "style_call_sixbtn_speaker");
-       }
-
-       elm_object_text_set(btn, _("IDS_CALL_BUTTON_SPEAKER"));
-
-       evas_object_smart_callback_del_full(btn, "clicked", _callui_spk_btn_cb, ad);
-       evas_object_smart_callback_add(btn, "clicked", _callui_spk_btn_cb, ad);
-
-       evas_object_event_callback_del_full(btn, EVAS_CALLBACK_DEL, __top_first_button_del_cb, ad);
-       evas_object_event_callback_add(btn, EVAS_CALLBACK_DEL, __top_first_button_del_cb, ad);
-
-       _callui_sdm_remove_audio_state_changed_cb(ad->sound_manager, __top_first_audio_st_changed_cb, btn);
-       _callui_sdm_add_audio_state_changed_cb(ad->sound_manager, __top_first_audio_st_changed_cb, btn);
-
-       elm_object_disabled_set(btn, EINA_FALSE);
-
-       return btn;
-}
-
-/* Speaker Button DISABLED */
-Evas_Object *_callui_create_top_first_button_disabled(callui_app_data_t *ad)
-{
-       Evas_Object *btn = NULL;
-       CALLUI_RETURN_VALUE_IF_FAIL(ad != NULL, NULL);
-
-       __callui_create_button_style(ad, &btn, PART_TOP_FIRST_BTN);
-
-       elm_object_style_set(btn, "style_call_sixbtn_disabled_speaker");
-
-       elm_object_text_set(btn, _("IDS_CALL_BUTTON_SPEAKER"));
-
-       elm_object_disabled_set(btn, EINA_TRUE);
-
-       return btn;
-}
-
-/* Keypad Button ENABLED */
-Evas_Object *_callui_create_top_second_button(callui_app_data_t *ad)
-{
-       Evas_Object *btn = NULL;
-       CALLUI_RETURN_VALUE_IF_FAIL(ad != NULL, NULL);
-
-       __callui_create_button_style(ad, &btn, PART_TOP_SECOND_BTN);
-
-       elm_object_style_set(btn, "style_call_sixbtn_keypad");
-
-       elm_object_text_set(btn, _("IDS_CALL_SK3_KEYPAD"));
-
-       evas_object_smart_callback_del_full(btn, "clicked", __callui_keypad_btn_cb, ad);
-       evas_object_smart_callback_add(btn, "clicked", __callui_keypad_btn_cb, ad);
-
-       elm_object_disabled_set(btn, EINA_FALSE);
-
-       return btn;
-}
-
-/* Keypad Button DISABLED */
-Evas_Object *_callui_create_top_second_button_disabled(callui_app_data_t *ad)
-{
-       CALLUI_RETURN_VALUE_IF_FAIL(ad != NULL, NULL);
-       Evas_Object *btn = NULL;
-
-       __callui_create_button_style(ad, &btn, PART_TOP_SECOND_BTN);
-
-       elm_object_style_set(btn, "style_call_sixbtn_disabled_keypad");
-
-       elm_object_text_set(btn, _("IDS_CALL_SK3_KEYPAD"));
-
-       elm_object_disabled_set(btn, EINA_TRUE);
-
-       return btn;
-}
-
-static void __top_third_audio_st_changed_cb(void *user_data, callui_audio_state_type_e state)
-{
-       CALLUI_RETURN_IF_FAIL(user_data);
-
-       Evas_Object *btn = (Evas_Object *)user_data;
-       if (state == CALLUI_AUDIO_STATE_BT) {
-               elm_object_style_set(btn, "style_call_sixbtn_headset_on");
-       } else {
-               elm_object_style_set(btn, "style_call_sixbtn_headset");
-       }
-}
-
-static void __top_third_button_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
-       CALLUI_RETURN_IF_FAIL(data);
-
-       callui_app_data_t *ad = (callui_app_data_t *)data;
-       _callui_sdm_remove_audio_state_changed_cb(ad->sound_manager, __top_third_audio_st_changed_cb, obj);
-}
-
-/* HeadSet Button ENABLED */
-Evas_Object *_callui_create_top_third_button(callui_app_data_t *ad)
-{
-       Evas_Object *btn = NULL;
-       CALLUI_RETURN_VALUE_IF_FAIL(ad != NULL, NULL);
-
-       __callui_create_button_style(ad, &btn, PART_TOP_THIRD_BTN);
-
-       callui_audio_state_type_e audio_state = _callui_sdm_get_audio_state(ad->sound_manager);
-       if (audio_state == CALLUI_AUDIO_STATE_BT) {
-               elm_object_style_set(btn, "style_call_sixbtn_headset_on");
-       } else {
-               elm_object_style_set(btn, "style_call_sixbtn_headset");
-       }
-
-       elm_object_text_set(btn, _("IDS_CALL_BUTTON_BLUETOOTH_ABB"));
-
-       evas_object_smart_callback_del(btn, "clicked", __callui_headset_btn_cb);
-       evas_object_smart_callback_add(btn, "clicked", __callui_headset_btn_cb, ad);
-
-       evas_object_event_callback_del_full(btn, EVAS_CALLBACK_DEL, __top_third_button_del_cb, ad);
-       evas_object_event_callback_add(btn, EVAS_CALLBACK_DEL, __top_third_button_del_cb, ad);
-
-       _callui_sdm_remove_audio_state_changed_cb(ad->sound_manager, __top_third_audio_st_changed_cb, btn);
-       _callui_sdm_add_audio_state_changed_cb(ad->sound_manager, __top_third_audio_st_changed_cb, btn);
-
-       elm_object_disabled_set(btn, EINA_FALSE);
-
-       return btn;
-}
-
-/* HeadSet Button DISABLED */
-Evas_Object *_callui_create_top_third_button_disabled(callui_app_data_t *ad)
-{
-       Evas_Object *btn = NULL;
-       CALLUI_RETURN_VALUE_IF_FAIL(ad != NULL, NULL);
-
-       __callui_create_button_style(ad, &btn, PART_TOP_THIRD_BTN);
-
-       elm_object_style_set(btn, "style_call_sixbtn_disabled_headset");
-
-       elm_object_text_set(btn, _("IDS_CALL_BUTTON_BLUETOOTH_ABB"));
-
-       elm_object_disabled_set(btn, EINA_TRUE);
-
-       return btn;
-}
-
-/* Add-Call/Join button ENABLED*/
-Evas_Object *_callui_create_bottom_first_button(callui_app_data_t *ad)
-{
-       CALLUI_RETURN_VALUE_IF_FAIL(ad != NULL, NULL);
-       Evas_Object *btn = NULL;
-
-       __callui_create_button_style(ad, &btn, PART_BOTTOM_FIRST_BTN);
-
-       elm_object_style_set(btn, "style_call_sixbtn_add");
-
-       elm_object_text_set(btn, _("IDS_CALL_BUTTON_ADD_CALL"));
-
-       evas_object_smart_callback_del_full(btn, "clicked", __callui_addcall_btn_cb, ad);
-       evas_object_smart_callback_add(btn, "clicked", __callui_addcall_btn_cb, ad);
-
-       elm_object_disabled_set(btn, EINA_FALSE);
-
-       return btn;
-}
-
-/* Add-Call/Join Button DISABLED */
-Evas_Object *_callui_create_bottom_first_button_disabled(callui_app_data_t *ad)
-{
-       CALLUI_RETURN_VALUE_IF_FAIL(ad != NULL, NULL);
-       Evas_Object *btn = NULL;
-
-       __callui_create_button_style(ad, &btn, PART_BOTTOM_FIRST_BTN);
-
-       elm_object_style_set(btn, "style_call_sixbtn_disabled_add");
-
-       elm_object_text_set(btn, _("IDS_CALL_BUTTON_ADD_CALL"));
-
-       elm_object_disabled_set(btn, EINA_TRUE);
-
-       return btn;
-}
-
-static void __bootom_second_mute_st_changed_cb(void *user_data, bool is_enable)
-{
-       CALLUI_RETURN_IF_FAIL(user_data);
-
-       Evas_Object *btn = (Evas_Object *)user_data;
-       if (is_enable) {
-               elm_object_style_set(btn, "style_call_sixbtn_mute_on");
-       } else {
-               elm_object_style_set(btn, "style_call_sixbtn_mute");
-       }
-}
-
-static void __bootom_second_button_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
-       CALLUI_RETURN_IF_FAIL(data);
-
-       callui_app_data_t *ad = (callui_app_data_t *)data;
-       _callui_sdm_remove_mute_state_changed_cb(ad->sound_manager, __bootom_second_mute_st_changed_cb, obj);
-}
-
-/* Mute Button ENABLED */
-Evas_Object *_callui_create_bottom_second_button(callui_app_data_t *ad)
-{
-       Evas_Object *btn = NULL;
-       CALLUI_RETURN_VALUE_IF_FAIL(ad != NULL, NULL);
-
-       __callui_create_button_style(ad, &btn, PART_BOTTOM_SECOND_BTN);
-
-       if (_callui_sdm_get_mute_state(ad->sound_manager)) {
-               elm_object_style_set(btn, "style_call_sixbtn_mute_on");
-       } else {
-               elm_object_style_set(btn, "style_call_sixbtn_mute");
-       }
-
-       elm_object_text_set(btn, _("IDS_CALL_BUTTON_MUTE_ABB"));
-
-       evas_object_smart_callback_del_full(btn, "clicked", _callui_mute_btn_cb, ad);
-       evas_object_smart_callback_add(btn, "clicked", _callui_mute_btn_cb, ad);
-
-       evas_object_event_callback_del_full(btn, EVAS_CALLBACK_DEL, __bootom_second_button_del_cb, ad);
-       evas_object_event_callback_add(btn, EVAS_CALLBACK_DEL, __bootom_second_button_del_cb, ad);
-
-       _callui_sdm_remove_mute_state_changed_cb(ad->sound_manager, __bootom_second_mute_st_changed_cb, btn);
-       _callui_sdm_add_mute_state_changed_cb(ad->sound_manager, __bootom_second_mute_st_changed_cb, btn);
-
-       elm_object_disabled_set(btn, EINA_FALSE);
-
-       return btn;
-}
-
-/* Mute Button DISABLED */
-Evas_Object *_callui_create_bottom_second_button_disabled(callui_app_data_t *ad)
-{
-       CALLUI_RETURN_VALUE_IF_FAIL(ad != NULL, NULL);
-       Evas_Object *btn = NULL;
-
-       __callui_create_button_style(ad, &btn, PART_BOTTOM_SECOND_BTN);
-
-       elm_object_style_set(btn, "style_call_sixbtn_disabled_mute");
-
-       elm_object_text_set(btn, _("IDS_CALL_BUTTON_MUTE_ABB"));
-
-       elm_object_disabled_set(btn, EINA_TRUE);
-
-       return btn;
-}
-
-/* Contacts Button ENABLED */
-Evas_Object *_callui_create_bottom_third_button(callui_app_data_t *ad)
-{
-       CALLUI_RETURN_VALUE_IF_FAIL(ad != NULL, NULL);
-       Evas_Object *btn = NULL;
-
-       __callui_create_button_style(ad, &btn, PART_BOTTOM_THIRD_BTN);
-
-       elm_object_style_set(btn, "style_call_sixbtn_contacts");
-
-       elm_object_text_set(btn, _("IDS_CALL_BUTTON_CONTACTS"));
-
-       evas_object_smart_callback_del_full(btn, "clicked", __callui_contacts_btn_cb, ad);
-       evas_object_smart_callback_add(btn, "clicked", __callui_contacts_btn_cb, ad);
-
-       elm_object_disabled_set(btn, EINA_FALSE);
-
-       return btn;
-}
-
-/* Contacts Button DISABLED */
-Evas_Object *_callui_create_bottom_third_button_disabled(callui_app_data_t *ad)
-{
-       CALLUI_RETURN_VALUE_IF_FAIL(ad != NULL, NULL);
-       Evas_Object *btn = NULL;
-
-       __callui_create_button_style(ad, &btn, PART_BOTTOM_THIRD_BTN);
-
-       elm_object_style_set(btn, "style_call_sixbtn_disabled_contacts");
-
-       elm_object_text_set(btn, _("IDS_CALL_BUTTON_CONTACTS"));
-
-       elm_object_disabled_set(btn, EINA_TRUE);
-
-       return btn;
-}
-
 Evas_Object *_callui_create_end_call_button(Evas_Object *parent, Evas_Smart_Cb cb_func, void *data)
 {
        CALLUI_RETURN_VALUE_IF_FAIL(parent != NULL, NULL);
@@ -583,19 +134,6 @@ Evas_Object *_callui_create_end_call_button(Evas_Object *parent, Evas_Smart_Cb c
        return btn;
 }
 
-void _callui_destroy_end_call_button(Evas_Object *parent)
-{
-       CALLUI_RETURN_IF_FAIL(parent != NULL);
-       Evas_Object *btn = NULL;
-
-       btn = elm_object_part_content_get(parent, PART_END_BTN);
-       if (btn) {
-               evas_object_del(btn);
-               btn = NULL;
-       }
-       return;
-}
-
 /* Creates thumbnail */
 Evas_Object *_callui_create_thumbnail(Evas_Object *parent, const char *path, thumbnail_type type)
 {
index d4a48b8..fa4fb11 100755 (executable)
@@ -88,9 +88,7 @@ static callui_result_e __create_main_content(callui_view_mc_conf_h vd)
        elm_object_part_content_set(vd->caller_info, "manage_calls_icon_swallow", manage_calls_ly);
        edje_object_signal_callback_add(_EDJ(manage_calls_ly), "mouse,clicked,1", "btn", __manage_calls_btn_clicked_cb, vd);
 
-       Evas_Object *btn_layout = _callui_load_edj(vd->base_view.contents, EDJ_NAME, GRP_BUTTON_LAYOUT);
-       CALLUI_RETURN_VALUE_IF_FAIL(btn_layout, CALLUI_RESULT_ALLOCATION_FAIL);
-       elm_object_part_content_set(vd->base_view.contents, "btn_region", btn_layout);
+       _callui_action_bar_show(ad->action_bar);
 
        _callui_keypad_clear_input(ad->keypad);
        _callui_keypad_show_status_change_callback_set(ad->keypad, __keypad_show_state_change_cd, vd);
@@ -168,12 +166,13 @@ static callui_result_e __update_displayed_data(callui_view_mc_conf_h vd)
        FREE(vd->base_view.call_duration_tm);
 
        if (is_held) {
+               elm_object_signal_emit(vd->caller_info, "hide,arrow", "");
+
                snprintf(status_txt, sizeof(status_txt), _("IDS_CALL_BODY_ON_HOLD_ABB"));
                _callui_show_caller_info_status(ad, status_txt);
-               elm_object_signal_emit(vd->caller_info, "set-hold-state", "call-screen");
 
        } else {
-               elm_object_signal_emit(vd->caller_info, "set-unhold-state", "call-screen");
+               elm_object_signal_emit(vd->caller_info, "show,arrow", "");
 
                vd->base_view.call_duration_tm = _callui_stp_get_call_duration(ad->state_provider, CALLUI_CALL_DATA_TYPE_ACTIVE);
                CALLUI_RETURN_VALUE_IF_FAIL(vd->base_view.call_duration_tm, CALLUI_RESULT_ALLOCATION_FAIL);
@@ -190,30 +189,6 @@ static callui_result_e __update_displayed_data(callui_view_mc_conf_h vd)
        snprintf(buf, CALLUI_BUF_MEMBER_SIZE, status, call_data->conf_member_count);
        _callui_show_caller_info_number(ad, buf);
 
-       if (is_held) {
-               CALLUI_RETURN_VALUE_IF_FAIL(
-                               _callui_create_top_second_button_disabled(ad), CALLUI_RESULT_FAIL);
-               CALLUI_RETURN_VALUE_IF_FAIL(
-                               _callui_create_bottom_second_button_disabled(ad), CALLUI_RESULT_FAIL);
-       } else {
-               if (_callui_keypad_get_show_status(vd->keypad)) {
-                       _callui_keypad_hide(vd->keypad);
-               }
-               CALLUI_RETURN_VALUE_IF_FAIL(
-                               _callui_create_top_second_button(ad), CALLUI_RESULT_FAIL);
-               CALLUI_RETURN_VALUE_IF_FAIL(
-                               _callui_create_bottom_second_button(ad), CALLUI_RESULT_FAIL);
-       }
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_top_third_button(ad), CALLUI_RESULT_FAIL);
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_bottom_first_button(ad), CALLUI_RESULT_FAIL);
-
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_top_first_button(ad), CALLUI_RESULT_FAIL);
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_bottom_third_button(ad), CALLUI_RESULT_FAIL);
-
        elm_object_signal_emit(vd->base_view.contents, "SHOW_NO_EFFECT", "ALLBTN");
 
        evas_object_show(vd->base_view.contents);
@@ -231,6 +206,11 @@ static callui_result_e __callui_view_multi_call_conf_ondestroy(call_view_data_ba
        callui_view_mc_conf_h vd = (callui_view_mc_conf_h)view_data;
        callui_app_data_t *ad = vd->base_view.ad;
 
+       _callui_action_bar_hide(ad->action_bar);
+
+       _callui_keypad_hide_immediately(ad->keypad);
+       _callui_keypad_show_status_change_callback_set(ad->keypad, NULL, NULL);
+
        DELETE_ECORE_TIMER(vd->base_view.call_duration_timer);
        free(vd->base_view.call_duration_tm);
 
@@ -239,9 +219,6 @@ static callui_result_e __callui_view_multi_call_conf_ondestroy(call_view_data_ba
                ad->ctxpopup = NULL;
        }
 
-       _callui_keypad_hide_immediately(ad->keypad);
-       _callui_keypad_show_status_change_callback_set(ad->keypad, NULL, NULL);
-
        eext_object_event_callback_del(vd->base_view.contents, EEXT_CALLBACK_MORE, __more_btn_click_cb);
 
        DELETE_EVAS_OBJECT(vd->base_view.contents);
index b44c9cc..23d4027 100755 (executable)
@@ -111,15 +111,17 @@ static callui_result_e _callui_view_multi_call_split_ondestroy(call_view_data_ba
        callui_view_mc_split_h vd = (callui_view_mc_split_h)view_data;
        callui_app_data_t *ad = vd->base_view.ad;
 
+       _callui_action_bar_show(ad->action_bar);
+
+       _callui_keypad_hide_immediately(ad->keypad);
+       _callui_keypad_show_status_change_callback_set(ad->keypad, NULL, NULL);
+
        DELETE_ECORE_TIMER(vd->base_view.call_duration_timer);
 
        free(vd->base_view.call_duration_tm);
 
        DELETE_EVAS_OBJECT(vd->base_view.contents);
 
-       _callui_keypad_hide_immediately(ad->keypad);
-       _callui_keypad_show_status_change_callback_set(ad->keypad, NULL, NULL);
-
        free(vd);
 
        return CALLUI_RESULT_OK;
@@ -147,9 +149,7 @@ static callui_result_e __create_main_content(callui_view_mc_split_h vd)
        callui_result_e res = __create_merge_swap_btns(vd->caller_info, ad);
        CALLUI_RETURN_VALUE_IF_FAIL(res == CALLUI_RESULT_OK, res);
 
-       Evas_Object *btn_region = _callui_load_edj(vd->base_view.contents, EDJ_NAME, GRP_BUTTON_LAYOUT);
-       CALLUI_RETURN_VALUE_IF_FAIL(btn_region, CALLUI_RESULT_ALLOCATION_FAIL);
-       elm_object_part_content_set(vd->base_view.contents, PART_SWALLOW_BTN_REGION, btn_region);
+       _callui_action_bar_show(ad->action_bar);
 
        _callui_keypad_clear_input(ad->keypad);
        _callui_keypad_show_status_change_callback_set(ad->keypad, __keypad_show_state_change_cd, vd);
@@ -312,20 +312,6 @@ static callui_result_e __update_displayed_data(callui_view_mc_split_h vd)
        vd->base_view.call_duration_timer = ecore_timer_add(0.1, __call_duration_timer_cb, vd);
        CALLUI_RETURN_VALUE_IF_FAIL(vd->base_view.call_duration_timer, CALLUI_RESULT_ALLOCATION_FAIL);
 
-
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_top_first_button(ad), CALLUI_RESULT_FAIL);
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_top_second_button(ad), CALLUI_RESULT_FAIL);
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_top_third_button(ad), CALLUI_RESULT_FAIL);
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_bottom_first_button_disabled(ad), CALLUI_RESULT_FAIL);
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_bottom_second_button(ad), CALLUI_RESULT_FAIL);
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_bottom_third_button(ad), CALLUI_RESULT_FAIL);
-
        evas_object_show(vd->base_view.contents);
 
        evas_object_hide(ad->main_ly);
index 9adb1af..3e7923f 100755 (executable)
@@ -89,23 +89,23 @@ static void __update_speaker_btn(callui_qp_mc_h qp);
 static __btn_params_t btn_params[QP_MC_BTN_TYPE_MAX] = {
                {
                                "swallow.call_button",__caller_btn_click_cb, __update_call_btn,
-                               {"style_call_icon_only_qp_call", NULL}
+                               {"callui_qp_btn_call", NULL}
                },
                {
                                "swallow.resume_button", __resume_btn_click_cb, __update_resume_btn,
-                               {"style_call_icon_only_qp_resume", "style_call_icon_only_qp_resume_on"}
+                               {"callui_qp_btn_resume", "callui_qp_btn_resume_on"}
                },
                {
                                "swallow.mute_button", __mute_btn_click_cb, __update_mute_btn,
-                               {"style_call_icon_only_qp_mute", "style_call_icon_only_qp_mute_on"}
+                               {"callui_qp_btn_mute", "callui_qp_btn_mute_on"}
                },
                {
                                "swallow.speaker_button", __speaker_btn_click_cb, __update_speaker_btn,
-                               {"style_call_icon_only_qp_speaker", "style_call_icon_only_qp_speaker_on"}
+                               {"callui_qp_btn_speaker", "callui_qp_btn_speaker_on"}
                },
                {
                                "swallow.end_button", __end_btn_click_cb, NULL,
-                               {"style_call_icon_only_qp_end", NULL}
+                               {"callui_qp_btn_end", NULL}
                }
 };
 
@@ -425,9 +425,6 @@ static Eina_Bool __active_call_duration_timer_cb(void* data)
 
 static void __init_split_call_duration_timer(callui_qp_mc_h qp)
 {
-       DELETE_ECORE_TIMER(qp->call_duration_timer);
-       FREE(qp->call_duration_tm);
-
        qp->call_duration_tm = _callui_stp_get_call_duration(qp->ad->state_provider, CALLUI_CALL_DATA_TYPE_ACTIVE);
        CALLUI_RETURN_IF_FAIL(qp->call_duration_tm);
        __set_split_call_duration_time(qp->call_duration_tm, qp->quickpanel_layout, "txt_timer");
index 1acab25..2f4198f 100644 (file)
@@ -26,6 +26,7 @@
 #include "callui-common.h"
 #include "callui-view-caller-info-defines.h"
 #include "callui-state-provider.h"
+#include "callui-action-bar.h"
 
 #define         VIEW_SINGLE_CALL_STATUS_TXT_LEN 129
 
@@ -92,12 +93,14 @@ static callui_result_e __callui_view_single_call_ondestroy(call_view_data_base_t
        call_view_single_call_h vd = (call_view_single_call_h)view_data;
        callui_app_data_t *ad = vd->base_view.ad;
 
-       DELETE_ECORE_TIMER(vd->base_view.call_duration_timer);
-       free(vd->base_view.call_duration_tm);
+       _callui_action_bar_hide(ad->action_bar);
 
        _callui_keypad_hide_immediately(ad->keypad);
        _callui_keypad_show_status_change_callback_set(ad->keypad, NULL, NULL);
 
+       DELETE_ECORE_TIMER(vd->base_view.call_duration_timer);
+       free(vd->base_view.call_duration_tm);
+
        eext_object_event_callback_del(vd->base_view.contents, EEXT_CALLBACK_MORE, __more_btn_click_cb);
 
        DELETE_EVAS_OBJECT(ad->ctxpopup);
@@ -165,8 +168,7 @@ static callui_result_e __update_displayed_data(call_view_single_call_h vd)
        const callui_call_state_data_t *call_data = _callui_stp_get_call_data(ad->state_provider,
                                        CALLUI_CALL_DATA_TYPE_ACTIVE);
        if (!call_data) {
-               call_data = _callui_stp_get_call_data(ad->state_provider,
-                               CALLUI_CALL_DATA_TYPE_HELD);
+               call_data = _callui_stp_get_call_data(ad->state_provider, CALLUI_CALL_DATA_TYPE_HELD);
                is_held = EINA_TRUE;
        }
        CALLUI_RETURN_VALUE_IF_FAIL(call_data, CALLUI_RESULT_FAIL);
@@ -223,27 +225,6 @@ static callui_result_e __update_displayed_data(call_view_single_call_h vd)
                elm_object_signal_emit(vd->caller_info, "2line", "caller_name");
        }
 
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_top_third_button(ad), CALLUI_RESULT_FAIL);
-       if (is_held) {
-               CALLUI_RETURN_VALUE_IF_FAIL(
-                               _callui_create_top_second_button_disabled(ad), CALLUI_RESULT_FAIL);
-               CALLUI_RETURN_VALUE_IF_FAIL(
-                               _callui_create_bottom_second_button_disabled(ad), CALLUI_RESULT_FAIL);
-
-       } else {
-               CALLUI_RETURN_VALUE_IF_FAIL(
-                               _callui_create_top_second_button(ad), CALLUI_RESULT_FAIL);
-               CALLUI_RETURN_VALUE_IF_FAIL(
-                               _callui_create_bottom_second_button(ad), CALLUI_RESULT_FAIL);
-       }
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_bottom_first_button(ad), CALLUI_RESULT_FAIL);
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_top_first_button(ad), CALLUI_RESULT_FAIL);
-       CALLUI_RETURN_VALUE_IF_FAIL(
-                       _callui_create_bottom_third_button(ad), CALLUI_RESULT_FAIL);
-
        elm_object_signal_emit(vd->base_view.contents, "SHOW_EFFECT", "ALLBTN");
 
        evas_object_show(vd->base_view.contents);
@@ -270,9 +251,7 @@ static callui_result_e __create_main_content(call_view_single_call_h vd)
        CALLUI_RETURN_VALUE_IF_FAIL(vd->caller_info, CALLUI_RESULT_ALLOCATION_FAIL);
        elm_object_part_content_set(vd->base_view.contents, "caller_info", vd->caller_info);
 
-       Evas_Object *btn_region = _callui_load_edj(vd->base_view.contents, EDJ_NAME, GRP_BUTTON_LAYOUT);
-       CALLUI_RETURN_VALUE_IF_FAIL(btn_region, CALLUI_RESULT_ALLOCATION_FAIL);
-       elm_object_part_content_set(vd->base_view.contents, "btn_region", btn_region);
+       _callui_action_bar_show(ad->action_bar);
 
        _callui_keypad_clear_input(ad->keypad);
        _callui_keypad_show_status_change_callback_set(ad->keypad, __keypad_show_state_change_cd, vd);
index 39dc9f9..315802f 100755 (executable)
@@ -40,7 +40,7 @@
 static bool _callui_app_create_layout(void *data);
 static Eina_Bool __callui_app_win_hard_key_down_cb(void *data, int type, void *event);
 static Eina_Bool __callui_app_win_hard_key_up_cb(void *data, int type, void *event);
-static void __app_deinit(callui_app_data_t *ad);
+static bool __app_deinit(callui_app_data_t *ad);
 static void __audio_state_changed_cb(void *user_data,
                callui_audio_state_type_e audio_state);
 static void __call_state_change_cb(void *user_data,
@@ -300,8 +300,7 @@ static bool _callui_app_create(void *data)
        ad->call_manager = _callui_manager_create();
        if (!ad->call_manager) {
                err("_callui_manager_create() failed");
-               __app_deinit(ad);
-               return false;
+               return __app_deinit(ad);
        }
 
        ad->state_provider = _callui_manager_get_state_provider(ad->call_manager);
@@ -312,17 +311,38 @@ static bool _callui_app_create(void *data)
 
        if (!_callui_app_create_layout(ad)) {
                err("_callui_app_create_layout() failed");
-               __app_deinit(ad);
-               return false;
+               return __app_deinit(ad);
        }
 
        ad->view_manager = _callui_vm_create(ad);
+       if (!ad->view_manager) {
+               err("_callui_vm_create() failed");
+               return __app_deinit(ad);
+       }
+
+       ad->action_bar = _callui_action_bar_create(ad);
+       if (!ad->action_bar) {
+               err("_callui_action_bar_create() failed");
+               return __app_deinit(ad);
+       }
 
-       ad->keypad = _callui_keypad_create(ad->main_ly, ad);
+       ad->keypad = _callui_keypad_create(ad);
+       if (!ad->keypad) {
+               err("_callui_keypad_create() failed");
+               return __app_deinit(ad);
+       }
 
        ad->lock_handle = _callui_lock_manager_create();
+       if (!ad->lock_handle) {
+               err("_callui_lock_manager_create() failed");
+               return __app_deinit(ad);
+       }
 
        ad->qp_minicontrol =_callui_qp_mc_create(ad);
+       if (!ad->qp_minicontrol) {
+               err("_callui_qp_mc_create() failed");
+               return __app_deinit(ad);
+       }
 
        elm_theme_extension_add(NULL, CALL_THEME);
 
@@ -362,35 +382,11 @@ static void __callui_bt_deinit()
        }
 }
 
-static void __app_deinit(callui_app_data_t *ad)
+static bool __app_deinit(callui_app_data_t *ad)
 {
-       Evas_Object *contents = NULL;
-       Evas_Object *caller_info = NULL;
-       Evas_Object *btn_ly = NULL;
-
        _callui_stp_remove_call_state_event_cb(ad->state_provider, __call_state_change_cb, ad);
        _callui_sdm_remove_audio_state_changed_cb(ad->sound_manager, __audio_state_changed_cb, ad);
 
-       if (ad->main_ly) {
-               contents = elm_object_part_content_get(ad->main_ly, "elm.swallow.content");
-               if (contents) {
-                       caller_info = elm_object_part_content_get(contents, "caller_info");
-                       if (caller_info) {
-                               evas_object_del(caller_info);
-                               caller_info = NULL;
-                       }
-
-                       btn_ly = elm_object_part_content_get(contents, "btn_region");
-                       if (btn_ly) {
-                               evas_object_del(btn_ly);
-                               btn_ly = NULL;
-                       }
-
-                       evas_object_del(contents);
-                       contents = NULL;
-               }
-       }
-
        if (ad->downkey_handler) {
                ecore_event_handler_del(ad->downkey_handler);
                ad->downkey_handler = NULL;
@@ -419,6 +415,11 @@ static void __app_deinit(callui_app_data_t *ad)
                ad->lock_handle = NULL;
        }
 
+       if (ad->action_bar) {
+               _callui_action_bar_destroy(ad->action_bar);
+               ad->action_bar = NULL;
+       }
+
        if (ad->keypad) {
                _callui_keypad_destroy(ad->keypad);
                ad->keypad = NULL;
@@ -430,6 +431,8 @@ static void __app_deinit(callui_app_data_t *ad)
        }
 
        __callui_bt_deinit();
+
+       return false;
 }
 
 static void _callui_app_terminate(void *data)