2 * Copyright (C) 2012 Samsung Electronics
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
22 * @brief Describes the history(back & forward list) API of visited page.
34 /** Creates a type name for _Ewk_History */
35 typedef struct _Ewk_History Ewk_History;
37 /** Creates a type name for _Ewk_History_Item */
38 typedef struct _Ewk_History_Item Ewk_History_Item;
41 * Get the whole length of back list.
43 * @param history to get the whole back list
45 * @return number of elements in whole list.
47 EAPI int ewk_history_back_list_length_get(Ewk_History* history);
50 * Get the whole length of forward list.
52 * @param history to get the whole forward list
54 * @return number of elements in whole list.
56 EAPI int ewk_history_forward_list_length_get(Ewk_History* history);
59 * Get the item at a given index relative to the current item.
61 * @param history which history instance to query.
62 * @param index position of item to get.
64 * @note The back list item in case of index < 0, the current item in case of index == 0, the forward list item in case of index > 0.
66 * @return the item at a given index relative to the current item.
68 EAPI Ewk_History_Item* ewk_history_nth_item_get(Ewk_History* history, int index);
71 * Query URI for given list item.
73 * @param item history item to query.
75 * @return the URI pointer, that may be @c NULL.
77 EAPI const char* ewk_history_item_uri_get(Ewk_History_Item* item);
80 * Query title for given list item.
82 * @param item history item to query.
84 * @return the title pointer, that may be @c NULL.
86 EAPI const char* ewk_history_item_title_get(Ewk_History_Item* item);
89 * Free given history instance.
91 * @param history what to free.
93 EAPI void ewk_history_free(Ewk_History* history);
95 EINA_DEPRECATED EAPI Eina_List* ewk_history_back_list_get(Ewk_History* history);
96 EINA_DEPRECATED EAPI Eina_List* ewk_history_forward_list_get(Ewk_History* history);
97 EINA_DEPRECATED EAPI void ewk_history_item_list_free(Eina_List* items);
103 #endif // ewk_history