Merge "Add a callback for navigation policy in web engine." into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / atspi-interfaces / action.h
1 #ifndef DALI_ADAPTOR_ATSPI_ACTION_H
2 #define DALI_ADAPTOR_ATSPI_ACTION_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 // EXTERNAL INCLUDES
21 #include <string>
22
23 // INTERNAL INCLUDES
24 #include <dali/devel-api/atspi-interfaces/accessible.h>
25
26 namespace Dali::Accessibility
27 {
28 /**
29  * @brief Interface enabling to perform provided actions.
30  */
31 class DALI_ADAPTOR_API Action : public virtual Accessible
32 {
33 public:
34   /**
35    * @brief Gets name of action with given index.
36    *
37    * @param[in] index The index of action
38    *
39    * @return The string with name of action
40    */
41   virtual std::string GetActionName(std::size_t index) const = 0;
42
43   /**
44    * @brief Gets translated name of action with given index.
45    *
46    * @param[in] index The index of action
47    *
48    * @return The string with name of action translated according to current translation domain
49    *
50    * @note The translation is not supported in this version
51    */
52   virtual std::string GetLocalizedActionName(std::size_t index) const = 0;
53
54   /**
55    * @brief Gets description of action with given index.
56    *
57    * @param[in] index The index of action
58    *
59    * @return The string with description of action
60    */
61   virtual std::string GetActionDescription(std::size_t index) const = 0;
62
63   /**
64    * @brief Gets key code binded to action with given index.
65    *
66    * @param[in] index The index of action
67    *
68    * @return The string with key name
69    */
70   virtual std::string GetActionKeyBinding(std::size_t index) const = 0;
71
72   /**
73    * @brief Gets number of provided actions.
74    *
75    * @return The number of actions
76    */
77   virtual std::size_t GetActionCount() const = 0;
78
79   /**
80    * @brief Performs an action with given index.
81    *
82    * @param index The index of action
83    *
84    * @return true on success, false otherwise
85    */
86   virtual bool DoAction(std::size_t index) = 0;
87
88   /**
89    * @brief Performs an action with given name.
90    *
91    * @param name The name of action
92    *
93    * @return true on success, false otherwise
94    */
95   virtual bool DoAction(const std::string& name) = 0;
96 };
97
98 } // namespace Dali::Accessibility
99
100 #endif // DALI_ADAPTOR_ATSPI_ACTION_H