summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--amiga/clipboard.c11
-rwxr-xr-xamiga/clipboard.h2
-rw-r--r--amiga/drag.c4
-rw-r--r--amiga/drag.h3
-rw-r--r--amiga/gui.c6
-rw-r--r--atari/gui.c32
-rw-r--r--beos/gui.cpp8
-rw-r--r--beos/window.cpp18
-rw-r--r--cocoa/gui.m15
-rw-r--r--cocoa/selection.m9
-rw-r--r--desktop/browser.c37
-rw-r--r--desktop/gui.h58
-rw-r--r--desktop/gui_factory.c34
-rw-r--r--desktop/selection.c6
-rw-r--r--framebuffer/gui.c29
-rw-r--r--gtk/selection.c11
-rw-r--r--gtk/window.c28
-rw-r--r--monkey/browser.c28
-rw-r--r--riscos/gui.c7
-rw-r--r--riscos/save.c4
-rw-r--r--riscos/save.h3
-rw-r--r--riscos/textselection.c14
-rw-r--r--riscos/textselection.h2
-rw-r--r--riscos/window.c7
-rw-r--r--windows/gui.c24
25 files changed, 128 insertions, 272 deletions
diff --git a/amiga/clipboard.c b/amiga/clipboard.c
index d37fb1aec..18598798c 100644
--- a/amiga/clipboard.c
+++ b/amiga/clipboard.c
@@ -107,17 +107,6 @@ void gui_start_selection(struct gui_window *g)
OnMenu(g->shared->win, AMI_MENU_CUT);
}
-void gui_clear_selection(struct gui_window *g)
-{
- if(!g) return;
- if(!g->shared->win) return;
- if(nsoption_bool(kiosk_mode) == true) return;
-
- OffMenu(g->shared->win, AMI_MENU_CLEAR);
- OffMenu(g->shared->win, AMI_MENU_CUT);
- OffMenu(g->shared->win, AMI_MENU_COPY);
-}
-
char *ami_clipboard_cat_collection(struct CollectionItem *ci, LONG codeset, size_t *text_length)
{
struct CollectionItem *ci_new = NULL, *ci_next, *ci_curr = ci;
diff --git a/amiga/clipboard.h b/amiga/clipboard.h
index cf3f74087..88de64340 100755
--- a/amiga/clipboard.h
+++ b/amiga/clipboard.h
@@ -26,6 +26,8 @@ struct selection;
struct gui_window;
struct gui_window_2;
+void gui_start_selection(struct gui_window *g);
+
void ami_clipboard_init(void);
void ami_clipboard_free(void);
void ami_drag_selection(struct gui_window *g);
diff --git a/amiga/drag.c b/amiga/drag.c
index 1123ba265..f8944d3a5 100644
--- a/amiga/drag.c
+++ b/amiga/drag.c
@@ -50,8 +50,8 @@ ULONG drag_icon_width;
ULONG drag_icon_height;
BOOL drag_in_progress = FALSE;
-void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
- struct gui_window *g)
+void gui_drag_save_object(struct gui_window *g, hlcache_handle *c,
+ gui_save_type type)
{
const char *filetype = NULL;
diff --git a/amiga/drag.h b/amiga/drag.h
index 218aa67f8..cfe9719ce 100644
--- a/amiga/drag.h
+++ b/amiga/drag.h
@@ -26,6 +26,9 @@ int drag_save;
void *drag_save_data;
struct gui_window *drag_save_gui;
+void gui_drag_save_selection(struct gui_window *g, const char *selection);
+void gui_drag_save_object(struct gui_window *g, hlcache_handle *c, gui_save_type type);
+
void ami_drag_save(struct Window *win);
void ami_drag_icon_show(struct Window *win, const char *type);
void ami_drag_icon_close(struct Window *win);
diff --git a/amiga/gui.c b/amiga/gui.c
index 4592eda7a..13c32cd8b 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -5066,7 +5066,7 @@ void ami_gui_splash_close(Object *win_obj)
if(win_obj) DisposeObject(win_obj);
}
-void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl,
+static void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl,
struct form_control *gadget)
{
LOG(("File open dialog rquest for %p/%p", g, gadget));
@@ -5103,6 +5103,10 @@ static struct gui_window_table ami_window_table = {
.remove_caret = gui_window_remove_caret,
.drag_start = gui_window_drag_start,
.new_content = gui_window_new_content,
+ .file_gadget_open = gui_file_gadget_open,
+ .drag_save_object = gui_drag_save_object,
+ .drag_save_selection =gui_drag_save_selection,
+ .start_selection = gui_start_selection,
/* from theme */
.set_pointer = gui_window_set_pointer,
diff --git a/atari/gui.c b/atari/gui.c
index 26a47aad1..c2109c985 100644
--- a/atari/gui.c
+++ b/atari/gui.c
@@ -445,13 +445,6 @@ static void gui_window_update_extent(struct gui_window *gw)
}
-void gui_clear_selection(struct gui_window *g)
-{
-
-}
-
-
-
/**
* set the pointer shape
*/
@@ -659,24 +652,6 @@ static void gui_window_new_content(struct gui_window *w)
gui_window_redraw_window(w);
}
-void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
- struct gui_window *w)
-{
- LOG((""));
- TODO();
-}
-
-void gui_drag_save_selection(struct gui_window *g, const char *selection)
-{
- LOG((""));
- TODO();
-}
-
-void gui_start_selection(struct gui_window *w)
-{
-
-}
-
/**
* Core asks front end for clipboard contents.
@@ -1064,13 +1039,6 @@ static void gui_init2(int argc, char** argv)
toolbar_init();
}
-void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl,
- struct form_control *gadget)
-{
- LOG(("File open dialog rquest for %p/%p", g, gadget));
- /* browser_window_set_gadget_filename(bw, gadget, "filename"); */
-}
-
static struct gui_window_table atari_window_table = {
.create = gui_window_create,
.destroy = gui_window_destroy,
diff --git a/beos/gui.cpp b/beos/gui.cpp
index 42a681c30..efac0bb4c 100644
--- a/beos/gui.cpp
+++ b/beos/gui.cpp
@@ -1073,14 +1073,6 @@ bool path_add_part(char *path, int length, const char *newpart)
return true;
}
-void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl,
- struct form_control *gadget)
-{
- LOG(("File open dialog rquest for %p/%p", g, gadget));
- /* browser_window_set_gadget_filename(bw, gadget, "filename"); */
-}
-
-
static struct gui_table beos_gui_table = {
.poll = gui_poll,
.quit = gui_quit,
diff --git a/beos/window.cpp b/beos/window.cpp
index 84199242d..a7bdf411e 100644
--- a/beos/window.cpp
+++ b/beos/window.cpp
@@ -1268,18 +1268,7 @@ static void gui_window_new_content(struct gui_window *g)
g->view->UnlockLooper();
}
-void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
- struct gui_window *g)
-{
-
-}
-
-void gui_drag_save_selection(struct gui_window *g, const char *selection)
-{
-
-}
-
-void gui_start_selection(struct gui_window *g)
+static void gui_start_selection(struct gui_window *g)
{
if (!g->view->LockLooper())
return;
@@ -1289,10 +1278,6 @@ void gui_start_selection(struct gui_window *g)
g->view->UnlockLooper();
}
-void gui_clear_selection(struct gui_window *g)
-{
-}
-
void gui_get_clipboard(char **buffer, size_t *length)
{
BMessage *clip;
@@ -1376,6 +1361,7 @@ static struct gui_window_table gui_window_table = {
.set_pointer = gui_window_set_pointer,
.place_caret = gui_window_place_caret,
.remove_caret = gui_window_remove_caret,
+ .start_selection = gui_start_selection,
/* from scaffold */
.set_icon = gui_window_set_icon,
diff --git a/cocoa/gui.m b/cocoa/gui.m
index 59d823d96..40dc8e191 100644
--- a/cocoa/gui.m
+++ b/cocoa/gui.m
@@ -250,15 +250,6 @@ static void gui_window_new_content(struct gui_window *g)
[(BrowserViewController *)g contentUpdated];
}
-void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
- struct gui_window *g)
-{
-}
-
-void gui_drag_save_selection(struct gui_window *g, const char *selection)
-{
-}
-
void gui_create_form_select_menu(struct browser_window *bw,
struct form_control *control)
@@ -289,12 +280,6 @@ void gui_401login_open(nsurl *url, const char *realm,
cb( false, cbpw );
}
-void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl,
- struct form_control *gadget)
-{
- LOG(("File open dialog rquest for %p/%p", g, gadget));
- /* browser_window_set_gadget_filename(bw, gadget, "filename"); */
-}
static struct gui_window_table cocoa_window_table = {
.create = gui_window_create,
diff --git a/cocoa/selection.m b/cocoa/selection.m
index 237c61ce2..daa64bf08 100644
--- a/cocoa/selection.m
+++ b/cocoa/selection.m
@@ -25,15 +25,6 @@
static NSMutableString *cocoa_clipboard_string;
-void gui_start_selection(struct gui_window *g)
-{
-}
-
-void gui_clear_selection(struct gui_window *g)
-{
-}
-
-
/**
* Core asks front end for clipboard contents.
*
diff --git a/desktop/browser.c b/desktop/browser.c
index 59cb4d44a..30aeead0c 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1484,20 +1484,23 @@ static nserror browser_window_callback(hlcache_handle *c,
switch(event->data.dragsave.type) {
case CONTENT_SAVE_ORIG:
- gui_drag_save_object(GUI_SAVE_OBJECT_ORIG, save,
- root->window);
+ guit->window->drag_save_object(root->window, save,
+ GUI_SAVE_OBJECT_ORIG);
break;
+
case CONTENT_SAVE_NATIVE:
- gui_drag_save_object(GUI_SAVE_OBJECT_NATIVE, save,
- root->window);
+ guit->window->drag_save_object(root->window, save,
+ GUI_SAVE_OBJECT_NATIVE);
break;
+
case CONTENT_SAVE_COMPLETE:
- gui_drag_save_object(GUI_SAVE_COMPLETE, save,
- root->window);
+ guit->window->drag_save_object(root->window, save,
+ GUI_SAVE_COMPLETE);
break;
+
case CONTENT_SAVE_SOURCE:
- gui_drag_save_object(GUI_SAVE_SOURCE, save,
- root->window);
+ guit->window->drag_save_object(root->window, save,
+ GUI_SAVE_SOURCE);
break;
}
}
@@ -1563,7 +1566,7 @@ static nserror browser_window_callback(hlcache_handle *c,
case CONTENT_MSG_GADGETCLICK:
if (event->data.gadget_click.gadget->type == GADGET_FILE) {
- gui_file_gadget_open(bw->window, c,
+ guit->window->file_gadget_open(bw->window, c,
event->data.gadget_click.gadget);
}
@@ -2893,14 +2896,14 @@ void browser_window_mouse_click(struct browser_window *bw,
break;
default:
if (mouse & BROWSER_MOUSE_MOD_2) {
- if (mouse & BROWSER_MOUSE_DRAG_2)
- gui_drag_save_object(GUI_SAVE_OBJECT_NATIVE, c,
- bw->window);
- else if (mouse & BROWSER_MOUSE_DRAG_1)
- gui_drag_save_object(GUI_SAVE_OBJECT_ORIG, c,
- bw->window);
- }
- else if (mouse & (BROWSER_MOUSE_DRAG_1 |
+ if (mouse & BROWSER_MOUSE_DRAG_2) {
+ guit->window->drag_save_object(bw->window, c,
+ GUI_SAVE_OBJECT_NATIVE);
+ } else if (mouse & BROWSER_MOUSE_DRAG_1) {
+ guit->window->drag_save_object(bw->window, c,
+ GUI_SAVE_OBJECT_ORIG);
+ }
+ } else if (mouse & (BROWSER_MOUSE_DRAG_1 |
BROWSER_MOUSE_DRAG_2)) {
browser_window_page_drag_start(bw, x, y);
browser_window_set_pointer(bw, BROWSER_POINTER_MOVE);
diff --git a/desktop/gui.h b/desktop/gui.h
index 3f533d224..8d65893d0 100644
--- a/desktop/gui.h
+++ b/desktop/gui.h
@@ -157,8 +157,6 @@ struct gui_window_table {
/** set favicon */
void (*set_icon)(struct gui_window *g, hlcache_handle *icon);
-
-
/**
* Set the status bar of a browser window.
*
@@ -190,8 +188,6 @@ struct gui_window_table {
*/
void (*remove_caret)(struct gui_window *g);
-
-
/** start the navigation throbber. */
void (*start_throbber)(struct gui_window *g);
@@ -233,6 +229,19 @@ struct gui_window_table {
*/
void (*new_content)(struct gui_window *g);
+ /**
+ * Called when file chooser gadget is activated
+ */
+ void (*file_gadget_open)(struct gui_window *g, hlcache_handle *hl, struct form_control *gadget);
+
+ /** object dragged to window*/
+ void (*drag_save_object)(struct gui_window *g, hlcache_handle *c, gui_save_type type);
+
+ /** drag selection save */
+ void (*drag_save_selection)(struct gui_window *g, const char *selection);
+
+ /** selection started */
+ void (*start_selection)(struct gui_window *g);
};
/** Graphical user interface function table
@@ -280,17 +289,27 @@ void gui_download_window_error(struct gui_download_window *dw,
const char *error_msg);
void gui_download_window_done(struct gui_download_window *dw);
-void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
- struct gui_window *g);
-void gui_drag_save_selection(struct gui_window *g, const char *selection);
-void gui_start_selection(struct gui_window *g);
-void gui_clear_selection(struct gui_window *g);
-void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl,
- struct form_control *gadget);
+
+/**
+ * Callback to translate resource to full url.
+ *
+ * Transforms a resource: path into a full URL. The returned URL
+ * is used as the target for a redirect. The caller takes ownership of
+ * the returned nsurl including unrefing it when finished with it.
+ *
+ * \param path The path of the resource to locate.
+ * \return A string containing the full URL of the target object or
+ * NULL if no suitable resource can be found.
+ */
+nsurl* gui_get_resource_url(const char *path);
+
void gui_launch_url(const char *url);
+void gui_create_form_select_menu(struct browser_window *bw,
+ struct form_control *control);
+
/**
* Core asks front end for clipboard contents.
*
@@ -304,6 +323,7 @@ typedef struct nsnsclipboard_styles {
plot_font_style_t style; /**< Style to give text run */
} nsclipboard_styles;
+
/**
* Core tells front end to put given text in clipboard
*
@@ -317,27 +337,11 @@ void gui_set_clipboard(const char *buffer, size_t length,
-void gui_create_form_select_menu(struct browser_window *bw,
- struct form_control *control);
-
-
struct ssl_cert_info;
void gui_cert_verify(nsurl *url, const struct ssl_cert_info *certs,
unsigned long num, nserror (*cb)(bool proceed, void *pw),
void *cbpw);
-/**
- * Callback to translate resource to full url.
- *
- * Transforms a resource: path into a full URL. The returned URL
- * is used as the target for a redirect. The caller takes ownership of
- * the returned nsurl including unrefing it when finished with it.
- *
- * \param path The path of the resource to locate.
- * \return A string containing the full URL of the target object or
- * NULL if no suitable resource can be found.
- */
-nsurl* gui_get_resource_url(const char *path);
#endif
diff --git a/desktop/gui_factory.c b/desktop/gui_factory.c
index e03e7dae0..8ebf3515a 100644
--- a/desktop/gui_factory.c
+++ b/desktop/gui_factory.c
@@ -85,6 +85,28 @@ static void gui_default_window_remove_caret(struct gui_window *g)
{
}
+static void gui_default_window_file_gadget_open(struct gui_window *g,
+ hlcache_handle *hl,
+ struct form_control *gadget)
+{
+}
+
+static void gui_default_window_drag_save_object(struct gui_window *g,
+ hlcache_handle *c,
+ gui_save_type type)
+{
+}
+
+static void gui_default_window_drag_save_selection(struct gui_window *g,
+ const char *selection)
+{
+}
+
+static void gui_default_window_start_selection(struct gui_window *g)
+{
+}
+
+
/** verify window table is valid */
static nserror verify_window_register(struct gui_window_table *gwt)
{
@@ -163,6 +185,18 @@ static nserror verify_window_register(struct gui_window_table *gwt)
if (gwt->scroll_start == NULL) {
gwt->scroll_start = gui_default_window_scroll_start;
}
+ if (gwt->file_gadget_open == NULL) {
+ gwt->file_gadget_open = gui_default_window_file_gadget_open;
+ }
+ if (gwt->drag_save_object == NULL) {
+ gwt->drag_save_object = gui_default_window_drag_save_object;
+ }
+ if (gwt->drag_save_selection == NULL) {
+ gwt->drag_save_selection = gui_default_window_drag_save_selection;
+ }
+ if (gwt->start_selection == NULL) {
+ gwt->start_selection = gui_default_window_start_selection;
+ }
return NSERROR_OK;
}
diff --git a/desktop/selection.c b/desktop/selection.c
index 13a1293e3..ca383c179 100644
--- a/desktop/selection.c
+++ b/desktop/selection.c
@@ -274,7 +274,7 @@ bool selection_click(struct selection *s, browser_mouse_state mouse,
(modkeys && (mouse & BROWSER_MOUSE_DRAG_2)))) {
/* drag-saving selection */
char *sel = selection_get_copy(s);
- gui_drag_save_selection(top->window, sel);
+ guit->window->drag_save_selection(top->window, sel);
free(sel);
}
else if (!modkeys) {
@@ -293,7 +293,7 @@ bool selection_click(struct selection *s, browser_mouse_state mouse,
s->drag_state = DRAG_END;
- gui_start_selection(top->window);
+ guit->window->start_selection(top->window);
}
else if (mouse & BROWSER_MOUSE_DRAG_2) {
@@ -312,7 +312,7 @@ bool selection_click(struct selection *s, browser_mouse_state mouse,
s->drag_state = DRAG_START;
}
- gui_start_selection(top->window);
+ guit->window->start_selection(top->window);
}
else if (mouse & BROWSER_MOUSE_CLICK_2) {
diff --git a/framebuffer/gui.c b/framebuffer/gui.c
index a9457fafe..eff0a98e1 100644
--- a/framebuffer/gui.c
+++ b/framebuffer/gui.c
@@ -1792,28 +1792,6 @@ gui_download_window_done(struct gui_download_window *dw)
}
void
-gui_drag_save_object(gui_save_type type,
- hlcache_handle *c,
- struct gui_window *w)
-{
-}
-
-void
-gui_drag_save_selection(struct gui_window *g, const char *selection)
-{
-}
-
-void
-gui_start_selection(struct gui_window *g)
-{
-}
-
-void
-gui_clear_selection(struct gui_window *g)
-{
-}
-
-void
gui_create_form_select_menu(struct browser_window *bw,
struct form_control *control)
{
@@ -1834,13 +1812,6 @@ gui_cert_verify(nsurl *url,
cb(false, cbpw);
}
-void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl,
- struct form_control *gadget)
-{
- LOG(("File open dialog rquest for %p/%p", g, gadget));
- /* browser_window_set_gadget_filename(bw, gadget, "filename"); */
-}
-
static struct gui_window_table framebuffer_gui_window_table = {
.create = gui_window_create,
.destroy = gui_window_destroy,
diff --git a/gtk/selection.c b/gtk/selection.c
index b0978b385..8bdc0f8c8 100644
--- a/gtk/selection.c
+++ b/gtk/selection.c
@@ -30,17 +30,6 @@ static GString *current_selection = NULL;
static GtkClipboard *clipboard;
-
-
-void gui_start_selection(struct gui_window *g)
-{
- gtk_widget_grab_focus(GTK_WIDGET(nsgtk_window_get_layout(g)));
-}
-
-void gui_clear_selection(struct gui_window *g)
-{
-}
-
/**
* Core asks front end for clipboard contents.
*
diff --git a/gtk/window.c b/gtk/window.c
index f7a348230..8b66be60d 100644
--- a/gtk/window.c
+++ b/gtk/window.c
@@ -28,6 +28,7 @@
#include "content/hlcache.h"
#include "gtk/window.h"
+#include "gtk/selection.h"
#include "desktop/browser_private.h"
#include "desktop/mouse.h"
#include "utils/nsoption.h"
@@ -1110,18 +1111,6 @@ static void gui_window_place_caret(struct gui_window *g, int x, int y, int heigh
}
-
-void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
- struct gui_window *g)
-{
-
-}
-
-void gui_drag_save_selection(struct gui_window *g, const char *selection)
-{
-
-}
-
static void gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
bool scaled)
{
@@ -1141,13 +1130,18 @@ static void gui_window_get_dimensions(struct gui_window *g, int *width, int *hei
LOG(("height: %i", *height));
}
-void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl,
- struct form_control *gadget)
+static void gui_window_start_selection(struct gui_window *g)
+{
+ gtk_widget_grab_focus(GTK_WIDGET(g->layout));
+}
+
+static void
+gui_window_file_gadget_open(struct gui_window *g,
+ hlcache_handle *hl,
+ struct form_control *gadget)
{
GtkWidget *dialog;
- LOG(("Awooga."));
-
dialog = gtk_file_chooser_dialog_new("Select File",
nsgtk_scaffolding_window(g->scaffold),
GTK_FILE_CHOOSER_ACTION_OPEN,
@@ -1188,6 +1182,8 @@ static struct gui_window_table gui_window_table = {
.set_pointer = gui_window_set_pointer,
.place_caret = gui_window_place_caret,
.remove_caret = gui_window_remove_caret,
+ .file_gadget_open = gui_window_file_gadget_open,
+ .start_selection = gui_window_start_selection,
/* from scaffold */
.set_title = gui_window_set_title,
diff --git a/monkey/browser.c b/monkey/browser.c
index c2e98f493..7cada343e 100644
--- a/monkey/browser.c
+++ b/monkey/browser.c
@@ -276,13 +276,6 @@ gui_window_set_url(struct gui_window *g, const char *url)
fprintf(stdout, "WINDOW SET_URL WIN %u URL %s\n", g->win_num, url);
}
-void
-gui_drag_save_object(gui_save_type type, hlcache_handle *c,
- struct gui_window *g)
-{
- /* Ignore? */
-}
-
static bool
gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
{
@@ -309,21 +302,6 @@ gui_window_scroll_visible(struct gui_window *g, int x0, int y0,
g->win_num, x0, y0, x1, y1);
}
-void
-gui_drag_save_selection(struct gui_window *g, const char *selection)
-{
-}
-
-void
-gui_start_selection(struct gui_window *g)
-{
-}
-
-void
-gui_clear_selection(struct gui_window *g)
-{
-}
-
/**
* Core asks front end for clipboard contents.
*
@@ -386,12 +364,6 @@ gui_window_save_link(struct gui_window *g, const char *url,
g->win_num, url, title);
}
-void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl,
- struct form_control *gadget)
-{
- LOG(("File open dialog rquest for %p/%p", g, gadget));
- /* browser_window_set_gadget_filename(bw, gadget, "filename"); */
-}
/**** Handlers ****/
diff --git a/riscos/gui.c b/riscos/gui.c
index 2854744df..f7caf02da 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -2432,10 +2432,3 @@ bool path_add_part(char *path, int length, const char *newpart)
return true;
}
-void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl,
- struct form_control *gadget)
-{
- LOG(("File open dialog rquest for %p/%p", g, gadget));
- /* browser_window_set_gadget_filename(bw, gadget, "filename"); */
-}
-
diff --git a/riscos/save.c b/riscos/save.c
index 4d1740397..59222c49a 100644
--- a/riscos/save.c
+++ b/riscos/save.c
@@ -357,8 +357,8 @@ bool ro_gui_save_ok(wimp_w w)
* \param g gui window
*/
-void gui_drag_save_object(gui_save_type save_type, hlcache_handle *c,
- struct gui_window *g)
+void gui_drag_save_object(struct gui_window *g, hlcache_handle *c,
+ gui_save_type save_type)
{
wimp_pointer pointer;
char icon_buf[20];
diff --git a/riscos/save.h b/riscos/save.h
index 34a4a6ba9..0c917664a 100644
--- a/riscos/save.h
+++ b/riscos/save.h
@@ -27,6 +27,9 @@
#include "oslib/wimp.h"
#include "desktop/gui.h"
+void gui_drag_save_object(struct gui_window *g, hlcache_handle *c, gui_save_type save_type);
+void gui_drag_save_selection(struct gui_window *g, const char *selection);
+
wimp_w ro_gui_saveas_create(const char *template_name);
void ro_gui_saveas_quit(void);
void ro_gui_save_prepare(gui_save_type save_type, struct hlcache_handle *h,
diff --git a/riscos/textselection.c b/riscos/textselection.c
index ab8ea5c3a..73b5246e3 100644
--- a/riscos/textselection.c
+++ b/riscos/textselection.c
@@ -186,20 +186,6 @@ static void ro_gui_selection_drag_end(wimp_dragged *drag, void *data)
browser_window_mouse_track(g->bw, 0, pos.x, pos.y);
}
-
-/**
- * Perform tasks after a selection has been cleared.
- *
- * \param g gui window
- */
-
-void gui_clear_selection(struct gui_window *g)
-{
- /* Refresh any open menu, in case it's the browser window menu. */
- ro_gui_menu_refresh(0);
-}
-
-
/**
* Core tells front end to put given text in clipboard
*
diff --git a/riscos/textselection.h b/riscos/textselection.h
index c6f96f0e9..a4f436ddc 100644
--- a/riscos/textselection.h
+++ b/riscos/textselection.h
@@ -26,6 +26,8 @@
#include "oslib/wimp.h"
#include "desktop/gui.h"
+void gui_start_selection(struct gui_window *g);
+
typedef void (*ro_gui_selection_prepare_paste_cb)(void *pw);
void ro_gui_selection_prepare_paste(wimp_w w,
diff --git a/riscos/window.c b/riscos/window.c
index feb7f8979..e4c515c36 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -5265,6 +5265,13 @@ static struct gui_window_table gui_window_table = {
.new_content = gui_window_new_content,
.start_throbber = gui_window_start_throbber,
.stop_throbber = gui_window_stop_throbber,
+
+ /* from save */
+ .drag_save_object = gui_drag_save_object,
+ .drag_save_selection =gui_drag_save_selection,
+
+ /* from textselection */
+ .start_selection = gui_start_selection,
};
struct gui_window_table *riscos_gui_window_table = &gui_window_table;
diff --git a/windows/gui.c b/windows/gui.c
index aa1cbec8b..c813c8b46 100644
--- a/windows/gui.c
+++ b/windows/gui.c
@@ -76,12 +76,6 @@ static struct nsws_pointers nsws_pointer;
void gui_window_set_scroll(struct gui_window *w, int sx, int sy);
static bool gui_window_get_scroll(struct gui_window *w, int *sx, int *sy);
-void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl,
- struct form_control *gadget)
-{
- LOG(("File open dialog rquest for %p/%p", g, gadget));
- /* browser_window_set_gadget_filename(bw, gadget, "filename"); */
-}
static void gui_poll(bool active)
{
@@ -1729,24 +1723,6 @@ static void gui_window_remove_caret(struct gui_window *w)
HideCaret(w->drawingarea);
}
-void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
- struct gui_window *w)
-{
-}
-
-
-void gui_drag_save_selection(struct gui_window *g, const char *selection)
-{
-}
-
-void gui_start_selection(struct gui_window *w)
-{
-}
-
-void gui_clear_selection(struct gui_window *w)
-{
-}
-
/**
* Core asks front end for clipboard contents.
*