Create devel-api folder for header files used by Toolkit
[platform/core/uifw/dali-adaptor.git] / adaptors / 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) 2015 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/common/dali-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 to move focus to the previous focusable actor (by one finger flick up).
50    * @param allowEndFeedback true if end of list feedback should be played when the focus is alread reached to the end
51    * @return whether the accessibility action is performed or not.
52    */
53   virtual bool AccessibilityActionPrevious(bool allowEndFeedback) = 0;
54
55   /**
56    * Perform the accessibility action to move focus to the next focusable actor (by one finger flick down).
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 AccessibilityActionNext(bool allowEndFeedback) = 0;
61
62   /**
63    * Perform the accessibility action to move focus to the previous focusable actor (by one finger flick left).
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 AccessibilityActionReadPrevious(bool allowEndFeedback) = 0;
68
69   /**
70    * Perform the accessibility action to move focus to the next focusable actor (by one finger flick right).
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 AccessibilityActionReadNext(bool allowEndFeedback) = 0;
75
76   /**
77    * Perform the accessibility action to focus and read the actor (by one finger tap or move).
78    * @param allowReadAgain true if the action read again the same object (i.e. read action)
79    *                       false if the action just read when the focus object is changed (i.e. over action)
80    * @return whether the accessibility action is performed or not.
81    */
82   virtual bool AccessibilityActionRead(bool allowReadAgain) = 0;
83
84   /**
85    * Perform the accessibility action to activate the current focused actor (by one finger double tap).
86    * @return whether the accessibility action is performed or not.
87    */
88   virtual bool AccessibilityActionActivate() = 0;
89
90   /**
91    * Perform the accessibility action to change the value when the current focused actor is a slider
92    * (by double finger down and move up and right).
93    * @return whether the accessibility action is performed or not.
94    */
95   virtual bool AccessibilityActionUp() = 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 down and left).
100    * @return whether the accessibility action is performed or not.
101    */
102   virtual bool AccessibilityActionDown() = 0;
103
104   /**
105    * Perform the accessibility action to navigate back (by two fingers circle draw).
106    * @return whether the accessibility action is performed or not.
107    */
108   virtual bool AccessibilityActionBack() = 0;
109
110   /**
111    * Perform the accessibility action to mouse move (by one finger tap & hold and move).
112    * @param touchEvent touch event structure
113    * @return whether the accessibility action is performed or not.
114    */
115   virtual bool AccessibilityActionTouch(const Dali::TouchEvent& touchEvent) = 0;
116
117 }; // class AccessibilityActionHandler
118
119 } // namespace Dali
120
121 #endif // __DALI_ACCESSIBILITY_ACTION_HANDLER_H__