1 // Copyright 2012 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 * @file ewk_history_internal.h
7 * @brief Describes the history(back & forward list) API of visited page.
10 #ifndef ewk_history_internal_h
11 #define ewk_history_internal_h
20 /** Creates a type name for _Ewk_History */
21 typedef struct _Ewk_History Ewk_History;
23 /** Creates a type name for _Ewk_History_Item */
24 typedef struct _Ewk_History_Item Ewk_History_Item;
27 * Get the whole length of back list.
29 * @param history to get the whole back list
31 * @return number of elements in whole list.
33 EXPORT_API int ewk_history_back_list_length_get(Ewk_History* history);
36 * Get the whole length of forward list.
38 * @param history to get the whole forward list
40 * @return number of elements in whole list.
42 EXPORT_API int ewk_history_forward_list_length_get(Ewk_History* history);
45 * Get the item at a given index relative to the current item.
47 * @param history which history instance to query.
48 * @param index position of item to get.
50 * @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.
52 * @return the item at a given index relative to the current item.
54 EXPORT_API Ewk_History_Item* ewk_history_nth_item_get(Ewk_History* history, int index);
57 * Query URI for given list item.
59 * @param item history item to query.
61 * @return the URI pointer, that may be @c NULL.
63 EXPORT_API const char* ewk_history_item_uri_get(Ewk_History_Item* item);
66 * Query title for given list item.
68 * @param item history item to query.
70 * @return the title pointer, that may be @c NULL.
72 EXPORT_API const char* ewk_history_item_title_get(Ewk_History_Item* item);
75 * Free given history instance.
77 * @param history what to free.
79 EXPORT_API void ewk_history_free(Ewk_History* history);
85 #endif // ewk_history_internal_h