Make UEFI boot-platform build again
[haiku.git] / headers / private / shared / LongAndDragTrackingFilter.h
blob5fca71cf0d977cd8a4eae260accc5840f9a04663
1 /*
2 * Copyright 2009, Alexandre Deckner, alex@zappotek.com
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef LONG_AND_DRAG_TRACKING_FILTER_H
6 #define LONG_AND_DRAG_TRACKING_FILTER_H
9 #include <MessageFilter.h>
10 #include <Point.h>
13 class BHandler;
14 class BMessageRunner;
17 namespace BPrivate {
19 class LongAndDragTrackingFilter : public BMessageFilter {
20 public:
21 LongAndDragTrackingFilter(
22 uint32 longMessageWhat,
23 uint32 dragMessageWhat,
24 float radiusThreshold = 4.0f,
25 bigtime_t durationThreshold = 0);
26 ~LongAndDragTrackingFilter();
28 filter_result Filter(BMessage* message, BHandler** target);
30 private:
31 void _StopTracking();
33 uint32 fLongMessageWhat;
34 uint32 fDragMessageWhat;
35 BMessageRunner* fMessageRunner;
36 BPoint fClickPoint;
37 uint32 fClickButtons;
38 float fSquaredRadiusThreshold;
39 bigtime_t fDurationThreshold;
42 } // namespace BPrivate
44 using BPrivate::LongAndDragTrackingFilter;
46 #endif // LONG_AND_DRAG_TRACKING_FILTER_H