2 * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
4 * This file is part of <phone-lock>
5 * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
7 * PROPRIETARY/CONFIDENTIAL
9 * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
10 * You shall not disclose such Confidential Information and shall use it only in accordance
11 * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
12 * SAMSUNG make no representations or warranties about the suitability of the software,
13 * either express or implied, including but not limited to the implied warranties of merchantability,
14 * fitness for a particular purpose, or non-infringement.
15 * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
16 * modifying or distributing this software or its derivatives.
20 #include <ui-gadget-module.h>
23 #include "phone-lock-gadget.h"
24 #include "phone-lock-util.h"
26 static phone_lock_gadget_destroy_cb gdestroy_cb = NULL;
29 _phone_lock_gadget_layout_cb(struct ui_gadget *ug, enum ug_mode mode,
32 PHONE_LOCK_DBG("%s\n", __FUNCTION__);
40 base = (Evas_Object *) ug_get_layout(ug);
41 win = (Evas_Object *) ug_get_window();
44 PHONE_LOCK_DBG("Error : base layout is null.\n",
50 case UG_MODE_FULLVIEW:
51 evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND,
53 elm_win_resize_object_add(win, base);
54 evas_object_show(base);
62 _phone_lock_gadget_result_cb(struct ui_gadget *ug, bundle * result, void *priv)
64 PHONE_LOCK_DBG("%s\n", __FUNCTION__);
67 static void _phone_lock_gadget_destroy_cb(struct ui_gadget *ug, void *priv)
69 PHONE_LOCK_DBG("%s\n", __FUNCTION__);
78 void *phone_lock_gadget_show_dialer(Evas_Object * win, struct ui_gadget *parent,
79 phone_lock_gadget_destroy_cb destroy_cb,
82 PHONE_LOCK_DBG("%s\n", __FUNCTION__);
87 struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs));
92 bundle_add(b, "emergency_dialer", "emergency");
94 cbs->layout_cb = _phone_lock_gadget_layout_cb;
95 cbs->result_cb = _phone_lock_gadget_result_cb;
96 cbs->destroy_cb = _phone_lock_gadget_destroy_cb;
97 cbs->priv = user_data;
99 gdestroy_cb = destroy_cb;
101 ug = ug_create(parent, "dialer-efl", UG_MODE_FULLVIEW, b, cbs);
106 evas_object_show(win);
108 PHONE_LOCK_DBG("%s : win %p\n", __FUNCTION__, win);