#include <system_settings.h>
#include <efl_util.h>
#include <app_common.h>
- #include <Ecore_Wayland.h>
+#include <msg.h>
+#include <msg_transport.h>
+ // TODO: needed for functionality of switch window types that currently does not work
+ //#include <Ecore_Wayland.h>
#include "callui-common.h"
+#include "callui-debug.h"
#include "callui-view-elements.h"
#include "callui.h"
#include "callui-view-dialing.h"
return 0;
}
-long _callui_common_get_uptime(void)
-{
- struct sysinfo info;
-
- if (sysinfo(&info) == 0) {
- return info.uptime;
- }
- return 0;
-}
-
void _callui_common_win_set_noti_type(void *appdata, int bwin_noti)
{
- dbg("_callui_common_win_set_noti_type START");
- callui_app_data_t *ad = (callui_app_data_t *)appdata;
-
- Ecore_Wl_Window *win = elm_win_wl_window_get(ad->win);
- if (bwin_noti == EINA_FALSE) {
- dbg("window type: NORMAL");
- /* Set Normal window */
- ecore_wl_window_type_set(win, ECORE_WL_WINDOW_TYPE_TOPLEVEL);
- } else {
- dbg("window type: NOTI-HIGH");
- /* Set Notification window */
- ecore_wl_window_type_set(win, ECORE_WL_WINDOW_TYPE_NOTIFICATION);
- /* Set Notification's priority to LEVEL_HIGH */
- efl_util_set_notification_window_level(ad->win, EFL_UTIL_NOTIFICATION_LEVEL_TOP);
- }
- dbg("_callui_common_win_set_noti_type END");
-
- return;
+ dbg("_callui_common_win_set_noti_type");
+ // TODO: commented until functionality of switch window types will be fixed
+ // callui_app_data_t *ad = (callui_app_data_t *)appdata;
+ //
+ // Ecore_Wl_Window *win = elm_win_wl_window_get(ad->win);
+ // if (bwin_noti == EINA_FALSE) {
+ // dbg("window type: NORMAL");
+ // /* Set Normal window */
+ // ecore_wl_window_type_set(win, ECORE_WL_WINDOW_TYPE_TOPLEVEL);
+ // } else {
+ // dbg("window type: NOTI-HIGH");
+ // /* Set Notification window */
+ // ecore_wl_window_type_set(win, ECORE_WL_WINDOW_TYPE_NOTIFICATION);
+ // /* Set Notification's priority to LEVEL_HIGH */
+ // efl_util_set_notification_window_level(ad->win, EFL_UTIL_NOTIFICATION_LEVEL_TOP);
+ // }
}
-void _callui_common_get_contact_info(int person_id, call_contact_data_t *ct_info)
-{
- dbg("_callui_common_get_contact_info");
- contacts_error_e err = CONTACTS_ERROR_NONE;
- contacts_record_h person_record = NULL;
-
- if (person_id == -1) {
- err("Invalid contact index!!!");
- return;
- }
-
- if (ct_info == NULL) {
- err("Empty contact info!!!");
- return;
- }
-
- err = contacts_connect();
- if (CONTACTS_ERROR_NONE != err) {
- err("contacts_connect is error : %d", err);
- return;
- }
-
- ct_info->person_id = person_id;
- err = contacts_db_get_record(_contacts_person._uri, person_id, &person_record);
- if (CONTACTS_ERROR_NONE != err) {
- err("contacts_db_get_record error %d", err);
- } else {
- char *name = NULL;
- char *img_path = NULL;
-
- /* Get display name */
- err = contacts_record_get_str(person_record, _contacts_person.display_name, &name);
- if (CONTACTS_ERROR_NONE != err) {
- err("contacts_record_get_str(display name) error %d", err);
- } else {
- g_strlcpy(ct_info->call_disp_name, name, CALLUI_DISPLAY_NAME_LENGTH_MAX);
- free(name);
- }
-
- /* Get caller id path */
- err = contacts_record_get_str(person_record, _contacts_person.image_thumbnail_path, &img_path);
- if (CONTACTS_ERROR_NONE != err) {
- err("contacts_record_get_str(caller id path) error %d", err);
- } else {
- g_strlcpy(ct_info->caller_id_path, img_path, CALLUI_IMAGE_PATH_LENGTH_MAX);
- free(img_path);
- }
- contacts_record_destroy(person_record, TRUE);
- }
-
- dbg("contact index:[%d]", ct_info->person_id);
- dbg("display name:[%s]", ct_info->call_disp_name);
- dbg("img path:[%s]", ct_info->caller_id_path);
-
- contacts_disconnect();
- return;
-}
-
void _callui_common_launch_contacts(void *appdata)
{
dbg("..");
point_distance = __callui_view_circle_get_distance(ad, accept_button_center_x, x, y);
if (point_distance >= outer_circle_radius) {
evas_object_move(circle_bg, accept_outer_circle_x, outer_circle_y);
- evas_object_resize(circle_bg, outer_circle_width, outer_circle_height);
- evas_object_image_fill_set(circle_bg, 0, 0, outer_circle_width, outer_circle_height);
+ evas_object_resize(circle_bg,
+ ELM_SCALE_SIZE(outer_circle_width), ELM_SCALE_SIZE(outer_circle_height));
+ evas_object_image_fill_set(circle_bg, 0, 0,
+ ELM_SCALE_SIZE(outer_circle_width), ELM_SCALE_SIZE(outer_circle_height));
dbg("__callui_view_circle_handle_accept");
- __callui_view_circle_handle_accept(vd, ad);
+ __callui_view_circle_handle_accept(ad);
} else {
elm_object_signal_emit(lock_accept, "outer_circle,hide", "outer-circle");
}
point_distance = __callui_view_circle_get_distance(ad, reject_button_center_x, x, y);
if (point_distance >= outer_circle_radius) {
evas_object_move(circle_bg, reject_outer_circle_x, outer_circle_y);
- evas_object_resize(circle_bg, outer_circle_width, outer_circle_height);
- evas_object_image_fill_set(circle_bg, 0, 0, outer_circle_width, outer_circle_height);
+ evas_object_resize(circle_bg,
+ ELM_SCALE_SIZE(outer_circle_width), ELM_SCALE_SIZE(outer_circle_height));
+ evas_object_image_fill_set(circle_bg, 0, 0,
+ ELM_SCALE_SIZE(outer_circle_width), ELM_SCALE_SIZE(outer_circle_height));
- __callui_view_circle_handle_reject(vd, ad);
+ __callui_view_circle_handle_reject(ad);
} else {
elm_object_signal_emit(lock_reject, "outer_circle,hide", "outer-circle");
elm_object_signal_emit(lock_reject, "inner_circle,show", "inner-circle");