/
doubletap.h
77 lines (60 loc) · 2.78 KB
/
doubletap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/**
* @file doubletap.h
* Doubletap control module -- this handles gesture enabling/disabling
* <p>
* Copyright (C) 2013-2019 Jolla Ltd.
* <p>
* @author Simo Piiroinen <simo.piiroinen@jollamobile.com>
*
* mce is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* mce is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with mce. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DOUBLETAP_H_
# define DOUBLETAP_H_
/* ========================================================================= *
* Configuration
* ========================================================================= */
/** Name of doubletap ini file configuration group */
# define MCE_CONF_DOUBLETAP_GROUP "DoubleTap"
/** Name of the configuration key for doubletap wakeup control file */
# define MCE_CONF_DOUBLETAP_CONTROL_PATH "ControlPath"
/** Name of the configuration key for doubletap enable value */
# define MCE_CONF_DOUBLETAP_ENABLE_VALUE "EnableValue"
/** Name of the configuration key for doubletap disable value */
# define MCE_CONF_DOUBLETAP_DISABLE_VALUE "DisableValue"
/** Name of touch panel ini file configuration group */
# define MCE_CONF_TPSLEEP_GROUP "TouchPanelSleep"
/** Name of the configuration key for touch panel sleep control file */
# define MCE_CONF_TPSLEEP_CONTROL_PATH "ControlPath"
/** Name of the configuration key for touch panel sleep allowed value */
# define MCE_CONF_TPSLEEP_ALLOW_VALUE "AllowValue"
/** Name of the configuration key for touch panel sleep denied value */
# define MCE_CONF_TPSLEEP_DENY_VALUE "DenyValue"
/* ========================================================================= *
* Settings
* ========================================================================= */
/** Double tap wakeup enable modes */
typedef enum
{
/** Double tap wakeups disabled */
DBLTAP_ENABLE_NEVER = 0,
/** Double tap wakeups always enabled */
DBLTAP_ENABLE_ALWAYS = 1,
/** Double tap wakeups enabled when PS is not covered */
DBLTAP_ENABLE_NO_PROXIMITY = 2,
} dbltap_mode_t;
/** Prefix for doubletap setting keys */
# define MCE_SETTING_DOUBLETAP_PATH "/system/osso/dsm/doubletap"
/** When doubletap detection is enabled */
# define MCE_SETTING_DOUBLETAP_MODE MCE_SETTING_DOUBLETAP_PATH "/mode"
# define MCE_DEFAULT_DOUBLETAP_MODE 2 // = DBLTAP_ENABLE_NO_PROXIMITY
#endif /* DOUBLETAP_H_ */