summaryrefslogtreecommitdiff
path: root/src/mtouch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mtouch.c')
-rw-r--r--src/mtouch.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/mtouch.c b/src/mtouch.c
index 5cb84fe..f7ffb12 100644
--- a/src/mtouch.c
+++ b/src/mtouch.c
@@ -21,8 +21,6 @@
21 21
22#include "mtouch.h" 22#include "mtouch.h"
23 23
24/******************************************************/
25
26int configure_mtouch(struct MTouch *mt, int fd) 24int configure_mtouch(struct MTouch *mt, int fd)
27{ 25{
28 int rc = read_capabilities(&mt->caps, fd); 26 int rc = read_capabilities(&mt->caps, fd);
@@ -32,8 +30,6 @@ int configure_mtouch(struct MTouch *mt, int fd)
32 return 0; 30 return 0;
33} 31}
34 32
35/******************************************************/
36
37int open_mtouch(struct MTouch *mt, int fd) 33int open_mtouch(struct MTouch *mt, int fd)
38{ 34{
39 int rc; 35 int rc;
@@ -45,8 +41,6 @@ int open_mtouch(struct MTouch *mt, int fd)
45 return rc; 41 return rc;
46} 42}
47 43
48/******************************************************/
49
50int close_mtouch(struct MTouch *mt, int fd) 44int close_mtouch(struct MTouch *mt, int fd)
51{ 45{
52 int rc; 46 int rc;
@@ -54,22 +48,16 @@ int close_mtouch(struct MTouch *mt, int fd)
54 return rc; 48 return rc;
55} 49}
56 50
57/******************************************************/ 51int read_synchronized_event(struct MTouch *mt, int fd)
58
59bool read_synchronized_event(struct MTouch *mt, int fd)
60{ 52{
61 const struct input_event* ev; 53 const struct input_event *ev;
62 while(ev = get_iobuf_event(&mt->buf, fd)) 54 while (ev = get_iobuf_event(&mt->buf, fd))
63 if (read_hwdata(&mt->hw, ev)) 55 if (read_hwdata(&mt->hw, ev))
64 return 1; 56 return 1;
65 return 0; 57 return 0;
66} 58}
67 59
68/******************************************************/
69
70void parse_event(struct MTouch *mt) 60void parse_event(struct MTouch *mt)
71{ 61{
72 modify_state(&mt->ns, &mt->hw, &mt->caps); 62 modify_state(&mt->ns, &mt->hw, &mt->caps);
73} 63}
74
75/******************************************************/