NetSurf
|
File/object/selection saving (Interface). More...
#include <stdbool.h>
#include "oslib/wimp.h"
Go to the source code of this file.
Functions | |
void | gui_drag_save_object (struct gui_window *g, struct hlcache_handle *c, enum gui_save_type save_type) |
Initiates drag saving of an object directly from a browser window. More... | |
void | gui_drag_save_selection (struct gui_window *g, const char *selection) |
Initiates drag saving of a selection from a browser window. More... | |
wimp_w | ro_gui_saveas_create (const char *template_name) |
Create the saveas dialogue from the given template, and the sprite area necessary for our thumbnail (full page save) More... | |
void | ro_gui_saveas_quit (void) |
Clean-up function that releases our sprite area and memory. More... | |
void | ro_gui_save_prepare (enum gui_save_type save_type, struct hlcache_handle *h, char *s, const struct nsurl *url, const char *title) |
void | ro_gui_save_start_drag (wimp_pointer *pointer) |
Starts a drag for the save dialog. More... | |
void | ro_gui_drag_save_link (enum gui_save_type save_type, const struct nsurl *url, const char *title, struct gui_window *g) |
void | ro_gui_drag_icon (int x, int y, const char *sprite) |
Start drag of icon under the pointer. More... | |
void | ro_gui_drag_box_cancel (void) |
void | ro_gui_send_datasave (enum gui_save_type save_type, wimp_full_message_data_xfer *message, wimp_t to) |
Send DataSave message on behalf of clipboard code and remember that it's the clipboard contents we're being asked for when the DataSaveAck reply arrives. More... | |
void | ro_gui_save_datasave_ack (wimp_message *message) |
Handle Message_DataSaveAck for a drag from the save dialog or browser window, or Clipboard protocol. More... | |
bool | ro_gui_save_ok (wimp_w w) |
Handle OK click/keypress in the save dialog. More... | |
void | ro_gui_convert_save_path (char *dp, size_t len, const char *p) |
Convert a ctrl-char terminated pathname possibly containing spaces to a NUL-terminated one containing only hard spaces. More... | |
File/object/selection saving (Interface).
Definition in file save.h.
void gui_drag_save_object | ( | struct gui_window * | g, |
struct hlcache_handle * | c, | ||
gui_save_type | save_type | ||
) |
Initiates drag saving of an object directly from a browser window.
g | gui window |
c | content to save |
save_type | type of save |
Definition at line 298 of file drag.c.
References dialog_saveas, gui_save_sourcew, hlcache_handle_get_url(), LEAFNAME_MAX, NSLOG, ro_gui_dialog_close(), ro_gui_drag_icon(), ro_gui_save_drag_end(), ro_gui_save_set_state(), ro_mouse_drag_start(), ro_warn_user(), save_leafname, saving_from_dialog, and gui_window::window.
void gui_drag_save_selection | ( | struct gui_window * | g, |
const char * | selection | ||
) |
Initiates drag saving of a selection from a browser window.
g | gui window |
selection | selection object |
Definition at line 303 of file drag.c.
References dialog_saveas, gui_save_selection, gui_save_sourcew, GUI_SAVE_TEXT_SELECTION, LEAFNAME_MAX, NSLOG, ro_gui_dialog_close(), ro_gui_drag_icon(), ro_gui_save_drag_end(), ro_gui_save_set_state(), ro_mouse_drag_start(), ro_warn_user(), save_leafname, saving_from_dialog, and gui_window::window.
void ro_gui_convert_save_path | ( | char * | dp, |
size_t | len, | ||
const char * | p | ||
) |
Convert a ctrl-char terminated pathname possibly containing spaces to a NUL-terminated one containing only hard spaces.
dp | destination buffer to receive pathname |
len | size of destination buffer |
p | source pathname, ctrl-char terminated |
Definition at line 1349 of file save.c.
Referenced by ro_gui_download_drag_end(), ro_gui_download_keypress(), ro_gui_save_drag_end(), and ro_gui_save_ok().
void ro_gui_drag_box_cancel | ( | void | ) |
Definition at line 1364 of file save.c.
References dragbox_active, NSLOG, ro_warn_user(), and using_dragasprite.
Referenced by ro_gui_keypress(), ro_gui_save_drag_end(), and ro_gui_selection_drag_claim().
void ro_gui_drag_icon | ( | int | x, |
int | y, | ||
const char * | sprite | ||
) |
Start drag of icon under the pointer.
x | The x coordinate of the drag start |
y | The y coordinate of the drag start |
sprite | The sprite to use for the drag. |
Definition at line 1275 of file save.c.
References dragbox_active, NSLOG, ro_warn_user(), saveas_area, and using_dragasprite.
Referenced by gui_drag_save_object(), gui_drag_save_selection(), ro_gui_download_click(), ro_gui_drag_save_link(), and ro_gui_save_start_drag().
void ro_gui_drag_save_link | ( | enum gui_save_type | save_type, |
const struct nsurl * | url, | ||
const char * | title, | ||
struct gui_window * | g | ||
) |
void ro_gui_save_datasave_ack | ( | wimp_message * | message | ) |
Handle Message_DataSaveAck for a drag from the save dialog or browser window, or Clipboard protocol.
Definition at line 1420 of file save.c.
References GUI_SAVE_CLIPBOARD_CONTENTS, gui_save_content, gui_save_current_type, GUI_SAVE_HISTORY_EXPORT_HTML, GUI_SAVE_HOTLIST_EXPORT_HTML, GUI_SAVE_LINK_TEXT, GUI_SAVE_LINK_URI, GUI_SAVE_LINK_URL, gui_save_message, gui_save_send_dataload, gui_save_sourcew, GUI_SAVE_TEXT_SELECTION, ICON_SAVE_PATH, NSLOG, nsoption_bool, path(), ro_gui_save_content(), ro_gui_save_done(), ro_gui_set_icon_string(), and saving_from_dialog.
Referenced by ro_msg_datasave_ack().
bool ro_gui_save_ok | ( | wimp_w | w | ) |
Handle OK click/keypress in the save dialog.
w | window handle of save dialog |
Definition at line 1110 of file save.c.
References gui_save_close_after, gui_save_content, gui_save_message, gui_save_send_dataload, gui_save_sourcew, ICON_SAVE_PATH, nsoption_bool, path(), ro_gui_convert_save_path(), ro_gui_get_icon_string(), ro_gui_save_content(), ro_gui_save_done(), ro_warn_user(), and saving_from_dialog.
Referenced by ro_gui_dialog_init().
void ro_gui_save_prepare | ( | enum gui_save_type | save_type, |
struct hlcache_handle * | h, | ||
char * | s, | ||
const struct nsurl * | url, | ||
const char * | title | ||
) |
void ro_gui_save_start_drag | ( | wimp_pointer * | pointer | ) |
Starts a drag for the save dialog.
pointer | mouse position info from Wimp |
Definition at line 602 of file save.c.
References gui_save_close_after, gui_save_sourcew, ro_gui_drag_icon(), ro_gui_get_icon_string(), ro_gui_save_drag_end(), ro_mouse_drag_start(), and saving_from_dialog.
Referenced by ro_gui_dialog_init().
wimp_w ro_gui_saveas_create | ( | const char * | template_name | ) |
Create the saveas dialogue from the given template, and the sprite area necessary for our thumbnail (full page save)
template_name | name of template to be used |
Definition at line 152 of file save.c.
References die(), ICON_SAVE_ICON, NSLOG, ro_gui_dialog_load_template(), ro_warn_user(), and saveas_area.
Referenced by ro_gui_dialog_init().
void ro_gui_saveas_quit | ( | void | ) |
Clean-up function that releases our sprite area and memory.
Definition at line 216 of file save.c.
References NSLOG, ro_warn_user(), save_dir, and saveas_area.
Referenced by gui_quit().
void ro_gui_send_datasave | ( | enum gui_save_type | save_type, |
wimp_full_message_data_xfer * | message, | ||
wimp_t | to | ||
) |
Send DataSave message on behalf of clipboard code and remember that it's the clipboard contents we're being asked for when the DataSaveAck reply arrives.
Definition at line 1397 of file save.c.
References dialog_saveas, gui_current_drag_type, GUI_DRAG_SAVE, gui_save_current_type, gui_save_sourcew, ro_gui_dialog_close(), ro_gui_save_bounced(), ro_message_send_message(), saving_from_dialog, and to.
Referenced by ro_gui_selection_data_request().