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*);
52 #define WEBKIT_WEB_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_VIEW, WebKitWebViewPrivate))
53 typedef struct _WebKitWebViewPrivate WebKitWebViewPrivate;
54 struct _WebKitWebViewPrivate {
55 WebCore::Page* corePage;
56 WebCore::Settings* settings;
58 WebKitWebFrame* mainFrame;
59 WebCore::String applicationNameForUserAgent;
60 WebCore::String* userAgent;
62 HashSet<GtkWidget*> children;
64 GtkIMContext* imContext;
67 #define WEBKIT_WEB_FRAME_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_FRAME, WebKitWebFramePrivate))
68 typedef struct _WebKitWebFramePrivate WebKitWebFramePrivate;
69 struct _WebKitWebFramePrivate {
70 WebCore::Frame* frame;
71 WebCore::FrameLoaderClient* client;
72 WebKitWebView* webView;
79 #define WEBKIT_NETWORK_REQUEST_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_NETWORK_REQUEST, WebKitNetworkRequestPrivate))
80 typedef struct _WebKitNetworkRequestPrivate WebKitNetworkRequestPrivate;
81 struct _WebKitNetworkRequestPrivate {
85 WebKitWebFrame* webkit_web_frame_init_with_web_view(WebKitWebView*, WebCore::HTMLFrameOwnerElement*);
88 // TODO: Move these to webkitwebframe.h once these functions are fully
89 // implemented and their API has been discussed.
92 webkit_web_frame_get_children (WebKitWebFrame* frame);
95 webkit_web_frame_get_inner_text (WebKitWebFrame* frame);
98 webkit_web_frame_print (WebKitWebFrame* frame);