|
NetSurf
|
Implementation of Amiga cookie viewer using core windows. More...
#include <stdint.h>#include <stdlib.h>#include <stdbool.h>#include <proto/intuition.h>#include <classes/window.h>#include <gadgets/layout.h>#include <gadgets/space.h>#include <reaction/reaction_macros.h>#include "desktop/cookie_manager.h"#include "netsurf/keypress.h"#include "netsurf/plotters.h"#include "utils/log.h"#include "utils/messages.h"#include "utils/nsoption.h"#include "amiga/cookies.h"#include "amiga/corewindow.h"#include "amiga/libs.h"#include "amiga/menu.h"#include "amiga/utf8.h"Go to the source code of this file.
Data Structures | |
| struct | ami_cookie_window |
| Amiga cookie viewer window context. More... | |
Functions | |
| static void | ami_cookies_menu_free (struct ami_cookie_window *cookie_win) |
| static void | ami_cookies_destroy (struct ami_corewindow *ami_cw) |
| destroy a previously created cookie view More... | |
| 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 More... | |
| static nserror | ami_cookies_key (struct ami_corewindow *ami_cw, uint32_t nskey) |
| callback for keypress for cookies viewer on core window More... | |
| 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 More... | |
| HOOKF (void, ami_cookies_menu_item_project_expand_all, APTR, window, struct IntuiMessage *) | |
| menu stuff More... | |
| HOOKF (void, ami_cookies_menu_item_project_expand_domains, APTR, window, struct IntuiMessage *) | |
| HOOKF (void, ami_cookies_menu_item_project_expand_cookies, APTR, window, struct IntuiMessage *) | |
| HOOKF (void, ami_cookies_menu_item_project_collapse_all, APTR, window, struct IntuiMessage *) | |
| HOOKF (void, ami_cookies_menu_item_project_collapse_domains, APTR, window, struct IntuiMessage *) | |
| HOOKF (void, ami_cookies_menu_item_project_collapse_cookies, APTR, window, struct IntuiMessage *) | |
| HOOKF (void, ami_cookies_menu_item_project_close, APTR, window, struct IntuiMessage *) | |
| HOOKF (void, ami_cookies_menu_item_edit_select_all, APTR, window, struct IntuiMessage *) | |
| HOOKF (void, ami_cookies_menu_item_edit_clear, APTR, window, struct IntuiMessage *) | |
| HOOKF (void, ami_cookies_menu_item_edit_delete, APTR, window, struct IntuiMessage *) | |
| static void | ami_cookies_menulabs (struct ami_menu_data **md) |
| static struct Menu * | ami_cookies_menu_create (struct ami_cookie_window *cookie_win) |
| static nserror | ami_cookies_create_window (struct ami_cookie_window *cookie_win) |
| nserror | ami_cookies_present (const char *search_term) |
| Open the cookie viewer. More... | |
Variables | |
| static struct ami_cookie_window * | cookie_window = NULL |
Implementation of Amiga cookie viewer using core windows.
Definition in file cookies.c.
| anonymous enum |
|
static |
Definition at line 275 of file cookies.c.
References ami_cookies_menu_create(), ami_gui_get_screen(), ami_gui_get_screen_title(), ami_gui_get_shared_msgport(), BVS_DISPLAY, ami_cookie_window::core, GID_CW_DRAW, GID_CW_MAIN, GID_CW_WIN, IDCMP_EXTENDEDMOUSE, ami_corewindow::idcmp_hook, LayoutVObj, NSERROR_NOMEM, NSERROR_OK, nsoption_bool, ami_corewindow::objects, SpaceObj, WindowObj, and ami_corewindow::wintitle.
Referenced by ami_cookies_present().
|
static |
destroy a previously created cookie view
Definition at line 99 of file cookies.c.
References ami_cookies_menu_free(), ami_corewindow_fini(), cookie_manager_fini(), cookie_window, ami_cookie_window::core, and NSERROR_OK.
Referenced by ami_cookies_present().
|
static |
callback on draw event for cookies viewer on core window
| ami_cw | The Amiga core window structure. |
| x | The x cordinate to plot at |
| y | The y cordinate to plot at |
| r | The rectangle of the window that needs updating. |
| ctx | The drawing context |
Definition at line 161 of file cookies.c.
References cookie_manager_redraw(), and NSERROR_OK.
Referenced by ami_cookies_present().
|
static |
callback for keypress for cookies viewer on core window
| ami_cw | The Amiga core window structure. |
| nskey | The netsurf key code |
Definition at line 142 of file cookies.c.
References cookie_manager_keypress(), NSERROR_NOT_IMPLEMENTED, and NSERROR_OK.
Referenced by ami_cookies_present().
|
static |
Definition at line 264 of file cookies.c.
References AMI_COOKIE_M_LAST, ami_cookies_menulabs(), ami_menu_layout(), ami_cookie_window::imenu, and ami_cookie_window::menu_data.
Referenced by ami_cookies_create_window().
|
static |
Definition at line 86 of file cookies.c.
References AMI_COOKIE_M_LAST, ami_menu_free_menu(), ami_cookie_window::core, GID_CW_WIN, ami_cookie_window::imenu, ami_cookie_window::menu_data, and ami_corewindow::objects.
Referenced by ami_cookies_destroy().
|
static |
Definition at line 230 of file cookies.c.
References AMI_COOKIE_M_BAR_E1, AMI_COOKIE_M_BAR_P1, AMI_COOKIE_M_CLEAR, AMI_COOKIE_M_CLOSE, AMI_COOKIE_M_COLLAPSE, AMI_COOKIE_M_COLLAPSE_ALL, AMI_COOKIE_M_COLLAPSE_COOKIES, AMI_COOKIE_M_COLLAPSE_DOMAINS, AMI_COOKIE_M_DELETE, AMI_COOKIE_M_EDIT, AMI_COOKIE_M_EXPAND, AMI_COOKIE_M_EXPAND_ALL, AMI_COOKIE_M_EXPAND_COOKIES, AMI_COOKIE_M_EXPAND_DOMAINS, AMI_COOKIE_M_LAST, AMI_COOKIE_M_PROJECT, AMI_COOKIE_M_SELECTALL, ami_menu_alloc_item(), and NSA_SPACE.
Referenced by ami_cookies_menu_create().
|
static |
callback for mouse action for cookie viewer on core window
| ami_cw | The Amiga core window structure. |
| mouse_state | netsurf mouse state on event |
| x | location of event |
| y | location of event |
Definition at line 125 of file cookies.c.
References cookie_manager_mouse_action(), and NSERROR_OK.
Referenced by ami_cookies_present().
| nserror ami_cookies_present | ( | const char * | search_term | ) |
Open the cookie viewer.
Definition at line 336 of file cookies.c.
References ami_cookies_create_window(), ami_cookies_destroy(), ami_cookies_draw(), ami_cookies_key(), ami_cookies_mouse(), ami_corewindow_init(), ami_utf8_easy(), ami_utf8_free(), ami_corewindow::close, cookie_manager_init(), cookie_manager_set_search_string(), cookie_window, ami_cookie_window::core, ami_corewindow::draw, ami_corewindow::event, GID_CW_WIN, ami_corewindow::key, messages_get(), ami_corewindow::mouse, NSERROR_NOMEM, NSERROR_OK, NSLOG, ami_corewindow::objects, and ami_corewindow::wintitle.
Referenced by HOOKF().
| HOOKF | ( | void | , |
| ami_cookies_menu_item_edit_clear | , | ||
| APTR | , | ||
| window | , | ||
| struct IntuiMessage * | |||
| ) |
Definition at line 217 of file cookies.c.
References cookie_manager_keypress(), and NS_KEY_CLEAR_SELECTION.
| HOOKF | ( | void | , |
| ami_cookies_menu_item_edit_delete | , | ||
| APTR | , | ||
| window | , | ||
| struct IntuiMessage * | |||
| ) |
Definition at line 222 of file cookies.c.
References cookie_manager_keypress(), and NS_KEY_DELETE_LEFT.
| HOOKF | ( | void | , |
| ami_cookies_menu_item_edit_select_all | , | ||
| APTR | , | ||
| window | , | ||
| struct IntuiMessage * | |||
| ) |
Definition at line 212 of file cookies.c.
References cookie_manager_keypress(), and NS_KEY_SELECT_ALL.
| HOOKF | ( | void | , |
| ami_cookies_menu_item_project_close | , | ||
| APTR | , | ||
| window | , | ||
| struct IntuiMessage * | |||
| ) |
Definition at line 204 of file cookies.c.
References ami_corewindow::close_window.
| HOOKF | ( | void | , |
| ami_cookies_menu_item_project_collapse_all | , | ||
| APTR | , | ||
| window | , | ||
| struct IntuiMessage * | |||
| ) |
Definition at line 189 of file cookies.c.
References cookie_manager_contract().
| HOOKF | ( | void | , |
| ami_cookies_menu_item_project_collapse_cookies | , | ||
| APTR | , | ||
| window | , | ||
| struct IntuiMessage * | |||
| ) |
Definition at line 199 of file cookies.c.
References cookie_manager_contract().
| HOOKF | ( | void | , |
| ami_cookies_menu_item_project_collapse_domains | , | ||
| APTR | , | ||
| window | , | ||
| struct IntuiMessage * | |||
| ) |
Definition at line 194 of file cookies.c.
References cookie_manager_contract().
| HOOKF | ( | void | , |
| ami_cookies_menu_item_project_expand_all | , | ||
| APTR | , | ||
| window | , | ||
| struct IntuiMessage * | |||
| ) |
menu stuff
Definition at line 174 of file cookies.c.
References cookie_manager_expand().
| HOOKF | ( | void | , |
| ami_cookies_menu_item_project_expand_cookies | , | ||
| APTR | , | ||
| window | , | ||
| struct IntuiMessage * | |||
| ) |
Definition at line 184 of file cookies.c.
References cookie_manager_expand().
| HOOKF | ( | void | , |
| ami_cookies_menu_item_project_expand_domains | , | ||
| APTR | , | ||
| window | , | ||
| struct IntuiMessage * | |||
| ) |
Definition at line 179 of file cookies.c.
References cookie_manager_expand().
|
static |
Definition at line 82 of file cookies.c.
Referenced by ami_cookies_destroy(), and ami_cookies_present().