Initialize Tizen 2.3
[apps/home/b2-clocksetting.git] / include / setting_control_haptic.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 #ifndef _SETTING_CONTROL_HAPTIC_
18 #define _SETTING_CONTROL_HAPTIC_
19
20 #include <Elementary.h>
21 #include <dd-haptic.h>
22
23 #define SETTING_DEFAULT_HAPTIC_PREVIEW_VIB              "/opt/share/settings/Vibrations/B2_System_Vibration_Preview_140221.ivt"
24 #define SETTING_DEFAULT_SYSTEM_HAPTIC_PREVIEW_VIB               "/opt/share/settings/Vibrations/B2_System_Long_v2_140221.ivt"
25 #define SETTING_DEFAULT_NOTIFICATION_GENERAL_PREVIEW_VIB                "/opt/usr/share/settings/Vibrations/B2_Notification_General_v5_140306.ivt"
26 #define SETTING_VIB_FEEDBACK_RATE                               20
27
28 #define SETTING_VIB_STRONG_RATE                 49      // 70
29 #define SETTING_VIB_MEDIUM_RATE                 49
30 #define SETTING_VIB_WEAK_RATE                   20      // 30
31
32 struct _haptic_data
33 {
34         int is_haptic_opened;
35 };
36
37 int _haptic_open();
38 int _is_haptic_open();
39 int _haptic_close();
40
41 Eina_Bool __vibration_timeout(void *data);
42 void _start_vibration(int level, int feedback_rate, char * res_path);
43
44 #endif