From 9660442e927c472cce96e6497e72e35b920e475b Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 1 Mar 2011 14:31:54 +0000 Subject: remove obsolete, unused gui_window_redraw API svn path=/trunk/netsurf/; revision=11870 --- windows/gui.c | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) (limited to 'windows') diff --git a/windows/gui.c b/windows/gui.c index 5a2163453..a3ce3ff8d 100644 --- a/windows/gui.c +++ b/windows/gui.c @@ -883,9 +883,12 @@ nsws_drawable_paint(struct gui_window *gw, HWND hwnd) struct rect clip; PAINTSTRUCT ps; - plot_hdc = BeginPaint(hwnd, &ps); + BeginPaint(hwnd, &ps); if (gw != NULL) { + + plot_hdc = ps.hdc; + clip.x0 = ps.rcPaint.left; clip.y0 = ps.rcPaint.top; clip.x1 = ps.rcPaint.right; @@ -2043,31 +2046,12 @@ void gui_window_set_title(struct gui_window *w, const char *title) free(fulltitle); } -/** - * redraw a rectangle of the window - */ -void gui_window_redraw(struct gui_window *w, int x0, int y0, int x1, int y1) -{ - RECT redrawrect; - - LOG(("redraw %p %d,%d %d,%d", w, x0, y0, x1, y1)); - if (w == NULL) - return; - - redrawrect.left = x0; - redrawrect.top = y0; - redrawrect.right = x1; - redrawrect.bottom = y1; - - RedrawWindow(w->drawingarea, &redrawrect, NULL, RDW_INVALIDATE | RDW_NOERASE); -} - /** * redraw the whole window */ void gui_window_redraw_window(struct gui_window *gw) { - LOG(("redraw window %p", gw)); + /* LOG(("gw:%p", gw)); */ if (gw == NULL) return; @@ -2077,13 +2061,15 @@ void gui_window_redraw_window(struct gui_window *gw) void gui_window_update_box(struct gui_window *gw, const union content_msg_data *data) { + /* LOG(("gw:%p %f,%f %f,%f", gw, data->redraw.x, data->redraw.y, data->redraw.width, data->redraw.height)); */ + if (gw == NULL) return; RECT redrawrect; - redrawrect.left = (long)data->redraw.x; - redrawrect.top = (long)data->redraw.y; + redrawrect.left = (long)data->redraw.x - (gw->scrollx / gw->bw->scale); + redrawrect.top = (long)data->redraw.y - (gw->scrolly / gw->bw->scale); redrawrect.right =(long)(data->redraw.x + data->redraw.width); redrawrect.bottom = (long)(data->redraw.y + data->redraw.height); -- cgit v1.2.3