summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-06-28 20:17:39 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-06-28 20:17:39 +0000
commit3128ecf2a5c94102e0e1659f947a345d36750afe (patch)
treea744c73c5464360bbddd1de5a4c83907abbc0048 /content
parent4d19457c59fa911743137277d312ac2935293f8b (diff)
downloadnetsurf-3128ecf2a5c94102e0e1659f947a345d36750afe.tar.gz
netsurf-3128ecf2a5c94102e0e1659f947a345d36750afe.tar.bz2
Unify content_redraw params in content_redraw_data struct. Core and RISC OS content handlers updated.
svn path=/trunk/netsurf/; revision=12529
Diffstat (limited to 'content')
-rw-r--r--content/content.c10
-rw-r--r--content/content.h27
-rw-r--r--content/content_protected.h6
3 files changed, 28 insertions, 15 deletions
diff --git a/content/content.c b/content/content.c
index eb259a6b1..3aed46f36 100644
--- a/content/content.c
+++ b/content/content.c
@@ -489,10 +489,8 @@ void content__request_redraw(struct content *c,
* redraw function if it doesn't exist.
*/
-bool content_redraw(hlcache_handle *h, int x, int y,
- int width, int height, const struct rect *clip,
- float scale, colour background_colour,
- bool repeat_x, bool repeat_y)
+bool content_redraw(hlcache_handle *h, struct content_redraw_data *data,
+ const struct rect *clip)
{
struct content *c = hlcache_handle_get_content(h);
@@ -508,9 +506,7 @@ bool content_redraw(hlcache_handle *h, int x, int y,
return true;
}
- return c->handler->redraw(c, x, y, width, height,
- clip, scale, background_colour,
- repeat_x, repeat_y);
+ return c->handler->redraw(c, data, clip);
}
diff --git a/content/content.h b/content/content.h
index 636da4e23..39f784904 100644
--- a/content/content.h
+++ b/content/content.h
@@ -94,6 +94,27 @@ union content_msg_data {
struct llcache_handle *download;
};
+
+struct content_redraw_data {
+ int x; /** coordinate for top-left of redraw */
+ int y; /** coordinate for top-left of redraw */
+
+ /** dimensions to render content at
+ * (for scaling contents with intrinsic dimensions) */
+ int width; /* horizontal */
+ int height; /* vertical */
+
+ /** the background colour */
+ colour background_colour;
+
+ /** Scale for redraw
+ * (for scaling contents without intrinsic dimensions) */
+ float scale; /* scale factor */
+
+ bool repeat_x; /* whether content is tiled in x direction */
+ bool repeat_y; /* whether content is tiled in y direction */
+};
+
/* The following are for hlcache */
void content_destroy(struct content *c);
@@ -127,10 +148,8 @@ void content_mouse_track(struct hlcache_handle *h, struct browser_window *bw,
browser_mouse_state mouse, int x, int y);
void content_mouse_action(struct hlcache_handle *h, struct browser_window *bw,
browser_mouse_state mouse, int x, int y);
-bool content_redraw(struct hlcache_handle *h, int x, int y,
- int width, int height, const struct rect *clip,
- float scale, colour background_colour,
- bool repeat_x, bool repeat_y);
+bool content_redraw(struct hlcache_handle *h, struct content_redraw_data *data,
+ const struct rect *clip);
void content_open(struct hlcache_handle *h, struct browser_window *bw,
struct content *page, struct box *box,
struct object_params *params);
diff --git a/content/content_protected.h b/content/content_protected.h
index 180a4a0d8..688010ec8 100644
--- a/content/content_protected.h
+++ b/content/content_protected.h
@@ -54,10 +54,8 @@ struct content_handler {
browser_mouse_state mouse, int x, int y);
void (*mouse_action)(struct content *c, struct browser_window *bw,
browser_mouse_state mouse, int x, int y);
- bool (*redraw)(struct content *c, int x, int y,
- int width, int height, const struct rect *clip,
- float scale, colour background_colour,
- bool repeat_x, bool repeat_y);
+ bool (*redraw)(struct content *c, struct content_redraw_data *data,
+ const struct rect *clip);
void (*open)(struct content *c, struct browser_window *bw,
struct content *page,
struct box *box,