2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
18 * @file FUi_TouchLongPressGestureDetector.h
19 * @brief This is the header file for the %_TouchLongPressGestureDetector class.
21 * This header file contains the declarations of the %_TouchLongPressGestureDetector class.
25 #ifndef _FUI_INTERNAL_TOUCH_LONG_PRESS_GESTURE_DETECTOR_H
26 #define _FUI_INTERNAL_TOUCH_LONG_PRESS_GESTURE_DETECTOR_H
28 #include "FUi_TouchGestureDetector.h"
29 #include "FUi_UiTouchEvent.h"
31 namespace Tizen { namespace Ui
33 class _TouchGestureTimerManager;
36 * @class _TouchLongPressGestureDetector
41 class _OSP_EXPORT_ _TouchLongPressGestureDetector
42 : public _TouchGestureDetector
45 _TouchLongPressGestureDetector(void);
46 virtual ~_TouchLongPressGestureDetector(void);
48 result SetDuration(int duration);
49 int GetDuration(void) const;
51 result SetMoveAllowance(int allowance);
52 int GetMoveAllowance(void) const;
54 result SetMoveAllowance(float allowance);
55 float GetMoveAllowanceF(void) const;
57 result SetTouchCount(int count);
58 int GetTouchCount(void) const;
61 void ClearLongPressInfoList(void);
63 void ResetGestureTimerManager(void);
64 bool IsTouchCanceled(void) const;
66 void EnableToDeleteTimer(bool deleteTimer);
68 virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
69 virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
70 virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
71 virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo);
74 void RemoveLongPressInfoList(void);
77 _TouchLongPressGestureDetector(const _TouchLongPressGestureDetector&);
78 _TouchLongPressGestureDetector& operator =(const _TouchLongPressGestureDetector&);
82 float __moveAllowance;
84 unsigned int __maxPointId;
85 _TouchGestureTimerManager* __pGestureTimerManager;
90 Tizen::Base::Collection::ArrayListT<_LongPressInfo*>* __pLongPressInfoList;
91 }; // _TouchLongPressGestureDetector
95 #endif //_FUI_INTERNAL_TOUCH_LONG_PRESS_GESTURE_DETECTOR_H