Create string tightly when retrive string from cbhm callback event
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / API / efl / ewk_frame.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 #ifndef ewk_frame_h
21 #define ewk_frame_h
22
23 #include <Eina.h>
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 typedef const void* Ewk_Frame_Ref;
30
31
32 /**
33  * Callback for ewk_frame_source_get
34  *
35  * @param frame frame object to get the frame source
36  * @param source frame source on success, or NULL on failure
37  * @param user_data user data
38  */
39 typedef void (*Ewk_Frame_Source_Get_Callback)(Ewk_Frame_Ref frame, const char* source, void* user_data);
40
41 /**
42  * Gets the reference object for frame that represents the parent frame.
43  *
44  * @param frame the reference object for frame to get parent frame
45  *
46  * @return frame reference of frame object on success, or NULL on failure
47  */
48 EAPI Ewk_Frame_Ref ewk_frame_parent_get(Ewk_Frame_Ref frame);
49
50 /**
51  * Gets the frame source.
52  *
53  * @param frame frame object to get the frame source
54  * @param callback result callback
55  * @param user_data user data
56  *
57  * @return @c EINA_TRUE on success or @c EINA_FALSE otherwise
58  */
59 EAPI Eina_Bool ewk_frame_source_get(Ewk_Frame_Ref frame, Ewk_Frame_Source_Get_Callback callback, void* user_data);
60
61 /**
62  * Gets whether a MIME type can be displayed in the frame.
63  *
64  * @param frame frame object
65  * @param mime_type a mime type
66  *
67  * @return @c EINA_TRUE if the MIME type can be displayed or @c EINA_FALSE otherwise
68  */
69 EAPI Eina_Bool ewk_frame_can_show_mime_type(Ewk_Frame_Ref frame, char* mime_type);
70
71 /**
72  * Gets whether the frame is main frame.
73  *
74  * @param frame frame object
75  *
76  * @return @c EINA_TRUE if the frame is main frame or @c EINA_FALSE otherwise
77  */
78 EAPI Eina_Bool ewk_frame_is_main_frame(Ewk_Frame_Ref frame);
79
80 #ifdef __cplusplus
81 }
82 #endif
83 #endif // ewk_frame_h