Accessibility Manager public API UTC tests and coverage
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-accessibility-adaptor.h
1 // Prevent normal accessibility adaptor declaration from loading
2 #define __DALI_ACCESSIBILITY_ADAPTOR_H__
3
4 #ifndef __DALI_TOOLKIT_ACCESSIBILITY_ADAPTOR_H__
5 #define __DALI_TOOLKIT_ACCESSIBILITY_ADAPTOR_H__
6
7 /*
8  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
9  *
10  * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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
24 // EXTERNAL INCLUDES
25 #include <string>
26 #include <dali/public-api/object/base-handle.h>
27 #include <dali/public-api/events/touch-point.h>
28
29 namespace Dali
30 {
31 namespace Internal
32 {
33 namespace Adaptor
34 {
35 class AccessibilityAdaptor;
36 }
37 }
38 class AccessibilityActionHandler;
39 class AccessibilityGestureHandler;
40 class TouchPoint;
41
42 /**
43  * This creates a stubbed AccessibilityAdaptor so that internal Toolkit Adaptor calls work.
44  */
45 class AccessibilityAdaptor : public BaseHandle
46 {
47 public: // Construction & Destruction
48   AccessibilityAdaptor();
49   ~AccessibilityAdaptor();
50
51 public: // Mock object setup.
52
53   void MockSetReadPosition( Vector2& position );
54
55 public: // Getters
56
57   static AccessibilityAdaptor Get();
58
59   Vector2 GetReadPosition();
60   bool IsEnabled() const;
61   void SetActionHandler(AccessibilityActionHandler& handler);
62   void SetGestureHandler(AccessibilityGestureHandler& handler);
63
64   bool HandleActionNextEvent();
65   bool HandleActionPreviousEvent();
66   bool HandleActionActivateEvent();
67   bool HandleActionReadEvent(unsigned int x, unsigned int y, bool allowReadAgain);
68   bool HandleActionReadNextEvent();
69   bool HandleActionReadPreviousEvent();
70   bool HandleActionUpEvent();
71   bool HandleActionDownEvent();
72   bool HandleActionClearFocusEvent();
73   bool HandleActionScrollEvent(TouchPoint& point, unsigned long timeStamp);
74   bool HandleActionBackEvent();
75   void HandleActionEnableEvent();
76   void HandleActionDisableEvent();
77   bool HandleActionScrollUpEvent();
78   bool HandleActionScrollDownEvent();
79   bool HandleActionPageLeftEvent();
80   bool HandleActionPageRightEvent();
81   bool HandleActionPageUpEvent();
82   bool HandleActionPageDownEvent();
83   bool HandleActionMoveToFirstEvent();
84   bool HandleActionMoveToLastEvent();
85   bool HandleActionReadFromTopEvent();
86   bool HandleActionReadFromNextEvent();
87   bool HandleActionZoomEvent();
88   bool HandleActionReadIndicatorInformationEvent();
89   bool HandleActionReadPauseResumeEvent();
90   bool HandleActionStartStopEvent();
91
92   AccessibilityAdaptor( Internal::Adaptor::AccessibilityAdaptor* adaptor );
93 };
94
95 } // namespace Dali
96
97 #endif // __DALI_TOOLKIT_ACCESSIBILITY_ADAPTOR_H__