From d1194be49f94de3fad35302c647433c4b16fb917 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 24 Mar 2012 17:09:21 +0000 Subject: Migrate frame types so that desktop/browser.h does not include render/html.h svn path=/trunk/netsurf/; revision=13605 --- desktop/browser.c | 1 + desktop/browser.h | 5 ++--- desktop/frame_types.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ desktop/frames.c | 1 + desktop/save_complete.c | 1 + desktop/save_text.c | 1 + render/html.h | 16 +--------------- 7 files changed, 53 insertions(+), 18 deletions(-) create mode 100644 desktop/frame_types.h 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 + * + * 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 . + */ + +/** \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 (, , etc.) in a CONTENT_HTML document. */ struct content_html_object { -- cgit v1.2.3