Initialize Tizen 2.3
[apps/home/b2-clocksetting.git] / include / setting-sound.h
1 /*
2  * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
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
37 #define TOUCH_SOUND_ENABLE              1
38 #define TOUCH_SOUND_DISABLE     0
39
40
41 enum {
42         VIBRATION_LEVEL_HIGH,
43         VIBRATION_LEVEL_LOW
44 };
45
46 enum {
47         VIBRATION_LEVEL_LOW_INT  = 1,
48         VIBRATION_LEVEL_MID_INT  = 2,
49         VIBRATION_LEVEL_HIGH_INT = 3
50 };
51
52 struct _sound_menu_item {
53         char *name;
54         int is_enable_touch_sound;
55         void (*func)(void *data, Evas_Object *obj, void *event_info);
56 };
57
58 typedef struct Sound_Item_Data
59 {
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_ */