Create string tightly when retrive string from cbhm callback event
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / API / efl / ewk_history.h
1 /*
2  * Copyright (C) 2012 Samsung Electronics
3  *
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.
8  *
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.
13  *
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.
18  */
19
20 /**
21  * @file    ewk_history.h
22  * @brief   Describes the history(back & forward list) API of visited page.
23  */
24
25 #ifndef ewk_history
26 #define ewk_history
27
28 #include <Eina.h>
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 /** Creates a type name for _Ewk_History */
35 typedef struct _Ewk_History Ewk_History;
36
37 /** Creates a type name for _Ewk_History_Item */
38 typedef struct _Ewk_History_Item Ewk_History_Item;
39
40 /**
41  * Get the whole length of back list.
42  *
43  * @param history to get the whole back list
44  *
45  * @return number of elements in whole list.
46  */
47 EAPI int ewk_history_back_list_length_get(Ewk_History* history);
48
49 /**
50  * Get the whole length of forward list.
51  *
52  * @param history to get the whole forward list
53  *
54  * @return number of elements in whole list.
55  */
56 EAPI int ewk_history_forward_list_length_get(Ewk_History* history);
57
58 /**
59  * Get the item at a given index relative to the current item.
60  *
61  * @param history which history instance to query.
62  * @param index position of item to get.
63  *
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.
65  *
66  * @return the item at a given index relative to the current item.
67  */
68 EAPI Ewk_History_Item* ewk_history_nth_item_get(Ewk_History* history, int index);
69
70 /**
71  * Query URI for given list item.
72  *
73  * @param item history item to query.
74  *
75  * @return the URI pointer, that may be @c NULL.
76  */
77 EAPI const char* ewk_history_item_uri_get(Ewk_History_Item* item);
78
79 /**
80  * Query title for given list item.
81  *
82  * @param item history item to query.
83  *
84  * @return the title pointer, that may be @c NULL.
85  */
86 EAPI const char* ewk_history_item_title_get(Ewk_History_Item* item);
87
88 /**
89  * Free given history instance.
90  *
91  * @param history what to free.
92  */
93 EAPI void ewk_history_free(Ewk_History* history);
94
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);
98
99 #ifdef __cplusplus
100 }
101 #endif
102
103 #endif // ewk_history