31#include <proto/intuition.h>
33#include <classes/window.h>
34#include <gadgets/layout.h>
35#include <gadgets/space.h>
37#include <reaction/reaction_macros.h>
100 WINDOW_MenuStrip, NULL,
173 int x,
int y,
struct rect *r,
192 struct nsurl *url = NULL;
193 const char *title = NULL;
202 if((ok ==
false) || (url == NULL)) {
226HOOKF(
void, ami_history_global_menu_item_project_export, APTR, window,
struct IntuiMessage *)
230 GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&ami_cw);
233 ASLFR_Window, ami_cw->
win,
234 ASLFR_SleepWindow, TRUE,
237 ASLFR_InitialFile,
"history.html",
239 strlcpy(fname,
savereq->fr_Drawer, 1024);
240 AddPart(fname,
savereq->fr_File, 1024);
247HOOKF(
void, ami_history_global_menu_item_project_expand_all, APTR, window,
struct IntuiMessage *)
252HOOKF(
void, ami_history_global_menu_item_project_expand_folders, APTR, window,
struct IntuiMessage *)
257HOOKF(
void, ami_history_global_menu_item_project_expand_links, APTR, window,
struct IntuiMessage *)
262HOOKF(
void, ami_history_global_menu_item_project_collapse_all, APTR, window,
struct IntuiMessage *)
267HOOKF(
void, ami_history_global_menu_item_project_collapse_folders, APTR, window,
struct IntuiMessage *)
272HOOKF(
void, ami_history_global_menu_item_project_collapse_links, APTR, window,
struct IntuiMessage *)
277HOOKF(
void, ami_history_global_menu_item_project_snapshot, APTR, window,
struct IntuiMessage *)
280 GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&ami_cw);
288HOOKF(
void, ami_history_global_menu_item_project_close, APTR, window,
struct IntuiMessage *)
291 GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&ami_cw);
296HOOKF(
void, ami_history_global_menu_item_edit_select_all, APTR, window,
struct IntuiMessage *)
301HOOKF(
void, ami_history_global_menu_item_edit_clear, APTR, window,
struct IntuiMessage *)
306HOOKF(
void, ami_history_global_menu_item_edit_delete, APTR, window,
struct IntuiMessage *)
318 ami_history_global_menu_item_project_export, NULL, 0);
322 ami_history_global_menu_item_project_expand_all, NULL, 0);
324 ami_history_global_menu_item_project_expand_folders, NULL, 0);
326 ami_history_global_menu_item_project_expand_links, NULL, 0);
329 ami_history_global_menu_item_project_collapse_all, NULL, 0);
331 ami_history_global_menu_item_project_collapse_folders, NULL, 0);
333 ami_history_global_menu_item_project_collapse_links, NULL, 0);
336 ami_history_global_menu_item_project_snapshot, NULL, 0);
339 ami_history_global_menu_item_project_close, NULL, 0);
343 ami_history_global_menu_item_edit_select_all, NULL, 0);
345 ami_history_global_menu_item_edit_clear, NULL, 0);
348 ami_history_global_menu_item_edit_delete, NULL, 0);
358 if(history_win->
imenu == NULL)
return NULL;
360 return history_win->
imenu;
368 ULONG refresh_mode = WA_SmartRefresh;
371 refresh_mode = WA_SimpleRefresh;
378 WA_DepthGadget, TRUE,
380 WA_CloseGadget, TRUE,
388 WA_ReportMouse, TRUE,
390 WA_IDCMP, IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
391 IDCMP_RAWKEY | IDCMP_GADGETUP | IDCMP_IDCMPUPDATE |
395 IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
399 WINDOW_UserData, history_win,
401 WINDOW_MenuUserData, WGUD_HOOK,
402 WINDOW_IconifyGadget, FALSE,
403 WINDOW_Position, WPOS_CENTERSCREEN,
407 SPACE_Transparent, TRUE,
441 NSLOG(netsurf, INFO,
"SSL UI builder init failed");
nserror ami_corewindow_fini(struct ami_corewindow *ami_cw)
finalise elements of Amiga core window.
nserror ami_corewindow_init(struct ami_corewindow *ami_cw)
initialise elements of Amiga core window.
struct Screen * ami_gui_get_screen(void)
Get a pointer to the screen NetSurf is running on.
void * ami_window_at_pointer(int type)
undocumented, or internal, or documented elsewhere
struct browser_window * ami_gui2_get_browser_window(struct gui_window_2 *gwin)
Get browser window from gui_window_2.
STRPTR ami_gui_get_screen_title(void)
Get the string for NetSurf's screen titlebar.
void ami_gui_beep(void)
Beep.
struct MsgPort * ami_gui_get_shared_msgport(void)
Get shared message port.
static void ami_history_global_menulabs(struct ami_menu_data **md)
static nserror ami_history_global_key(struct ami_corewindow *ami_cw, uint32_t nskey)
callback for keypress for history viewer on core window
static struct ami_history_global_window * history_window
static void ami_history_global_destroy(struct ami_corewindow *ami_cw)
destroy a previously created history view
@ AMI_HISTORY_M_EXPAND_LINKS
@ AMI_HISTORY_M_EXPAND_ALL
@ AMI_HISTORY_M_EXPAND_FOLDERS
@ AMI_HISTORY_M_COLLAPSE_FOLDERS
@ AMI_HISTORY_M_SELECTALL
@ AMI_HISTORY_M_COLLAPSE_ALL
@ AMI_HISTORY_M_COLLAPSE_LINKS
nserror ami_history_global_present(void)
Open the global history viewer.
HOOKF(void, ami_history_global_menu_item_project_export, APTR, window, struct IntuiMessage *)
menu stuff
static nserror ami_history_global_create_window(struct ami_history_global_window *history_win)
static struct Menu * ami_history_global_menu_create(struct ami_history_global_window *history_win)
static nserror ami_history_global_draw(struct ami_corewindow *ami_cw, int x, int y, struct rect *r, struct redraw_context *ctx)
callback on draw event for history viewer on core window
static nserror ami_history_global_drag_end(struct ami_corewindow *ami_cw, int x, int y)
callback on drag end for history viewer
static void ami_history_global_menu_free(struct ami_history_global_window *history_win)
static nserror ami_history_global_mouse(struct ami_corewindow *ami_cw, browser_mouse_state mouse_state, int x, int y)
callback for mouse action for history viewer on core window
void ami_update_pointer(struct Window *win, gui_pointer_shape shape)
Browser window creation and manipulation interface.
nserror browser_window_navigate(struct browser_window *bw, struct nsurl *url, struct nsurl *referrer, enum browser_window_nav_flags flags, char *post_urlenc, struct fetch_multipart_data *post_multipart, struct hlcache_handle *parent)
Start fetching a page in a browser window.
@ BW_NAVIGATE_HISTORY
this will form a new history node (don't set for back/reload/etc)
nserror global_history_init(void *core_window_handle)
Initialise the global history.
nserror global_history_expand(bool only_folders)
Expand the treeview's nodes.
nserror global_history_fini(void)
Finalise the global history.
void global_history_redraw(int x, int y, struct rect *clip, const struct redraw_context *ctx)
Redraw the global history.
bool global_history_has_selection(void)
Determine whether there is a selection.
bool global_history_get_selection(nsurl **url, const char **title)
Get the first selected node.
nserror global_history_export(const char *path, const char *title)
Save global history to file (html)
nserror global_history_contract(bool all)
Contract the treeview's nodes.
bool global_history_keypress(uint32_t key)
Key press handling.
void global_history_mouse_action(browser_mouse_state mouse, int x, int y)
Handles all kinds of mouse action.
nserror
Enumeration of error codes.
@ NSERROR_NOT_IMPLEMENTED
Functionality is not implemented.
@ NSERROR_NOMEM
Memory exhaustion.
struct FileRequester * savereq
void ami_utf8_free(char *ptr)
char * ami_utf8_easy(const char *string)
browser_mouse_state
Mouse state.
Target independent plotting interface.
Interface to key press operations.
#define NSLOG(catname, level, logmsg, args...)
const char * messages_get(const char *key)
Fast lookup of a message by key from the standard Messages hash.
Localised message support (interface).
struct nsurl nsurl
NetSurf URL object.
#define IDCMP_EXTENDEDMOUSE
Interface to utility string handling.
void(* close)(struct ami_corewindow *ami_cw)
callback to close an Amiga core window
Object * objects[GID_CW_LAST]
nserror(* icon_drop)(struct ami_corewindow *ami_cw, struct nsurl *url, const char *title, int x, int y)
callback for icon drop on Amiga core window ie.
nserror(* mouse)(struct ami_corewindow *ami_cw, browser_mouse_state mouse_state, int x, int y)
callback for mouse event on Amiga core window
nserror(* draw)(struct ami_corewindow *ami_cw, int x, int y, struct rect *r, struct redraw_context *ctx)
callback to draw on drawable area of Amiga core window
nserror(* key)(struct ami_corewindow *ami_cw, uint32_t nskey)
callback for keypress on Amiga core window
BOOL(* event)(struct ami_corewindow *ami_cw, ULONG result)
callback for unknown events on Amiga core window eg.
nserror(* drag_end)(struct ami_corewindow *ami_cw, int x, int y)
callback for drag end on Amiga core window ie.
char * wintitle
window title, must be allocated wth ami_utf8 function
Amiga history viewer window context.
struct ami_menu_data * menu_data[AMI_HISTORY_M_LAST+1]
struct ami_corewindow core
Amiga core window context.
Option reading and saving interface.
#define nsoption_int(OPTION)
Get the value of an integer option.
#define nsoption_set_int(OPTION, VALUE)
set an integer option in the default table
#define nsoption_bool(OPTION)
Get the value of a boolean option.