forked from wertarbyte/triggerhappy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
trigger.h
31 lines (25 loc) · 820 Bytes
/
trigger.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
/* Copyright 2010 Stefan Tomanek <[email protected]>
* You have permission to copy, modify, and redistribute under the
* terms of the GPLv3 or any later version.
* For full license terms, see COPYING.
*/
#include "devtag.h"
#define TRIGGER_MODIFIERS_MAX 5
typedef int trigger_modifier[TRIGGER_MODIFIERS_MAX];
typedef struct trigger {
int type;
int code;
int value;
trigger_modifier modifiers;
char *mode;
char devtag[TH_DEVICE_TAG_LENGTH];
char *action;
struct trigger *next;
} trigger;
trigger* parse_trigger(char* line);
void append_trigger(trigger *t);
int read_triggers(const char *filename);
void run_triggers(int type, int code, int value, keystate_holder ksh, device *dev);
void clear_triggers();
void triggers_enabled( int status );
void change_trigger_mode( const char *tmode );