[UI]Lockscreen for RSA
[apps/home/lockscreen.git] / src / lockscreen.h
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
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 #ifndef __LOCKSCREEN_H__
18 #define __LOCKSCREEN_H__
19
20 #include <Elementary.h>
21 #include "log.h"
22
23 #if !defined(PACKAGE)
24 #define PACKAGE "lockscreen"
25 #endif
26
27 #if !defined(EDJDIR)
28 #define EDJDIR "/usr/apps/org.tizen."PACKAGE"/res/edje/lockscreen"
29 #endif
30
31 #define EDJEFILE EDJEDIR"/"PACKAGE".edj"
32
33 #define _S(str) dgettext("sys_string", str)
34 #define _L(str) dgettext("lockscreen", str)
35 #define _NOT_LOCALIZED(str) (str)
36
37 #define _EDJ(x) elm_layout_edje_get(x)
38 #define _X(x) (x*elm_config_scale_get())
39
40 #define FLICK_LINE 898
41 #define SLIDER_RATIO_H 0.089
42 #define SLIDER_RATIO_Y 0.872
43
44 enum {
45         POS_DOWN = 0,
46         POS_MOVE,
47         POS_UP,
48         POS_REC,//to record the pre position
49         STEP,
50         POS_MAX
51 };
52
53 struct appdata {
54         Evas_Object *win;
55         Evas_Object *ly_main;//top_layout
56
57         Evas_Coord win_w;
58         Evas_Coord win_h;
59         Evas_Coord posx[POS_MAX];
60         Evas_Coord posy[POS_MAX];
61
62         Evas_Object *info;//time
63         Evas_Object *noti;
64         Evas_Object *ly_simple_password;
65         Evas_Object *ly_complex_password;
66         Evas_Object *c_password_entry;
67         Evas_Object *event_bg;
68         Evas_Object *slider;
69
70         Evas_Coord_Rectangle slider_rel1;
71         Evas_Coord_Rectangle slider_rel2;
72
73         Eina_Bool bFlick;//flick to launch shorcuts
74         Eina_Bool bDrag;//for drag lock
75
76         void *h_password_policy;
77         Ecore_Timer *password_timer;
78         int block_seconds;
79         Eina_Bool is_disabled;
80 };
81
82 #endif