ce65360ad4aef01b6b38c879710ca5a56428937e
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / atspi-accessibility.h
1 #ifndef DALI_DEVEL_ATSPI_ACCESSIBILITY_H
2 #define DALI_DEVEL_ATSPI_ACCESSIBILITY_H
3 /*
4  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 // EXTERNAL INCLUDES
21 #include <functional>
22
23 // INTERNAL INCLUDES
24 #include <dali/public-api/dali-adaptor-common.h>
25
26 namespace Dali
27 {
28 namespace AtspiAccessibility
29 {
30 /**
31  * @brief Reads given text by screen reader
32  * @param text The text to read
33  * @param discardable If TRUE, reading can be discarded by subsequent reading requests,
34  * if FALSE the reading must finish before next reading request can be started
35  * @param callback the callback function that is called on reading signals emitted
36  * during processing of this reading request.
37  * Callback can be one of the following signals:
38  * ReadingCancelled, ReadingStopped, ReadingSkipped
39  */
40 DALI_ADAPTOR_API void Say( const std::string &text, bool discardable, std::function<void(std::string)> callback );
41
42 /**
43  * @brief Force accessibility client to pause.
44  */
45 DALI_ADAPTOR_API void Pause();
46
47 /**
48  * @brief Force accessibility client to resume.
49  */
50 DALI_ADAPTOR_API void Resume();
51
52 /**
53  * @brief Set ATSPI to be turned On or Off forcibly.
54  *
55  * @param[in] turnOn true to turn on, false to turn off.
56  * @return The status of ATSPI : 0(ATSPI OFF, ScreenReader OFF), 1(ATSPI ON, ScreenReader OFF),
57  * 2 (ATSPI OFF, ScreenReader ON), 3(ATSPI ON, ScreenReader ON)
58  */
59 DALI_ADAPTOR_API int SetForcefully( bool turnOn );
60
61 /**
62  * @brief Get ATSPI status.
63  * @return Status of ATSPI : 0(ATSPI OFF, ScreenReader OFF), 1(ATSPI ON, ScreenReader OFF),
64  * 2 (ATSPI OFF, ScreenReader ON), 3(ATSPI ON, ScreenReader ON)
65  */
66 DALI_ADAPTOR_API int GetStatus();
67
68 } //namespace AtspiAccessibility
69 } //namespace Dali
70
71 #endif // DALI_DEVEL_ATSPI_ACCESSIBILITY_H