2 * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 #include <Elementary.h>
22 #include <sound_manager.h>
23 #include <ui-gadget.h>
25 #include <appcore-efl.h>
27 #include <notification.h>
28 #include <syspopup_caller.h>
31 # define PACKAGE "volume"
35 # define RESDIR "/usr/apps/org.tizen.volume/res"
38 #if !defined(LOCALEDIR)
39 # define LOCALEDIR RESDIR"/locale"
43 # define EDJDIR RESDIR"/edje"
47 # define PKGNAME "org.tizen.volume"
50 #define EDJ_APP EDJDIR"/volume_app.edj"
52 #define IMG_VOLUME_ICON "00_volume_icon.png"
53 #define IMG_VOLUME_ICON_CALL "00_volume_icon_call.png"
54 #define IMG_VOLUME_ICON_MUTE "00_volume_icon_mute.png"
55 #define IMG_VOLUME_ICON_VIB "00_volume_icon_vibrat.png"
56 #define IMG_VOLUME_ICON_NOTI "00_volume_icon_notification.png"
57 #define IMG_VOLUME_ICON_NOTI_VIB "00_volume_icon_notification_vibrate.png"
58 #define IMG_VOLUME_ICON_NOTI_MUTE "00_volume_icon_notification_mute.png"
59 #define IMG_VOLUME_ICON_HEADPHONE "00_volume_icon_headphone.png"
60 #define IMG_VOLUME_ICON_MEDIA "00_volume_icon_media.png"
61 #define IMG_VOLUME_ICON_SETTINGS "00_volume_icon_settings.png"
62 #define IMG_VOLUME_ICON_SETTINGS_PRESSED "00_volume_icon_settings_pressed.png"
63 #define IMG_VOLUME_ICON_SETTINGS_DISABLED "00_volume_icon_settings_disabled.png"
65 #define _EDJ(x) elm_layout_edje_get(x)
66 #define _X(x) (x) / elm_app_base_scale_get() * elm_config_scale_get()
68 #define S_(str) dgettext("sys_string", str)
69 #define T_(str) dgettext(PACKAGE, str)
71 #define _(str) gettext(str)
73 #ifndef VCONFKEY_SETAPPL_ACCESSIBILITY_TURN_OFF_ALL_SOUNDS
74 #define VCONFKEY_SETAPPL_ACCESSIBILITY_TURN_OFF_ALL_SOUNDS VCONFKEY_SETAPPL_PREFIX"/accessibility/turn_off_all_sounds"
77 /* Fake-BG : bundle */
78 #define SHOWLOCK "show_lock"
81 /* For voice control */
82 #define SHOWVOLUME "show_volume"
84 #define LOCKSCREEN_PKG "org.tizen.lockscreen"
86 #define SCREEN_W_HD 720
87 #define SCREEN_H_HD 1280
89 #define SCREEN_W_WVGA 480
90 #define SCREEN_H_WVGA 800
92 #define SCREEN_W_FHD 1080
93 #define SCREEN_H_FHD 1920
96 #define WIN_HEIGHT_WITH_WARNING 222
97 #define WIN_HEIGHT 102
99 #define WIN_LANDSCAPE_X 79
100 #define WIN_LANDSCAPE_INVERTED_X volume_control_viewport_width_get()-WIN_HEIGHT_WITH_WARNING-WIN_LANDSCAPE_X
101 #define WIN_LANDSCAPE_Y (volume_control_viewport_height_get()-WIN_WIDTH)/2
102 #define WIN_PORTRAIT_X 12
103 #define WIN_PORTRAIT_Y 113
104 #define WIN_SLIDER_TOUCHING_OFFSET 55
106 #define SOUND_TYPE_SYSTEM 0
107 #define SOUND_TYPE_NOTIFICATION 1
108 #define SOUND_TYPE_ALARM 2
109 #define SOUND_TYPE_RINGTONE 3
110 #define SOUND_TYPE_MEDIA 4
111 #define SOUND_TYPE_CALL 5
113 #define VOLUME_MAX_SAFETY_VOLUME_LEVEL 10
116 TYPE_VCONF_SOUND_STATUS = 0,
117 TYPE_VCONF_VIBRATION_STATUS
118 } volume_vconf_type_e;
120 /* Volume : return values */
123 VOLUME_ERROR_FAIL = -1,
124 VOLUME_ERROR_INVALID_PARAMETER = -2,
125 VOLUME_ERROR_NO_DATA = -3
128 #endif /* __VOLUME_H__ */