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:
Peter Hutterer 2014-07-04 09:39:05 +10:00
parent d03488f4a3
commit 03a1ef7540
4 changed files with 13 additions and 13 deletions

View file

@ -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);
}

View file

@ -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);

View file

@ -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)
{

View file

@ -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.