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_TouchGestureDetectorImpl.h
19 * @brief This is the header file for the %_TouchGestureDetectorImpl class.
21 * This header file contains the declarations of the %_TouchGestureDetectorImpl class.
23 #ifndef _FUI_INTERNAL_TOUCH_GESTURE_DETECTOR_IMPL_H_
24 #define _FUI_INTERNAL_TOUCH_GESTURE_DETECTOR_IMPL_H_
26 #include <FBaseObject.h>
27 #include <FBaseColIListT.h>
28 #include <FUiTouchGestureDetector.h>
29 #include <FUiITouchGestureEventListener.h>
30 #include "FUi_TouchGestureDetector.h"
31 #include "FUi_ITouchGestureDelegate.h"
33 namespace Tizen { namespace Ui
37 class _TouchGestureDetectorImpl
38 : public Tizen::Base::Object
39 , virtual public _ITouchGestureDelegate
42 virtual ~_TouchGestureDetectorImpl(void);
44 static _TouchGestureDetectorImpl* CreateInstanceN(TouchGestureDetector* pPublic);
46 result SetDetectorState(TouchGestureDetectorState state);
47 TouchGestureDetectorState GetDetectorState(void) const;
49 result SetDelayTouchEventEnabled(bool enable);
50 bool IsDelayTouchEventEnabled(void) const;
52 result SetCancelTouchEventOnSuccessEnabled(bool enable);
53 bool IsCancelTouchEventOnSuccessEnabled(void) const;
55 result AddGestureEventListener(Tizen::Ui::ITouchGestureEventListener& listener);
56 result RemoveGestureEventListener(Tizen::Ui::ITouchGestureEventListener& listener);
57 Tizen::Base::Collection::IListT <Tizen::Ui::ITouchGestureEventListener*>* GetGestureEventListenerList(void) const;
59 result StartOnFailureOf(const TouchGestureDetector& gesture);
61 Control* GetControl(void) const;
63 virtual const TouchGestureDetector& GetPublic(void) const;
64 virtual TouchGestureDetector& GetPublic(void);
66 virtual const _TouchGestureDetector& GetCore(void) const;
67 virtual _TouchGestureDetector& GetCore(void);
69 static _TouchGestureDetectorImpl* GetInstance(TouchGestureDetector& gestureDetector);
70 static const _TouchGestureDetectorImpl* GetInstance(const TouchGestureDetector& gestureDetector);
72 virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
73 virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
74 virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
75 virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo);
78 _TouchGestureDetectorImpl(TouchGestureDetector* pPublic, _TouchGestureDetector* pCore);
81 _TouchEventArg* GetTouchEventArgN(const Control& source, const _TouchInfo& touchInfo);
83 _TouchGestureDetectorImpl(const _TouchGestureDetectorImpl&);
84 _TouchGestureDetectorImpl& operator =(const _TouchGestureDetectorImpl&);
87 TouchGestureDetector* __pPublicGestureDetector;
88 _TouchGestureDetector* __pCoreGestureDetector;
90 Tizen::Base::Collection::IListT<Tizen::Ui::ITouchGestureEventListener*>* __pPublicGestureEventListenerList;
91 }; // _TouchGestureDetectorImpl
95 #endif //_FUI_INTERNAL_TOUCH_GESTURE_DETECTOR_IMPL_H_