Remove trivial unnecessary build dependency
[apps/core/preloaded/lockscreen.git] / src / camera_view.c
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #include "camera_view.h"
18 #include "util.h"
19 #include "log.h"
20 #include "lockscreen.h"
21 #include "util_time.h"
22
23 #include <Elementary.h>
24
25 static void _camera_clicked(void *data, Evas_Object *obj, const char *emission, const char *source)
26 {
27         evas_object_smart_callback_call(data, SIGNAL_CAMERA_SELECTED, NULL);
28 }
29
30 Evas_Object *lockscreen_camera_view_create(Evas_Object *parent)
31 {
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");
35                 return false;
36         }
37         elm_object_signal_callback_add(cam_ly, "camera,icon,clicked", "camera-layout", _camera_clicked, cam_ly);
38
39         evas_object_show(cam_ly);
40         return cam_ly;
41 }