diff options
Diffstat (limited to 'include/grail.h')
| -rw-r--r-- | include/grail.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/grail.h b/include/grail.h index ae3a73f..40cf22f 100644 --- a/include/grail.h +++ b/include/grail.h | |||
| @@ -49,6 +49,32 @@ struct grail_coord { | |||
| 49 | float x, y; | 49 | float x, y; |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | /** | ||
| 53 | * struct grail_contact - MT event information in bounding box units | ||
| 54 | * @id: Contact tracking id | ||
| 55 | * @tool_type: Tool type (ABS_MT_TOOL_TYPE) | ||
| 56 | * @pos: Position of contact (bbox units) | ||
| 57 | * @touch_major: Major axis of contact shape (bbox units) | ||
| 58 | * @touch_minor: Minor axis of contact shape (bbox units) | ||
| 59 | * @width_major: Major axis of perimeter (bbox units) | ||
| 60 | * @width_minor: Minor axis of perimeter (bbox units) | ||
| 61 | * @angle: Angle of orientation (vertical: 0 horizontal: +-M_PI_2) | ||
| 62 | * @pressure: Pressure of contact (min: 0 max: 1) | ||
| 63 | * | ||
| 64 | * Depending on the native support of the underlying device, some or all of | ||
| 65 | * the listed properties may be computed. | ||
| 66 | */ | ||
| 67 | struct grail_contact { | ||
| 68 | int id; | ||
| 69 | int tool_type; | ||
| 70 | struct grail_coord pos; | ||
| 71 | float touch_major; | ||
| 72 | float touch_minor; | ||
| 73 | float width_major; | ||
| 74 | float width_minor; | ||
| 75 | float angle; | ||
| 76 | float pressure; | ||
| 77 | }; | ||
| 52 | 78 | ||
| 53 | /** | 79 | /** |
| 54 | * struct grail_client_id - Gesture client information | 80 | * struct grail_client_id - Gesture client information |
| @@ -228,4 +254,16 @@ void grail_filter_abs_events(struct grail *ge, int usage); | |||
| 228 | void grail_get_units(const struct grail *ge, | 254 | void grail_get_units(const struct grail *ge, |
| 229 | struct grail_coord *min, struct grail_coord *max); | 255 | struct grail_coord *min, struct grail_coord *max); |
| 230 | 256 | ||
| 257 | /** | ||
| 258 | * grail_get_contacts - get current contact state | ||
| 259 | * @ge: the grail device in use | ||
| 260 | * @touch: array of contacts to be filled in | ||
| 261 | * @max_touch: maximum number of contacts supported by the array | ||
| 262 | * | ||
| 263 | * Extract the contact state as currently seen by grail. | ||
| 264 | * | ||
| 265 | */ | ||
| 266 | int grail_get_contacts(const struct grail *ge, | ||
| 267 | struct grail_contact *touch, int max_touch); | ||
| 268 | |||
| 231 | #endif | 269 | #endif |
