summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-02-25 15:12:58 +0000
committerJames Bursa <james@netsurf-browser.org>2004-02-25 15:12:58 +0000
commit7897a98a4c7475e116f406ab173139c959d6dfb6 (patch)
tree5d51f0f542e80025b2e16d261ac2749d81abfae6 /content
parentdeaaa4a753bc2bc4b694845a720b51e7ceafb742 (diff)
downloadnetsurf-7897a98a4c7475e116f406ab173139c959d6dfb6.tar.gz
netsurf-7897a98a4c7475e116f406ab173139c959d6dfb6.tar.bz2
[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
Diffstat (limited to 'content')
-rw-r--r--content/content.c17
-rw-r--r--content/content.h5
2 files changed, 12 insertions, 10 deletions
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 <bursa@users.sourceforge.net>
+ * Copyright 2004 James Bursa <bursa@users.sourceforge.net>
*/
/** \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);
}
diff --git a/content/content.h b/content/content.h
index 737942187..2d2e498fe 100644
--- a/content/content.h
+++ b/content/content.h
@@ -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 <bursa@users.sourceforge.net>
+ * Copyright 2004 James Bursa <bursa@users.sourceforge.net>
* Copyright 2003 Philip Pemberton <philpem@users.sourceforge.net>
*/
@@ -161,7 +161,8 @@ void content_destroy(struct content *c);
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);
void content_add_user(struct content *c,
void (*callback)(content_msg msg, struct content *c, void *p1,
void *p2, const char *error),