From 7897a98a4c7475e116f406ab173139c959d6dfb6 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Wed, 25 Feb 2004 15:12:58 +0000 Subject: [project @ 2004-02-25 15:12:57 by bursa] Implement scaling; rewrite desktop/browser; add riscos/thumbnail; rewrite history. svn path=/import/netsurf/; revision=566 --- content/content.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'content/content.c') diff --git a/content/content.c b/content/content.c index 4b4e19bff..9a53869ed 100644 --- a/content/content.c +++ b/content/content.c @@ -2,7 +2,7 @@ * This file is part of NetSurf, http://netsurf.sourceforge.net/ * Licensed under the GNU General Public License, * http://www.opensource.org/licenses/gpl-license - * Copyright 2003 James Bursa + * Copyright 2004 James Bursa */ /** \file @@ -90,7 +90,8 @@ struct handler_entry { void (*destroy)(struct content *c); void (*redraw)(struct content *c, long x, long y, unsigned long width, unsigned long height, - long clip_x0, long clip_y0, long clip_x1, long clip_y1); + long clip_x0, long clip_y0, long clip_x1, long clip_y1, + float scale); void (*add_instance)(struct content *c, struct browser_window *bw, struct content *page, struct box *box, struct object_params *params, void **state); @@ -256,7 +257,7 @@ void content_process_data(struct content *c, char *data, unsigned long size) * (eg. loading images), the content gets status CONTENT_STATUS_READY, and a * CONTENT_MSG_READY is sent to all users. * - If the conversion succeeds and is complete, the content gets status - * CONTENT_STATUS_DONE, and CONTENT_MSG_DONE is sent. + * CONTENT_STATUS_DONE, and CONTENT_MSG_READY then CONTENT_MSG_DONE are sent. * - If the conversion fails, CONTENT_MSG_ERROR is sent. The content is then * destroyed and must no longer be used. */ @@ -278,9 +279,8 @@ void content_convert(struct content *c, unsigned long width, unsigned long heigh } assert(c->status == CONTENT_STATUS_READY || c->status == CONTENT_STATUS_DONE); - if (c->status == CONTENT_STATUS_READY) - content_broadcast(c, CONTENT_MSG_READY, 0); - else + content_broadcast(c, CONTENT_MSG_READY, 0); + if (c->status == CONTENT_STATUS_DONE) content_broadcast(c, CONTENT_MSG_DONE, 0); } @@ -379,12 +379,13 @@ void content_reset(struct content *c) void content_redraw(struct content *c, long x, long y, unsigned long width, unsigned long height, - long clip_x0, long clip_y0, long clip_x1, long clip_y1) + long clip_x0, long clip_y0, long clip_x1, long clip_y1, + float scale) { assert(c != 0); if (handler_map[c->type].redraw != 0) handler_map[c->type].redraw(c, x, y, width, height, - clip_x0, clip_y0, clip_x1, clip_y1); + clip_x0, clip_y0, clip_x1, clip_y1, scale); } -- cgit v1.2.3