X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Fweb-view%2Fweb-back-forward-list.h;h=1c0ca6ec2d93d6daf747c6d25f4d924a913fccb2;hp=144c02b0e55b31f57d62ddbb9ce8ab6db832b73d;hb=a0389a25a5ce0e8b539c75a6f37b75d3286dacef;hpb=06390b11a4bbb71ee3d9a0508ed33cb3aa14d8a3 diff --git a/dali-toolkit/devel-api/controls/web-view/web-back-forward-list.h b/dali-toolkit/devel-api/controls/web-view/web-back-forward-list.h index 144c02b..1c0ca6e 100755 --- a/dali-toolkit/devel-api/controls/web-view/web-back-forward-list.h +++ b/dali-toolkit/devel-api/controls/web-view/web-back-forward-list.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_WEB_BACK_FORWARD_LIST_H /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,13 +18,16 @@ * */ +// EXTERNAL INCLUDES +#include +#include +#include + // INTERNAL INCLUDES -#include #include namespace Dali { - class WebEngineBackForwardList; namespace Toolkit @@ -49,7 +52,7 @@ public: /** * @brief Creates a WebBackForwardList. */ - WebBackForwardList( const Dali::WebEngineBackForwardList& list ); + WebBackForwardList(Dali::WebEngineBackForwardList& list); /** * @brief Destructor. @@ -60,14 +63,26 @@ public: * @brief Returns the current item in the @a list. * @return The current item in list. */ - WebBackForwardListItem* GetCurrentItem(); + std::unique_ptr GetCurrentItem(); + + /** + * @brief Returns the previous item in the @a list. + * @return The previous item in list. + */ + std::unique_ptr GetPreviousItem(); + + /** + * @brief Returns the next item in the @a list. + * @return The next item in list. + */ + std::unique_ptr GetNextItem(); /** * @brief Returns the item at a given @a index relative to the current item. * @param[in] index The index of the item * @return The current item in list. */ - WebBackForwardListItem* GetItemAtIndex(uint32_t index); + std::unique_ptr GetItemAtIndex(uint32_t index); /** * @brief Returns the length of the back-forward list including the current @@ -77,10 +92,38 @@ public: */ uint32_t GetItemCount() const; -private: - const Dali::WebEngineBackForwardList& mWebEngineBackForwardList; - Dali::Toolkit::WebBackForwardListItem mWebBackForwardListItem; + /** + * @brief Creates a list containing the items preceding the current item limited + * by @a limit. + * + * @details The WebEngineBackForwardListItem elements are located in the result + list starting with the oldest one.\n + * If @a limit is equal to @c -1 all the items preceding the current + * item are returned. + * + * @param[in] limit The number of items to retrieve + * + * @return @c vector containing @c WebEngineBackForwardListItem elements,\n + */ + std::vector> GetBackwardItems(int limit); + /** + * @brief Creates the list containing the items following the current item + * limited by @a limit. + * + * @details The @c WebEngineBackForwardListItem elements are located in the result + * list starting with the oldest one.\n + * If @a limit is equal to @c -1 all the items preceding the current + * item are returned. + * + * @param[in] limit The number of items to retrieve + * + * @return @c vector containing @c WebEngineBackForwardListItem elements,\n + */ + std::vector> GetForwardItems(int limit); + +private: + Dali::WebEngineBackForwardList& mWebEngineBackForwardList; }; /**