Migrate frame types so that desktop/browser.h does not include render/html.h

svn path=/trunk/netsurf/; revision=13605
This commit is contained in:
Daniel Silverstone 2012-03-24 17:09:21 +00:00
parent 85d3e6337f
commit d1194be49f
7 changed files with 53 additions and 18 deletions

View File

@ -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"

View File

@ -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. */

46
desktop/frame_types.h Normal file
View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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"

View File

@ -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 {