1 #ifndef DALI_ADAPTOR_ATSPI_HYPERTEXT_H
2 #define DALI_ADAPTOR_ATSPI_HYPERTEXT_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>
25 #include <dali/devel-api/atspi-interfaces/hyperlink.h>
27 namespace Dali::Accessibility
30 * @brief Interface representing hypertext that can store a collection of hyperlinks.
32 class DALI_ADAPTOR_API Hypertext : public virtual Accessible
36 * @brief Gets the handle to hyperlink object from a specified index in hyperlink collection of this hypertext.
38 * @param[in] linkIndex The 0-based index in hyperlink collection.
40 * @return Handle to hyperlink object at a specified index in hyperlink collection of hypertext.
42 virtual Hyperlink* GetLink(int32_t linkIndex) const = 0;
45 * @brief Gets the index in hyperlink collection occupied by hyperlink which spans over a specified character offset in this hypertext.
47 * @param[in] characterOffset The 0-based index of character in hypertext.
49 * @return The value of 0-based index in hyperlink collection (-1 if there is no hyperlink at the specified character offset).
51 virtual int32_t GetLinkIndex(int32_t characterOffset) const = 0;
54 * @brief Gets number of hyperlinks stored in this hypertext.
56 * @return The number of hyperlinks (zero if none or -1 if the number cannot be determined)
58 virtual int32_t GetLinkCount() const = 0;
61 } // namespace Dali::Accessibility
63 #endif // DALI_ADAPTOR_ATSPI_HYPERTEXT_H