summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2012-03-24 17:09:21 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2012-03-24 17:09:21 +0000
commitd1194be49f94de3fad35302c647433c4b16fb917 (patch)
tree3f4e15f0bb195d3fb722bc187c1771d71641bb73
parent85d3e6337f0fb93c12cab2211973fe46aff4f840 (diff)
downloadnetsurf-d1194be49f94de3fad35302c647433c4b16fb917.tar.gz
netsurf-d1194be49f94de3fad35302c647433c4b16fb917.tar.bz2
Migrate frame types so that desktop/browser.h does not include render/html.h
svn path=/trunk/netsurf/; revision=13605
-rw-r--r--desktop/browser.c1
-rw-r--r--desktop/browser.h5
-rw-r--r--desktop/frame_types.h46
-rw-r--r--desktop/frames.c1
-rw-r--r--desktop/save_complete.c1
-rw-r--r--desktop/save_text.c1
-rw-r--r--render/html.h16
7 files changed, 53 insertions, 18 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index ec6234171..9a5c5a774 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -58,6 +58,7 @@
#include "render/form.h"
#include "render/textplain.h"
+#include "render/html.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/nsurl.h"
diff --git a/desktop/browser.h b/desktop/browser.h
index 7fff04c82..e0d42265a 100644
--- a/desktop/browser.h
+++ b/desktop/browser.h
@@ -31,9 +31,10 @@
#include "content/content.h"
#include "desktop/gui.h"
#include "desktop/mouse.h"
-#include "render/html.h"
#include "utils/types.h"
+#include "frame_types.h"
+
struct box;
struct hlcache_handle;
struct form;
@@ -67,8 +68,6 @@ typedef enum {
DRAGGING_OTHER
} browser_drag_type;
-
-
/** Browser window data. */
struct browser_window {
/** Page currently displayed, or 0. Must have status READY or DONE. */
diff --git a/desktop/frame_types.h b/desktop/frame_types.h
new file mode 100644
index 000000000..a9ba0b8a6
--- /dev/null
+++ b/desktop/frame_types.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2011 Michael Drake <tlsa@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/** \file
+ * Browser window creation and manipulation (interface).
+ */
+
+#ifndef _NETSURF_DESKTOP_FRAME_TYPES_H_
+#define _NETSURF_DESKTOP_FRAME_TYPES_H_
+
+struct frame_dimension {
+ float value;
+ enum {
+ FRAME_DIMENSION_PIXELS, /* '100', '200' */
+ FRAME_DIMENSION_PERCENT, /* '5%', '20%' */
+ FRAME_DIMENSION_RELATIVE /* '*', '2*' */
+ } unit;
+};
+
+typedef enum {
+ SCROLLING_AUTO,
+ SCROLLING_YES,
+ SCROLLING_NO
+} frame_scrolling;
+
+/* Handy struct names */
+struct content_html_iframe;
+struct scrollbar_msg_data;
+struct content_html_frames;
+
+#endif
diff --git a/desktop/frames.c b/desktop/frames.c
index e89e54df0..6092b40e2 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -39,6 +39,7 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
+#include "render/html.h"
/** maximum frame resize margin */
#define FRAME_RESIZE 6
diff --git a/desktop/save_complete.c b/desktop/save_complete.c
index 956a7f7e3..8c3a1f716 100644
--- a/desktop/save_complete.c
+++ b/desktop/save_complete.c
@@ -41,6 +41,7 @@
#include "utils/log.h"
#include "utils/url.h"
#include "utils/utils.h"
+#include "render/html.h"
regex_t save_complete_import_re;
diff --git a/desktop/save_text.c b/desktop/save_text.c
index 5e5cef761..d2f687e34 100644
--- a/desktop/save_text.c
+++ b/desktop/save_text.c
@@ -30,6 +30,7 @@
#include "content/hlcache.h"
#include "desktop/save_text.h"
#include "render/box.h"
+#include "render/html.h"
#include "utils/log.h"
#include "utils/utf8.h"
#include "utils/utils.h"
diff --git a/render/html.h b/render/html.h
index b33e3112a..7d2ef82cf 100644
--- a/render/html.h
+++ b/render/html.h
@@ -31,6 +31,7 @@
#include "desktop/mouse.h"
#include "desktop/plot_style.h"
#include "render/parser_binding.h"
+#include "desktop/frame_types.h"
struct fetch_multipart_data;
struct box;
@@ -57,21 +58,6 @@ struct html_stylesheet {
} data; /**< Sheet data */
};
-struct frame_dimension {
- float value;
- enum {
- FRAME_DIMENSION_PIXELS, /* '100', '200' */
- FRAME_DIMENSION_PERCENT, /* '5%', '20%' */
- FRAME_DIMENSION_RELATIVE /* '*', '2*' */
- } unit;
-};
-
-typedef enum {
- SCROLLING_AUTO,
- SCROLLING_YES,
- SCROLLING_NO
-} frame_scrolling;
-
/** An object (<img>, <object>, etc.) in a CONTENT_HTML document. */
struct content_html_object {