Merge branch 'master' into tizen
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-gesture-manager.h
1 #ifndef __DALI_TEST_GESTURE_MANAGER_H__
2 #define __DALI_TEST_GESTURE_MANAGER_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //     http://floralicense.org/license/
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19
20 // INTERNAL INCLUDES
21 #include <dali/integration-api/gesture-manager.h>
22 #include <dali/public-api/common/dali-common.h>
23
24 namespace Dali
25 {
26
27 /**
28  * Concrete implementation of the gesture manager class.
29  */
30 class DALI_IMPORT_API TestGestureManager : public Dali::Integration::GestureManager
31 {
32
33 public:
34
35   /**
36    * Constructor
37    */
38   TestGestureManager();
39
40   /**
41    * Destructor
42    */
43   virtual ~TestGestureManager();
44
45   /**
46    * @copydoc Dali::Integration::GestureManager::Register(Gesture::Type)
47    */
48   virtual void Register(const Integration::GestureRequest& request);
49
50   /**
51    * @copydoc Dali::Integration::GestureManager::Unregister(Gesture::Type)
52    */
53   virtual void Unregister(const Integration::GestureRequest& request);
54
55   /**
56    * @copydoc Dali::Integration::GestureManager::Update(Gesture::Type)
57    */
58   virtual void Update(const Integration::GestureRequest& request);
59
60 public: // TEST FUNCTIONS
61
62   // Enumeration of Gesture Manager methods
63   enum TestFuncEnum
64   {
65     RegisterType,
66     UnregisterType,
67     UpdateType,
68   };
69
70   /** Call this every test */
71   void Initialize();
72   bool WasCalled(TestFuncEnum func);
73   void ResetCallStatistics(TestFuncEnum func);
74
75 private:
76
77   struct TestFunctions
78   {
79     TestFunctions();
80     void Reset();
81
82     bool Register;
83     bool Unregister;
84     bool Update;
85   };
86
87   TestFunctions mFunctionsCalled;
88 };
89
90 } // Dali
91
92 #endif // __DALI_TEST_GESTURE_MANAGER_H__