2 * Copyright 2009, Alexandre Deckner, alex@zappotek.com
3 * Distributed under the terms of the MIT License.
5 #ifndef SHAKE_TRACKING_FILTER_H
6 #define SHAKE_TRACKING_FILTER_H
9 #include <MessageFilter.h>
20 LowPassFilter(uint32 size
);
23 void Input(const BPoint
& p
);
24 BPoint
Output() const;
32 class ShakeTrackingFilter
: public BMessageFilter
{
37 uint32 countThreshold
= 2,
38 bigtime_t timeTreshold
= 400000);
40 ~ShakeTrackingFilter();
42 filter_result
Filter(BMessage
* message
, BHandler
** _target
);
48 BMessageRunner
* fCancelRunner
;
49 LowPassFilter fLowPass
;
53 uint32 fCountThreshold
;
54 bigtime_t fTimeThreshold
;
57 } // namespace BPrivate
59 using BPrivate::ShakeTrackingFilter
;
60 using BPrivate::LowPassFilter
;
62 #endif // SHAKE_TRACKING_FILTER_H