tizen_2.0_build
[profile/ivi/indicator-win.git] / daemon / indicator_ui.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
18 #ifndef __DEF_indicator_H_
19 #define __DEF_indicator_H_
20
21 #include <Elementary.h>
22 #include <Ecore_X.h>
23
24
25 #if !defined(PACKAGE)
26 #  define PACKAGE "indicator"
27 #endif
28
29 #if !defined(LOCALEDIR)
30 #  define LOCALEDIR "/usr/apps/com.samsung.indicator/res/locale"
31 #endif
32
33 #if !defined(EDJDIR)
34 #  define EDJDIR "/usr/apps/com.samsung.indicator/res/edje"
35 #endif
36
37 #if !defined(ICONDIR)
38 #  define ICONDIR "/usr/apps/com.samsung.indicator/res/icons"
39 #endif
40
41 #define EDJ_FILE EDJDIR"/"PACKAGE".edj"
42 #define ICON_THEME_FILE EDJDIR"/"PACKAGE"_icon_theme.edj"
43 #define ICON_NONFIXED_THEME_FILE EDJDIR"/"PACKAGE"_icon_nonfixed_theme.edj"
44
45 #define HOME_SCREEN_NAME                "com.samsung.live-magazine"
46 #define MENU_SCREEN_NAME                "com.samsung.menu-screen"
47 #define LOCK_SCREEN_NAME                "com.samsung.idle-lock"
48 #define QUICKPANEL_NAME                 "E Popup"
49 #define CALL_NAME                       "com.samsung.call"
50 #define VTCALL_NAME                     "com.samsung.vtmain"
51
52 enum _win_type {
53         /* clock view */
54         TOP_WIN_NORMAL = 0,
55         TOP_WIN_LOCK_SCREEN,
56         /* full line of indicator */
57         /* CAUTION: Don't change order!!!! */
58         TOP_WIN_CALL,
59         TOP_WIN_MENU_SCREEN,
60         TOP_WIN_HOME_SCREEN,
61         TOP_WIN_QUICKPANEL
62 };
63
64 enum indicator_opacity_mode{
65         INDICATOR_OPACITY_OPAQUE = 0,
66         INDICATOR_OPACITY_TRANSLUCENT,
67         INDICATOR_OPACITY_TRANSPARENT,
68 };
69
70 struct appdata {
71         Evas *evas;
72         Evas_Object *win_main;
73         Evas_Object *layout_main;       /* layout widget based on EDJ */
74
75 #ifdef HOME_KEY_EMULATION
76         /* for H/W home key emulation */
77         Ecore_X_Atom atom_hwkey;
78         Ecore_X_Window win_hwkey;
79 #endif /* HOME_KEY_EMULATION */
80
81         int w;
82         int h;
83         double xscale;
84         double yscale;
85         double scale;
86         int angle;
87
88         Eina_Bool lock;
89         Eina_Bool menu;
90         Eina_Bool quickpanel;
91
92         int notifd;
93         Eina_List *evt_handlers;
94
95         enum indicator_opacity_mode opacity_mode;
96
97         enum _win_type top_win;
98         struct {
99                 Eina_Bool trigger;
100                 int x;
101                 int y;
102         } mouse_event;
103
104         void (*update_display) (int);
105 };
106
107 #endif                          /* __DEF_indicator_H__ */