8bc2ac801de4fc40ec6e89e2b2ef10789e0fd977
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / accessibility-action-handler.h
1 #ifndef DALI_ACCESSIBILITY_ACTION_HANDLER_H
2 #define DALI_ACCESSIBILITY_ACTION_HANDLER_H
3
4 /*
5  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/dali-adaptor-common.h>
23 #include <dali/public-api/events/touch-event.h>
24
25 namespace Dali
26 {
27
28 /**
29  * AccessibilityActionHandler is an abstract interface, used by Dali to handle accessibility actions
30  * passed by the accessibility manager.
31  */
32 class AccessibilityActionHandler
33 {
34 public:
35
36   /**
37    * Change the accessibility status when Accessibility feature(screen-reader) turned on or off.
38    * @return whether the status is changed or not.
39    */
40   virtual bool ChangeAccessibilityStatus() = 0;
41
42   /**
43    * Clear the accessibility focus from the current focused actor.
44    * @return whether the focus is cleared or not.
45    */
46   virtual bool ClearAccessibilityFocus() = 0;
47
48   /**
49    * Perform the accessibility action associated with a scroll event.
50    * @param touch The touch point (and time) of the event.
51    * @return whether the focus is cleared or not.
52    */
53   virtual bool AccessibilityActionScroll( Dali::TouchEvent& touch ) = 0;
54
55   /**
56    * Perform the accessibility action to move focus to the previous focusable actor (by one finger flick up).
57    * @param allowEndFeedback true if end of list feedback should be played when the focus is alread reached to the end
58    * @return whether the accessibility action is performed or not.
59    */
60   virtual bool AccessibilityActionPrevious(bool allowEndFeedback) = 0;
61
62   /**
63    * Perform the accessibility action to move focus to the next focusable actor (by one finger flick down).
64    * @param allowEndFeedback true if end of list feedback should be played when the focus is alread reached to the end
65    * @return whether the accessibility action is performed or not.
66    */
67   virtual bool AccessibilityActionNext(bool allowEndFeedback) = 0;
68
69   /**
70    * Perform the accessibility action to move focus to the previous focusable actor (by one finger flick left).
71    * @param allowEndFeedback true if end of list feedback should be played when the focus is alread reached to the end
72    * @return whether the accessibility action is performed or not.
73    */
74   virtual bool AccessibilityActionReadPrevious(bool allowEndFeedback) = 0;
75
76   /**
77    * Perform the accessibility action to move focus to the next focusable actor (by one finger flick right).
78    * @param allowEndFeedback true if end of list feedback should be played when the focus is alread reached to the end
79    * @return whether the accessibility action is performed or not.
80    */
81   virtual bool AccessibilityActionReadNext(bool allowEndFeedback) = 0;
82
83   /**
84    * Perform the accessibility action to focus and read the actor (by one finger tap or move).
85    * @param allowReadAgain true if the action read again the same object (i.e. read action)
86    *                       false if the action just read when the focus object is changed (i.e. over action)
87    * @return whether the accessibility action is performed or not.
88    */
89   virtual bool AccessibilityActionRead(bool allowReadAgain) = 0;
90
91   /**
92    * Perform the accessibility action to activate the current focused actor (by one finger double tap).
93    * @return whether the accessibility action is performed or not.
94    */
95   virtual bool AccessibilityActionActivate() = 0;
96
97   /**
98    * Perform the accessibility action to change the value when the current focused actor is a slider
99    * (by double finger down and move up and right).
100    * @return whether the accessibility action is performed or not.
101    */
102   virtual bool AccessibilityActionUp() = 0;
103
104   /**
105    * Perform the accessibility action to change the value when the current focused actor is a slider
106    * (by double finger down and move down and left).
107    * @return whether the accessibility action is performed or not.
108    */
109   virtual bool AccessibilityActionDown() = 0;
110
111   /**
112    * Perform the accessibility action to navigate back (by two fingers circle draw).
113    * @return whether the accessibility action is performed or not.
114    */
115   virtual bool AccessibilityActionBack() = 0;
116
117   /**
118    * Perform the accessibility action to scroll up the list and focus on the first item on the list
119    * after the scrolling and read the item (by two finger swipe up).
120    * @return whether the accessibility action is performed or not.
121    */
122   virtual bool AccessibilityActionScrollUp() = 0;
123
124   /**
125    * Perform the accessibility action to scroll down the list and focus on the first item on the list
126    * after the scrolling and read the item (by two finger swipe down).
127    * @return whether the accessibility action is performed or not.
128    */
129   virtual bool AccessibilityActionScrollDown() = 0;
130
131   /**
132    * Perform the accessibility action to scroll left to the previous page (by two finger swipe left).
133    * @return whether the accessibility action is performed or not.
134    */
135   virtual bool AccessibilityActionPageLeft() = 0;
136
137   /**
138    * Perform the accessibility action to scroll right to the next page (by two finger swipe right).
139    * @return whether the accessibility action is performed or not.
140    */
141   virtual bool AccessibilityActionPageRight() = 0;
142
143   /**
144    * Perform the accessibility action to scroll up to the previous page (by one finger swipe left and right).
145    * @return whether the accessibility action is performed or not.
146    */
147   virtual bool AccessibilityActionPageUp() = 0;
148
149   /**
150    * Perform the accessibility action to scroll down to the next page (by one finger swipe right and left).
151    * @return whether the accessibility action is performed or not.
152    */
153   virtual bool AccessibilityActionPageDown() = 0;
154
155   /**
156    * Perform the accessibility action to move the focus to the first item on the screen
157    * (by one finger swipe up and down).
158    * @return whether the accessibility action is performed or not.
159    */
160   virtual bool AccessibilityActionMoveToFirst() = 0;
161
162   /**
163    * Perform the accessibility action to move the focus to the last item on the screen
164    * (by one finger swipe down and up).
165    * @return whether the accessibility action is performed or not.
166    */
167   virtual bool AccessibilityActionMoveToLast() = 0;
168
169   /**
170    * Perform the accessibility action to move the focus to the first item on the top
171    * and read from the top item continuously (by three fingers single tap).
172    * @return whether the accessibility action is performed or not.
173    */
174   virtual bool AccessibilityActionReadFromTop() = 0;
175
176   /**
177    * Perform the accessibility action to move the focus to and read from the next item
178    * continuously (by three fingers double tap).
179    * @return whether the accessibility action is performed or not.
180    */
181   virtual bool AccessibilityActionReadFromNext() = 0;
182
183   /**
184    * Perform the accessibility action to move the focus to do the zooming (by one finger triple tap).
185    * @return whether the accessibility action is performed or not.
186    */
187   virtual bool AccessibilityActionZoom() = 0;
188
189   /**
190    * Perform the accessibility action to pause/resume the current read out (by two fingers single tap).
191    * @return whether the accessibility action is performed or not.
192    */
193   virtual bool AccessibilityActionReadPauseResume() = 0;
194
195   /**
196    * Perform the accessibility action to start/stop the current action (by two fingers double tap).
197    * @return whether the accessibility action is performed or not.
198    */
199   virtual bool AccessibilityActionStartStop() = 0;
200
201   /**
202    * Perform the accessibility action to mouse move (by one finger tap & hold and move).
203    * @param touch touch data
204    * @return whether the accessibility action is performed or not.
205    */
206   virtual bool AccessibilityActionTouch(const Dali::TouchEvent& touch) = 0;
207
208 }; // class AccessibilityActionHandler
209
210 } // namespace Dali
211
212 #endif // DALI_ACCESSIBILITY_ACTION_HANDLER_H