Apply new directory policy to RSA git branch.
[apps/native/volume-app.git] / src / volume.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 __VOLUME_H__
19 #define __VOLUME_H__
20
21 #include <Elementary.h>
22 #include <mm_sound.h>
23 #include <ui-gadget.h>
24 #include <syspopup.h>
25 #include <appcore-efl.h>
26 #include <Ecore_X.h>
27
28 #if !defined(PACKAGE)
29 #  define PACKAGE "volume"
30 #endif
31
32 #if !defined(RESDIR)
33 #  define RESDIR "/usr/apps/com.samsung.volume/res"
34 #endif
35
36 #if !defined(LOCALEDIR)
37 #  define LOCALEDIR RESDIR"/locale"
38 #endif
39
40 #if !defined(EDJDIR)
41 #  define EDJDIR RESDIR"/edje"
42 #endif
43
44 #define EDJ_THEME EDJDIR"/volume_popup.edj"
45 #define GRP_VOLUME_SLIDER "popup_slider_style"
46 #define GRP_VOLUME_SLIDER_WITH_WARNING "popup_slider_text_style_with_warn_label"
47 #define EDJ_APP EDJDIR"/volume_app.edj"
48 #define GRP_VOLUME_BLOCKEVENTS "block_events"
49 #define GRP_VOLUME_LAYOUT "volumeLayout"
50 #define GRP_VOLUME_CONTENT "volumeLayoutContent"
51 #define GRP_VOLUME_SLIDER_HORIZONTAL "volumeHorizontalSlider"
52
53 #define IMG_VOLUME_ICON "/00_volume_icon.png"
54 #define IMG_VOLUME_ICON_CALL "/00_volume_icon_Call.png"
55 #define IMG_VOLUME_ICON_MUTE "/00_volume_icon_Mute.png"
56 #define IMG_VOLUME_ICON_VIB "/00_volume_icon_Vibrat.png"
57 #define IMG_VOLUME_ICON_HEADPHONE "/00_volume_icon_headphone.png"
58 #define IMG_VOLUME_ICON_MEDIA "/00_volume_icon_media.png"
59 #define IMG_VOLUME_ICON_SETTINGS "/00_volume_icon_settings.png"
60 #define IMG_VOLUME_ICON_SETTINGS_PRESSED "/00_volume_icon_settings_pressed.png"
61 #define IMG_VOLUME_WINSET_DIVIDER_LINE "/00_winset_divider_line.png"
62
63 #define S_(str) dgettext("sys_string", str)
64 #define T_(str) dgettext(PACKAGE, str)
65
66 #define ADD_TIMER(x, time, _timer_cb, data) \
67         x = ecore_timer_add(time, _timer_cb, data);\
68
69 #define DEL_TIMER(x) \
70         if (x) {\
71                 ecore_timer_del(x);\
72                 x = NULL;\
73         }
74
75 struct appdata
76 {
77         Evas_Object *win, *block_events, *ly, *sl, *ic, *ic_settings, *warn_lb;
78
79         Ecore_Timer *ptimer;
80         Ecore_Timer *stimer;    /* slider timer */
81         Ecore_Timer *sutimer, *sdtimer, *lutimer, *ldtimer;     /* long press */
82         Ecore_Timer *warntimer; /* warning message timer */
83         Ecore_Timer *luwarmtimer, *ldwarmtimer;
84         volume_type_t type;
85         int step;
86         int angle;
87
88         /* ug handler */
89         ui_gadget_h ug;
90
91         /* add more variables here */
92         int sh; /* svi handle */
93         int flag_pressing;      /* to set hard key press */
94         int flag_touching;
95         int flag_launching;
96         int flag_deleting;
97         int flag_warning;       /* set device warning flag */
98 };
99
100 #endif /* __VOLUME_H__ */
101