diff options
| author | Henrik Rydberg <rydberg@bitmath.org> | 2010-07-20 15:39:08 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-08-05 22:48:38 +0200 |
| commit | eb896e11aacab5f53e3915a8d19ffffd92ce8e10 (patch) | |
| tree | a2b12258c1697e61854704a0eff14070bc9fa963 /include | |
| parent | 3b9c20f869a2f55bd9953665c9e7fd713db4ff43 (diff) | |
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 <rydberg@bitmath.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/grail-touch.h | 24 |
1 files changed, 15 insertions, 9 deletions
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 { | |||
| 52 | touch_prop_t prop[DIM_TOUCH_PROP]; | 52 | touch_prop_t prop[DIM_TOUCH_PROP]; |
| 53 | }; | 53 | }; |
| 54 | 54 | ||
| 55 | struct touch_frame { | ||
| 56 | int ntouch; | ||
| 57 | int slot; | ||
| 58 | int ncreate, nmodify, ndestroy; | ||
| 59 | touch_time_t time; | ||
| 60 | struct touch touch[DIM_TOUCHES]; | ||
| 61 | }; | ||
| 62 | |||
| 55 | struct touch_dev { | 63 | struct touch_dev { |
| 56 | void (*event)(struct touch_dev *dev, const struct input_event *ev); | 64 | void (*event)(struct touch_dev *dev, const struct input_event *ev); |
| 57 | void (*create)(struct touch_dev *dev, int slot, | 65 | void (*create)(struct touch_dev *dev, int slot, |
| @@ -64,14 +72,10 @@ struct touch_dev { | |||
| 64 | void *priv; | 72 | void *priv; |
| 65 | }; | 73 | }; |
| 66 | 74 | ||
| 67 | struct touch_frame { | ||
| 68 | int ntouch; | ||
| 69 | int slot; | ||
| 70 | struct touch touch[DIM_TOUCHES]; | ||
| 71 | }; | ||
| 72 | |||
| 73 | struct touch_engine { | 75 | struct touch_engine { |
| 74 | void (*sync)(struct touch_engine *engine, touch_time_t time); | 76 | void (*event)(struct touch_engine *engine, |
| 77 | const struct input_event *ev); | ||
| 78 | void (*sync)(struct touch_engine *engine); | ||
| 75 | struct touch_frame frame; | 79 | struct touch_frame frame; |
| 76 | void *priv; | 80 | void *priv; |
| 77 | }; | 81 | }; |
| @@ -92,9 +96,11 @@ int touch_dev_pull(struct touch_dev *dev, int fd); | |||
| 92 | void touch_dev_close(struct touch_dev *dev, int fd); | 96 | void touch_dev_close(struct touch_dev *dev, int fd); |
| 93 | 97 | ||
| 94 | void touch_engine_init(struct touch_engine *engine, | 98 | void touch_engine_init(struct touch_engine *engine, |
| 95 | void (*sync)(struct touch_engine *engine, | 99 | void (*event)(struct touch_engine *engine, |
| 96 | touch_time_t time), | 100 | const struct input_event *ev), |
| 101 | void (*sync)(struct touch_engine *engine), | ||
| 97 | void *priv); | 102 | void *priv); |
| 98 | void touch_engine_attach(struct touch_engine *engine, struct touch_dev *dev); | 103 | void touch_engine_attach(struct touch_engine *engine, struct touch_dev *dev); |
| 104 | void touch_engine_detach(struct touch_engine *engine, struct touch_dev *dev); | ||
| 99 | 105 | ||
| 100 | #endif | 106 | #endif |
