NetSurf
|
#include <proto/asl.h>
#include <proto/dos.h>
#include <proto/exec.h>
#include <proto/icon.h>
#include <workbench/icon.h>
#include <string.h>
#include "utils/utils.h"
#include "utils/nsoption.h"
#include "utils/file.h"
#include "utils/messages.h"
#include "utils/nsurl.h"
#include "netsurf/browser_window.h"
#include "netsurf/content.h"
#include "content/content_factory.h"
#include "desktop/save_complete.h"
#include "desktop/save_pdf.h"
#include "desktop/save_text.h"
#include "amiga/gui.h"
#include "amiga/bitmap.h"
#include "amiga/download.h"
#include "amiga/file.h"
#include "amiga/filetype.h"
#include "amiga/icon.h"
#include "amiga/iff_dr2d.h"
#include "amiga/misc.h"
#include "amiga/save_pdf.h"
#include "amiga/theme.h"
Go to the source code of this file.
Functions | |
HOOKF (ULONG, ami_file_asl_mime_hook, struct FileRequester *, fr, struct AnchorPathOld *) | |
void | ami_file_open (struct gui_window_2 *gwin) |
static void | ami_file_set_type (const char *path, lwc_string *mime_type) |
void | ami_file_save (int type, char *fname, struct Window *win, struct hlcache_handle *object, struct hlcache_handle *favicon, struct browser_window *bw) |
void | ami_file_save_req (int type, struct gui_window_2 *gwin, struct hlcache_handle *object) |
void | ami_file_req_init (void) |
void | ami_file_req_free (void) |
Variables | |
static struct Hook | aslhookfunc |
struct FileRequester * | filereq |
struct FileRequester * | savereq |
void ami_file_open | ( | struct gui_window_2 * | gwin | ) |
Definition at line 83 of file file.c.
References ami_gui2_get_browser_window(), ami_gui2_get_window(), ami_gui_get_screen(), amiga_warn_user(), aslhookfunc, browser_window_navigate(), BW_NAVIGATE_HISTORY, filereq, messages_get(), netsurf_path_to_nsurl(), NSERROR_OK, and nsurl_unref().
Referenced by HOOKF().
void ami_file_req_free | ( | void | ) |
Definition at line 300 of file file.c.
References filereq, and savereq.
Referenced by ami_gui_opts_use(), and gui_quit().
void ami_file_req_init | ( | void | ) |
Definition at line 281 of file file.c.
References aslhookfunc, download_dir, filereq, nsoption_charp, and savereq.
Referenced by ami_gui_opts_use(), and main().
void ami_file_save | ( | int | type, |
char * | fname, | ||
struct Window * | win, | ||
struct hlcache_handle * | object, | ||
struct hlcache_handle * | favicon, | ||
struct browser_window * | bw | ||
) |
Definition at line 147 of file file.c.
References ami_bitmap_set_title(), ami_bitmap_set_url(), ami_download_check_overwrite(), ami_file_set_type(), ami_mime_compare(), ami_update_pointer(), amiga_bitmap_save(), amiga_icon_superimpose_favicon(), AMINS_SAVE_COMPLETE, AMINS_SAVE_IFF, AMINS_SAVE_PDF, AMINS_SAVE_SELECTION, AMINS_SAVE_SOURCE, AMINS_SAVE_TEXT, browser_window_get_selection(), content_get_bitmap(), content_get_source_data(), content_get_title(), FClose, FOpen, GUI_POINTER_DEFAULT, GUI_POINTER_WAIT, hlcache_handle_get_url(), nsurl_access(), save_as_text(), save_complete(), and type.
Referenced by ami_file_save_req().
void ami_file_save_req | ( | int | type, |
struct gui_window_2 * | gwin, | ||
struct hlcache_handle * | object | ||
) |
Definition at line 225 of file file.c.
References ami_file_save(), ami_gui2_get_browser_window(), ami_gui2_get_gui_window(), ami_gui2_get_window(), ami_gui_get_favicon(), ami_gui_get_screen(), AMINS_SAVE_IFF, AMINS_SAVE_PDF, AMINS_SAVE_SELECTION, AMINS_SAVE_SOURCE, AMINS_SAVE_TEXT, hlcache_handle_get_url(), messages_get(), nsurl_nice(), savereq, and type.
Referenced by HOOKF().
|
static |
Definition at line 121 of file file.c.
References content_factory_type_from_mime_type(), CONTENT_HTML, path(), and type.
Referenced by ami_file_save().
HOOKF | ( | ULONG | , |
ami_file_asl_mime_hook | , | ||
struct FileRequester * | , | ||
fr | , | ||
struct AnchorPathOld * | |||
) |
Definition at line 55 of file file.c.
References content_factory_type_from_mime_type(), CONTENT_NONE, and fetch_filetype().
|
static |
Definition at line 50 of file file.c.
Referenced by ami_file_open(), and ami_file_req_init().
struct FileRequester* filereq |
Definition at line 52 of file file.c.
Referenced by ami_file_open(), ami_file_req_free(), ami_file_req_init(), gui_file_gadget_open(), and HOOKF().
struct FileRequester* savereq |
Definition at line 53 of file file.c.
Referenced by ami_file_req_free(), ami_file_req_init(), ami_file_save_req(), gui_download_window_create(), gui_window_save_link(), and HOOKF().