forked from nemomobile/mce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
event-input.h
60 lines (48 loc) · 1.98 KB
/
event-input.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
/**
* @file event-input.h
* Headers for the /dev/input event provider for the Mode Control Entity
* <p>
* Copyright © 2007-2011 Nokia Corporation and/or its subsidiary(-ies).
* <p>
* @author David Weinehall <[email protected]>
*
* 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 _EVENT_INPUT_H_
#define _EVENT_INPUT_H_
#include <glib.h>
#include <linux/input.h> /* KEY_POWER */
/** Path to the input device directory */
#define DEV_INPUT_PATH "/dev/input"
/** Prefix for event files */
#define EVENT_FILE_PREFIX "event"
/** Path to the GPIO key disable interface */
#define GPIO_KEY_DISABLE_PATH "/sys/devices/platform/gpio-keys/disabled_keys"
/**
* Delay between I/O monitoring setups and keypress repeats; 1 second
*/
#define MONITORING_DELAY 1
/** Name of Homekey configuration group */
#define MCE_CONF_HOMEKEY_GROUP "HomeKey"
/** Name of configuration key for long [home] press delay */
#define MCE_CONF_HOMEKEY_LONG_DELAY "HomeKeyLongDelay"
/** Name of configuration key for short [home] press action */
#define MCE_CONF_HOMEKEY_SHORT_ACTION "HomeKeyShortAction"
/** Name of configuration key for long [home] press action */
#define MCE_CONF_HOMEKEY_LONG_ACTION "HomeKeyLongAction"
/** Long delay for the [home] button in milliseconds */
#define DEFAULT_HOME_LONG_DELAY 800 /* 0.8 seconds */
/* When MCE is made modular, this will be handled differently */
gboolean mce_input_init(void);
void mce_input_exit(void);
#endif /* _EVENT_INPUT_H_ */