tizen 2.3.1 release
[apps/home/b2-clocksetting.git] / include / setting-sound.h
1 /*
2  *  Copyright (c) 2014 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://floralicense.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  * setting-sound.h
19  *
20  *  Created on: Oct 8, 2013
21  *      Author: min-hoyun
22  */
23
24 #ifndef SETTING_SOUND_H_
25 #define SETTING_SOUND_H_
26
27 #include <Elementary.h>
28 #include <libintl.h>
29 #include <string.h>
30
31 #include <player.h>
32 #include <sound_manager.h>
33
34 #define ITEM_SIZE                       6
35 /*#define RINGTONE_MAX_COUNT            5 */
36 #define RINGTONE_MAX_COUNT              6
37
38 #define TOUCH_SOUND_ENABLE              1
39 #define TOUCH_SOUND_DISABLE     0
40
41
42 enum {
43         VIBRATION_LEVEL_HIGH,
44         VIBRATION_LEVEL_LOW
45 };
46
47 enum {
48         VIBRATION_LEVEL_LOW_INT  = 1,
49         VIBRATION_LEVEL_MID_INT  = 2,
50         VIBRATION_LEVEL_HIGH_INT = 3
51 };
52
53 struct _sound_menu_item {
54         char *name;
55         int is_enable_touch_sound;
56         void (*func)(void *data, Evas_Object *obj, void *event_info);
57 };
58
59 typedef struct Sound_Item_Data {
60         int index;
61         Elm_Object_Item *item;
62         Evas_Object *check;
63 } Sound_Item_Data;
64
65 char *_gl_Sound_title_get(void *data, Evas_Object *obj, const char *part);
66 Evas_Object *_gl_sound_check_get(void *data, Evas_Object *obj, const char *part);
67 Evas_Object *_create_sound_list(void *data);
68 void _sound_chk_changed_cb(void *data, Evas_Object *obj, void *event_info);
69 void _volume_cb(void *data, Evas_Object *obj, void *event_info);
70 void _sound_mode_cb(void *data, Evas_Object *obj, void *event_info);
71 void _touch_sound_cb(void *data, Evas_Object *obj, void *event_info);
72 void _ringtone_cb(void *data, Evas_Object *obj, void *event_info);
73 void _noti_cb(void *data, Evas_Object *obj, void *event_info);
74 void _vibrate_cb(void *data, Evas_Object *obj, void *event_info);
75 void _preferred_cb(void *data, Evas_Object *obj, void *event_info);
76 void _show_sound_mode_list(void *data);
77 void _show_ringtone_popup_cb(void *data, Evas_Object *obj, void *event_info);
78 void _show_notification_popup_cb(void *data, Evas_Object *obj, void *event_info);
79 void _show_vibration_popup_cb(void *data, Evas_Object *obj, void *event_info);
80 void _show_pref_arm_mode_list(void *data);
81
82 void _initialize();
83 void _clear_sound_resource();
84 Eina_Bool _clear_sound_cb(void *data, Elm_Object_Item *it);
85 void _stop_player();
86 void _stop_wav_player();
87 void _stop_all_sound_play();
88
89 #endif /* SETTING_SOUND_H_ */