summaryrefslogtreecommitdiff
path: root/riscos/wimp.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2005-03-14 13:58:43 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2005-03-14 13:58:43 +0000
commit501da1c487f04fbbe04c3cc2a130a4583621681c (patch)
tree0246ee27f677f9dfd494018f070926159b674b39 /riscos/wimp.c
parent950d8e27a041119009bede022cb5a2502131a94b (diff)
downloadnetsurf-501da1c487f04fbbe04c3cc2a130a4583621681c.tar.gz
netsurf-501da1c487f04fbbe04c3cc2a130a4583621681c.tar.bz2
[project @ 2005-03-14 13:58:43 by rjw]
Minimise flicker when viewing non-HTML files. svn path=/import/netsurf/; revision=1535
Diffstat (limited to 'riscos/wimp.c')
-rw-r--r--riscos/wimp.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/riscos/wimp.c b/riscos/wimp.c
index a9e2a29d4..54a3cf815 100644
--- a/riscos/wimp.c
+++ b/riscos/wimp.c
@@ -14,6 +14,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include "oslib/colourtrans.h"
#include "oslib/os.h"
#include "oslib/osfile.h"
#include "oslib/wimp.h"
@@ -626,3 +627,45 @@ void ro_gui_open_pane(wimp_w parent, wimp_w pane, int offset)
return;
}
}
+
+
+/**
+ * Performs simple user redraw for a window.
+ *
+ * \param user_fill whether to fill the redraw area
+ * \param user_colour the colour to use when filling
+ */
+
+void ro_gui_user_redraw(wimp_draw *redraw, bool user_fill, os_colour user_colour)
+{
+ os_error *error;
+ osbool more;
+
+ error = xwimp_redraw_window(redraw, &more);
+ if (error) {
+ LOG(("xwimp_redraw_window: 0x%x: %s",
+ error->errnum, error->errmess));
+ warn_user("WimpError", error->errmess);
+ return;
+ }
+ while (more) {
+ if (user_fill) {
+ error = xcolourtrans_set_gcol(user_colour,
+ colourtrans_SET_BG,
+ os_ACTION_OVERWRITE, 0, 0);
+ if (error) {
+ LOG(("xcolourtrans_set_gcol: 0x%x: %s",
+ error->errnum, error->errmess));
+ warn_user("MiscError", error->errmess);
+ }
+ os_clg();
+ }
+ error = xwimp_get_rectangle(redraw, &more);
+ if (error) {
+ LOG(("xwimp_get_rectangle: 0x%x: %s",
+ error->errnum, error->errmess));
+ warn_user("WimpError", error->errmess);
+ return;
+ }
+ }
+}