summaryrefslogtreecommitdiff
path: root/src/filter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/filter.h')
-rw-r--r--src/filter.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/filter.h b/src/filter.h
index a293e5a6..f42a0c63 100644
--- a/src/filter.h
+++ b/src/filter.h
@@ -82,6 +82,28 @@ filter_dispatch_constant(struct motion_filter *filter,
const struct device_float_coords *unaccelerated,
void *data, uint64_t time);
+/**
+ * Apply a scroll filter.
+ * Depending on the device, and the acceleration profile,
+ * this filter allows the user to accelerate the scroll movement.
+ *
+ * Takes a set of unaccelerated deltas and applies the scroll filter to it.
+ *
+ * @param filter The device's motion filter
+ * @param unaccelerated The unaccelerated delta in the device's dpi
+ * resolution as specified during filter creation. If a device has uneven
+ * resolution for x and y, one axis needs to be scaled to match the
+ * originally provided resolution.
+ * @param data Custom data
+ * @param time The time of the delta
+ *
+ * @see filter_dispatch
+ */
+struct normalized_coords
+filter_dispatch_scroll(struct motion_filter *filter,
+ const struct device_float_coords *unaccelerated,
+ void *data, uint64_t time);
+
void
filter_restart(struct motion_filter *filter,
void *data, uint64_t time);
@@ -180,4 +202,9 @@ custom_accel_profile_motion(struct motion_filter *filter,
void *data,
double speed_in,
uint64_t time);
+double
+custom_accel_profile_scroll(struct motion_filter *filter,
+ void *data,
+ double speed_in,
+ uint64_t time);
#endif /* FILTER_H */