From 3128ecf2a5c94102e0e1659f947a345d36750afe Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 28 Jun 2011 20:17:39 +0000 Subject: Unify content_redraw params in content_redraw_data struct. Core and RISC OS content handlers updated. svn path=/trunk/netsurf/; revision=12529 --- content/content.h | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'content/content.h') 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); -- cgit v1.2.3