r10077 jmb - in /branches/jmb/new-cache/desktop: ./ save_pdf/
netsurf at semichrome.net
netsurf at semichrome.net
Thu Feb 25 00:25:47 GMT 2010
Author: jmb
Date: Wed Feb 24 18:25:46 2010
New Revision: 10077
URL: http://source.netsurf-browser.org?rev=10077&view=rev
Log:
s/struct content/hlcache_handle/g
Modified:
branches/jmb/new-cache/desktop/401login.h
branches/jmb/new-cache/desktop/browser.c
branches/jmb/new-cache/desktop/browser.h
branches/jmb/new-cache/desktop/frames.c
branches/jmb/new-cache/desktop/gui.h
branches/jmb/new-cache/desktop/history_core.c
branches/jmb/new-cache/desktop/history_core.h
branches/jmb/new-cache/desktop/print.c
branches/jmb/new-cache/desktop/print.h
branches/jmb/new-cache/desktop/save_complete.c
branches/jmb/new-cache/desktop/save_complete.h
branches/jmb/new-cache/desktop/save_pdf/pdf_plotters.c
branches/jmb/new-cache/desktop/save_text.c
branches/jmb/new-cache/desktop/save_text.h
branches/jmb/new-cache/desktop/search.c
branches/jmb/new-cache/desktop/searchweb.c
branches/jmb/new-cache/desktop/searchweb.h
branches/jmb/new-cache/desktop/selection.c
Modified: branches/jmb/new-cache/desktop/401login.h
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/401login.h?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/401login.h (original)
+++ branches/jmb/new-cache/desktop/401login.h Wed Feb 24 18:25:46 2010
@@ -21,10 +21,10 @@
#include "utils/config.h"
-#include "content/content.h"
-#include "desktop/browser.h"
+struct hlcache_handle;
+struct browser_window;
-void gui_401login_open(struct browser_window *bw, struct content *c,
+void gui_401login_open(struct browser_window *bw, struct hlcache_handle *c,
const char *realm);
#endif
Modified: branches/jmb/new-cache/desktop/browser.c
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/browser.c?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/browser.c (original)
+++ branches/jmb/new-cache/desktop/browser.c Wed Feb 24 18:25:46 2010
@@ -39,6 +39,7 @@
#include "utils/config.h"
#include "content/fetch.h"
#include "content/fetchcache.h"
+#include "content/hlcache.h"
#include "content/urldb.h"
#include "css/css.h"
#include "desktop/401login.h"
@@ -76,8 +77,8 @@
const char *url, char *post_urlenc,
struct fetch_multipart_data *post_multipart,
bool add_to_history, const char *referer, bool download,
- bool verifiable, struct content *parent);
-static void browser_window_callback(struct content *c, content_msg msg,
+ bool verifiable, hlcache_handle *parent);
+static void browser_window_callback(hlcache_handle *c, content_msg msg,
union content_msg_data data, void *pw);
static void browser_window_refresh(void *p);
static bool browser_window_check_throbber(struct browser_window *bw);
@@ -109,7 +110,7 @@
browser_mouse_state mouse, int x, int y);
static void browser_window_mouse_track_text(struct browser_window *bw,
browser_mouse_state mouse, int x, int y);
-static void browser_radio_set(struct content *content,
+static void browser_radio_set(hlcache_handle *content,
struct form_control *radio);
static gui_pointer_shape get_pointer_shape(struct browser_window *bw,
struct box *box, bool imagemap);
@@ -250,7 +251,7 @@
void browser_window_go_unverifiable(struct browser_window *bw,
const char *url, const char *referer, bool history_add,
- struct content *parent)
+ hlcache_handle *parent)
{
/* All fetches passing through here are unverifiable
* (i.e are not the result of user action) */
@@ -283,9 +284,9 @@
char *post_urlenc,
struct fetch_multipart_data *post_multipart,
bool add_to_history, const char *referer, bool download,
- bool verifiable, struct content *parent)
-{
- struct content *c;
+ bool verifiable, hlcache_handle *parent)
+{
+ hlcache_handle *c;
char *url2;
char *fragment;
url_func_result res;
@@ -403,7 +404,7 @@
* Callback for fetchcache() for browser window fetches.
*/
-void browser_window_callback(struct content *c, content_msg msg,
+void browser_window_callback(hlcache_handle *c, content_msg msg,
union content_msg_data data, void *pw)
{
struct browser_window *bw = pw;
@@ -637,7 +638,7 @@
void browser_window_convert_to_download(struct browser_window *bw)
{
struct gui_download_window *download_window;
- struct content *c = bw->loading_content;
+ hlcache_handle *c = bw->loading_content;
struct fetch *fetch;
assert(c);
@@ -884,7 +885,7 @@
void browser_window_reload(struct browser_window *bw, bool all)
{
- struct content *c;
+ hlcache_handle *c;
unsigned int i;
if (!bw->current_content || bw->loading_content)
@@ -1105,7 +1106,7 @@
void browser_window_reformat(struct browser_window *bw, int width, int height)
{
- struct content *c = bw->current_content;
+ hlcache_handle *c = bw->current_content;
if (!c)
return;
@@ -1135,7 +1136,7 @@
void browser_window_set_scale_internal(struct browser_window *bw, float scale)
{
int i;
- struct content *c;
+ hlcache_handle *c;
if (fabs(bw->scale-scale) < 0.0001)
return;
@@ -1211,7 +1212,7 @@
{
struct browser_window *bw_target;
struct browser_window *top;
- struct content *c;
+ hlcache_handle *c;
int rdepth;
/* use the base target if we don't have one */
@@ -1414,7 +1415,7 @@
void browser_window_mouse_click(struct browser_window *bw,
browser_mouse_state mouse, int x, int y)
{
- struct content *c = bw->current_content;
+ hlcache_handle *c = bw->current_content;
if (!c)
return;
@@ -1479,12 +1480,12 @@
struct box *url_box = 0;
struct box *gadget_box = 0;
struct box *text_box = 0;
- struct content *c = bw->current_content;
+ hlcache_handle *c = bw->current_content;
struct box *box;
- struct content *content = c;
- struct content *gadget_content = c;
+ hlcache_handle *content = c;
+ hlcache_handle *gadget_content = c;
struct form_control *gadget = 0;
- struct content *object = NULL;
+ hlcache_handle *object = NULL;
struct box *next_box;
struct box *drag_candidate = NULL;
struct scroll *scroll = NULL;
@@ -1988,7 +1989,7 @@
void browser_window_mouse_action_text(struct browser_window *bw,
browser_mouse_state mouse, int x, int y)
{
- struct content *c = bw->current_content;
+ hlcache_handle *c = bw->current_content;
gui_pointer_shape pointer = GUI_POINTER_DEFAULT;
const char *status = 0;
size_t idx;
@@ -2040,7 +2041,7 @@
void browser_window_mouse_track(struct browser_window *bw,
browser_mouse_state mouse, int x, int y)
{
- struct content *c = bw->current_content;
+ hlcache_handle *c = bw->current_content;
if (c == NULL && bw->drag_type != DRAGGING_FRAME)
return;
@@ -2148,7 +2149,7 @@
switch (bw->drag_type) {
case DRAGGING_SELECTION: {
- struct content *c = bw->current_content;
+ hlcache_handle *c = bw->current_content;
int dir = -1;
size_t idx;
@@ -2217,7 +2218,7 @@
switch (bw->drag_type) {
case DRAGGING_SELECTION: {
- struct content *c = bw->current_content;
+ hlcache_handle *c = bw->current_content;
if (c) {
bool found = true;
int dir = -1;
@@ -2283,7 +2284,7 @@
* \param radio form control of type GADGET_RADIO
*/
-void browser_radio_set(struct content *content,
+void browser_radio_set(hlcache_handle *content,
struct form_control *radio)
{
struct form_control *control;
@@ -2329,7 +2330,7 @@
void browser_window_redraw_rect(struct browser_window *bw, int x, int y,
int width, int height)
{
- struct content *c = bw->current_content;
+ hlcache_handle *c = bw->current_content;
if (c) {
union content_msg_data data;
@@ -2359,7 +2360,7 @@
* \param box box to redraw
*/
-void browser_redraw_box(struct content *c, struct box *box)
+void browser_redraw_box(hlcache_handle *c, struct box *box)
{
int x, y;
union content_msg_data data;
@@ -2888,7 +2889,7 @@
struct box *browser_window_pick_text_box(struct browser_window *bw,
int x, int y, int dir, int *dx, int *dy)
{
- struct content *c = bw->current_content;
+ hlcache_handle *c = bw->current_content;
struct box *text_box = NULL;
if (c && content_get_type(c) == CONTENT_HTML) {
Modified: branches/jmb/new-cache/desktop/browser.h
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/browser.h?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/browser.h (original)
+++ branches/jmb/new-cache/desktop/browser.h Wed Feb 24 18:25:46 2010
@@ -31,7 +31,7 @@
#include "render/html.h"
struct box;
-struct content;
+struct hlcache_handle;
struct form;
struct form_control;
struct gui_window;
@@ -43,20 +43,20 @@
struct scroll_msg_data;
typedef bool (*browser_caret_callback)(struct browser_window *bw,
- uint32_t key, void *p);
+ uint32_t key, void *p);
typedef bool (*browser_paste_callback)(struct browser_window *bw,
- const char *utf8, unsigned utf8_len, bool last, void *p);
+ const char *utf8, unsigned utf8_len, bool last, void *p);
typedef void (*browser_move_callback)(struct browser_window *bw,
- void *p);
+ void *p);
/** Browser window data. */
struct browser_window {
/** Page currently displayed, or 0. Must have status READY or DONE. */
- struct content *current_content;
+ struct hlcache_handle *current_content;
/** Page being loaded, or 0. */
- struct content *loading_content;
+ struct hlcache_handle *loading_content;
/** Window history structure. */
struct history *history;
@@ -229,17 +229,17 @@
extern bool browser_reformat_pending;
struct browser_window * browser_window_create(const char *url,
- struct browser_window *clone, const char *referrer,
- bool history_add, bool new_tab);
+ struct browser_window *clone, const char *referrer,
+ bool history_add, bool new_tab);
void browser_window_initialise_common(struct browser_window *bw,
- struct browser_window *clone);
+ struct browser_window *clone);
void browser_window_go(struct browser_window *bw, const char *url,
- const char *referrer, bool history_add);
+ const char *referrer, bool history_add);
void browser_window_go_unverifiable(struct browser_window *bw,
- const char *url, const char *referrer, bool history_add,
- struct content *parent);
+ const char *url, const char *referrer, bool history_add,
+ struct hlcache_handle *parent);
void browser_window_download(struct browser_window *bw,
- const char *url, const char *referrer);
+ const char *url, const char *referrer);
void browser_window_update(struct browser_window *bw, bool scroll_to_top);
void browser_window_stop(struct browser_window *bw);
void browser_window_reload(struct browser_window *bw, bool all);
@@ -249,31 +249,32 @@
void browser_window_set_scale(struct browser_window *bw, float scale, bool all);
void browser_window_refresh_url_bar(struct browser_window *bw, const char *url,
- const char *frag);
+ const char *frag);
void browser_window_mouse_click(struct browser_window *bw,
- browser_mouse_state mouse, int x, int y);
+ browser_mouse_state mouse, int x, int y);
void browser_window_mouse_track(struct browser_window *bw,
- browser_mouse_state mouse, int x, int y);
+ browser_mouse_state mouse, int x, int y);
void browser_window_mouse_drag_end(struct browser_window *bw,
- browser_mouse_state mouse, int x, int y);
+ browser_mouse_state mouse, int x, int y);
bool browser_window_key_press(struct browser_window *bw, uint32_t key);
bool browser_window_paste_text(struct browser_window *bw, const char *utf8,
- unsigned utf8_len, bool last);
+ unsigned utf8_len, bool last);
void browser_window_form_select(struct browser_window *bw,
- struct form_control *control, int item);
-void browser_redraw_box(struct content *c, struct box *box);
-void browser_form_submit(struct browser_window *bw, struct browser_window *target,
- struct form *form, struct form_control *submit_button);
+ struct form_control *control, int item);
+void browser_redraw_box(struct hlcache_handle *c, struct box *box);
+void browser_form_submit(struct browser_window *bw,
+ struct browser_window *target, struct form *form,
+ struct form_control *submit_button);
void browser_scroll_callback(void *client_data,
- struct scroll_msg_data *scroll_data);
+ struct scroll_msg_data *scroll_data);
void browser_select_menu_callback(void *client_data,
- int x, int y, int width, int height);
+ int x, int y, int width, int height);
void browser_window_redraw_rect(struct browser_window *bw, int x, int y,
- int width, int height);
+ int width, int height);
bool browser_window_back_available(struct browser_window *bw);
bool browser_window_forward_available(struct browser_window *bw);
@@ -281,7 +282,7 @@
bool browser_window_stop_available(struct browser_window *bw);
/* In platform specific hotlist.c. */
-void hotlist_visited(struct content *content);
+void hotlist_visited(struct hlcache_handle *content);
/* In platform specific global_history.c. */
void global_history_add(const char *url);
@@ -289,8 +290,8 @@
char **global_history_get_recent(int *count);
/* In platform specific thumbnail.c. */
-bool thumbnail_create(struct content *content, struct bitmap *bitmap,
- const char *url);
+bool thumbnail_create(struct hlcache_handle *content, struct bitmap *bitmap,
+ const char *url);
/* In platform specific schedule.c. */
void schedule(int t, void (*callback)(void *p), void *p);
@@ -299,7 +300,7 @@
/* In platform specific theme_install.c. */
#ifdef WITH_THEME_INSTALL
-void theme_install_start(struct content *c);
+void theme_install_start(struct hlcache_handle *c);
#endif
#endif
Modified: branches/jmb/new-cache/desktop/frames.c
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/frames.c?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/frames.c (original)
+++ branches/jmb/new-cache/desktop/frames.c Wed Feb 24 18:25:46 2010
@@ -29,6 +29,7 @@
#include <time.h>
#include <math.h>
#include "utils/config.h"
+#include "content/hlcache.h"
#include "desktop/browser.h"
#include "desktop/frames.h"
#include "desktop/history_core.h"
@@ -155,7 +156,7 @@
int row, col, index;
struct content_html_frames *frame;
struct browser_window *window;
- struct content *parent;
+ hlcache_handle *parent;
assert(bw && frameset);
Modified: branches/jmb/new-cache/desktop/gui.h
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/gui.h?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/gui.h (original)
+++ branches/jmb/new-cache/desktop/gui.h Wed Feb 24 18:25:46 2010
@@ -56,6 +56,7 @@
#include <stdbool.h>
#include "utils/config.h"
#include "content/content.h"
+#include "content/hlcache.h"
#include "desktop/browser.h"
#include "desktop/search.h"
@@ -90,8 +91,8 @@
void gui_window_set_url(struct gui_window *g, const char *url);
void gui_window_start_throbber(struct gui_window *g);
void gui_window_stop_throbber(struct gui_window *g);
-void gui_window_set_icon(struct gui_window *g, struct content *icon);
-void gui_window_set_search_ico(struct content *ico);
+void gui_window_set_icon(struct gui_window *g, hlcache_handle *icon);
+void gui_window_set_search_ico(hlcache_handle *ico);
void gui_window_place_caret(struct gui_window *g, int x, int y, int height);
void gui_window_remove_caret(struct gui_window *g);
void gui_window_new_content(struct gui_window *g);
@@ -112,7 +113,7 @@
const char *error_msg);
void gui_download_window_done(struct gui_download_window *dw);
-void gui_drag_save_object(gui_save_type type, struct content *c,
+void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
struct gui_window *g);
void gui_drag_save_selection(struct selection *s, struct gui_window *g);
void gui_start_selection(struct gui_window *g);
@@ -135,7 +136,7 @@
struct ssl_cert_info;
-void gui_cert_verify(struct browser_window *bw, struct content *c,
+void gui_cert_verify(struct browser_window *bw, hlcache_handle *c,
const struct ssl_cert_info *certs, unsigned long num);
#endif
Modified: branches/jmb/new-cache/desktop/history_core.c
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/history_core.c?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/history_core.c (original)
+++ branches/jmb/new-cache/desktop/history_core.c Wed Feb 24 18:25:46 2010
@@ -27,6 +27,7 @@
#include <string.h>
#include <time.h>
#include "content/content.h"
+#include "content/hlcache.h"
#include "content/urldb.h"
#include "css/css.h"
#include "desktop/gui.h"
@@ -220,7 +221,7 @@
* The page is added after the current entry and becomes current.
*/
-void history_add(struct history *history, struct content *content,
+void history_add(struct history *history, hlcache_handle *content,
char *frag_id)
{
url_func_result res;
@@ -303,7 +304,7 @@
* \param content content for current entry
*/
-void history_update(struct history *history, struct content *content)
+void history_update(struct history *history, hlcache_handle *content)
{
char *title;
Modified: branches/jmb/new-cache/desktop/history_core.h
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/history_core.h?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/history_core.h (original)
+++ branches/jmb/new-cache/desktop/history_core.h Wed Feb 24 18:25:46 2010
@@ -25,15 +25,15 @@
#include <stdbool.h>
-struct content;
+struct hlcache_handle;
struct history;
struct browser_window;
struct history *history_create(void);
struct history *history_clone(struct history *history);
-void history_add(struct history *history, struct content *content,
+void history_add(struct history *history, struct hlcache_handle *content,
char *frag_id);
-void history_update(struct history *history, struct content *content);
+void history_update(struct history *history, struct hlcache_handle *content);
void history_destroy(struct history *history);
void history_back(struct browser_window *bw, struct history *history);
void history_forward(struct browser_window *bw, struct history *history);
Modified: branches/jmb/new-cache/desktop/print.c
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/print.c?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/print.c (original)
+++ branches/jmb/new-cache/desktop/print.c Wed Feb 24 18:25:46 2010
@@ -26,6 +26,7 @@
#include <string.h>
#include "content/content.h"
+#include "content/hlcache.h"
#include "css/utils.h"
#include "desktop/options.h"
#include "desktop/print.h"
@@ -39,11 +40,11 @@
#define DEFAULT_PAGE_HEIGHT 840
#define DEFAULT_COPIES 1
-static struct content *print_init(struct content *, struct print_settings *);
-static bool print_apply_settings(struct content *, struct print_settings *);
+static hlcache_handle *print_init(hlcache_handle *, struct print_settings *);
+static bool print_apply_settings(hlcache_handle *, struct print_settings *);
static float page_content_width, page_content_height;
-static struct content *printed_content;
+static hlcache_handle *printed_content;
static float done_height;
bool html_redraw_printing = false;
@@ -59,7 +60,7 @@
* \param settings The settings for printing to use
* \return true if successful, false otherwise
*/
-bool print_basic_run(struct content *content,
+bool print_basic_run(hlcache_handle *content,
const struct printer *printer,
struct print_settings *settings)
{
@@ -88,7 +89,7 @@
* \param height updated to the height of the printed content
* \return true if successful, false otherwise
*/
-bool print_set_up(struct content *content,
+bool print_set_up(hlcache_handle *content,
const struct printer *printer, struct print_settings *settings,
double *height)
{
@@ -158,13 +159,13 @@
* \param settings The settings for printing to use
* \return true if successful, false otherwise
*/
-struct content *print_init(struct content *content,
+hlcache_handle *print_init(hlcache_handle *content,
struct print_settings *settings)
{
// newcache
#if 0
- struct content* printed_content;
- struct content_user *user_sentinel;
+ hlcache_handle* printed_content;
+ hlcache_handle_user *user_sentinel;
content_add_user(content, NULL, (intptr_t) print_init, 0);
@@ -175,7 +176,7 @@
printed_content->data.html.bw = 0;
- user_sentinel = talloc(printed_content, struct content_user);
+ user_sentinel = talloc(printed_content, hlcache_handle_user);
user_sentinel->callback = 0;
user_sentinel->p1 = user_sentinel->p2 = 0;
user_sentinel->next = 0;
@@ -208,7 +209,7 @@
* \param settings The settings for printing to use
* \return true if successful, false otherwise
*/
-bool print_apply_settings(struct content *content,
+bool print_apply_settings(hlcache_handle *content,
struct print_settings *settings)
{
if (settings == NULL)
@@ -240,7 +241,7 @@
* \param printer The printer interface for the printer to be used
* \return true if successful, false otherwise
*/
-bool print_cleanup(struct content *content, const struct printer *printer,
+bool print_cleanup(hlcache_handle *content, const struct printer *printer,
struct print_settings *settings)
{
printer->print_end();
Modified: branches/jmb/new-cache/desktop/print.h
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/print.h?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/print.h (original)
+++ branches/jmb/new-cache/desktop/print.h Wed Feb 24 18:25:46 2010
@@ -36,7 +36,7 @@
#include "css/css.h"
-struct content;
+struct hlcache_handle;
struct printer;
enum { MARGINLEFT = 0, MARGINRIGHT = 1, MARGINTOP = 2, MARGINBOTTOM = 3};
@@ -64,13 +64,13 @@
};
-bool print_basic_run(struct content *, const struct printer *,
+bool print_basic_run(struct hlcache_handle *, const struct printer *,
struct print_settings *);
-bool print_set_up(struct content *content, const struct printer *printer,
+bool print_set_up(struct hlcache_handle *content, const struct printer *printer,
struct print_settings *settings, double *height);
bool print_draw_next_page(const struct printer *printer,
struct print_settings *settings);
-bool print_cleanup(struct content *, const struct printer *,
+bool print_cleanup(struct hlcache_handle *, const struct printer *,
struct print_settings *settings);
struct print_settings *print_make_settings(print_configuration configuration,
Modified: branches/jmb/new-cache/desktop/save_complete.c
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/save_complete.c?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/save_complete.c (original)
+++ branches/jmb/new-cache/desktop/save_complete.c Wed Feb 24 18:25:46 2010
@@ -35,6 +35,7 @@
#include <libxml/parserInternals.h>
#include "utils/config.h"
#include "content/content.h"
+#include "content/hlcache.h"
#include "css/css.h"
#include "render/box.h"
#include "desktop/save_complete.h"
@@ -46,11 +47,11 @@
/** An entry in save_complete_list. */
struct save_complete_entry {
- struct content *content;
+ hlcache_handle *content;
struct save_complete_entry *next; /**< Next entry in list */
};
-static bool save_complete_html(struct content *c, const char *path,
+static bool save_complete_html(hlcache_handle *c, const char *path,
bool index, struct save_complete_entry **list);
static bool save_imported_sheets(struct nscss_import *imports, uint32_t count,
const char *path, struct save_complete_entry **list);
@@ -63,11 +64,11 @@
struct save_complete_entry *list);
static bool rewrite_url(xmlNode *n, const char *attr, const char *base,
struct save_complete_entry *list);
-static bool save_complete_list_add(struct content *content,
+static bool save_complete_list_add(hlcache_handle *content,
struct save_complete_entry **list);
-static struct content * save_complete_list_find(const char *url,
+static hlcache_handle * save_complete_list_find(const char *url,
struct save_complete_entry *list);
-static bool save_complete_list_check(struct content *content,
+static bool save_complete_list_check(hlcache_handle *content,
struct save_complete_entry *list);
/* static void save_complete_list_dump(void); */
static bool save_complete_inventory(const char *path,
@@ -81,7 +82,7 @@
* \return true on success, false on error and error reported
*/
-bool save_complete(struct content *c, const char *path)
+bool save_complete(hlcache_handle *c, const char *path)
{
bool result;
struct save_complete_entry *list = NULL;
@@ -111,7 +112,7 @@
* \return true on success, false on error and error reported
*/
-bool save_complete_html(struct content *c, const char *path, bool index,
+bool save_complete_html(hlcache_handle *c, const char *path, bool index,
struct save_complete_entry **list)
{
struct html_stylesheet *sheets;
@@ -134,7 +135,7 @@
sheets = html_get_stylesheets(c, &count);
for (i = STYLESHEET_START; i != count; i++) {
- struct content *css;
+ hlcache_handle *css;
const char *css_data;
unsigned long css_size;
char *source;
@@ -190,7 +191,7 @@
objects = html_get_objects(c, &count);
for (i = 0; i != count; i++) {
- struct content *obj = objects[i].content;
+ hlcache_handle *obj = objects[i].content;
const char *obj_data;
unsigned long obj_size;
@@ -280,7 +281,7 @@
bool res;
for (j = 0; j != count; j++) {
- struct content *css = imports[j].c;
+ hlcache_handle *css = imports[j].c;
const char *css_data;
unsigned long css_size;
struct nscss_import *child_imports;
@@ -381,7 +382,7 @@
char buf[20];
unsigned int offset = 0;
int url_len = 0;
- struct content *content;
+ hlcache_handle *content;
int m;
unsigned int i;
unsigned int imports = 0;
@@ -646,7 +647,7 @@
{
char *url, *data;
char rel[20];
- struct content *content;
+ hlcache_handle *content;
url_func_result res;
if (!xmlHasProp(n, (const xmlChar *) attr))
@@ -691,7 +692,7 @@
* \return true on success, false on out of memory
*/
-bool save_complete_list_add(struct content *content,
+bool save_complete_list_add(hlcache_handle *content,
struct save_complete_entry **list)
{
struct save_complete_entry *entry;
@@ -712,7 +713,7 @@
* \return content if found, 0 otherwise
*/
-struct content * save_complete_list_find(const char *url,
+hlcache_handle * save_complete_list_find(const char *url,
struct save_complete_entry *list)
{
struct save_complete_entry *entry;
@@ -730,7 +731,7 @@
* \return true if the content is in the save_complete_list
*/
-bool save_complete_list_check(struct content *content,
+bool save_complete_list_check(hlcache_handle *content,
struct save_complete_entry *list)
{
struct save_complete_entry *entry;
Modified: branches/jmb/new-cache/desktop/save_complete.h
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/save_complete.h?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/save_complete.h (original)
+++ branches/jmb/new-cache/desktop/save_complete.h Wed Feb 24 18:25:46 2010
@@ -28,10 +28,10 @@
#include <libxml/HTMLtree.h>
#include "content/content.h"
-struct content;
+struct hlcache_handle;
void save_complete_init(void);
-bool save_complete(struct content *c, const char *path);
+bool save_complete(struct hlcache_handle *c, const char *path);
bool save_complete_gui_save(const char *path, const char *filename,
size_t len, const char *sourcedata, content_type type);
Modified: branches/jmb/new-cache/desktop/save_pdf/pdf_plotters.c
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/save_pdf/pdf_plotters.c?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/save_pdf/pdf_plotters.c (original)
+++ branches/jmb/new-cache/desktop/save_pdf/pdf_plotters.c Wed Feb 24 18:25:46 2010
@@ -30,6 +30,7 @@
#include <hpdf.h>
+#include "content/hlcache.h"
#include "desktop/options.h"
#include "desktop/plotters.h"
#include "desktop/print.h"
@@ -410,7 +411,7 @@
HPDF_Image pdf_extract_image(struct bitmap *bitmap)
{
HPDF_Image image = NULL;
- struct content *content = NULL;
+ hlcache_handle *content = NULL;
/* TODO - get content from bitmap pointer */
Modified: branches/jmb/new-cache/desktop/save_text.c
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/save_text.c?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/save_text.c (original)
+++ branches/jmb/new-cache/desktop/save_text.c Wed Feb 24 18:25:46 2010
@@ -27,6 +27,7 @@
#include "utils/config.h"
#include "content/content.h"
+#include "content/hlcache.h"
#include "desktop/save_text.h"
#include "render/box.h"
#include "utils/log.h"
@@ -48,7 +49,7 @@
* \param path Path to save text file too.
*/
-void save_as_text(struct content *c, char *path)
+void save_as_text(hlcache_handle *c, char *path)
{
FILE *out;
struct save_text_state save = { NULL, 0, 0 };
Modified: branches/jmb/new-cache/desktop/save_text.h
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/save_text.h?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/save_text.h (original)
+++ branches/jmb/new-cache/desktop/save_text.h Wed Feb 24 18:25:46 2010
@@ -25,7 +25,7 @@
#define _NETSURF_DESKTOP_SAVE_TEXT_H_
struct box;
-struct content;
+struct hlcache_handle;
/* text currently being saved */
struct save_text_state {
@@ -41,7 +41,7 @@
WHITESPACE_TWO_NEW_LINES
} save_text_whitespace;
-void save_as_text(struct content *c, char *path);
+void save_as_text(struct hlcache_handle *c, char *path);
void save_text_solve_whitespace(struct box *box, bool *first,
save_text_whitespace *before, const char **whitespace_text,
size_t *whitespace_length);
Modified: branches/jmb/new-cache/desktop/search.c
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/search.c?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/search.c (original)
+++ branches/jmb/new-cache/desktop/search.c Wed Feb 24 18:25:46 2010
@@ -26,6 +26,7 @@
#include <ctype.h>
#include <string.h>
#include "content/content.h"
+#include "content/hlcache.h"
#include "desktop/browser.h"
#include "desktop/gui.h"
#include "desktop/options.h"
@@ -61,7 +62,7 @@
struct search_context {
struct browser_window *bw;
- struct content *content;
+ hlcache_handle *content;
char *string;
bool prev_case_sens;
bool newsearch;
@@ -81,7 +82,7 @@
struct box *cur, bool case_sens,
struct search_context *context);
static bool find_occurrences_text(const char *pattern, int p_len,
- struct content *c, bool case_sens,
+ hlcache_handle *c, bool case_sens,
struct search_context *context);
static struct list_entry *add_entry(unsigned start_idx, unsigned end_idx,
struct search_context *context);
@@ -237,7 +238,7 @@
struct search_context *context, search_flags_t flags)
{
struct rect bounds;
- struct content *c;
+ hlcache_handle *c;
struct box *box;
bool case_sensitive, forwards, showall;
@@ -552,7 +553,7 @@
*/
bool find_occurrences_text(const char *pattern, int p_len,
- struct content *c, bool case_sens,
+ hlcache_handle *c, bool case_sens,
struct search_context *context)
{
int nlines = textplain_line_count(c);
@@ -643,7 +644,7 @@
if (add && !a->sel) {
a->sel = selection_create(context->bw);
if (a->sel) {
- struct content *c = context->bw->
+ hlcache_handle *c = context->bw->
current_content;
switch (content_get_type(c)) {
case CONTENT_HTML:
Modified: branches/jmb/new-cache/desktop/searchweb.c
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/searchweb.c?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/searchweb.c (original)
+++ branches/jmb/new-cache/desktop/searchweb.c Wed Feb 24 18:25:46 2010
@@ -26,6 +26,7 @@
#include "content/content.h"
#include "content/fetchcache.h"
#include "content/fetch.h"
+#include "content/hlcache.h"
#include "desktop/browser.h"
#include "desktop/gui.h"
#include "desktop/options.h"
@@ -43,7 +44,7 @@
char *ico; /** < location of domain's favicon */
} current_search_provider;
-static struct content *search_ico = NULL;
+static hlcache_handle *search_ico = NULL;
char *search_engines_file_location;
char *search_default_ico_location;
@@ -205,7 +206,7 @@
void search_web_retrieve_ico(bool localdefault)
{
char *url;
- struct content *icocontent;
+ hlcache_handle *icocontent;
if (localdefault) {
if (search_default_ico_location == NULL)
return;
@@ -249,7 +250,7 @@
* responsibility
*/
-struct content *search_web_ico(void)
+hlcache_handle *search_web_ico(void)
{
return search_ico;
}
@@ -259,7 +260,7 @@
* else retry default from local file system
*/
-void search_web_ico_callback(content_msg msg, struct content *ico,
+void search_web_ico_callback(content_msg msg, hlcache_handle *ico,
intptr_t p1, intptr_t p2, union content_msg_data data)
{
Modified: branches/jmb/new-cache/desktop/searchweb.h
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/searchweb.h?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/searchweb.h (original)
+++ branches/jmb/new-cache/desktop/searchweb.h Wed Feb 24 18:25:46 2010
@@ -23,6 +23,8 @@
#include <string.h>
#include "content/content.h"
#include "desktop/browser.h"
+
+struct hlcache_handle;
extern char *search_engines_file_location;
extern char *search_default_ico_location;
@@ -71,9 +73,9 @@
void search_web_retrieve_ico(bool localdefault);
-struct content *search_web_ico(void);
+struct hlcache_handle *search_web_ico(void);
-void search_web_ico_callback(content_msg msg, struct content *ico,
+void search_web_ico_callback(content_msg msg, struct hlcache_handle *ico,
intptr_t p1, intptr_t p2, union content_msg_data data);
#endif
Modified: branches/jmb/new-cache/desktop/selection.c
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/desktop/selection.c?rev=10077&r1=10076&r2=10077&view=diff
==============================================================================
--- branches/jmb/new-cache/desktop/selection.c (original)
+++ branches/jmb/new-cache/desktop/selection.c Wed Feb 24 18:25:46 2010
@@ -27,6 +27,7 @@
#include <stdbool.h>
#include <string.h>
+#include "content/hlcache.h"
#include "desktop/gui.h"
#include "desktop/plotters.h"
#include "desktop/save_text.h"
@@ -155,7 +156,7 @@
s->max_idx = selection_label_subtree(root, root_idx);
}
else {
- struct content *c = s->bw->current_content;
+ hlcache_handle *c = s->bw->current_content;
if (c && content_get_type(c) == CONTENT_TEXTPLAIN)
s->max_idx = textplain_size(c);
else
@@ -560,7 +561,7 @@
bool selection_traverse(struct selection *s, seln_traverse_handler handler,
void *handle)
{
- struct content *c;
+ hlcache_handle *c;
save_text_whitespace before = WHITESPACE_NONE;
bool first = true;
const char *text;
@@ -664,7 +665,7 @@
return;
}
else {
- struct content *c = s->bw->current_content;
+ hlcache_handle *c = s->bw->current_content;
if (c && content_get_type(c) == CONTENT_TEXTPLAIN &&
end_idx > start_idx) {
textplain_coords_from_range(c, start_idx,
@@ -953,7 +954,7 @@
bool selection_save_text(struct selection *s, const char *path)
{
- struct content *c = s->bw->current_content;
+ hlcache_handle *c = s->bw->current_content;
struct save_text_state sv = { NULL, 0, 0 };
utf8_convert_ret ret;
char *result;
More information about the netsurf-commits
mailing list