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 --- gtk/window.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'gtk') diff --git a/gtk/window.c b/gtk/window.c index ed0ab6a9f..207b23f89 100644 --- a/gtk/window.c +++ b/gtk/window.c @@ -798,23 +798,36 @@ void gui_window_destroy(struct gui_window *g) } + static void nsgtk_redraw_caret(struct gui_window *g) { + int sx, sy; + if (g->careth == 0) return; - gui_window_redraw(g, g->caretx, g->carety, - g->caretx, g->carety + g->careth); + gui_window_get_scroll(g, &sx, &sy); + + gtk_widget_queue_draw_area(GTK_WIDGET(g->layout), + g->caretx - sx, g->carety - sy, 1, g->careth + 1); + } -void gui_window_redraw(struct gui_window *g, int x0, int y0, int x1, int y1) +void gui_window_remove_caret(struct gui_window *g) { int sx, sy; + int oh = g->careth; + + if (oh == 0) + return; + + g->careth = 0; gui_window_get_scroll(g, &sx, &sy); gtk_widget_queue_draw_area(GTK_WIDGET(g->layout), - x0 - sx, y0 - sy, x1-x0+1, y1-y0+1); + g->caretx - sx, g->carety - sy, 1, oh + 1); + } void gui_window_redraw_window(struct gui_window *g) @@ -1049,19 +1062,6 @@ void gui_window_place_caret(struct gui_window *g, int x, int y, int height) gtk_widget_grab_focus(GTK_WIDGET(g->layout)); } -void gui_window_remove_caret(struct gui_window *g) -{ - int oh = g->careth; - - if (oh == 0) - return; - - g->careth = 0; - - gui_window_redraw(g, g->caretx, g->carety, - g->caretx, g->carety + oh); -} - void gui_window_new_content(struct gui_window *g) { -- cgit v1.2.3