Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUi_TouchEventInfoImpl.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_TouchEventInfoImpl.h
19 * @brief                        This is the header file for _TouchEventInfoImpl class.
20 * @version              2.0
21 *
22 * This header file contains declarations of _TouchEventInfoImpl class.
23 */
24
25 #ifndef _FUI_INTERNAL_TOUCH_EVENT_INFO_IMPL_H_
26 #define _FUI_INTERNAL_TOUCH_EVENT_INFO_IMPL_H_
27
28 #include <FBaseObject.h>
29 #include <FGrpPoint.h>
30 #include "FUi_UiTouchEvent.h"
31
32 namespace Tizen { namespace Ui
33 {
34
35 class TouchEventInfo;
36 /**
37  * @class       _TouchEventInfoImpl
38  *
39  * @brief       This class is used as the argument to touch event listener.
40  *
41  * This class is used as the argument of touch event listener. When touch event event is generated,
42  * the @c TouchEvent instance calls the registered ITouchEventListener with an instance of this
43  * class as the argument.
44  *
45  */
46 class _TouchEventInfoImpl
47         : public Tizen::Base::Object
48 {
49 public:
50         static _TouchEventInfoImpl* CreateInstanceN(TouchEventInfo* pPublic);
51
52         ~_TouchEventInfoImpl(void);
53
54         void SetTouchEventInfo(const _TouchInfo& touchInfo, const Tizen::Graphics::Point startPosition);
55
56         unsigned long GetPointId(void) const;
57
58         Tizen::Graphics::Point GetStartPosition(void) const;
59
60         Tizen::Graphics::Point GetCurrentPosition(void) const;
61
62         _TouchStatus GetTouchStatus(void) const;
63
64         bool IsFlicked(void) const;
65
66 private:
67         /**
68          * This is the default class constructor.
69          *
70          * @param[in]   source          - A pointer to the Object instance which contains this instance.
71          * @param[in]   status                  - TouchStatus
72          */
73         _TouchEventInfoImpl(TouchEventInfo* pPublic);
74
75         /*
76          * This is the copy constructor for this class.
77          */
78         _TouchEventInfoImpl(const _TouchEventInfoImpl&);
79
80         /**
81          * This is the assignment operator for this class.
82          */
83         _TouchEventInfoImpl& operator =(const _TouchEventInfoImpl&);
84
85 // Attributes
86 private:
87         TouchEventInfo* __pPublic;
88         unsigned long __pointId;
89         _TouchStatus __touchStatus;
90         Tizen::Graphics::Point __startPosition;
91         Tizen::Graphics::Point __currentPosition;
92         bool __isFlicked;
93 }; // TouchEventInfo
94
95 } } // Tizen::Ui
96
97 #endif // _FUI_INTERNAL_TOUCH_EVENT_INFO_IMPL_H_