2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include "camera_view.h"
20 #include "lockscreen.h"
21 #include "util_time.h"
23 #include <Elementary.h>
25 static void _camera_clicked(void *data, Evas_Object *obj, const char *emission, const char *source)
27 evas_object_smart_callback_call(data, SIGNAL_CAMERA_SELECTED, NULL);
30 Evas_Object *lockscreen_camera_view_create(Evas_Object *parent)
32 Evas_Object *cam_ly = elm_layout_add(parent);
33 if (!elm_layout_file_set(cam_ly, util_get_res_file_path(LOCK_EDJE_FILE), "camera-layout")) {
34 FAT("elm_layout_file_set failed");
37 elm_object_signal_callback_add(cam_ly, "camera,icon,clicked", "camera-layout", _camera_clicked, cam_ly);
39 evas_object_show(cam_ly);