Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3584 sourcerer 1
/*
2
 * Copyright 2004 James Bursa 
3
 *
4
 * This file is part of NetSurf, http://www.netsurf-browser.org/
5
 *
6
 * NetSurf is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation; version 2 of the License.
9
 *
10
 * NetSurf is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program.  If not, see .
17
 */
18
 
19
/** \file
20
 * Content for text/html (interface).
21
 *
22
 * These functions should in general be called via the content interface.
23
 */
24
 
25
#ifndef _NETSURF_RENDER_HTML_H_
26
#define _NETSURF_RENDER_HTML_H_
27
 
28
#include 
29
 
30
#include 
5043 ashmew2 31
#include 
3584 sourcerer 32
#include "content/content_type.h"
33
#include "css/css.h"
34
#include "desktop/mouse.h"
35
#include "desktop/plot_style.h"
36
#include "desktop/frame_types.h"
37
 
38
struct fetch_multipart_data;
39
struct box;
40
struct rect;
41
struct browser_window;
42
struct content;
43
struct hlcache_handle;
44
struct http_parameter;
45
struct imagemap;
46
struct object_params;
47
struct plotters;
48
struct scrollbar;
49
struct scrollbar_msg_data;
50
struct search_context;
51
 
52
/**
53
 * Container for stylesheets used by an HTML document
54
 */
55
struct html_stylesheet {
56
	/** Type of sheet */
57
	enum { HTML_STYLESHEET_EXTERNAL, HTML_STYLESHEET_INTERNAL } type;
58
	union {
59
		struct hlcache_handle *external;
60
		struct content_css_data *internal;
61
	} data;	/**< Sheet data */
62
};
63
 
64
/**
65
 * Container for scripts used by an HTML document
66
 */
67
struct html_script {
68
	/** Type of script */
69
	enum html_script_type { HTML_SCRIPT_INLINE,
70
				HTML_SCRIPT_SYNC,
71
				HTML_SCRIPT_DEFER,
72
				HTML_SCRIPT_ASYNC } type;
73
	union {
74
		struct hlcache_handle *handle;
75
		struct dom_string *string;
76
	} data;	/**< Script data */
77
	struct dom_string *mimetype;
78
	struct dom_string *encoding;
79
	bool already_started;
80
	bool parser_inserted;
81
	bool force_async;
82
	bool ready_exec;
83
	bool async;
84
	bool defer;
85
};
86
 
87
 
88
/** An object (, , etc.) in a CONTENT_HTML document. */
89
struct content_html_object {
90
	struct content *parent;		/**< Parent document */
91
	struct content_html_object *next; /**< Next in chain */
92
 
93
	struct hlcache_handle *content;  /**< Content, or 0. */
94
	struct box *box;  /**< Node in box tree containing it. */
95
	/** Bitmap of acceptable content types */
96
	content_type permitted_types;
97
	bool background;  /**< This object is a background image. */
98
};
99
 
100
struct html_scrollbar_data {
101
	struct content *c;
102
	struct box *box;
103
};
104
 
105
/** Frame tree (, ) */
106
struct content_html_frames {
107
	int cols;	/** number of columns in frameset */
108
	int rows;	/** number of rows in frameset */
109
 
110
	struct frame_dimension width;	/** frame width */
111
	struct frame_dimension height;	/** frame width */
112
	int margin_width;	/** frame margin width */
113
	int margin_height;	/** frame margin height */
114
 
115
	char *name;	/** frame name (for targetting) */
116
	nsurl *url;	/** frame url */
117
 
118
	bool no_resize;	/** frame is not resizable */
119
	frame_scrolling scrolling;	/** scrolling characteristics */
120
	bool border;	/** frame has a border */
121
	colour border_colour;	/** frame border colour */
122
 
123
	struct content_html_frames *children; /** [cols * rows] children */
124
};
125
 
126
/** Inline frame list (