summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2014-01-16 14:28:25 +0000
committerVincent Sanders <vince@netsurf-browser.org>2014-01-16 14:28:25 +0000
commit54b7482f785dc647a5369328efea467d6ee0d5e8 (patch)
tree3b2072b3b5c02aea6dc6b1b0a60bab135ed8875c
parenta1361f22b43e78b00cdddab3a0a2b9e4871965f7 (diff)
downloadnetsurf-54b7482f785dc647a5369328efea467d6ee0d5e8.tar.gz
netsurf-54b7482f785dc647a5369328efea467d6ee0d5e8.tar.bz2
fix up riscos build errors
-rw-r--r--riscos/download.c102
-rw-r--r--riscos/gui.c2
-rw-r--r--riscos/gui.h1
-rw-r--r--riscos/gui/url_bar.c1
-rw-r--r--riscos/hotlist.c1
-rw-r--r--riscos/wimp_event.c1
-rw-r--r--riscos/window.c6
-rw-r--r--riscos/window.h4
8 files changed, 62 insertions, 56 deletions
diff --git a/riscos/download.c b/riscos/download.c
index 3a02c9c90..d0149b66c 100644
--- a/riscos/download.c
+++ b/riscos/download.c
@@ -435,6 +435,57 @@ static struct gui_download_window *gui_download_window_create(download_context *
return dw;
}
+/**
+ * Handle failed downloads.
+ *
+ * \param dw download window
+ * \param error_msg error message
+ */
+
+static void gui_download_window_error(struct gui_download_window *dw,
+ const char *error_msg)
+{
+ os_error *error;
+
+ if (dw->ctx != NULL)
+ download_context_destroy(dw->ctx);
+ dw->ctx = NULL;
+ dw->error = true;
+
+ schedule_remove(ro_gui_download_update_status_wrapper, dw);
+
+ /* place error message in status icon in red */
+ strncpy(dw->status, error_msg, sizeof dw->status);
+ error = xwimp_set_icon_state(dw->window,
+ ICON_DOWNLOAD_STATUS,
+ wimp_COLOUR_RED << wimp_ICON_FG_COLOUR_SHIFT,
+ wimp_ICON_FG_COLOUR);
+ if (error) {
+ LOG(("xwimp_set_icon_state: 0x%x: %s",
+ error->errnum, error->errmess));
+ warn_user("WimpError", error->errmess);
+ }
+
+ /* grey out pathname icon */
+ error = xwimp_set_icon_state(dw->window, ICON_DOWNLOAD_PATH,
+ wimp_ICON_SHADED, 0);
+ if (error) {
+ LOG(("xwimp_set_icon_state: 0x%x: %s",
+ error->errnum, error->errmess));
+ warn_user("WimpError", error->errmess);
+ }
+
+ /* grey out file icon */
+ error = xwimp_set_icon_state(dw->window, ICON_DOWNLOAD_ICON,
+ wimp_ICON_SHADED, wimp_ICON_SHADED);
+ if (error) {
+ LOG(("xwimp_set_icon_state: 0x%x: %s",
+ error->errnum, error->errmess));
+ warn_user("WimpError", error->errmess);
+ }
+
+ ro_gui_download_window_hide_caret(dw);
+}
/**
* Handle received download data.
@@ -707,57 +758,6 @@ void ro_gui_download_window_hide_caret(struct gui_download_window *dw)
}
-/**
- * Handle failed downloads.
- *
- * \param dw download window
- * \param error_msg error message
- */
-
-static void gui_download_window_error(struct gui_download_window *dw,
- const char *error_msg)
-{
- os_error *error;
-
- if (dw->ctx != NULL)
- download_context_destroy(dw->ctx);
- dw->ctx = NULL;
- dw->error = true;
-
- schedule_remove(ro_gui_download_update_status_wrapper, dw);
-
- /* place error message in status icon in red */
- strncpy(dw->status, error_msg, sizeof dw->status);
- error = xwimp_set_icon_state(dw->window,
- ICON_DOWNLOAD_STATUS,
- wimp_COLOUR_RED << wimp_ICON_FG_COLOUR_SHIFT,
- wimp_ICON_FG_COLOUR);
- if (error) {
- LOG(("xwimp_set_icon_state: 0x%x: %s",
- error->errnum, error->errmess));
- warn_user("WimpError", error->errmess);
- }
-
- /* grey out pathname icon */
- error = xwimp_set_icon_state(dw->window, ICON_DOWNLOAD_PATH,
- wimp_ICON_SHADED, 0);
- if (error) {
- LOG(("xwimp_set_icon_state: 0x%x: %s",
- error->errnum, error->errmess));
- warn_user("WimpError", error->errmess);
- }
-
- /* grey out file icon */
- error = xwimp_set_icon_state(dw->window, ICON_DOWNLOAD_ICON,
- wimp_ICON_SHADED, wimp_ICON_SHADED);
- if (error) {
- LOG(("xwimp_set_icon_state: 0x%x: %s",
- error->errnum, error->errmess));
- warn_user("WimpError", error->errmess);
- }
-
- ro_gui_download_window_hide_caret(dw);
-}
/**
diff --git a/riscos/gui.c b/riscos/gui.c
index f7dc6c962..6160956c7 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -948,7 +948,7 @@ void ro_gui_cleanup(void)
* \param active return as soon as possible
*/
-static void gui_poll(bool active)
+void gui_poll(bool active)
{
wimp_event_no event;
wimp_block block;
diff --git a/riscos/gui.h b/riscos/gui.h
index 89a539300..c3dce1cb8 100644
--- a/riscos/gui.h
+++ b/riscos/gui.h
@@ -118,6 +118,7 @@ void ro_gui_dump_browser_window(struct browser_window *bw);
void ro_gui_drag_box_start(wimp_pointer *pointer);
bool ro_gui_prequit(void);
const char *ro_gui_default_language(void);
+void gui_poll(bool active); /* exported for riscos/wimp_event.c:722 */
/* in download.c */
void ro_gui_download_init(void);
diff --git a/riscos/gui/url_bar.c b/riscos/gui/url_bar.c
index 62956a9ab..49930934f 100644
--- a/riscos/gui/url_bar.c
+++ b/riscos/gui/url_bar.c
@@ -36,6 +36,7 @@
#include "riscos/url_suggest.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
+#include "riscos/window.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
diff --git a/riscos/hotlist.c b/riscos/hotlist.c
index eeaddd00f..791035331 100644
--- a/riscos/hotlist.c
+++ b/riscos/hotlist.c
@@ -45,6 +45,7 @@
#include "riscos/treeview.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
+#include "riscos/query.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/schedule.h"
diff --git a/riscos/wimp_event.c b/riscos/wimp_event.c
index e87962039..1811498ea 100644
--- a/riscos/wimp_event.c
+++ b/riscos/wimp_event.c
@@ -32,6 +32,7 @@
#include "oslib/serviceinternational.h"
#include "oslib/wimp.h"
#include "desktop/gui.h"
+#include "riscos/gui.h"
#include "riscos/dialog.h"
#include "riscos/menus.h"
#include "riscos/ucstables.h"
diff --git a/riscos/window.c b/riscos/window.c
index 0d31b663a..2221425c3 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -1069,7 +1069,7 @@ void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
* \param url new url for address bar
*/
-static void gui_window_set_url(struct gui_window *g, const char *url)
+void gui_window_set_url(struct gui_window *g, const char *url)
{
if (!g->toolbar)
return;
@@ -5240,7 +5240,7 @@ bool ro_gui_alt_pressed(void)
return (alt == 0xff);
}
-static struct gui_window_table gui_window_table = {
+static struct gui_window_table window_table = {
.create = gui_window_create,
.destroy = gui_window_destroy,
.redraw = gui_window_redraw_window,
@@ -5273,4 +5273,4 @@ static struct gui_window_table gui_window_table = {
.start_selection = gui_start_selection,
};
-struct gui_window_table *riscos_gui_window_table = &gui_window_table;
+struct gui_window_table *riscos_window_table = &window_table;
diff --git a/riscos/window.h b/riscos/window.h
index 679fa9801..b55f1120d 100644
--- a/riscos/window.h
+++ b/riscos/window.h
@@ -25,11 +25,13 @@
#ifndef _NETSURF_RISCOS_WINDOW_H_
#define _NETSURF_RISCOS_WINDOW_H_
-extern struct gui_window_table *riscos_gui_window_table;
+extern struct gui_window_table *riscos_window_table;
void ro_gui_window_initialise(void);
bool ro_gui_window_check_menu(wimp_menu *menu);
+void gui_window_set_url(struct gui_window *g, const char *url);
+
#endif