mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-01 04:20:24 +01:00
filter: rename motion_filter_destroy to filter_destroy
For better consistency with filter_dispatch(). And move the things around to keep the consumable API together. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
d03488f4a3
commit
03a1ef7540
4 changed files with 13 additions and 13 deletions
|
|
@ -577,7 +577,7 @@ tp_destroy(struct evdev_dispatch *dispatch)
|
|||
tp_destroy_tap(tp);
|
||||
tp_destroy_buttons(tp);
|
||||
|
||||
motion_filter_destroy(tp->filter);
|
||||
filter_destroy(tp->filter);
|
||||
free(tp->touches);
|
||||
free(tp);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -943,7 +943,7 @@ evdev_device_destroy(struct evdev_device *device)
|
|||
if (dispatch)
|
||||
dispatch->interface->destroy(dispatch);
|
||||
|
||||
motion_filter_destroy(device->pointer.filter);
|
||||
filter_destroy(device->pointer.filter);
|
||||
libinput_seat_unref(device->base.seat);
|
||||
libevdev_free(device->evdev);
|
||||
free(device->mt.slots);
|
||||
|
|
|
|||
18
src/filter.c
18
src/filter.c
|
|
@ -38,6 +38,15 @@ filter_dispatch(struct motion_filter *filter,
|
|||
filter->interface->filter(filter, motion, data, time);
|
||||
}
|
||||
|
||||
void
|
||||
filter_destroy(struct motion_filter *filter)
|
||||
{
|
||||
if (!filter)
|
||||
return;
|
||||
|
||||
filter->interface->destroy(filter);
|
||||
}
|
||||
|
||||
/*
|
||||
* Default parameters for pointer acceleration profiles.
|
||||
*/
|
||||
|
|
@ -332,15 +341,6 @@ create_pointer_accelator_filter(accel_profile_func_t profile)
|
|||
return &filter->base;
|
||||
}
|
||||
|
||||
void
|
||||
motion_filter_destroy(struct motion_filter *filter)
|
||||
{
|
||||
if (!filter)
|
||||
return;
|
||||
|
||||
filter->interface->destroy(filter);
|
||||
}
|
||||
|
||||
static inline double
|
||||
calc_penumbral_gradient(double x)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ void
|
|||
filter_dispatch(struct motion_filter *filter,
|
||||
struct motion_params *motion,
|
||||
void *data, uint64_t time);
|
||||
void
|
||||
filter_destroy(struct motion_filter *filter);
|
||||
|
||||
|
||||
struct motion_filter_interface {
|
||||
|
|
@ -59,8 +61,6 @@ typedef double (*accel_profile_func_t)(struct motion_filter *filter,
|
|||
struct motion_filter *
|
||||
create_pointer_accelator_filter(accel_profile_func_t filter);
|
||||
|
||||
void
|
||||
motion_filter_destroy(struct motion_filter *filter);
|
||||
|
||||
/*
|
||||
* Pointer acceleration profiles.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue