[Tizen](ATSPI) Fix Native TC fails
[platform/core/uifw/dali-adaptor.git] / dali / internal / accessibility / tizen-wayland / tizen-mobile / accessibility-adaptor-impl-mobile.h
1 #ifndef DALI_INTERNAL_ACCESSIBILITY_ADAPTOR_MOBILE_H
2 #define DALI_INTERNAL_ACCESSIBILITY_ADAPTOR_MOBILE_H
3
4 /*
5  * Copyright (c) 2019 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 // INTERNAL INCLUDES
22 #include <dali/devel-api/adaptor-framework/accessibility-adaptor.h>
23 #include <dali/devel-api/adaptor-framework/accessibility-action-handler.h>
24 #include <dali/devel-api/adaptor-framework/accessibility-gesture-handler.h>
25 #include <dali/internal/accessibility/common/accessibility-gesture-detector.h>
26 #include <dali/internal/accessibility/common/accessibility-adaptor-impl.h>
27
28 namespace Dali
29 {
30
31 namespace Internal
32 {
33
34 namespace Adaptor
35 {
36
37 /**
38  * This mobile version is different since it forwards events to the indicator.
39  */
40 class AccessibilityAdaptorMobile : public AccessibilityAdaptor
41 {
42 public:
43
44   /**
45    * Constructor.
46    */
47   AccessibilityAdaptorMobile();
48
49   // From AccessibilityAdaptor base class
50
51   /**
52    * @copydoc Dali::AccessibilityAdaptor::HandleActionNextEvent()
53    */
54   virtual bool HandleActionNextEvent( bool allowEndFeedback );
55
56   /**
57    * @copydoc Dali::AccessibilityAdaptor::HandleActionPreviousEvent()
58    */
59   virtual bool HandleActionPreviousEvent( bool allowEndFeedback );
60
61   /**
62    * @copydoc Dali::AccessibilityAdaptor::HandleActionActivateEvent()
63    */
64   virtual bool HandleActionActivateEvent();
65
66   /**
67    * @copydoc Dali::AccessibilityAdaptor::HandleActionReadEvent()
68    */
69   virtual bool HandleActionReadEvent( unsigned int x, unsigned int y, bool allowReadAgain );
70
71   /**
72    * @copydoc Dali::AccessibilityAdaptor::HandleActionReadNextEvent()
73    */
74   virtual bool HandleActionReadNextEvent( bool allowEndFeedback );
75
76   /**
77    * @copydoc Dali::AccessibilityAdaptor::HandleActionReadPreviousEvent()
78    */
79   virtual bool HandleActionReadPreviousEvent( bool allowEndFeedback );
80
81   /**
82    * @copydoc Dali::AccessibilityAdaptor::HandleActionUpEvent()
83    */
84   virtual bool HandleActionUpEvent();
85
86   /**
87    * @copydoc Dali::AccessibilityAdaptor::HandleActionDownEvent()
88    */
89   virtual bool HandleActionDownEvent();
90
91 private:
92
93   /**
94    * Destructor.
95    */
96   virtual ~AccessibilityAdaptorMobile();
97
98   // Undefined
99   AccessibilityAdaptorMobile( const AccessibilityAdaptorMobile& );
100   AccessibilityAdaptorMobile& operator=( AccessibilityAdaptorMobile& );
101
102 public:
103
104   // Helpers for public-api forwarding methods
105
106   inline static Internal::Adaptor::AccessibilityAdaptorMobile& GetImplementation(Dali::AccessibilityAdaptor& adaptor)
107   {
108     DALI_ASSERT_ALWAYS( adaptor && "AccessibilityAdaptorMobile handle is empty" );
109
110     BaseObject& handle = adaptor.GetBaseObject();
111
112     return static_cast<Internal::Adaptor::AccessibilityAdaptorMobile&>(handle);
113   }
114
115   inline static const Internal::Adaptor::AccessibilityAdaptorMobile& GetImplementation(const Dali::AccessibilityAdaptor& adaptor)
116   {
117     DALI_ASSERT_ALWAYS( adaptor && "AccessibilityAdaptorMobile handle is empty" );
118
119     const BaseObject& handle = adaptor.GetBaseObject();
120
121     return static_cast<const Internal::Adaptor::AccessibilityAdaptorMobile&>(handle);
122   }
123
124 };
125
126 } // namespace Adaptor
127
128 } // namespace Internal
129
130 } // namespace Dali
131
132 #endif // DALI_INTERNAL_ACCESSIBILITY_ADAPTOR_MOBILE_H