Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUi_TouchLongPressGestureDetector.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 /**
18  * @file                        FUi_TouchLongPressGestureDetector.h
19  * @brief               This is the header file for the %_TouchLongPressGestureDetector class.
20  *
21  * This header file contains the declarations of the %_TouchLongPressGestureDetector class.
22  *
23  */
24
25 #ifndef _FUI_INTERNAL_TOUCH_LONG_PRESS_GESTURE_DETECTOR_H
26 #define _FUI_INTERNAL_TOUCH_LONG_PRESS_GESTURE_DETECTOR_H
27
28 #include "FUi_TouchGestureDetector.h"
29 #include "FUi_UiTouchEvent.h"
30
31 namespace Tizen { namespace Ui
32 {
33 class _TouchGestureTimerManager;
34
35 /**
36  * @class               _TouchLongPressGestureDetector
37  * @brief
38  * @since 2.0
39  *
40  */
41 class _OSP_EXPORT_ _TouchLongPressGestureDetector
42         : public _TouchGestureDetector
43 {
44 public:
45         _TouchLongPressGestureDetector(void);
46         virtual ~_TouchLongPressGestureDetector(void);
47
48         result SetDuration(int duration);
49         int GetDuration(void) const;
50
51         result SetMoveAllowance(int allowance);
52         int GetMoveAllowance(void) const;
53
54         result SetTouchCount(int count);
55         int GetTouchCount(void) const;
56
57         bool IsPressed(void);
58         void ClearLongPressInfoList(void);
59
60         virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
61         virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
62         virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
63         virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
64
65 private:
66         void RemoveLongPressInfoList(void);
67
68 private:
69         _TouchLongPressGestureDetector(const _TouchLongPressGestureDetector&);
70         _TouchLongPressGestureDetector& operator =(const _TouchLongPressGestureDetector&);
71
72 private:
73         int __duration;
74         int __moveAllowance;
75         int __touchCount;
76         unsigned int __maxPointId;
77         _TouchGestureTimerManager* __pGestureTimerManager;
78
79         class _LongPressInfo;
80         Tizen::Base::Collection::ArrayListT<_LongPressInfo*>* __pLongPressInfoList;
81 }; // _TouchLongPressGestureDetector
82
83 } } // Tizen::Ui
84
85 #endif  //_FUI_INTERNAL_TOUCH_LONG_PRESS_GESTURE_DETECTOR_H
86
87