summaryrefslogtreecommitdiffstats
path: root/project.h
blob: 0018d2333efc745188012fbd0f8f1309f07d6c30 (plain)
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
#include <stdio.h>
#include <linux/input.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <dirent.h>
#include <malloc.h>
#include <usb.h>
#include <stdlib.h>
#include <stdint.h>

#ifdef BROMIUM
#undef APPLE_KEYBOARD
#define N_COMPUTER 5
#define N_CONSOLE 1
#define MAP_NULL
#define LAYOUT_NULL
#endif

#ifdef HOME
#define N_COMPUTER 7
#define N_CONSOLE 3
#define MAP_HOME
#define LAYOUT_HOME
#endif

typedef struct MM_struct MM;

typedef struct input_dev
{
  struct input_dev *next;
  int id;                       /* /dev/input/event%d */
  int present;                  /* !0 if the device file exists */
  int fd;                       /* fd if the device is open, -1 otherwise */
  int blacklistid;              /* !0 if the device is a km link */
} input_dev_t;

#define OUTPUT_KEY_LIST_LEN 10

typedef struct output_dev
{
  struct output_dev *next;

  char filename[PATH_MAX + 1];
  int present;

  struct usb_dev_handle *devh;
  uint32_t seq;

  uint8_t keys[OUTPUT_KEY_LIST_LEN];

} output_dev_t;



#include "prototypes.h"