diff options
Diffstat (limited to 'include/grail-touch.h')
| -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 |
