1 #ifndef DALI_ADAPTOR_ATSPI_EDITABLE_TEXT_H
2 #define DALI_ADAPTOR_ATSPI_EDITABLE_TEXT_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.
24 #include <dali/devel-api/atspi-interfaces/accessible.h>
26 namespace Dali::Accessibility
29 * @brief Interface representing objects which can store editable texts.
31 * @note Paste method is entirely implemented inside bridge
33 * @see Dali::Accessibility::EditableText
35 class DALI_ADAPTOR_API EditableText : public virtual Accessible
39 * @brief Copies text in range to system clipboard.
41 * @param[in] startPosition The index of first character
42 * @param[in] endPosition The index of first character after the last one expected
44 * @return true on success, false otherwise
46 virtual bool CopyText(size_t startPosition, size_t endPosition) = 0;
49 * @brief Cuts text in range to system clipboard.
51 * @param[in] startPosition The index of first character
52 * @param[in] endPosition The index of first character after the last one expected
54 * @return true on success, false otherwise
56 virtual bool CutText(size_t startPosition, size_t endPosition) = 0;
59 * @brief Deletes text in range.
61 * @param[in] startPosition The index of first character
62 * @param[in] endPosition The index of first character after the last one expected
64 * @return true on success, false otherwise
66 virtual bool DeleteText(size_t startPosition, size_t endPosition) = 0;
69 * @brief Inserts text at startPosition.
71 * @param[in] startPosition The index of first character
72 * @param[in] text The text content
74 * @return true on success, false otherwise
76 virtual bool InsertText(size_t startPosition, std::string text) = 0;
79 * @brief Replaces text with content.
81 * @param[in] newContents The text content
83 * @return true on success, false otherwise
85 virtual bool SetTextContents(std::string newContents) = 0;
88 } // namespace Dali::Accessibility
90 #endif // DALI_ADAPTOR_ATSPI_EDITABLE_TEXT_H