28#include <proto/intuition.h>
30#include <classes/window.h>
31#include <gadgets/layout.h>
32#include <gadgets/space.h>
34#include <reaction/reaction_macros.h>
91 WINDOW_MenuStrip, NULL,
176HOOKF(
void, ami_cookies_menu_item_project_expand_all, APTR, window,
struct IntuiMessage *)
181HOOKF(
void, ami_cookies_menu_item_project_expand_domains, APTR, window,
struct IntuiMessage *)
186HOOKF(
void, ami_cookies_menu_item_project_expand_cookies, APTR, window,
struct IntuiMessage *)
191HOOKF(
void, ami_cookies_menu_item_project_collapse_all, APTR, window,
struct IntuiMessage *)
196HOOKF(
void, ami_cookies_menu_item_project_collapse_domains, APTR, window,
struct IntuiMessage *)
201HOOKF(
void, ami_cookies_menu_item_project_collapse_cookies, APTR, window,
struct IntuiMessage *)
206HOOKF(
void, ami_cookies_menu_item_project_snapshot, APTR, window,
struct IntuiMessage *)
209 GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&ami_cw);
217HOOKF(
void, ami_cookies_menu_item_project_close, APTR, window,
struct IntuiMessage *)
220 GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&ami_cw);
225HOOKF(
void, ami_cookies_menu_item_edit_select_all, APTR, window,
struct IntuiMessage *)
230HOOKF(
void, ami_cookies_menu_item_edit_clear, APTR, window,
struct IntuiMessage *)
235HOOKF(
void, ami_cookies_menu_item_edit_delete, APTR, window,
struct IntuiMessage *)
248 ami_cookies_menu_item_project_expand_all, NULL, 0);
250 ami_cookies_menu_item_project_expand_domains, NULL, 0);
252 ami_cookies_menu_item_project_expand_cookies, NULL, 0);
255 ami_cookies_menu_item_project_collapse_all, NULL, 0);
257 ami_cookies_menu_item_project_collapse_domains, NULL, 0);
259 ami_cookies_menu_item_project_collapse_cookies, NULL, 0);
262 ami_cookies_menu_item_project_snapshot, NULL, 0);
265 ami_cookies_menu_item_project_close, NULL, 0);
269 ami_cookies_menu_item_edit_select_all, NULL, 0);
271 ami_cookies_menu_item_edit_clear, NULL, 0);
274 ami_cookies_menu_item_edit_delete, NULL, 0);
284 if(cookie_win->
imenu == NULL)
return NULL;
286 return cookie_win->
imenu;
294 ULONG refresh_mode = WA_SmartRefresh;
297 refresh_mode = WA_SimpleRefresh;
304 WA_DepthGadget, TRUE,
306 WA_CloseGadget, TRUE,
314 WA_ReportMouse, TRUE,
316 WA_IDCMP, IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
317 IDCMP_RAWKEY | IDCMP_GADGETUP | IDCMP_IDCMPUPDATE |
321 IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
325 WINDOW_UserData, cookie_win,
327 WINDOW_MenuUserData, WGUD_HOOK,
328 WINDOW_IconifyGadget, FALSE,
329 WINDOW_Position, WPOS_CENTERSCREEN,
333 SPACE_Transparent, TRUE,
367 NSLOG(netsurf, INFO,
"SSL UI builder init failed");
398 if (search_term != NULL) {
static struct ami_cookie_window * cookie_window
static nserror ami_cookies_draw(struct ami_corewindow *ami_cw, int x, int y, struct rect *r, struct redraw_context *ctx)
callback on draw event for cookies viewer on core window
static void ami_cookies_destroy(struct ami_corewindow *ami_cw)
destroy a previously created cookie view
nserror ami_cookies_present(const char *search_term)
Open the cookie viewer.
static nserror ami_cookies_mouse(struct ami_corewindow *ami_cw, browser_mouse_state mouse_state, int x, int y)
callback for mouse action for cookie viewer on core window
HOOKF(void, ami_cookies_menu_item_project_expand_all, APTR, window, struct IntuiMessage *)
menu stuff
static struct Menu * ami_cookies_menu_create(struct ami_cookie_window *cookie_win)
@ AMI_COOKIE_M_EXPAND_COOKIES
@ AMI_COOKIE_M_EXPAND_ALL
@ AMI_COOKIE_M_COLLAPSE_ALL
@ AMI_COOKIE_M_EXPAND_DOMAINS
@ AMI_COOKIE_M_COLLAPSE_DOMAINS
@ AMI_COOKIE_M_COLLAPSE_COOKIES
static void ami_cookies_menu_free(struct ami_cookie_window *cookie_win)
static nserror ami_cookies_create_window(struct ami_cookie_window *cookie_win)
static nserror ami_cookies_key(struct ami_corewindow *ami_cw, uint32_t nskey)
callback for keypress for cookies viewer on core window
static void ami_cookies_menulabs(struct ami_menu_data **md)
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.
STRPTR ami_gui_get_screen_title(void)
Get the string for NetSurf's screen titlebar.
struct MsgPort * ami_gui_get_shared_msgport(void)
Get shared message port.
nserror cookie_manager_contract(bool all)
Contract the treeview's nodes.
nserror cookie_manager_expand(bool only_folders)
Expand the treeview's nodes.
void cookie_manager_redraw(int x, int y, struct rect *clip, const struct redraw_context *ctx)
Redraw the cookies manager.
void cookie_manager_mouse_action(enum browser_mouse_state mouse, int x, int y)
Handles all kinds of mouse action.
nserror cookie_manager_init(void *core_window_handle)
Initialise the cookie manager.
nserror cookie_manager_fini(void)
Finalise the cookie manager.
nserror cookie_manager_set_search_string(const char *string)
Set the cookie manager search string.
bool cookie_manager_keypress(uint32_t key)
Key press handling.
Cookie Manager (interface).
nserror
Enumeration of error codes.
@ NSERROR_NOT_IMPLEMENTED
Functionality is not implemented.
@ NSERROR_NOMEM
Memory exhaustion.
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).
#define IDCMP_EXTENDEDMOUSE
Amiga cookie viewer window context.
struct ami_menu_data * menu_data[AMI_COOKIE_M_LAST+1]
struct ami_corewindow core
Amiga core window context.
void(* close)(struct ami_corewindow *ami_cw)
callback to close an Amiga core window
Object * objects[GID_CW_LAST]
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.
char * wintitle
window title, must be allocated wth ami_utf8 function
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.