diff options
Diffstat (limited to 'include/mtdev-plumbing.h')
| -rw-r--r-- | include/mtdev-plumbing.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/include/mtdev-plumbing.h b/include/mtdev-plumbing.h index cadc1f7..21ca708 100644 --- a/include/mtdev-plumbing.h +++ b/include/mtdev-plumbing.h | |||
| @@ -36,6 +36,15 @@ extern "C" { | |||
| 36 | #include <mtdev.h> | 36 | #include <mtdev.h> |
| 37 | 37 | ||
| 38 | /** | 38 | /** |
| 39 | * mtdev_new - allocate a new mtdev | ||
| 40 | * | ||
| 41 | * Allocate a new mtdev. | ||
| 42 | * | ||
| 43 | * Returns zero in case of memory allocation failure. | ||
| 44 | */ | ||
| 45 | struct mtdev *mtdev_new(void); | ||
| 46 | |||
| 47 | /** | ||
| 39 | * mtdev_init - initialize mtdev converter | 48 | * mtdev_init - initialize mtdev converter |
| 40 | * @dev: the mtdev to initialize | 49 | * @dev: the mtdev to initialize |
| 41 | * | 50 | * |
| @@ -46,6 +55,26 @@ extern "C" { | |||
| 46 | int mtdev_init(struct mtdev *dev); | 55 | int mtdev_init(struct mtdev *dev); |
| 47 | 56 | ||
| 48 | /** | 57 | /** |
| 58 | * mtdev_set_mt_event - set event type | ||
| 59 | * @dev: the mtdev in use | ||
| 60 | * @code: the ABS_MT code to set | ||
| 61 | * @value: boolean value | ||
| 62 | * | ||
| 63 | * Returns true if the given event code is present. | ||
| 64 | */ | ||
| 65 | void mtdev_set_mt_event(struct mtdev *dev, int code, int value); | ||
| 66 | |||
| 67 | /** | ||
| 68 | * mtdev_set_abs_<property> - set abs event property | ||
| 69 | * @dev: the mtdev in use | ||
| 70 | * @code: the ABS_MT code to set | ||
| 71 | */ | ||
| 72 | void mtdev_set_abs_minimum(struct mtdev *dev, int code, int value); | ||
| 73 | void mtdev_set_abs_maximum(struct mtdev *dev, int code, int value); | ||
| 74 | void mtdev_set_abs_fuzz(struct mtdev *dev, int code, int value); | ||
| 75 | void mtdev_set_abs_resolution(struct mtdev *dev, int code, int value); | ||
| 76 | |||
| 77 | /** | ||
| 49 | * mtdev_configure - configure the mtdev converter | 78 | * mtdev_configure - configure the mtdev converter |
| 50 | * @dev: the mtdev to configure | 79 | * @dev: the mtdev to configure |
| 51 | * @fd: file descriptor of the kernel device | 80 | * @fd: file descriptor of the kernel device |
| @@ -106,6 +135,14 @@ int mtdev_empty(struct mtdev *dev); | |||
| 106 | */ | 135 | */ |
| 107 | void mtdev_get_event(struct mtdev *dev, struct input_event* ev); | 136 | void mtdev_get_event(struct mtdev *dev, struct input_event* ev); |
| 108 | 137 | ||
| 138 | /** | ||
| 139 | * mtdev_delete - free a previously allocated mtdev | ||
| 140 | * | ||
| 141 | * Frees the memory associated with the mtdev and invalidates the | ||
| 142 | * mtdev pointer. | ||
| 143 | */ | ||
| 144 | void mtdev_delete(struct mtdev *dev); | ||
| 145 | |||
| 109 | #ifdef __cplusplus | 146 | #ifdef __cplusplus |
| 110 | } | 147 | } |
| 111 | #endif | 148 | #endif |
