1 #ifndef DALI_WEB_ENGINE_BACK_FORWARD_LIST_H
2 #define DALI_WEB_ENGINE_BACK_FORWARD_LIST_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.
22 #include <dali/devel-api/adaptor-framework/web-engine-back-forward-list-item.h>
31 class WebEngineBackForwardListItem;
34 * @brief A class WebBackForwardList for back forward list of web engine.
36 class WebEngineBackForwardList
42 WebEngineBackForwardList() = default;
47 virtual ~WebEngineBackForwardList() = default;
50 * @brief Returns the current item in the @a list.
51 * @return The item of back-forward list.
53 virtual std::unique_ptr<Dali::WebEngineBackForwardListItem> GetCurrentItem() const = 0;
56 * @brief Returns the previous item in the @a list.
57 * @return The previous item of back-forward list.
59 virtual std::unique_ptr<Dali::WebEngineBackForwardListItem> GetPreviousItem() const = 0;
62 * @brief Returns the next item in the @a list.
63 * @return The next item of back-forward list.
65 virtual std::unique_ptr<Dali::WebEngineBackForwardListItem> GetNextItem() const = 0;
68 * @brief Returns the item at a given @a index relative to the current item.
69 * @param[in] index The index of the item
70 * @return The item of back-forward list.
72 virtual std::unique_ptr<Dali::WebEngineBackForwardListItem> GetItemAtIndex(uint32_t index) const = 0;
75 * @brief Returns the length of the back-forward list including the current
77 * @return The length of the back-forward list including the current item,
78 * otherwise @c 0 in case of an error
80 virtual uint32_t GetItemCount() const = 0;
83 * @brief Creates a list containing the items preceding the current item limited
86 * @details The WebEngineBackForwardListItem elements are located in the result
87 list starting with the oldest one.\n
88 * If @a limit is equal to @c -1 all the items preceding the current
91 * @param[in] limit The number of items to retrieve
93 * @return @c Dali::Vector containing @c WebEngineBackForwardListItem elements,\n
95 virtual std::vector<std::unique_ptr<Dali::WebEngineBackForwardListItem>> GetBackwardItems(int limit) = 0;
98 * @brief Creates the list containing the items following the current item
99 * limited by @a limit.
101 * @details The @c WebEngineBackForwardListItem elements are located in the result
102 * list starting with the oldest one.\n
103 * If @a limit is equal to @c -1 all the items preceding the current
106 * @param[in] limit The number of items to retrieve
108 * @return @c Dali::Vector containing @c WebEngineBackForwardListItem elements,\n
110 virtual std::vector<std::unique_ptr<Dali::WebEngineBackForwardListItem>> GetForwardItems(int limit) = 0;
115 #endif // DALI_WEB_ENGINE_BACK_FORWARD_LIST_H