#define CI_EC_PHONE_NUMB_SIZE_MIN 0 46
#define CI_EC_PHONE_NUMB_PAD_TOP (CI_EC_CONT_NAME_PAD_TOP + CI_EC_CONT_NAME_SIZE_MIN + CI_EC_CONT_NAME_PAD_BOTTOM)
+#define CI_CONF_CALLER_INFO_ACCESS_PAD_BOTTOM 45
+
styles {
style { name: "ci_contact_info_first_line";
base: "font=Tizen:style=Light font_size=64 color=#fafafaff align=center valign=center ellipsis=1.0";
}
}
-group{ name: "elm/layout/callui/manage_calls";
+group{ name: "elm/button/base/callui/manage_calls";
images {
image: "call_multi_ic_arrow.png" COMP;
}
map.rotation.y: 180.0;
}
)
+ CU_PART_RECT( "over",
+ mouse_events: 1;
+ description { state: "default" 0.0;
+ color: COLOR_BG_ALPHA;
+ rel1 { relative: 0.0 0.0; to: "bg"; }
+ rel2 { relative: 1.0 1.0; to: "bg"; }
+ }
+ )
}
programs {
program { name: "ltr";
action: STATE_SET "rtl" 0 0;
target: "btn";
}
+ program { name: "mouse_clicked";
+ signal: "mouse,clicked,1";
+ source: "over";
+ after: "touch_sound";
+ after: "clicked_signal";
+ }
+ program { name: "touch_sound";
+ action: RUN_PLUGIN "touch_sound";
+ }
+ program { name: "clicked_signal";
+ in: 0.001 0.0;
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
}
}
inherit: "default" 0.0;
}
)
+ CU_PART_SPACER("caller_info_conf.access.padding.bottom",
+ description { state: "default" 0.0;
+ min: 0 CI_CONF_CALLER_INFO_ACCESS_PAD_BOTTOM;
+ fixed: 0 1;
+ rel1.relative: 0.0 1.0;
+ align: 0.0 1.0;
+ }
+ )
+ CU_PART_RECT( "caller_info_conf.access",
+ mouse_events: 1;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1 { relative: 1.0 0.0; to_x: "extend.padding.left"; to_y: "contact_name"; }
+ rel2 { relative: 0.0 0.0; to_x: "extend.padding.right"; to_y: "caller_info_conf.access.padding.bottom"; }
+ color: COLOR_BG_ALPHA;
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "hide" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ )
}
programs {
script {
source: "ec_add_contact.click_area";
action: SIGNAL_EMIT "add_contact.clicked" "caller_info";
}
+
+ // ACCESSIBILITY
+
+ program { name: "show_conf_call_access_part";
+ signal: "show_conf_call_access_part";
+ source: "caller_info";
+ action: STATE_SET "show" 0.0;
+ target: "caller_info_conf.access";
+ }
+ program { name: "hide_conf_call_access_part";
+ signal: "hide_conf_call_access_part";
+ source: "caller_info";
+ action: STATE_SET "hide" 0.0;
+ target: "caller_info_conf.access";
+ }
}
}
#include "callui-view-layout.h"
#include "callui-keypad.h"
#include "callui-state-provider.h"
+#include "callui-accessibility-utils.h"
-#define CALLUI_LY_STYLE_MANAGE_CALLS "manage_calls"
+#define CALLUI_BTN_STYLE_MANAGE_CALLS "callui/manage_calls"
struct _callui_view_mc_conf {
call_view_data_base_t base_view;
Evas_Object *caller_info;
+ Evas_Object *manage_calls_btn;
callui_keypad_h keypad;
-
-} callui_view_mc_list;
+};
typedef struct _callui_view_mc_conf _callui_view_mc_conf_t;
static callui_result_e __create_main_content(callui_view_mc_conf_h vd, Evas_Object *parent);
static callui_result_e __update_displayed_data(callui_view_mc_conf_h vd);
-static void __manage_calls_btn_clicked_cb(void *data, Evas_Object *o, const char *emission, const char *source);
+static void __manage_calls_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info);
static void __end_call_btn_click_cb(void *data, Evas_Object *obj, void *event_info);
static void __more_btn_click_cb(void *data, Evas_Object *obj, void *event_info);
static void __keypad_show_state_change_cd(void *data, callui_keypad_state_event_e visibility);
static Eina_Bool __call_duration_timer_cb(void* data);
+static callui_result_e __create_accessible_objects(callui_view_mc_conf_h vd);
+static void __register_accessibility_rout_start_and_end_points(callui_view_mc_conf_h vd);
+static void __register_accessibility_rout_default(callui_view_mc_conf_h vd);
+static void __unregister_accessibility_rout_default(callui_view_mc_conf_h vd);
+
callui_view_mc_conf_h _callui_view_multi_call_conf_new()
{
callui_view_mc_conf_h mc_list_conf = calloc(1, sizeof(_callui_view_mc_conf_t));
CALLUI_RETURN_VALUE_IF_FAIL(vd->caller_info, CALLUI_RESULT_ALLOCATION_FAIL);
elm_object_part_content_set(vd->base_view.contents, CALLUI_PART_SWL_CALLER_INFO, vd->caller_info);
- /* Manage button Layout */
- Evas_Object *manage_calls_ly = _callui_create_layout(vd->base_view.contents, CALLUI_LY_STYLE_MANAGE_CALLS);
- CALLUI_RETURN_VALUE_IF_FAIL(manage_calls_ly, CALLUI_RESULT_ALLOCATION_FAIL);
- elm_object_part_content_set(vd->caller_info, "manage_calls_btn", manage_calls_ly);
- edje_object_signal_callback_add(_EDJ(manage_calls_ly), "mouse,clicked,1", "btn", __manage_calls_btn_clicked_cb, vd);
+ /* Manage calls button */
+ vd->manage_calls_btn = elm_button_add(vd->base_view.contents);
+ CALLUI_RETURN_VALUE_IF_FAIL(vd->manage_calls_btn, CALLUI_RESULT_ALLOCATION_FAIL);
+ elm_object_style_set(vd->manage_calls_btn, CALLUI_BTN_STYLE_MANAGE_CALLS);
+ evas_object_smart_callback_add(vd->manage_calls_btn, "clicked", __manage_calls_btn_clicked_cb, vd);
+ elm_object_part_content_set(vd->caller_info, "manage_calls_btn", vd->manage_calls_btn);
+
if (_callui_common_is_mirrored_mode_on()) {
- elm_object_signal_emit(manage_calls_ly, "set_rtl_mode", "manage_calls");
+ elm_object_signal_emit(vd->manage_calls_btn, "set_rtl_mode", "manage_calls");
}
_callui_action_bar_show(ad->action_bar);
_callui_keypad_clear_input(ad->keypad);
_callui_keypad_add_show_status_change_cb(ad->keypad, __keypad_show_state_change_cd, vd);
- CALLUI_RETURN_VALUE_IF_FAIL(
- _callui_create_end_call_button(vd->base_view.contents, __end_call_btn_click_cb, vd),
- CALLUI_RESULT_ALLOCATION_FAIL);
+ vd->base_view.ao_last = _callui_create_end_call_button(vd->base_view.contents, __end_call_btn_click_cb, vd);
+ CALLUI_RETURN_VALUE_IF_FAIL(vd->base_view.ao_last, CALLUI_RESULT_ALLOCATION_FAIL);
+
+ if (__create_accessible_objects(vd) == CALLUI_RESULT_OK) {
+ __register_accessibility_rout_start_and_end_points(vd);
+ __register_accessibility_rout_default(vd);
+ } else {
+ err("Register accessible objects failed");
+ }
return CALLUI_RESULT_OK;
}
return CALLUI_RESULT_OK;
}
-static void __manage_calls_btn_clicked_cb(void *data, Evas_Object *o, const char *emission, const char *source)
+static void __manage_calls_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
{
callui_view_mc_conf_h vd = (callui_view_mc_conf_h)data;
callui_app_data_t *ad = vd->base_view.ad;
switch (visibility) {
case CALLUI_KEYPAD_STATE_EVENT_START_SHOW:
+ __unregister_accessibility_rout_default(vd);
+ _callui_au_register_base_view_accessibility_rout_with_keypad(&vd->base_view);
elm_object_signal_emit(vd->base_view.contents, "hide_caller_info", "view_main");
+ elm_object_signal_emit(vd->caller_info, "hide_conf_call_access_part", "caller_info");
break;
case CALLUI_KEYPAD_STATE_EVENT_HIDDEN:
case CALLUI_KEYPAD_STATE_EVENT_QUICK_HIDDEN:
+ _callui_au_unregister_base_view_accessibility_rout_with_keypad(&vd->base_view);
+ __register_accessibility_rout_default(vd);
elm_object_signal_emit(vd->base_view.contents, "show_caller_info", "view_main");
+ elm_object_signal_emit(vd->caller_info, "show_conf_call_access_part", "caller_info");
break;
default:
break;
}
}
+
+/* Accessibility */
+
+static void __register_accessibility_rout_start_and_end_points(callui_view_mc_conf_h vd)
+{
+ vd->base_view.ao_first = _callui_au_create_accessible_object(vd->base_view.contents, vd->base_view.contents, "access.rect");
+ _callui_au_set_highlight_ability(vd->base_view.ao_first, false);
+
+ callui_result_e res = _callui_au_append_symmetric_relationship(vd->base_view.ao_first, vd->base_view.ao_call_status);
+ CALLUI_RETURN_IF_FAIL(res == CALLUI_RESULT_OK);
+
+ res = _callui_au_append_relationship_end_point(vd->base_view.ao_last);
+ CALLUI_RETURN_IF_FAIL(res == CALLUI_RESULT_OK);
+}
+
+static callui_result_e __create_accessible_objects(callui_view_mc_conf_h vd)
+{
+ vd->base_view.ao_call_status = _callui_au_create_accessible_object(vd->base_view.contents, vd->base_view.contents, "call_txt_status.access");
+ CALLUI_RETURN_VALUE_IF_FAIL(vd->base_view.ao_call_status, CALLUI_RESULT_FAIL);
+
+ vd->base_view.ao_caller_info = _callui_au_create_accessible_object(vd->caller_info, vd->caller_info, "caller_info_conf.access");
+ CALLUI_RETURN_VALUE_IF_FAIL(vd->base_view.ao_caller_info, CALLUI_RESULT_FAIL);
+
+ return CALLUI_RESULT_OK;
+}
+
+static void __register_accessibility_rout_default(callui_view_mc_conf_h vd)
+{
+ Evas_Object *ab_start_obj;
+ Evas_Object *ab_end_obj;
+
+ callui_result_e res = _callui_action_get_accessible_objects(vd->base_view.ad->action_bar, &ab_start_obj, &ab_end_obj);
+ CALLUI_RETURN_IF_FAIL(res == CALLUI_RESULT_OK);
+
+ res = _callui_au_append_symmetric_relationship(vd->base_view.ao_call_status, vd->base_view.ao_caller_info);
+ CALLUI_RETURN_IF_FAIL(res == CALLUI_RESULT_OK);
+ res = _callui_au_append_symmetric_relationship(vd->base_view.ao_caller_info, vd->manage_calls_btn);
+ CALLUI_RETURN_IF_FAIL(res == CALLUI_RESULT_OK);
+ res = _callui_au_append_symmetric_relationship(vd->manage_calls_btn, ab_start_obj);
+ CALLUI_RETURN_IF_FAIL(res == CALLUI_RESULT_OK);
+ res = _callui_au_append_symmetric_relationship(ab_end_obj, vd->base_view.ao_last);
+ CALLUI_RETURN_IF_FAIL(res == CALLUI_RESULT_OK);
+}
+
+static void __unregister_accessibility_rout_default(callui_view_mc_conf_h vd)
+{
+ Evas_Object *ab_start_obj;
+ Evas_Object *ab_end_obj;
+
+ CALLUI_RETURN_IF_FAIL(_callui_action_get_accessible_objects(vd->base_view.ad->action_bar, &ab_start_obj, &ab_end_obj) == CALLUI_RESULT_OK);
+
+ _callui_au_remove_symmetric_relationship(vd->base_view.ao_call_status, vd->base_view.ao_caller_info);
+ _callui_au_remove_symmetric_relationship(vd->base_view.ao_caller_info, vd->manage_calls_btn);
+ _callui_au_remove_symmetric_relationship(vd->manage_calls_btn, ab_start_obj);
+ _callui_au_remove_symmetric_relationship(ab_end_obj, vd->base_view.ao_last);
+}