add language files
[apps/home/draglock.git] / include / draglock.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 __DRAGLOCK_H__
18 #define __DRAGLOCK_H__
19
20 #include <Elementary.h>
21 #include <power.h>
22
23 #ifdef  LOG_TAG
24 #undef  LOG_TAG
25 #endif
26 #define LOG_TAG "DRAGLOCK"
27
28 #include <dlog.h>
29
30 #define DRAGLOCK_ERR(fmt, arg...)  LOGE("["LOG_TAG"%s:%d:E] : %s "fmt, __FILE__, __LINE__, __func__, ##arg)
31 #define DRAGLOCK_DBG(fmt, arg...)  LOGD("["LOG_TAG"%s:%d:D] : %s "fmt, __FILE__, __LINE__, __func__, ##arg)
32 #define DRAGLOCK_WARN(fmt, arg...) LOGW("["LOG_TAG"%s:%d:D] : %s "fmt, __FILE__, __LINE__, __func__, ##arg)
33
34 #if !defined(PACKAGE)
35 #define PACKAGE "draglock"
36 #endif
37
38 #if !defined(PKGNAME)
39 #define PKGNAME "org.tizen."PACKAGE
40 #endif
41
42 #if !defined(EDJEDIR)
43 #define EDJEDIR "/opt/apps/"PKGNAME"/res/edje"
44 #endif
45
46 #define EDJEFILE EDJEDIR"/"PACKAGE".edj"
47
48 #define _S(str) dgettext("sys_string", str)
49 #define _(str) gettext(str)
50
51 #define _EDJ(x) elm_layout_edje_get(x)
52
53 #define DEFAULT_WIN_WIDTH 720
54 #define DEFAULT_SLIDE_HEIGHT 114
55 #define DEFAULT_SLIDE_Y 1116
56 #define SLIDE_RATIO_H 0.089
57 #define SLIDE_RATIO_Y 0.872
58
59 struct appdata {
60         Evas_Object *win;
61
62         int win_w;
63         int win_h;
64
65         double scale;
66
67         Evas_Object *ui_layout;
68         Evas_Object *time_layout;
69         Evas_Object *slide_layout;
70
71         Ecore_Timer *clock_timer;
72
73         int slide_status; // 0 : invalid 1 : valid
74         int slide_step;
75
76         Evas_Coord_Rectangle slide_rel1;
77         Evas_Coord_Rectangle slide_rel2;
78
79         power_state_e power_state;
80         int sound_handle;
81 };
82
83 #endif /* __DRAGLOCK_H__ */