Implement some new ewk apis in web engine.
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / web-engine-back-forward-list.h
1 #ifndef DALI_WEB_ENGINE_BACK_FORWARD_LIST_H
2 #define DALI_WEB_ENGINE_BACK_FORWARD_LIST_H
3
4 /*
5  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <string>
23 #include <dali/devel-api/adaptor-framework/web-engine-back-forward-list-item.h>
24
25 namespace Dali
26 {
27
28 class WebEngineBackForwardListItem;
29
30 /**
31  * @brief A class WebBackForwardList for back forward list of web engine.
32  */
33 class WebEngineBackForwardList
34 {
35
36 public:
37
38   /**
39    * @brief Constructor.
40    */
41   WebEngineBackForwardList() = default;
42
43   /**
44    * @brief Destructor.
45    */
46   virtual ~WebEngineBackForwardList() = default;
47
48   /**
49    * @brief Returns the current item in the @a list.
50    * @return The item of back-forward list.
51    */
52   virtual WebEngineBackForwardListItem& GetCurrentItem() const = 0;
53
54   /**
55    * @brief Returns the item at a given @a index relative to the current item.
56    * @param[in] index The index of the item
57    * @return The item of back-forward list.
58    */
59   virtual WebEngineBackForwardListItem& GetItemAtIndex( uint32_t index ) const = 0;
60
61   /**
62    * @brief Returns the length of the back-forward list including the current
63    *        item.
64    * @return The length of the back-forward list including the current item,
65    *         otherwise @c 0 in case of an error
66    */
67   virtual uint32_t GetItemCount() const = 0;
68
69 };
70
71 } // namespace Dali
72
73 #endif // DALI_WEB_ENGINE_BACK_FORWARD_LIST_H