From: Peter Hutterer Date: Thu, 3 Jul 2014 23:29:11 +0000 (+1000) Subject: filter: add a filter-private.h header file X-Git-Tag: 0.7.0~113 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=515a938e3aaaad60db23f3009a1b172c34641064;p=platform%2Fupstream%2Flibinput.git filter: add a filter-private.h header file To keep the implementation of a filter separate from the users of a filter. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede --- diff --git a/src/Makefile.am b/src/Makefile.am index 44e73d3f..5cc52a66 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,6 +17,7 @@ libinput_la_SOURCES = \ evdev-mt-touchpad-buttons.c \ filter.c \ filter.h \ + filter-private.h \ path.h \ path.c \ udev-seat.c \ diff --git a/src/filter-private.h b/src/filter-private.h new file mode 100644 index 00000000..283a747b --- /dev/null +++ b/src/filter-private.h @@ -0,0 +1,42 @@ +/* + * Copyright © 2012 Jonas Ådahl + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of the copyright holders not be used in + * advertising or publicity pertaining to distribution of the software + * without specific, written prior permission. The copyright holders make + * no representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF + * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef FILTER_PRIVATE_H +#define FILTER_PRIVATE_H + +#include "config.h" + +#include "filter.h" + +struct motion_filter_interface { + void (*filter)(struct motion_filter *filter, + struct motion_params *motion, + void *data, uint64_t time); + void (*destroy)(struct motion_filter *filter); +}; + +struct motion_filter { + struct motion_filter_interface *interface; +}; + + +#endif diff --git a/src/filter.c b/src/filter.c index 804058a4..12bf8f6a 100644 --- a/src/filter.c +++ b/src/filter.c @@ -30,6 +30,7 @@ #include "filter.h" #include "libinput-util.h" +#include "filter-private.h" void filter_dispatch(struct motion_filter *filter, diff --git a/src/filter.h b/src/filter.h index be48838c..b79f0e34 100644 --- a/src/filter.h +++ b/src/filter.h @@ -40,18 +40,6 @@ filter_dispatch(struct motion_filter *filter, void filter_destroy(struct motion_filter *filter); - -struct motion_filter_interface { - void (*filter)(struct motion_filter *filter, - struct motion_params *motion, - void *data, uint64_t time); - void (*destroy)(struct motion_filter *filter); -}; - -struct motion_filter { - struct motion_filter_interface *interface; -}; - typedef double (*accel_profile_func_t)(struct motion_filter *filter, void *data, double velocity,