1 #ifndef DALI_ADAPTOR_ATSPI_HYPERLINK_H
2 #define DALI_ADAPTOR_ATSPI_HYPERLINK_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.
25 #include <dali/devel-api/atspi-interfaces/accessible.h>
27 namespace Dali::Accessibility
30 * @brief Interface representing a hyperlink in hypertext .
32 class Hyperlink : public virtual Accessible
36 * @brief Gets the index of character in originating hypertext at which this hyperlink ends.
38 * @return The 0-based index of hyperlink's last character + 1, in its originating hypertext.
40 virtual int32_t GetEndIndex() const = 0;
43 * @brief Gets the index of character in originating hypertext at which this hyperlink starts.
45 * @return The 0-based index of hyperlink's first character, in its originating hypertext.
47 virtual int32_t GetStartIndex() const = 0;
50 * @brief Gets the total number of anchors which this hyperlink has. Though, typical hyperlinks will have only one anchor.
52 * @return The number of anchors.
54 virtual int32_t GetAnchorCount() const = 0;
57 * @brief Gets the object associated with a particular hyperlink's anchor.
59 * @param[in] anchorIndex The 0-based index in anchor collection.
61 * @return The handle to accessible object.
63 virtual Accessible* GetAnchorAccessible(int32_t anchorIndex) const = 0;
66 * @brief Gets the URI associated with a particular hyperlink's anchor.
68 * @param[in] anchorIndex The 0-based index in anchor collection.
70 * @return The string containing URI.
72 virtual std::string GetAnchorUri(int32_t anchorIndex) const = 0;
75 * @brief Tells whether this hyperlink object is still valid with respect to its originating hypertext object.
77 * @return True if hyperlink object is valid, false otherwise
79 virtual bool IsValid() const = 0;
82 } // namespace Dali::Accessibility
84 #endif // DALI_ADAPTOR_ATSPI_HYPERLINK_H