mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-11 09:50:19 +01:00
filter: constify the interfaces and make them static
No functional change Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
0bb82faab1
commit
fc1a28951a
9 changed files with 9 additions and 9 deletions
|
|
@ -100,7 +100,7 @@ accelerator_destroy_flat(struct motion_filter *filter)
|
|||
free(accel);
|
||||
}
|
||||
|
||||
struct motion_filter_interface accelerator_interface_flat = {
|
||||
static const struct motion_filter_interface accelerator_interface_flat = {
|
||||
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT,
|
||||
.filter = accelerator_filter_flat,
|
||||
.filter_constant = accelerator_filter_noop_flat,
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ accelerator_set_speed(struct motion_filter *filter,
|
|||
return true;
|
||||
}
|
||||
|
||||
struct motion_filter_interface accelerator_interface_low_dpi = {
|
||||
static const struct motion_filter_interface accelerator_interface_low_dpi = {
|
||||
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE,
|
||||
.filter = accelerator_filter_low_dpi,
|
||||
.filter_constant = accelerator_filter_noop,
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ pointer_accel_profile_linear(struct motion_filter *filter,
|
|||
return factor;
|
||||
}
|
||||
|
||||
struct motion_filter_interface accelerator_interface = {
|
||||
static const struct motion_filter_interface accelerator_interface = {
|
||||
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE,
|
||||
.filter = accelerator_filter_linear,
|
||||
.filter_constant = accelerator_filter_noop,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ struct motion_filter_interface {
|
|||
|
||||
struct motion_filter {
|
||||
double speed_adjustment; /* normalized [-1, 1] */
|
||||
struct motion_filter_interface *interface;
|
||||
const struct motion_filter_interface *interface;
|
||||
};
|
||||
|
||||
struct pointer_tracker {
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ tablet_accelerator_destroy(struct motion_filter *filter)
|
|||
free(accel_filter);
|
||||
}
|
||||
|
||||
struct motion_filter_interface accelerator_interface_tablet = {
|
||||
static const struct motion_filter_interface accelerator_interface_tablet = {
|
||||
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT,
|
||||
.filter = tablet_accelerator_filter_flat,
|
||||
.filter_constant = NULL,
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ accelerator_destroy_touchpad_flat(struct motion_filter *filter)
|
|||
free(accel);
|
||||
}
|
||||
|
||||
struct motion_filter_interface accelerator_interface_touchpad_flat = {
|
||||
static const struct motion_filter_interface accelerator_interface_touchpad_flat = {
|
||||
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT,
|
||||
.filter = accelerator_filter_touchpad_flat,
|
||||
.filter_constant = accelerator_filter_noop_touchpad_flat,
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ touchpad_lenovo_x230_accel_profile(struct motion_filter *filter,
|
|||
return factor * X230_MAGIC_SLOWDOWN / X230_TP_MAGIC_LOW_RES_FACTOR;
|
||||
}
|
||||
|
||||
struct motion_filter_interface accelerator_interface_x230 = {
|
||||
static const struct motion_filter_interface accelerator_interface_x230 = {
|
||||
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE,
|
||||
.filter = accelerator_filter_x230,
|
||||
.filter_constant = accelerator_filter_constant_x230,
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ touchpad_accel_profile_linear(struct motion_filter *filter,
|
|||
return factor * TP_MAGIC_SLOWDOWN;
|
||||
}
|
||||
|
||||
struct motion_filter_interface accelerator_interface_touchpad = {
|
||||
static const struct motion_filter_interface accelerator_interface_touchpad = {
|
||||
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE,
|
||||
.filter = accelerator_filter_touchpad,
|
||||
.filter_constant = touchpad_constant_filter,
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ trackpoint_accelerator_destroy(struct motion_filter *filter)
|
|||
free(accel_filter);
|
||||
}
|
||||
|
||||
struct motion_filter_interface accelerator_interface_trackpoint = {
|
||||
static const struct motion_filter_interface accelerator_interface_trackpoint = {
|
||||
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE,
|
||||
.filter = trackpoint_accelerator_filter,
|
||||
.filter_constant = trackpoint_accelerator_filter_noop,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue