[ATSPI] Add more descriptions to Bridge objects
[platform/core/uifw/dali-adaptor.git] / dali / internal / accessibility / bridge / bridge-component.h
1 #ifndef DALI_INTERNAL_ACCESSIBILITY_BRIDGE_COMPONENT_H
2 #define DALI_INTERNAL_ACCESSIBILITY_BRIDGE_COMPONENT_H
3
4 /*
5  * Copyright (c) 2021 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 <array>
23 #include <string>
24 #include <tuple>
25 #include <unordered_map>
26 #include <vector>
27
28 // INTERNAL INCLUDES
29 #include <dali/internal/accessibility/bridge/bridge-base.h>
30
31 /**
32  * @brief The BridgeComponent class is to correspond with Dali::Accessibility::Component.
33  */
34 class BridgeComponent : public virtual BridgeBase
35 {
36 protected:
37   /**
38    * @brief Constructor.
39    */
40   BridgeComponent();
41
42   /**
43    * @brief Registers Component functions to dbus interfaces.
44    */
45   void RegisterInterfaces();
46
47   /**
48    * @brief Returns the Component object of the currently executed DBus method call.
49    *
50    * @return The Component object
51    */
52   Dali::Accessibility::Component* FindSelf() const;
53
54 public:
55   /**
56    * @copydoc Dali::Accessibility::Component::IsAccessibleContainingPoint()
57    */
58   DBus::ValueOrError<bool> IsAccessibleContainingPoint(int32_t x, int32_t y, uint32_t coordType);
59
60   /**
61    * @copydoc Dali::Accessibility::Component::GetAccessibleAtPoint()
62    */
63   DBus::ValueOrError<Dali::Accessibility::Accessible*> GetAccessibleAtPoint(int32_t x, int32_t y, uint32_t coordType);
64
65   /**
66    * @copydoc Dali::Accessibility::Component::GetExtents()
67    */
68   DBus::ValueOrError<std::tuple<int32_t, int32_t, int32_t, int32_t> > GetExtents(uint32_t coordType);
69
70   /**
71    * @brief Gets the position from the given coordinate.
72    * @param[in] coordType The enumeration with type of coordinate systems
73    * @return The X and Y position of rectangle
74    */
75   DBus::ValueOrError<int32_t, int32_t> GetPosition(uint32_t coordType);
76
77   /**
78    * @brief Gets the size from the given coordinate.
79    * @param[in] coordType The enumeration with type of coordinate systems
80    * @return The width and height of rectangle
81    */
82   DBus::ValueOrError<int32_t, int32_t> GetSize(uint32_t coordType);
83
84   /**
85    * @copydoc Dali::Accessibility::Component::GetLayer()
86    */
87   DBus::ValueOrError<Dali::Accessibility::ComponentLayer> GetLayer();
88
89   /**
90    * @copydoc Dali::Accessibility::Component::GetAlpha()
91    */
92   DBus::ValueOrError<double> GetAlpha();
93
94   /**
95    * @copydoc Dali::Accessibility::Component::GrabFocus()
96    */
97   DBus::ValueOrError<bool> GrabFocus();
98
99   /**
100    * @copydoc Dali::Accessibility::Component::GrabHighlight()
101    */
102   DBus::ValueOrError<bool> GrabHighlight();
103
104   /**
105    * @copydoc Dali::Accessibility::Component::ClearHighlight()
106    */
107   DBus::ValueOrError<bool> ClearHighlight();
108
109   /**
110    * @copydoc Dali::Accessibility::Component::GetMdiZOrder()
111    */
112   DBus::ValueOrError<int16_t> GetMdiZOrder();
113 };
114
115 #endif // DALI_INTERNAL_ACCESSIBILITY_BRIDGE_COMPONENT_H