NetSurf
|
Implementation of GTK cookie manager. More...
#include <stdint.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "utils/log.h"
#include "netsurf/keypress.h"
#include "netsurf/plotters.h"
#include "desktop/cookie_manager.h"
#include "gtk/cookies.h"
#include "gtk/plotters.h"
#include "gtk/resources.h"
#include "gtk/corewindow.h"
Go to the source code of this file.
Data Structures | |
struct | nsgtk_cookie_window |
struct | menu_events |
Macros | |
#define | MENUPROTO(x) |
#define | MENUEVENT(x) { #x, G_CALLBACK(nsgtk_on_##x##_activate) } |
#define | MENUHANDLER(x) |
Functions | |
MENUPROTO (delete_selected) | |
MENUPROTO (delete_all) | |
MENUPROTO (select_all) | |
MENUPROTO (clear_selection) | |
MENUPROTO (expand_all) | |
MENUPROTO (expand_domains) | |
MENUPROTO (expand_cookies) | |
MENUPROTO (collapse_all) | |
MENUPROTO (collapse_domains) | |
MENUPROTO (collapse_cookies) | |
MENUHANDLER (delete_selected) | |
MENUHANDLER (delete_all) | |
MENUHANDLER (select_all) | |
MENUHANDLER (clear_selection) | |
MENUHANDLER (expand_all) | |
MENUHANDLER (expand_domains) | |
MENUHANDLER (expand_cookies) | |
MENUHANDLER (collapse_all) | |
MENUHANDLER (collapse_domains) | |
MENUHANDLER (collapse_cookies) | |
static void | nsgtk_cookies_init_menu (struct nsgtk_cookie_window *ncwin) |
Connects menu events in the cookies window. More... | |
static nserror | nsgtk_cookies_mouse (struct nsgtk_corewindow *nsgtk_cw, browser_mouse_state mouse_state, int x, int y) |
callback for mouse action on cookie window More... | |
static nserror | nsgtk_cookies_key (struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey) |
callback for keypress on cookie window More... | |
static nserror | nsgtk_cookies_draw (struct nsgtk_corewindow *nsgtk_cw, struct rect *r) |
callback on draw event for cookie window More... | |
static nserror | nsgtk_cookies_init (void) |
Creates the window for the cookies tree. More... | |
nserror | nsgtk_cookies_present (const char *search_term) |
make the cookie window visible. More... | |
nserror | nsgtk_cookies_destroy (void) |
Free any resources allocated for the cookie window. More... | |
Variables | |
static struct nsgtk_cookie_window * | cookie_window = NULL |
static struct menu_events | menu_events [] |
Implementation of GTK cookie manager.
Definition in file cookies.c.
#define MENUEVENT | ( | x | ) | { #x, G_CALLBACK(nsgtk_on_##x##_activate) } |
#define MENUHANDLER | ( | x | ) |
#define MENUPROTO | ( | x | ) |
MENUHANDLER | ( | clear_selection | ) |
Definition at line 116 of file cookies.c.
References cookie_manager_keypress(), and NS_KEY_CLEAR_SELECTION.
MENUHANDLER | ( | collapse_all | ) |
Definition at line 141 of file cookies.c.
References cookie_manager_contract().
MENUHANDLER | ( | collapse_cookies | ) |
Definition at line 153 of file cookies.c.
References cookie_manager_contract().
MENUHANDLER | ( | collapse_domains | ) |
Definition at line 147 of file cookies.c.
References cookie_manager_contract().
MENUHANDLER | ( | delete_all | ) |
Definition at line 99 of file cookies.c.
References cookie_manager_keypress(), NS_KEY_DELETE_LEFT, NS_KEY_ESCAPE, and NS_KEY_SELECT_ALL.
MENUHANDLER | ( | delete_selected | ) |
Definition at line 93 of file cookies.c.
References cookie_manager_keypress(), and NS_KEY_DELETE_LEFT.
MENUHANDLER | ( | expand_all | ) |
Definition at line 123 of file cookies.c.
References cookie_manager_expand().
MENUHANDLER | ( | expand_cookies | ) |
Definition at line 135 of file cookies.c.
References cookie_manager_expand().
MENUHANDLER | ( | expand_domains | ) |
Definition at line 129 of file cookies.c.
References cookie_manager_expand().
MENUHANDLER | ( | select_all | ) |
Definition at line 108 of file cookies.c.
References cookie_manager_keypress(), NS_KEY_ESCAPE, and NS_KEY_SELECT_ALL.
MENUPROTO | ( | clear_selection | ) |
MENUPROTO | ( | collapse_all | ) |
MENUPROTO | ( | collapse_cookies | ) |
MENUPROTO | ( | collapse_domains | ) |
MENUPROTO | ( | delete_all | ) |
MENUPROTO | ( | delete_selected | ) |
MENUPROTO | ( | expand_all | ) |
MENUPROTO | ( | expand_cookies | ) |
MENUPROTO | ( | expand_domains | ) |
MENUPROTO | ( | select_all | ) |
nserror nsgtk_cookies_destroy | ( | void | ) |
Free any resources allocated for the cookie window.
Definition at line 325 of file cookies.c.
References nsgtk_cookie_window::builder, cookie_manager_fini(), cookie_window, nsgtk_cookie_window::core, NSERROR_OK, nsgtk_corewindow_fini(), and nsgtk_cookie_window::wnd.
Referenced by nsgtk_finalise().
|
static |
callback on draw event for cookie window
nsgtk_cw | The nsgtk core window structure. |
r | The rectangle of the window that needs updating. |
Definition at line 227 of file cookies.c.
References cookie_manager_redraw(), redraw_context::interactive, NSERROR_OK, and nsgtk_plotters.
Referenced by nsgtk_cookies_init().
|
static |
Creates the window for the cookies tree.
Definition at line 245 of file cookies.c.
References nsgtk_cookie_window::builder, cookie_manager_init(), cookie_window, nsgtk_cookie_window::core, nsgtk_corewindow::draw, nsgtk_corewindow::drawing_area, nsgtk_corewindow::key, nsgtk_corewindow::mouse, NSERROR_NOMEM, NSERROR_OK, nsgtk_builder_new_from_resname(), nsgtk_cookies_draw(), nsgtk_cookies_init_menu(), nsgtk_cookies_key(), nsgtk_cookies_mouse(), nsgtk_corewindow_init(), NSLOG, nsgtk_corewindow::scrolled, and nsgtk_cookie_window::wnd.
Referenced by nsgtk_cookies_present().
|
static |
Connects menu events in the cookies window.
Definition at line 162 of file cookies.c.
References nsgtk_cookie_window::builder, menu_events, and NSLOG.
Referenced by nsgtk_cookies_init().
|
static |
callback for keypress on cookie window
nsgtk_cw | The nsgtk core window structure. |
nskey | The netsurf key code |
Definition at line 211 of file cookies.c.
References cookie_manager_keypress(), NSERROR_NOT_IMPLEMENTED, and NSERROR_OK.
Referenced by nsgtk_cookies_init().
|
static |
callback for mouse action on cookie window
nsgtk_cw | The nsgtk core window structure. |
mouse_state | netsurf mouse state on event |
x | location of event |
y | location of event |
Definition at line 194 of file cookies.c.
References cookie_manager_mouse_action(), and NSERROR_OK.
Referenced by nsgtk_cookies_init().
nserror nsgtk_cookies_present | ( | const char * | search_term | ) |
make the cookie window visible.
Definition at line 311 of file cookies.c.
References cookie_manager_set_search_string(), cookie_window, NSERROR_OK, nsgtk_cookies_init(), and nsgtk_cookie_window::wnd.
Referenced by showcookies_button_clicked_cb().
|
static |
Definition at line 44 of file cookies.c.
Referenced by nsgtk_cookies_destroy(), nsgtk_cookies_init(), and nsgtk_cookies_present().
|
static |
Definition at line 72 of file cookies.c.
Referenced by nsgtk_cookies_init_menu().