summaryrefslogtreecommitdiff
path: root/src/filter.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2015-07-28 15:06:13 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2015-08-11 09:19:55 +1000
commit4c48b46d15497fec9fa16cbf39f83bc3c090db6f (patch)
tree52e582dbd5df3eedb1bb93bc5f8239c7fd9dea79 /src/filter.h
parent4cdcf5cc381c6cfbe552b642e56e1c6a68263876 (diff)
downloadlibinput-4c48b46d15497fec9fa16cbf39f83bc3c090db6f.tar.gz
filter: revamp to create device-specific filters, rather than accel functions
The previous approach to pointer acceleration was to initialize the same motion filter behavior but a different acceleration profile depending on the hardware (the profile converts a speed to a multiplier for input deltas). To be more flexible for hardware-specifics, change this into a set of specific pointer acceleration init functions. This patch has no effective functional changes, they're still all the same. The acceleration functions are kept for direct access by the ptraccel-debug tool. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
Diffstat (limited to 'src/filter.h')
-rw-r--r--src/filter.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/filter.h b/src/filter.h
index 617fab1f..76fc1476 100644
--- a/src/filter.h
+++ b/src/filter.h
@@ -57,9 +57,19 @@ typedef double (*accel_profile_func_t)(struct motion_filter *filter,
double velocity,
uint64_t time);
+/* Pointer acceleration types */
+
+struct motion_filter *
+create_pointer_accelerator_filter_linear(int dpi);
+
+struct motion_filter *
+create_pointer_accelerator_filter_linear_low_dpi(int dpi);
+
+struct motion_filter *
+create_pointer_accelerator_filter_touchpad(int dpi);
+
struct motion_filter *
-create_pointer_accelerator_filter(accel_profile_func_t filter,
- int dpi);
+create_pointer_accelerator_filter_lenovo_x230(int dpi);
/*
* Pointer acceleration profiles.