1 #ifndef DALI_ADAPTOR_ATSPI_COMPONENT_H
2 #define DALI_ADAPTOR_ATSPI_COMPONENT_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/math/rect.h>
25 #include <dali/devel-api/adaptor-framework/accessibility.h>
26 #include <dali/devel-api/atspi-interfaces/accessible.h>
28 namespace Dali::Accessibility
31 * @brief Interface representing objects having screen coordinates.
33 class DALI_ADAPTOR_API Component : public virtual Accessible
37 * @brief Gets rectangle describing size.
39 * @param[in] type The enumeration with type of coordinate systems
41 * @return Rect<> object
45 virtual Rect<> GetExtents(CoordinateType type) = 0;
48 * @brief Gets layer current object is localized on.
50 * @return The enumeration pointing layer
52 * @see Dali::Accessibility::ComponentLayer
54 virtual ComponentLayer GetLayer() = 0;
57 * @brief Gets value of z-order.
59 * @return The value of z-order
60 * @remarks MDI means "Multi Document Interface" (https://en.wikipedia.org/wiki/Multiple-document_interface)
61 * which in short means that many stacked windows can be displayed within a single application.
62 * In such model, the concept of z-order of UI element became important to deal with element overlapping.
64 virtual int16_t GetMdiZOrder() = 0;
67 * @brief Sets current object as "focused".
69 * @return true on success, false otherwise
71 virtual bool GrabFocus() = 0;
74 * @brief Gets value of alpha channel.
76 * @return The alpha channel value in range [0.0, 1.0]
78 virtual double GetAlpha() = 0;
81 * @brief Sets current object as "highlighted".
83 * The method assings "highlighted" state, simultaneously removing it
84 * from currently highlighted object.
86 * @return true on success, false otherwise
88 virtual bool GrabHighlight() = 0;
91 * @brief Sets current object as "unhighlighted".
93 * The method removes "highlighted" state from object.
95 * @return true on success, false otherwise
97 * @see Dali:Accessibility::State
99 virtual bool ClearHighlight() = 0;
102 * @brief Checks whether object can be scrolled.
104 * @return true if object is scrollable, false otherwise
106 * @see Dali:Accessibility::State
108 virtual bool IsScrollable();
111 * @brief Gets Accessible object containing given point.
113 * @param[in] point The two-dimensional point
114 * @param[in] type The enumeration with type of coordinate system
116 * @return The handle to last child of current object which contains given point
118 * @see Dali::Accessibility::Point
120 virtual Accessible* GetAccessibleAtPoint(Point point, CoordinateType type);
123 * @brief Checks if the current object contains the given point inside.
125 * @param[in] point The two-dimensional point
126 * @param[in] type The enumeration with type of coordinate system
128 * @return True if accessible contains in point, otherwise false.
130 * @remarks This method is `Contains` in DBus method.
131 * @see Dali::Accessibility::Point
133 virtual bool IsAccessibleContainingPoint(Point point, CoordinateType type);
136 } // namespace Dali::Accessibility
138 #endif // DALI_ADAPTOR_ATSPI_COMPONENT_H