1 | /* |
2 | * Copyright (C) 2012 Igalia S.L. |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Lesser General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2,1 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 | #if !defined(__WEBKIT_WEB_EXTENSION_H_INSIDE__) && !defined(WEBKIT2_COMPILATION) |
21 | #error "Only <webkit2/webkit-web-extension.h> can be included directly." |
22 | #endif |
23 | |
24 | #ifndef WebKitWebPage_h |
25 | #define WebKitWebPage_h |
26 | |
27 | #include <glib-object.h> |
28 | #include <webkit2/WebKitDefines.h> |
29 | #include <webkit2/WebKitFrame.h> |
30 | #include <webkit2/WebKitWebEditor.h> |
31 | #include <webkitdom/webkitdom.h> |
32 | |
33 | G_BEGIN_DECLS |
34 | |
35 | #define WEBKIT_TYPE_WEB_PAGE (webkit_web_page_get_type()) |
36 | #define WEBKIT_WEB_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEB_PAGE, WebKitWebPage)) |
37 | #define WEBKIT_IS_WEB_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEB_PAGE)) |
38 | #define WEBKIT_WEB_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_WEB_PAGE, WebKitWebPageClass)) |
39 | #define WEBKIT_IS_WEB_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_WEB_PAGE)) |
40 | #define WEBKIT_WEB_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_WEB_PAGE, WebKitWebPageClass)) |
41 | |
42 | typedef struct _WebKitWebPage WebKitWebPage; |
43 | typedef struct _WebKitWebPageClass WebKitWebPageClass; |
44 | typedef struct _WebKitWebPagePrivate WebKitWebPagePrivate; |
45 | |
46 | /* Forward declarations */ |
47 | typedef struct _WebKitWebEditor WebKitWebEditor; |
48 | |
49 | /** |
50 | * WebKitFormSubmissionStep: |
51 | * @WEBKIT_FORM_SUBMISSION_WILL_SEND_DOM_EVENT: indicates the form's |
52 | * DOM submit event is about to be emitted. |
53 | * @WEBKIT_FORM_SUBMISSION_WILL_COMPLETE: indicates the form is about |
54 | * to be submitted. |
55 | * |
56 | * Used to indicate a particular stage in form submission. See |
57 | * #WebKitWebPage::will-submit-form. |
58 | * |
59 | * Since: 2.20 |
60 | */ |
61 | typedef enum { |
62 | WEBKIT_FORM_SUBMISSION_WILL_SEND_DOM_EVENT, |
63 | WEBKIT_FORM_SUBMISSION_WILL_COMPLETE, |
64 | } WebKitFormSubmissionStep; |
65 | |
66 | struct _WebKitWebPage { |
67 | GObject parent; |
68 | |
69 | WebKitWebPagePrivate *priv; |
70 | }; |
71 | |
72 | struct _WebKitWebPageClass { |
73 | GObjectClass parent_class; |
74 | }; |
75 | |
76 | WEBKIT_API GType |
77 | webkit_web_page_get_type (void); |
78 | |
79 | WEBKIT_API WebKitDOMDocument * |
80 | webkit_web_page_get_dom_document (WebKitWebPage *web_page); |
81 | |
82 | WEBKIT_API guint64 |
83 | webkit_web_page_get_id (WebKitWebPage *web_page); |
84 | |
85 | WEBKIT_API const gchar * |
86 | webkit_web_page_get_uri (WebKitWebPage *web_page); |
87 | |
88 | WEBKIT_API WebKitFrame * |
89 | webkit_web_page_get_main_frame (WebKitWebPage *web_page); |
90 | |
91 | WEBKIT_API WebKitWebEditor * |
92 | webkit_web_page_get_editor (WebKitWebPage *web_page); |
93 | |
94 | G_END_DECLS |
95 | |
96 | #endif |
97 | |