CU_PART_IMAGE( "btn",
mouse_events: 1;
description { state: "default" 0.0;
- rel1 { relative: 0.0 0.0; to: "bg"; }
- rel2 { relative: 1.0 1.0; to: "bg"; }
+ rel1 { relative: 0.0 0.0; to: "bg"; }
+ rel2 { relative: 1.0 1.0; to: "bg"; }
image.normal: "call_multi_ic_arrow.png";
color_class: "manage_calls_arrow";
+ map {
+ on: 1;
+ smooth: 1;
+ perspective_on: 1;
+ rotation.x: 0;
+ rotation.y: 0;
+ rotation.z: 0;
+ }
+ }
+ description { state: "ltr" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "rtl" 0.0;
+ inherit: "default" 0.0;
+ map.rotation.y: 180.0;
}
)
}
+ programs {
+ program { name: "ltr";
+ signal: "edje,state,ltr";
+ source: "edje";
+ action: STATE_SET "ltr" 0 0;
+ target: "btn";
+ }
+ program { name: "rtl";
+ signal: "edje,state,rtl";
+ source: "edje";
+ action: STATE_SET "rtl" 0 0;
+ target: "btn";
+ }
+ program { name: "set_ltr";
+ signal: "set_ltr_mode";
+ source: "manage_calls";
+ action: STATE_SET "ltr" 0 0;
+ target: "btn";
+ }
+ program { name: "set_rtl";
+ signal: "set_rtl_mode";
+ source: "manage_calls";
+ action: STATE_SET "rtl" 0 0;
+ target: "btn";
+ }
+ }
}
group{
styles {
style { name: "ec_contact_name";
- base: "font=Tizen:style=Light font_size=56 color=#fafafaff align=left ellipsis=1.0";
+ base: "font=Tizen:style=Light font_size=56 color=#fafafaff align=auto ellipsis=1.0";
}
style { name: "ec_phone_number";
- base: "font=Tizen:style=Regular font_size=34 color=#fafafaff align=left ellipsis=1.0";
+ base: "font=Tizen:style=Regular font_size=34 color=#fafafaff align=auto ellipsis=1.0";
}
style { name: "ec_call_status";
- base: "font=Tizen:style=Regular font_size=40 color=#fafafaff align=left ellipsis=1.0";
+ base: "font=Tizen:style=Regular font_size=40 color=#fafafaff align=auto ellipsis=1.0";
}
style { name: "ec_reply_btn";
base: "font=Tizen:style=Regular font_size=28 text_class=tizen color=#808080ff align=center valign=center ellipsis=1.0";
styles {
style { name: "an_contacts_name";
- base: "font=Tizen:style=Regular font_size=40 color=#fafafaff align=left valign=center ellipsis=1.0";
+ base: "font=Tizen:style=Regular font_size=40 color=#fafafaff align=auto valign=center ellipsis=1.0";
}
style { name: "an_contacts_info";
- base: "font=Tizen:style=Regular font_size=32 color=#fafafaff align=left valign=center ellipsis=1.0";
+ base: "font=Tizen:style=Regular font_size=32 color=#fafafaff align=auto valign=center ellipsis=1.0";
}
style { name: "an_reject_msg_item";
- base: "font=Tizen:style=Regular font_size=40 color=#fafafaff align=left valign=center ellipsis=1.0";
+ base: "font=Tizen:style=Regular font_size=40 color=#fafafaff align=auto valign=center ellipsis=1.0";
}
style { name: "an_button";
base: "font=Tizen:style=Regular font_size=40 color=#ffffffff align=center valign=center ellipsis=1.0";
inherit: "default" 0.0;
}
)
- CU_PART_TEXTBLOCK ( "text.status",
+ CU_PART_TEXTBLOCK( "text.status",
description { state: "default" 0.0;
- align: 0.0 0.0;
+ align: 0.5 0.0;
rel1 { relative: 1.0 1.0; to_x: "contact_icon.pad.right"; to_y: "text_info.pad.top"; }
rel2 { relative: 0.0 1.0; to_x: "padding.right"; to_y: "text_info.pad.top"; }
min: 0 AN_STATUS_TXT_H;
fixed: 0 1;
- text.style:"an_contacts_info";
+ text {
+ style:"an_contacts_info";
+ fit: 1 1;
+ }
}
)
- CU_PART_TEXTBLOCK ( "text.contact_name",
+ CU_PART_TEXTBLOCK( "text.contact_name",
description { state: "default" 0.0;
- align: 0.0 0.0;
+ align: 0.5 0.0;
rel1 { relative: 1.0 1.0; to_x: "contact_icon.pad.right"; to_y: "text.status"; }
rel2 { relative: 0.0 1.0; to_x: "padding.right"; to_y: "text.status"; }
min: 0 AN_CONTACT_NAME_TXT_H;
fixed: 0 1;
- text.style:"an_contacts_name";
+ text {
+ style:"an_contacts_name";
+ fit: 1 1;
+ }
}
)
- CU_PART_TEXTBLOCK ( "text.contact_number",
+ CU_PART_TEXTBLOCK( "text.contact_number",
description { state: "default" 0.0;
- align: 0.0 0.0;
+ align: 0.5 0.0;
rel1 { relative: 1.0 1.0; to_x: "contact_icon.pad.right"; to_y: "text.contact_name"; }
rel2 { relative: 0.0 1.0; to_x: "padding.right"; to_y: "text.contact_name"; }
min: 0 AN_CONTACT_NUMBER_TXT_H;
fixed: 0 1;
- text.style:"an_contacts_info";
+ text {
+ style:"an_contacts_info";
+ fit: 1 1;
+ }
}
description { state: "show" 0.0;
inherit: "default" 0.0;
CU_PART_SWALLOW( "elm.swallow.content",
description { state: "default" 0.0; }
)
+ CU_PART_SWALLOW( "elm.swallow.active_noti",
+ description { state: "default" 0.0;
+ rel1{ relative: 0.0 0.0; to: "bg"; }
+ rel2{ relative: 0.0 1.0; to: "bg"; }
+ align: 0 0.5;
+ }
+ )
CU_PART_SWALLOW( "swallow.action_bar",
clip_to: "keypadarea.clipper";
description { state: "default" 0.0;
styles {
style { name: "vml_call_status";
- base: "font=Tizen:style=Regular font_size=40 color=#fafafaff align=left ellipsis=1.0";
+ base: "font=Tizen:style=Regular font_size=40 color=#fafafaff align=auto ellipsis=1.0";
}
}
styles {
style { name: "multicall_list_call_duration";
- base: "font=Tizen:style=Regular font_size=40 color=#fafafaff align=left ellipsis=1.0";
+ base: "font=Tizen:style=Regular font_size=40 color=#fafafaff align=auto ellipsis=1.0";
}
}
styles {
style { name: "sc_contact_name";
- base: "font=Tizen:style=Light font_size=56 color=#fafafaff align=left ellipsis=1.0";
+ base: "font=Tizen:style=Light font_size=56 color=#fafafaff align=auto ellipsis=1.0";
}
style { name: "sc_phone_number";
- base: "font=Tizen:style=Regular font_size=34 color=#fafafaff align=left ellipsis=1.0";
+ base: "font=Tizen:style=Regular font_size=34 color=#fafafaff align=auto ellipsis=1.0";
}
style { name: "sc_call_duration";
- base: "font=Tizen:style=Regular font_size=40 color=#fafafaff align=left ellipsis=1.0";
+ base: "font=Tizen:style=Regular font_size=40 color=#fafafaff align=auto ellipsis=1.0";
}
style { name: "sc_manage_call_btn";
base: "font=Tizen:style=Regular font_size=27 color=#fafafaff align=center valign=center ellipsis=1.0";
}
}
-#define SPLIT_CALL_MANAGE_BTN(grp_name, bg_image, icon, bg_color_norm, bg_color_press) \
+#define SPLIT_CALL_MANAGE_BTN(grp_name, bg_image_ltr, bg_image_rtl, icon, bg_color_norm_ltr, bg_color_press_ltr, bg_color_norm_rtl, bg_color_press_rtl) \
group { name: "elm/button/base/"grp_name; \
images { \
- image: bg_image COMP; \
+ image: bg_image_ltr COMP; \
+ image: bg_image_rtl COMP; \
image: icon COMP; \
} \
script { \
PRESS_EFFECT_DEFAULT_SCRIPT_VAR \
+ public is_rtl = 0; \
} \
- parts { part { name: "bg"; \
+ parts { \
+ part { name: "bg"; \
type: IMAGE; \
scale: 1; \
description { \
state: "default" 0.0; \
- image.normal: bg_image; \
- color_class: bg_color_norm; \
+ image.normal: bg_image_ltr; \
+ color_class: bg_color_norm_ltr; \
+ } \
+ description { state: "ltr" 0.0; \
+ inherit: "default" 0.0; \
+ } \
+ description { state: "rtl" 0.0; \
+ image.normal: bg_image_rtl; \
+ color_class: bg_color_norm_rtl; \
} \
} \
- part { name: "bg_press"; \
+ part { name: "bg_press_ltr"; \
type: IMAGE; \
scale: 1; \
mouse_events: 1; \
description { state: "default" 0.0; \
rel1 { relative: 0.0 0.0; to: "bg"; } \
rel2 { relative: 1.0 1.0; to: "bg"; } \
- image.normal: bg_image; \
+ image.normal: bg_image_ltr; \
color_class: "transparent_black"; \
} \
description { state: "pressed" 0.0; \
inherit: "default" 0.0; \
- color_class: bg_color_press; \
+ color_class: bg_color_press_ltr; \
+ } \
+ description { state: "pressed_effect" 0.0; \
+ inherit: "pressed" 0.0; \
+ rel1 { relative: 0.15 0.15; to: "bg"; } \
+ rel2 { relative: 0.85 0.85; to: "bg"; } \
+ } \
+ } \
+ part { name: "bg_press_rtl"; \
+ type: IMAGE; \
+ scale: 1; \
+ mouse_events: 1; \
+ description { state: "default" 0.0; \
+ rel1 { relative: 0.0 0.0; to: "bg"; } \
+ rel2 { relative: 1.0 1.0; to: "bg"; } \
+ image.normal: bg_image_rtl; \
+ color_class: "transparent_black"; \
+ } \
+ description { state: "pressed" 0.0; \
+ inherit: "default" 0.0; \
+ color_class: bg_color_press_rtl; \
} \
description { state: "pressed_effect" 0.0; \
inherit: "pressed" 0.0; \
} \
} \
programs { \
- PRESS_EFFECT_DEFAULT_PROGRAMS \
+ program { name: "pressed_effect"; \
+ action: STATE_SET "pressed_effect" 0.0; \
+ script { \
+ if (get_int(is_rtl) == 0) { \
+ set_state(PART:"bg_press_ltr", "pressed_effect", 0.0); \
+ } else { \
+ set_state(PART:"bg_press_rtl", "pressed_effect", 0.0); \
+ } \
+ run_program(PROGRAM:"pressed_effect2"); \
+ } \
+ } \
+ program { name: "pressed_effect2_ltr"; \
+ action: STATE_SET "pressed" 0.0; \
+ target: "bg_press_ltr"; \
+ transition: TRANSITION_GLIDE(0.15); \
+ after: "pressed_effect3"; \
+ } \
+ program { name: "pressed_effect2_rtl"; \
+ action: STATE_SET "pressed" 0.0; \
+ target: "bg_press_rtl"; \
+ transition: TRANSITION_GLIDE(0.15); \
+ after: "pressed_effect3"; \
+ } \
+ program { name: "pressed_effect2"; \
+ script { \
+ if (get_int(is_rtl) == 0) { \
+ run_program(PROGRAM:"pressed_effect2_ltr"); \
+ } else { \
+ run_program(PROGRAM:"pressed_effect2_rtl"); \
+ } \
+ } \
+ } \
+ program { name: "pressed_effect3"; \
+ script { \
+ set_int(animate, 0); \
+ } \
+ } \
+ program { name: "delay_unpressed_effect"; \
+ in: 0.1 0.0; \
+ after: "unpressed_effect"; \
+ } \
+ program { name: "unpressed_effect_ltr"; \
+ action: STATE_SET "default" 0.0; \
+ target: "bg_press_ltr"; \
+ transition: TRANSITION_GLIDE(0.45); \
+ } \
+ program { name: "unpressed_effect_rtl"; \
+ action: STATE_SET "default" 0.0; \
+ target: "bg_press_rtl"; \
+ transition: TRANSITION_GLIDE(0.45); \
+ } \
+ program { name: "unpressed_effect"; \
+ script { \
+ if (get_int(is_rtl) == 0) { \
+ run_program(PROGRAM:"unpressed_effect_ltr"); \
+ } else { \
+ run_program(PROGRAM:"unpressed_effect_rtl"); \
+ } \
+ } \
+ } \
+ program { name: "pressed"; \
+ signal: "mouse,down,1*"; \
+ source: "over"; \
+ script { \
+ if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0)) { \
+ stop_program(PROGRAM:"delay_unpressed_effect"); \
+ set_int(mouse_down, 1); \
+ set_int(animate, 1); \
+ emit("elm,action,press", ""); \
+ run_program(PROGRAM:"pressed_effect"); \
+ } \
+ } \
+ } \
+ program { name: "unpressed"; \
+ signal: "mouse,up,1"; \
+ source: "over"; \
+ script { \
+ if (get_int(mouse_down) == 1) { \
+ set_int(mouse_down, 0); \
+ if (get_int(animate) == 0) { \
+ run_program(PROGRAM:"unpressed_effect"); \
+ } else { \
+ if (get_int(is_rtl) == 0) { \
+ set_state(PART:"bg_press_ltr", "pressed", 0.0); \
+ } else { \
+ set_state(PART:"bg_press_rtl", "pressed", 0.0); \
+ } \
+ set_int(animate, 0); \
+ run_program(PROGRAM:"delay_unpressed_effect"); \
+ } \
+ emit("elm,action,unpress", ""); \
+ } \
+ } \
+ } \
+ program { name: "touch_snd"; \
+ signal: "mouse,clicked,1"; \
+ source: "over"; \
+ script { \
+ if (get_int(multi_down) == 0) { \
+ run_program(PROGRAM:"touch_sound"); \
+ run_program(PROGRAM:"clicked_signal"); \
+ } \
+ } \
+ } \
+ program { name: "touch_sound"; \
+ action: RUN_PLUGIN "touch_sound"; \
+ } \
+ program { name: "clicked_signal"; \
+ in: 0.001 0.0; \
+ action: SIGNAL_EMIT "elm,action,click" ""; \
+ } \
+ program { name: "multi_down"; \
+ signal: "elm,action,multi,down"; \
+ source: "elm"; \
+ script { \
+ set_int(multi_down, 1); \
+ } \
+ } \
+ program { name: "multi_up"; \
+ signal: "elm,action,multi,up"; \
+ source: "elm"; \
+ script { \
+ set_int(multi_down, 0); \
+ } \
+ } \
+ program { name: "ltr"; \
+ signal: "edje,state,ltr"; \
+ source: "edje"; \
+ script { \
+ set_state(PART:"bg", "ltr", 0.0); \
+ set_int(is_rtl, 0); \
+ } \
+ } \
+ program { name: "rtl"; \
+ signal: "edje,state,rtl"; \
+ source: "edje"; \
+ script { \
+ set_state(PART:"bg", "rtl", 0.0); \
+ set_int(is_rtl, 1); \
+ } \
+ } \
} \
}
image: "call_multi_ic_arrow.png" COMP; \
image: "call_multi_hold_bg.png" COMP; \
} \
+ script { \
+ public is_rtl = 0; \
+ public is_arrow_shown = 0; \
+ } \
parts { \
_bg_part \
CU_PART_SPACER( "pad.top", \
fixed: 1 1; \
image.normal: "call_multi_ic_arrow.png"; \
align: 0.0 1.0; \
+ map { \
+ on: 1; \
+ smooth: 1; \
+ perspective_on: 1; \
+ rotation.x: 0.0; \
+ rotation.y: 0.0; \
+ rotation.z: 0.0; \
+ } \
+ } \
+ description { state: "show_ltr" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
} \
- description { state: "show" 0.0; \
+ description { state: "show_rtl" 0.0; \
inherit: "default" 0.0; \
visible: 1; \
+ map.rotation.y: 180.0; \
} \
description { state: "hide" 0.0; \
inherit: "default" 0.0; \
} \
- description { state: "pressed" 0.0; \
- inherit: "show" 0.0; \
+ description { state: "pressed_ltr" 0.0; \
+ inherit: "show_ltr" 0.0; \
+ color_class: "pressed"; \
+ } \
+ description { state: "pressed_rtl" 0.0; \
+ inherit: "show_rtl" 0.0; \
color_class: "pressed"; \
} \
) \
action: STATE_SET "hide_arrow" 0.0; \
target: "pad.right"; \
} \
- program { name: "show_arrow"; \
- signal: "show_manage_calls_btn"; \
- action: STATE_SET "show" 0.0; \
- target: "arrow"; \
- after: "max_pad_right"; \
+ program { name: "show_manage_calls_btn_ltr"; \
+ signal: "show_manage_calls_btn_ltr"; \
+ script { \
+ set_int(is_arrow_shown, 1); \
+ set_state(PART:"arrow", "show_ltr", 0.0); \
+ run_program(PROGRAM:"max_pad_right"); \
+ } \
+ } \
+ program { name: "show_manage_calls_btn_rtl"; \
+ signal: "show_manage_calls_btn_rtl"; \
+ script { \
+ set_int(is_arrow_shown, 1); \
+ set_state(PART:"arrow", "show_rtl", 0.0); \
+ run_program(PROGRAM:"max_pad_right"); \
+ } \
} \
program { name: "hide_arrow"; \
signal: "hide_manage_calls_btn"; \
- action: STATE_SET "hide" 0.0; \
- target: "arrow"; \
- after: "min_pad_right"; \
+ script { \
+ set_int(is_arrow_shown, 0); \
+ set_state(PART:"arrow", "hide", 0.0); \
+ run_program(PROGRAM:"min_pad_right"); \
+ } \
} \
program { name: "arrow_pressed"; \
signal: "mouse,down,*"; \
- source: "arrow"; \
- action: STATE_SET "pressed" 0.0; \
- target: "arrow"; \
+ script { \
+ if (get_int(is_rtl) == 0) { \
+ set_state(PART:"arrow", "pressed_ltr", 0.0); \
+ } else { \
+ set_state(PART:"arrow", "pressed_rtl", 0.0); \
+ } \
+ } \
} \
program { name: "arrow_unpressed"; \
signal: "mouse,up,*"; \
- source: "arrow"; \
- action: STATE_SET "default" 0.0; \
- target: "arrow"; \
+ script { \
+ if (get_int(is_rtl) == 0) { \
+ set_state(PART:"arrow", "show_ltr", 0.0); \
+ } else { \
+ set_state(PART:"arrow", "show_rtl", 0.0); \
+ } \
+ } \
+ } \
+ program { name: "ltr"; \
+ signal: "edje,state,ltr"; \
+ source: "edje"; \
+ script { \
+ if (get_int(is_arrow_shown) == 1) { \
+ set_state(PART:"arrow", "show_ltr", 0.0); \
+ } \
+ set_int(is_rtl, 0); \
+ } \
+ } \
+ program { name: "rtl"; \
+ signal: "edje,state,rtl"; \
+ source: "edje"; \
+ script { \
+ if (get_int(is_arrow_shown) == 1) { \
+ set_state(PART:"arrow", "show_rtl", 0.0); \
+ } \
+ set_int(is_rtl, 1); \
+ } \
} \
} \
} \
}
}
-SPLIT_CALL_MANAGE_BTN("callui_multi_split_merge_btn", "call_multi_hold_btn_merge_bg.png", "call_multi_ic_merge.png", "multi_hold_merge_btn_norm", "multi_hold_merge_btn_press");
-SPLIT_CALL_MANAGE_BTN("callui_multi_split_swap_btn", "call_multi_hold_btn_swap_bg.png", "call_multi_ic_swap.png", "multi_hold_swap_btn_norm", "multi_hold_swap_btn_press");
+SPLIT_CALL_MANAGE_BTN("callui_multi_split_merge_btn", "call_multi_hold_btn_merge_bg.png", "call_multi_hold_btn_swap_bg.png", "call_multi_ic_merge.png", "multi_hold_merge_btn_norm", "multi_hold_merge_btn_press", "multi_hold_swap_btn_norm", "multi_hold_swap_btn_press");
+SPLIT_CALL_MANAGE_BTN("callui_multi_split_swap_btn", "call_multi_hold_btn_swap_bg.png", "call_multi_hold_btn_merge_bg.png", "call_multi_ic_swap.png", "multi_hold_swap_btn_norm", "multi_hold_swap_btn_press", "multi_hold_merge_btn_norm", "multi_hold_merge_btn_press");
styles {
style { name: "qp_mc_caller_name";
- base: "font=Tizen:style=Regular font_size=40 color=#000000ff align=left ellipsis=0.0";
+ base: "font=Tizen:style=Regular font_size=40 color=#000000ff align=auto ellipsis=0.0";
}
style { name: "qp_mc_call_duration";
- base: "font=Tizen:style=Regular font_size=30 color=#7f7f7fff align=left ellipsis=1.0";
+ base: "font=Tizen:style=Regular font_size=30 color=#7f7f7fff align=auto ellipsis=1.0";
}
}
} callui_result_e;
+typedef enum {
+ CALLUI_LOCK_TYPE_UNLOCK = 1,
+ CALLUI_LOCK_TYPE_SWIPE_LOCK,
+ CALLUI_LOCK_TYPE_SECURITY_LOCK
+} callui_idle_lock_type_e;
+
typedef struct {
int r;
int g;
#include "callui-common-types.h"
#include "callui-common-defines.h"
-typedef enum {
- CALLUI_LOCK_TYPE_UNLOCK = 1,
- CALLUI_LOCK_TYPE_SWIPE_LOCK,
- CALLUI_LOCK_TYPE_SECURITY_LOCK
-} callui_idle_lock_type_t;
-
/* Set call duration function prototype */
typedef void (*set_call_duration_time)(struct tm *cur_time, Evas_Object *obj, const char *part);
*
* @return Device lock type
*/
-callui_idle_lock_type_t _callui_common_get_idle_lock_type(void);
+callui_idle_lock_type_e _callui_common_get_idle_lock_type(void);
/**
* @brief Unlocks swipe lock
*/
bool _callui_common_is_app_foreground();
+/**
+ * @brief Checks whether application is in mirrored mode
+ *
+ * @return @c true when application mirrored mode is on, otherwise false
+ *
+ */
+bool _callui_common_is_mirrored_mode_on();
+
#endif /*__CALLUI_COMMON_H__ */
void _callui_window_set_size_type(callui_window_h window_h, callui_win_size_type_e size_type);
/**
+ * @brief Validates position of the window
+ *
+ * @param[in] window_h Window handle
+ *
+ * @return CALLUI_RESULT_OK on success or another result otherwise
+ */
+callui_result_e _callui_window_validate_position(callui_window_h window_h);
+
+/**
* @brief Sets rotation lock state
*
* @param[in] window_h Window handle
*
* @return Device lock type
*/
-callui_idle_lock_type_t _callui_common_get_idle_lock_type(void)
+callui_idle_lock_type_e _callui_common_get_idle_lock_type(void)
{
int lock_state = -1;
int lock_type = SETTING_SCREEN_LOCK_TYPE_NONE;
int ret = 0;
- callui_idle_lock_type_t ret_val = CALLUI_LOCK_TYPE_UNLOCK;
+ callui_idle_lock_type_e ret_val = CALLUI_LOCK_TYPE_UNLOCK;
ret = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_LOCK_STATE, &lock_state);
if (ret < 0) {
static void __try_send_app_launch_request(callui_app_data_t *ad, app_control_h app_control)
{
int ret;
- callui_idle_lock_type_t type = _callui_common_get_idle_lock_type();
+ callui_idle_lock_type_e type = _callui_common_get_idle_lock_type();
if (type == CALLUI_LOCK_TYPE_SWIPE_LOCK) {
if (ad->delayed_app_control) {
return (state == APP_STATE_FOREGROUND);
}
+
+bool _callui_common_is_mirrored_mode_on()
+{
+ bool is_mirrored_mode = elm_config_mirrored_get();
+ dbg("Mirrored mode [%s]", is_mirrored_mode?"ON":"OFF");
+ return is_mirrored_mode;
+}
keypad->btns_layout = _callui_create_layout(keypad->main_layout, CALLUI_LY_STYLE_KEYPAD_BTNS);
CALLUI_RETURN_VALUE_IF_FAIL(keypad->btns_layout, CALLUI_RESULT_ALLOCATION_FAIL);
+ elm_object_mirrored_automatic_set(keypad->btns_layout, EINA_FALSE);
+ elm_object_mirrored_set(keypad->btns_layout, EINA_FALSE);
elm_object_part_content_set(keypad->main_layout, CALLUI_PART_SWALLOW_KEYPAD, keypad->btns_layout);
Evas_Object *parent;
- Evas_Object *box;
Evas_Object *layout;
-
Evas_Object *rm_scroller;
Evas_Object *rm_scroller_anchor;
Evas_Object *rm_scroller_stroke;
static Eina_Bool __appear_effect_activated_cb(void *data);
static Eina_Bool __disappear_effect_activated_cb(void *data);
static void __show_reject_msg_btn_click_cb(void *data, Evas_Object *obj, void *event_info);
-static void __box_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __layout_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void __call_action_btn_click_cb(void *data, Evas_Object *obj, void *event_info);
static Evas_Event_Flags __gesture_layer_flick_end_cb(void *data, void *event_info);
DELETE_ECORE_IDLE_ENTERER(vd->transit_effect_idler);
DELETE_ELM_TRANSIT_HARD(vd->transit);
- DELETE_EVAS_OBJECT(vd->box);
+ DELETE_EVAS_OBJECT(vd->layout);
DELETE_EVAS_OBJECT(vd->rm_scroller_stroke);
_callui_window_set_size_type(ad->window, CALLUI_WIN_SIZE_FULLSCREEN);
static void __reset_params_after_transit(callui_view_incoming_call_noti_h vd)
{
vd->transit = NULL;
- evas_object_freeze_events_set(vd->box, EINA_FALSE);
+ evas_object_freeze_events_set(vd->layout, EINA_FALSE);
}
static void __appear_transit_del_cb(void *data, Elm_Transit *transit)
callui_view_incoming_call_noti_h vd = data;
int height = 0;
- evas_object_geometry_get(vd->box, NULL, NULL, NULL, &height);
+ evas_object_geometry_get(vd->layout, NULL, NULL, NULL, &height);
DELETE_ELM_TRANSIT_HARD(vd->transit);
vd->transit = elm_transit_add();
return ECORE_CALLBACK_CANCEL;
}
elm_transit_del_cb_set(vd->transit, __appear_transit_del_cb, vd);
- elm_transit_object_add(vd->transit, vd->box);
+ elm_transit_object_add(vd->transit, vd->layout);
elm_transit_effect_translation_add(vd->transit, 0, -height, 0, 0);
elm_transit_duration_set(vd->transit, CALLUI_MOVE_TRANSITION_TIME_SEC);
elm_transit_objects_final_state_keep_set(vd->transit, EINA_TRUE);
elm_transit_go(vd->transit);
vd->transit_effect_idler = NULL;
- evas_object_freeze_events_set(vd->box, EINA_TRUE);
+ evas_object_freeze_events_set(vd->layout, EINA_TRUE);
return ECORE_CALLBACK_DONE;
}
int ypos = 0;
int width = 0;
int height = 0;
- evas_object_geometry_get(vd->box, &xpos, &ypos, &width, &height);
+ evas_object_geometry_get(vd->layout, &xpos, &ypos, &width, &height);
int transit_y = -(height + ypos);
DELETE_ELM_TRANSIT_HARD(vd->transit);
return ECORE_CALLBACK_CANCEL;
}
elm_transit_del_cb_set(vd->transit, __disappear_transit_del_cb, vd);
- elm_transit_object_add(vd->transit, vd->box);
+ elm_transit_object_add(vd->transit, vd->layout);
elm_transit_effect_translation_add(vd->transit, xpos, ypos, xpos, transit_y);
elm_transit_duration_set(vd->transit, CALLUI_MOVE_TRANSITION_TIME_SEC);
elm_transit_objects_final_state_keep_set(vd->transit, EINA_TRUE);
elm_transit_go(vd->transit);
vd->transit_effect_idler = NULL;
- evas_object_freeze_events_set(vd->box, EINA_TRUE);
+ evas_object_freeze_events_set(vd->layout, EINA_TRUE);
return ECORE_CALLBACK_CANCEL;
}
dbg("No hide animation in progress...");
__rm_reset_status_flags(vd);
_callui_window_set_size_type(ad->window, CALLUI_WIN_SIZE_FULLSCREEN);
- elm_object_signal_emit(vd->layout, "hide_swipe", "active_noti_main");
__rm_create_content(vd);
__move_active_noti(vd);
}
dbg("RM scroller size - w[%d] h[%d]", *w, *h);
}
-static void __box_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+static void __layout_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
CALLUI_RETURN_IF_FAIL(data);
callui_view_incoming_call_noti_h vd = data;
- if (vd->appear_anim_init) {
+ Evas_Coord w = 0;
+ Evas_Coord h = 0;
+ evas_object_size_hint_min_get(vd->layout, &w, &h);
+ dbg("LY hint min size - w[%d] h[%d]", w, h);
+
+ if (w == 0 || h == 0) {
+ dbg("Ignored");
return;
}
+ if (vd->appear_anim_init) {
+ dbg("Appear animation already initiated");
+ return;
+ }
vd->appear_anim_init = true;
vd->transit_effect_idler = ecore_idle_enterer_before_add(__appear_effect_activated_cb, vd);
}
{
__rm_destroy_content(vd);
- elm_object_signal_emit(vd->layout, "show_swipe", "active_noti_main");
_callui_window_set_size_type(vd->base_view.ad->window, CALLUI_WIN_SIZE_ACTIVE_NOTI);
__move_active_noti(vd);
}
static callui_result_e __rm_create_compose_item(callui_view_incoming_call_noti_h vd, Evas_Object *box)
{
- Evas_Object *item_ly = _callui_create_layout(vd->box, CALLUI_LY_STYLE_REJ_MSG_ITEM_COMPOSE);
+ Evas_Object *item_ly = _callui_create_layout(vd->layout, CALLUI_LY_STYLE_REJ_MSG_ITEM_COMPOSE);
CALLUI_RETURN_VALUE_IF_FAIL(item_ly, CALLUI_RESULT_FAIL);
evas_object_size_hint_weight_set(item_ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
static void __rm_create_content(callui_view_incoming_call_noti_h vd)
{
/* Reject message list background gradient color layout */
- vd->rm_scroller_bg = _callui_create_layout(vd->box, CALLUI_LY_STYLE_REJ_MSG_SCROLLER_BG);
+ vd->rm_scroller_bg = _callui_create_layout(vd->layout, CALLUI_LY_STYLE_REJ_MSG_SCROLLER_BG);
evas_object_event_callback_add(vd->rm_scroller_bg, EVAS_CALLBACK_RESIZE, __rm_scroller_bg_resize_cb, vd);
evas_object_event_callback_add(vd->rm_scroller_bg, EVAS_CALLBACK_MOVE, __rm_scroller_bg_move_cb, vd);
CALLUI_RETURN_IF_FAIL(vd->rm_scroller_bg);
evas_object_show(vd->rm_scroller_bg);
/* Reject message scroller */
- vd->rm_scroller = elm_scroller_add(vd->box);
+ vd->rm_scroller = elm_scroller_add(vd->layout);
if (!vd->rm_scroller) {
err("rm_scroller is NULL");
return __rm_destroy_content(vd);
elm_object_part_content_set(parent, "elm.swallow.content", vd->base_view.contents);
evas_object_show(vd->base_view.contents);
- vd->box = elm_box_add(vd->base_view.contents);
- CALLUI_RETURN_VALUE_IF_FAIL(vd->box, CALLUI_RESULT_ALLOCATION_FAIL);
- evas_object_event_callback_add(vd->box, EVAS_CALLBACK_CHANGED_SIZE_HINTS, __box_changed_hints_cb, vd);
- elm_box_horizontal_set(vd->box, EINA_FALSE);
- evas_object_show(vd->box);
-
- vd->layout = _callui_create_layout(vd->box, CALLUI_LY_STYLE_ACTIVE_NOTI_CALL_MAIN);
+ vd->layout = elm_layout_add(parent);
CALLUI_RETURN_VALUE_IF_FAIL(vd->layout, CALLUI_RESULT_ALLOCATION_FAIL);
+ evas_object_event_callback_add(vd->layout, EVAS_CALLBACK_CHANGED_SIZE_HINTS, __layout_changed_hints_cb, vd);
+ elm_layout_theme_set(vd->layout, "layout", "callui", CALLUI_LY_STYLE_ACTIVE_NOTI_CALL_MAIN);
evas_object_size_hint_weight_set(vd->layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(vd->layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- elm_object_signal_callback_add(vd->layout, "contact_info.clicked",
- "active_noti_main", __contact_info_click_cb, vd);
-
- elm_box_pack_end(vd->box, vd->layout);
+ elm_object_signal_callback_add(vd->layout, "contact_info.clicked", "active_noti_main", __contact_info_click_cb, vd);
+ elm_object_part_content_set(parent, "elm.swallow.active_noti", vd->layout);
Evas_Object *answer_btn = __create_btn(vd,
CALLUI_BTN_STYLE_AN_ACCEPT_CALL,
const callui_call_data_t *call_data = _callui_stp_get_call_data(ad->state_provider, CALLUI_CALL_DATA_INCOMING);
CALLUI_RETURN_VALUE_IF_FAIL(call_data, CALLUI_RESULT_FAIL);
- elm_object_signal_emit(vd->layout, "small_main_ly", "active_noti_main");
-
const char *call_name = call_data->call_ct_info.call_disp_name;
const char *call_number = NULL;
if (call_data->call_disp_num[0] != '\0') {
callui_app_data_t *ad = vd->base_view.ad;
int rotation = _callui_window_get_rotation(ad->window);
int new_x = 0;
- if (vd->rm_scroller) {
- if (rotation == 90 || rotation == 270)
+ if (vd->rm_scroller && (rotation == 90 || rotation == 270)) {
+ if (_callui_common_is_mirrored_mode_on()) {
+ new_x = ACTIVE_NOTI_LANDSCAPE_L_PAD;
+ } else {
new_x = (ad->root_h - ad->root_w - ACTIVE_NOTI_LANDSCAPE_L_PAD);
+ }
}
- evas_object_move(vd->box, new_x, 0);
+ evas_object_move(vd->layout, new_x, 0);
}
static void __parent_resize_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
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);
+ if (_callui_common_is_mirrored_mode_on()) {
+ elm_object_signal_emit(manage_calls_ly, "set_rtl_mode", "manage_calls");
+ }
_callui_action_bar_show(ad->action_bar);
#define CALLUI_BTN_STYLE_SPLIT_MERGE "callui_multi_split_merge_btn"
#define CALLUI_BTN_STYLE_SPLIT_SWAP "callui_multi_split_swap_btn"
+#define CALLUI_BTN_STYLE_SPLIT_MERGE "callui_multi_split_merge_btn"
+#define CALLUI_BTN_STYLE_SPLIT_SWAP "callui_multi_split_swap_btn"
+
#define CALLUI_PART_TEXT_MERGE_SWAP_BTN "text"
#define CALLUI_PART_TEXT_STATUS "text.status"
#define CALLUI_PART_TEXT_MAIN "text.main"
if (active) {
if (active->conf_member_count > 1) {
- elm_object_signal_emit(content, "show_manage_calls_btn", "");
+ if (_callui_common_is_mirrored_mode_on()) {
+ elm_object_signal_emit(content, "show_manage_calls_btn_rtl", "");
+ } else {
+ elm_object_signal_emit(content, "show_manage_calls_btn_ltr", "");
+ }
elm_object_signal_callback_add(content, "mouse,up,*", "arrow", __mng_callers_btn_click_cb, ad);
} else {
elm_object_signal_emit(content, "hide_manage_calls_btn", "");
elm_object_part_content_set(parent, CALLUI_PART_SWALLOW_MERGE, merge);
Evas_Object *swap = __create_merge_swap_btn(parent, CALLUI_BTN_STYLE_SPLIT_SWAP, "IDS_CALL_SK_MULTICALL_SWAP");
- CALLUI_RETURN_VALUE_IF_FAIL(merge, CALLUI_RESULT_ALLOCATION_FAIL);
+ CALLUI_RETURN_VALUE_IF_FAIL(swap, CALLUI_RESULT_ALLOCATION_FAIL);
evas_object_smart_callback_add(swap, "clicked", __swap_btn_click_cb, ad);
elm_object_part_content_set(parent, CALLUI_PART_SWALLOW_SWAP, swap);
int move_x = 0;
int move_y = 0;
- if (window_h->size_type != CALLUI_WIN_SIZE_FULLSCREEN) {
+ if (window_h->size_type == CALLUI_WIN_SIZE_ACTIVE_NOTI) {
switch (angle) {
case 90:
- move_y = ACTIVE_NOTI_LANDSCAPE_L_PAD;
+ if (_callui_common_is_mirrored_mode_on()) {
+ move_y = ad->root_h - win_w - ACTIVE_NOTI_LANDSCAPE_L_PAD;
+ } else {
+ move_y = ACTIVE_NOTI_LANDSCAPE_L_PAD;
+ }
break;
case 180:
move_y = ad->root_h - win_h;
break;
case 270:
move_x = ad->root_w - win_h;
- move_y = ad->root_h - win_w - ACTIVE_NOTI_LANDSCAPE_L_PAD;
+ if (_callui_common_is_mirrored_mode_on()) {
+ move_y = ACTIVE_NOTI_LANDSCAPE_L_PAD;
+ } else {
+ move_y = ad->root_h - win_w - ACTIVE_NOTI_LANDSCAPE_L_PAD;
+ }
break;
default:
break;
__eo_win_update_size(window_h, size_type);
}
+callui_result_e _callui_window_validate_position(callui_window_h window_h)
+{
+ CALLUI_RETURN_VALUE_IF_FAIL(window_h, CALLUI_RESULT_INVALID_PARAM);
+
+ int angle = elm_win_rotation_get(window_h->win);
+ if (window_h->size_type == CALLUI_WIN_SIZE_ACTIVE_NOTI && (angle == 90 || angle == 270)) {
+ dbg("Need window position validation as window is ACTIVE_NOTI and in landscape mode");
+ __eo_win_update_size(window_h, CALLUI_WIN_SIZE_ACTIVE_NOTI);
+ }
+ return CALLUI_RESULT_OK;
+}
+
static callui_result_e __eo_win_set_rotation_locked(callui_window_h window_h, bool is_locked)
{
CALLUI_RETURN_VALUE_IF_FAIL(window_h->rotation_locked != is_locked,
#include <vconf-keys.h>
#include <network/bluetooth.h>
#include <system_settings.h>
+#include <utils_i18n_ulocale.h>
#include "callui.h"
#include "callui-debug.h"
static void __init_signals_handling();
static void __app_signal_handler(int signum, siginfo_t *info, void *context);
+static callui_result_e __check_sys_language_character_orientation_on_rtl(const char *lang, bool *is_rtl);
+static callui_result_e __update_app_language(callui_app_data_t *ad);
+static void __set_app_mirrored_mode(bool is_mirrored_mode);
+
static void __set_main_power_key_grab(callui_app_data_t *ad)
{
callui_result_e res = CALLUI_RESULT_FAIL;
_callui_common_set_lock_state_changed_cb(ad);
+ __update_app_language(ad);
+
return true;
}
return res;
}
-static void __app_lang_changed_cb(app_event_info_h event_info, void *user_data)
+static callui_result_e __check_sys_language_character_orientation_on_rtl(const char *lang, bool *is_rtl)
{
- char *language;
- int r = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &language);
- if (r == SYSTEM_SETTINGS_ERROR_NONE) {
- dbg("language: %s", language);
- elm_language_set(language);
- free(language);
+ dbg("System local language [%s]", lang);
+
+ *is_rtl = false;
+ i18n_ulocale_layout_type_e layout = I18N_ULOCALE_LAYOUT_UNKNOWN;
+ int ret = i18n_ulocale_get_character_orientation(lang, &layout);
+ CALLUI_RETURN_VALUE_IF_FAIL(ret == I18N_ERROR_NONE, CALLUI_RESULT_FAIL);
+
+ switch (layout) {
+ case I18N_ULOCALE_LAYOUT_LTR:
+ dbg("Language is LTR");
+ break;
+ case I18N_ULOCALE_LAYOUT_RTL:
+ dbg("Language is RTL");
+ *is_rtl = true;
+ break;
+ default:
+ err("Unsupported character orientation type [%d]", layout);
+ return CALLUI_RESULT_FAIL;
}
+ return CALLUI_RESULT_OK;
+}
+
+static callui_result_e __update_app_language(callui_app_data_t *ad)
+{
+ char *lang = NULL;
+ int ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &lang);
+ CALLUI_RETURN_VALUE_IF_FAIL(ret == SYSTEM_SETTINGS_ERROR_NONE, CALLUI_RESULT_FAIL);
+ dbg("System local language [%s]", lang);
+
+ elm_language_set(lang);
+
+ bool is_rtl = false;
+ ret = __check_sys_language_character_orientation_on_rtl(lang, &is_rtl);
+ free(lang);
+ CALLUI_RETURN_VALUE_IF_FAIL(ret == CALLUI_RESULT_OK, ret);
+ __set_app_mirrored_mode(is_rtl);
+
+ return CALLUI_RESULT_OK;
+}
+
+static void __set_app_mirrored_mode(bool is_mirrored_mode)
+{
+ elm_config_mirrored_set(is_mirrored_mode);
+}
+
+static void __app_lang_changed_cb(app_event_info_h event_info, void *user_data)
+{
CALLUI_RETURN_IF_FAIL(user_data);
callui_app_data_t *ad = user_data;
- _callui_vm_update_language(ad->view_manager);
+ callui_result_e res = __update_app_language(ad);
+ if (res != CALLUI_RESULT_OK) {
+ err("Update application language failed. res[%d]", res);
+ }
+ res = _callui_window_validate_position(ad->window);
+ if (res != CALLUI_RESULT_OK)
+ {
+ err("Validate window position failed. res[%d]", res);
+ }
+ res = _callui_vm_update_language(ad->view_manager);
+ if (res != CALLUI_RESULT_OK)
+ {
+ err("Update language in view manager failed. res[%d]", res);
+ }
}
static void __app_deinit(callui_app_data_t *ad)
}
if (!_callui_dpm_is_need_enforce_change_password(ad->dpm)) {
- callui_idle_lock_type_t lock_type = _callui_common_get_idle_lock_type();
+ callui_idle_lock_type_e lock_type = _callui_common_get_idle_lock_type();
if (lock_type == CALLUI_LOCK_TYPE_SECURITY_LOCK) {
_callui_common_unlock_swipe_lock();
_callui_window_set_above_lockscreen_state(ad->window, false);