5365e77522a2c3d5fb2fc686b97f77aa337ddadd
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-accessibility-manager.h
1 // Prevent normal accessibility manager declaration from loading
2 #define __DALI_ACCESSIBILITY_MANAGER_H__
3
4 #ifndef __DALI_TOOLKIT_ACCESSIBILITY_MANAGER_H__
5 #define __DALI_TOOLKIT_ACCESSIBILITY_MANAGER_H__
6
7 //
8 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
9 //
10 // Licensed under the Flora License, Version 1.0 (the License);
11 // you may not use this file except in compliance with the License.
12 // You may obtain a copy of the License at
13 //
14 //     http://floralicense.org/license/
15 //
16 // Unless required by applicable law or agreed to in writing, software
17 // distributed under the License is distributed on an AS IS BASIS,
18 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 // See the License for the specific language governing permissions and
20 // limitations under the License.
21 //
22
23 // EXTERNAL INCLUDES
24 #include <string>
25
26 #include <dali/dali.h>
27
28 namespace Dali
29 {
30 namespace Internal
31 {
32 namespace Adaptor
33 {
34 class AccessibilityManager;
35 }
36 }
37 class AccessibilityActionHandler;
38 class AccessibilityGestureHandler;
39 class TouchPoint;
40
41 /**
42  * This creates a stubbed AccessibilityManager so that internal Toolkit Adaptor calls work.
43  */
44 class AccessibilityManager : public BaseHandle
45 {
46 public: // Typedefs
47   typedef SignalV2< bool ( AccessibilityManager& ) > AccessibilityActionSignalV2;
48
49 public: // Construction & Destruction
50   AccessibilityManager();
51   virtual ~AccessibilityManager();
52
53 public: // Getters
54   static AccessibilityManager Get();
55   Vector2 GetReadPosition() const;
56   bool IsEnabled() const;
57   void SetActionHandler(AccessibilityActionHandler& handler);
58   void SetGestureHandler(AccessibilityGestureHandler& handler);
59   bool HandleActionNextEvent();
60   bool HandleActionPreviousEvent();
61   bool HandleActionActivateEvent();
62   bool HandleActionReadEvent(unsigned int x, unsigned int y, bool allowReadAgain);
63   bool HandleActionReadNextEvent();
64   bool HandleActionReadPreviousEvent();
65   bool HandleActionUpEvent();
66   bool HandleActionDownEvent();
67   bool HandleActionClearFocusEvent();
68   bool HandleActionScrollEvent(TouchPoint& point, unsigned long timeStamp);
69   bool HandleActionBackEvent();
70   void HandleActionEnableEvent();
71   void HandleActionDisableEvent();
72
73 public:  // Signals
74   AccessibilityActionSignalV2& StatusChangedSignal();
75   AccessibilityActionSignalV2& ActionNextSignal();
76   AccessibilityActionSignalV2& ActionPreviousSignal();
77   AccessibilityActionSignalV2& ActionActivateSignal();
78   AccessibilityActionSignalV2& ActionReadSignal();
79   AccessibilityActionSignalV2& ActionOverSignal();
80   AccessibilityActionSignalV2& ActionReadNextSignal();
81   AccessibilityActionSignalV2& ActionReadPreviousSignal();
82   AccessibilityActionSignalV2& ActionUpSignal();
83   AccessibilityActionSignalV2& ActionDownSignal();
84   AccessibilityActionSignalV2& ActionClearFocusSignal();
85   AccessibilityActionSignalV2& ActionBackSignal();
86
87   AccessibilityManager( Internal::Adaptor::AccessibilityManager* manager );
88 };
89
90 } // namespace Dali
91
92 #endif // __DALI_TOOLKIT_ACCESSIBILITY_MANAGER_H__