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>
98 WINDOW_MenuStrip, NULL,
171 int x,
int y,
struct rect *r,
190 struct nsurl *url = NULL;
191 const char *title = NULL;
200 if((ok ==
false) || (url == NULL)) {
224HOOKF(
void, ami_history_global_menu_item_project_export, APTR, window,
struct IntuiMessage *)
228 GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&ami_cw);
231 ASLFR_Window, ami_cw->
win,
232 ASLFR_SleepWindow, TRUE,
235 ASLFR_InitialFile,
"history.html",
237 strlcpy(fname,
savereq->fr_Drawer, 1024);
238 AddPart(fname,
savereq->fr_File, 1024);
245HOOKF(
void, ami_history_global_menu_item_project_expand_all, APTR, window,
struct IntuiMessage *)
250HOOKF(
void, ami_history_global_menu_item_project_expand_folders, APTR, window,
struct IntuiMessage *)
255HOOKF(
void, ami_history_global_menu_item_project_expand_links, APTR, window,
struct IntuiMessage *)
260HOOKF(
void, ami_history_global_menu_item_project_collapse_all, APTR, window,
struct IntuiMessage *)
265HOOKF(
void, ami_history_global_menu_item_project_collapse_folders, APTR, window,
struct IntuiMessage *)
270HOOKF(
void, ami_history_global_menu_item_project_collapse_links, APTR, window,
struct IntuiMessage *)
275HOOKF(
void, ami_history_global_menu_item_project_close, APTR, window,
struct IntuiMessage *)
278 GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&ami_cw);
283HOOKF(
void, ami_history_global_menu_item_edit_select_all, APTR, window,
struct IntuiMessage *)
288HOOKF(
void, ami_history_global_menu_item_edit_clear, APTR, window,
struct IntuiMessage *)
293HOOKF(
void, ami_history_global_menu_item_edit_delete, APTR, window,
struct IntuiMessage *)
305 ami_history_global_menu_item_project_export, NULL, 0);
309 ami_history_global_menu_item_project_expand_all, NULL, 0);
311 ami_history_global_menu_item_project_expand_folders, NULL, 0);
313 ami_history_global_menu_item_project_expand_links, NULL, 0);
316 ami_history_global_menu_item_project_collapse_all, NULL, 0);
318 ami_history_global_menu_item_project_collapse_folders, NULL, 0);
320 ami_history_global_menu_item_project_collapse_links, NULL, 0);
323 ami_history_global_menu_item_project_close, NULL, 0);
327 ami_history_global_menu_item_edit_select_all, NULL, 0);
329 ami_history_global_menu_item_edit_clear, NULL, 0);
332 ami_history_global_menu_item_edit_delete, NULL, 0);
342 if(history_win->
imenu == NULL)
return NULL;
344 return history_win->
imenu;
352 ULONG refresh_mode = WA_SmartRefresh;
355 refresh_mode = WA_SimpleRefresh;
362 WA_DepthGadget, TRUE,
364 WA_CloseGadget, TRUE,
370 WA_ReportMouse, TRUE,
372 WA_IDCMP, IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
373 IDCMP_RAWKEY | IDCMP_GADGETUP | IDCMP_IDCMPUPDATE |
377 IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
381 WINDOW_UserData, history_win,
383 WINDOW_MenuUserData, WGUD_HOOK,
384 WINDOW_IconifyGadget, FALSE,
386 WINDOW_UniqueID,
"NS_HISTORY_GLOBAL_WIN",
387 WINDOW_PopupGadget, TRUE,
389 WINDOW_Position, WPOS_CENTERSCREEN,
393 SPACE_Transparent, TRUE,
429 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: 1 is primary mouse button.
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_bool(OPTION)
Get the value of a boolean option.