summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-02-11 19:36:33 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-02-11 19:36:33 +0000
commitfedcbf6656e8d6f082d891c02d6c4555616fd0d6 (patch)
tree71b9d4f388214dcf62074bb9e144730ebd8f88ab /desktop
parent27b6096dcd8a38fa0200cec6dfe25f05529efa7c (diff)
downloadnetsurf-fedcbf6656e8d6f082d891c02d6c4555616fd0d6.tar.gz
netsurf-fedcbf6656e8d6f082d891c02d6c4555616fd0d6.tar.bz2
Pass clip rect to browser_window_redraw as struct.
svn path=/trunk/netsurf/; revision=11648
Diffstat (limited to 'desktop')
-rw-r--r--desktop/browser.c13
-rw-r--r--desktop/browser.h18
2 files changed, 13 insertions, 18 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index 553baefc3..32a77972e 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -89,10 +89,8 @@ static void browser_window_find_target_internal(struct browser_window *bw,
int *rdepth, struct browser_window **bw_target);
/* exported interface, documented in browser.h */
-bool browser_window_redraw(struct browser_window *bw,
- int x, int y,
- int clip_x0, int clip_y0,
- int clip_x1, int clip_y1)
+bool browser_window_redraw(struct browser_window *bw, int x, int y,
+ struct rect clip)
{
int width = 0;
int height = 0;
@@ -102,10 +100,11 @@ bool browser_window_redraw(struct browser_window *bw,
return false;
}
- plot.clip(clip_x0, clip_y0, clip_x1, clip_y1);
+ plot.clip(clip.x0, clip.y0, clip.x1, clip.y1);
if (bw->current_content == NULL) {
- return plot.rectangle(clip_x0, clip_y0, clip_x1, clip_y1, plot_style_fill_white);
+ return plot.rectangle(clip.x0, clip.y0, clip.x1, clip.y1,
+ plot_style_fill_white);
}
@@ -115,7 +114,7 @@ bool browser_window_redraw(struct browser_window *bw,
}
return content_redraw(bw->current_content, x, y, width, height,
- clip_x0, clip_y0, clip_x1, clip_y1,
+ clip.x0, clip.y0, clip.x1, clip.y1,
bw->scale, 0xFFFFFF);
}
diff --git a/desktop/browser.h b/desktop/browser.h
index e2410ae95..84b0efe15 100644
--- a/desktop/browser.h
+++ b/desktop/browser.h
@@ -30,6 +30,7 @@
#include "desktop/gui.h"
#include "desktop/mouse.h"
+#include "desktop/shape.h"
#include "render/html.h"
struct box;
@@ -256,13 +257,10 @@ bool browser_window_stop_available(struct browser_window *bw);
*
* Calls the redraw function for the content,
*
- * \param bw The window to redraw
- * \param x coordinate for top-left of redraw
- * \param y coordinate for top-left of redraw
- * \param clip_x0 clip rectangle left
- * \param clip_y0 clip rectangle top
- * \param clip_x1 clip rectangle right
- * \param clip_y1 clip rectangle bottom
+ * \param bw The window to redraw
+ * \param x coordinate for top-left of redraw
+ * \param y coordinate for top-left of redraw
+ * \param clip clip rectangle coordinates
* \return true if successful, false otherwise
*
* x, y and clip_* are coordinates from the top left of the canvas area.
@@ -271,10 +269,8 @@ bool browser_window_stop_available(struct browser_window *bw);
* the bottom right corner of the clip rectangle is (clip_x1, clip_y1).
* Units for x, y and clip_* are pixels.
*/
-bool browser_window_redraw(struct browser_window *bw,
- int x, int y,
- int clip_x0, int clip_y0,
- int clip_x1, int clip_y1);
+bool browser_window_redraw(struct browser_window *bw, int x, int y,
+ struct rect clip);
/* In platform specific hotlist.c. */
void hotlist_visited(struct hlcache_handle *c);