summaryrefslogtreecommitdiff
path: root/src/evbuf.h
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-06-19 12:10:27 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-06-19 14:01:40 +0200
commit259b92a30280cdec2b7798df3c14da596c417ef1 (patch)
treebb1f7138cb2e2c7be18975cb3cd0cc9a07d8c44f /src/evbuf.h
parent8087ac3d655c2b2835cf61e7a69611d81d4f303e (diff)
Restructure mtdev api
Split the api into plumbing and porcelain layers and move the plumbing part to its own optional header file. The main usecase is to fetch events from the device, route them through the converter and extract the processed events. To simplify the API, replace the intermediate mtdev_pull() function by the higher-level mtdev_get(). This function does all the required steps, and has the same semantics as read(). Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/evbuf.h')
-rw-r--r--src/evbuf.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/evbuf.h b/src/evbuf.h
index ba61cd5..1afd9f5 100644
--- a/src/evbuf.h
+++ b/src/evbuf.h
@@ -42,11 +42,6 @@ static inline int evbuf_empty(const struct mtdev_evbuf *evbuf)
42 return evbuf->head == evbuf->tail; 42 return evbuf->head == evbuf->tail;
43} 43}
44 44
45static inline int evbuf_full(const struct mtdev_evbuf *evbuf)
46{
47 return ((evbuf->head + 1) & (DIM_EVENTS - 1)) == evbuf->tail;
48}
49
50static inline void evbuf_put(struct mtdev_evbuf *evbuf, 45static inline void evbuf_put(struct mtdev_evbuf *evbuf,
51 const struct input_event *ev) 46 const struct input_event *ev)
52{ 47{