From eb896e11aacab5f53e3915a8d19ffffd92ce8e10 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Tue, 20 Jul 2010 15:39:08 +0200 Subject: Touch API changes Add touch time to the touch frame (Thanks Rafi) Add touch change counters to the touch frame Add event bypass callback Signed-off-by: Henrik Rydberg --- include/grail-touch.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'include/grail-touch.h') diff --git a/include/grail-touch.h b/include/grail-touch.h index d6c9bf5..9e8572b 100644 --- a/include/grail-touch.h +++ b/include/grail-touch.h @@ -52,6 +52,14 @@ struct touch { touch_prop_t prop[DIM_TOUCH_PROP]; }; +struct touch_frame { + int ntouch; + int slot; + int ncreate, nmodify, ndestroy; + touch_time_t time; + struct touch touch[DIM_TOUCHES]; +}; + struct touch_dev { void (*event)(struct touch_dev *dev, const struct input_event *ev); void (*create)(struct touch_dev *dev, int slot, @@ -64,14 +72,10 @@ struct touch_dev { void *priv; }; -struct touch_frame { - int ntouch; - int slot; - struct touch touch[DIM_TOUCHES]; -}; - struct touch_engine { - void (*sync)(struct touch_engine *engine, touch_time_t time); + void (*event)(struct touch_engine *engine, + const struct input_event *ev); + void (*sync)(struct touch_engine *engine); struct touch_frame frame; void *priv; }; @@ -92,9 +96,11 @@ int touch_dev_pull(struct touch_dev *dev, int fd); void touch_dev_close(struct touch_dev *dev, int fd); void touch_engine_init(struct touch_engine *engine, - void (*sync)(struct touch_engine *engine, - touch_time_t time), + void (*event)(struct touch_engine *engine, + const struct input_event *ev), + void (*sync)(struct touch_engine *engine), void *priv); void touch_engine_attach(struct touch_engine *engine, struct touch_dev *dev); +void touch_engine_detach(struct touch_engine *engine, struct touch_dev *dev); #endif -- cgit v1.2.3