2 * Copyright (C) 2007 Holger Hans Peter Freyther
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.
20 #ifndef WEBKIT_PRIVATE_H
21 #define WEBKIT_PRIVATE_H
24 * Internal class. This class knows the shared secret of WebKitWebFrame,
25 * WebKitNetworkRequest and WebKitWebView.
26 * They are using WebCore which musn't be exposed to the outer world.
29 #include "webkitdefines.h"
30 #include "webkitsettings.h"
31 #include "webkitwebview.h"
32 #include "webkitwebframe.h"
33 #include "webkitnetworkrequest.h"
38 #include "FrameLoaderClient.h"
41 void apply(WebKitSettings*,WebCore::Settings*);
42 WebKitSettings* create(WebCore::Settings*);
43 WebKitWebView* getViewFromFrame(WebKitWebFrame*);
45 WebCore::Frame* core(WebKitWebFrame*);
46 WebKitWebFrame* kit(WebCore::Frame*);
47 WebCore::Page* core(WebKitWebView*);
48 WebKitWebView* kit(WebCore::Page*);
54 #define WEBKIT_WEB_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_VIEW, WebKitWebViewPrivate))
55 typedef struct _WebKitWebViewPrivate WebKitWebViewPrivate;
56 struct _WebKitWebViewPrivate {
57 WebCore::Page* corePage;
58 WebCore::Settings* settings;
60 WebKitWebFrame* mainFrame;
61 WebCore::String applicationNameForUserAgent;
62 WebCore::String* userAgent;
64 HashSet<GtkWidget*> children;
66 GtkIMContext* imContext;
69 #define WEBKIT_WEB_FRAME_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_FRAME, WebKitWebFramePrivate))
70 typedef struct _WebKitWebFramePrivate WebKitWebFramePrivate;
71 struct _WebKitWebFramePrivate {
72 WebCore::Frame* frame;
73 WebCore::FrameLoaderClient* client;
74 WebKitWebView* webView;
81 #define WEBKIT_NETWORK_REQUEST_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_NETWORK_REQUEST, WebKitNetworkRequestPrivate))
82 typedef struct _WebKitNetworkRequestPrivate WebKitNetworkRequestPrivate;
83 struct _WebKitNetworkRequestPrivate {
87 WebKitWebFrame* webkit_web_frame_init_with_web_view(WebKitWebView*, WebCore::HTMLFrameOwnerElement*);
89 // TODO: Move these to webkitwebframe.h once these functions are fully
90 // implemented and their API has been discussed.
93 webkit_web_frame_get_children (WebKitWebFrame* frame);
96 webkit_web_frame_get_inner_text (WebKitWebFrame* frame);
99 webkit_web_frame_print (WebKitWebFrame* frame);