46#define MENUPROTO(x) static gboolean nsgtk_on_##x##_activate( \
47 GtkMenuItem *widget, gpointer g)
48#define MENUEVENT(x) { #x, G_CALLBACK(nsgtk_on_##x##_activate) }
49#define MENUHANDLER(x) gboolean nsgtk_on_##x##_activate(GtkMenuItem *widget, \
167 while (event->widget != NULL) {
168 w = GTK_WIDGET(gtk_builder_get_object(ncwin->
builder,
172 "Unable to connect menu widget ""%s""",
175 g_signal_connect(G_OBJECT(w),
231 .background_images =
true,
254 ncwin = calloc(1,
sizeof(*ncwin));
261 NSLOG(netsurf, INFO,
"Cookie UI builder init failed");
266 gtk_builder_connect_signals(ncwin->
builder, NULL);
268 ncwin->
wnd = GTK_WINDOW(gtk_builder_get_object(ncwin->
builder,
272 gtk_builder_get_object(ncwin->
builder,
"cookiesScrolled"));
275 gtk_builder_get_object(ncwin->
builder,
"cookiesDrawingArea"));
278 g_signal_connect(G_OBJECT(ncwin->
wnd),
280 G_CALLBACK(gtk_widget_hide_on_delete),
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.
Target independent plotting GTK+ interface.
static struct nsgtk_cookie_window * cookie_window
static nserror nsgtk_cookies_init(void)
Creates the window for the cookies tree.
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
static nserror nsgtk_cookies_draw(struct nsgtk_corewindow *nsgtk_cw, struct rect *r)
callback on draw event for cookie window
static struct menu_events menu_events[]
nserror nsgtk_cookies_present(const char *search_term)
make the cookie window visible.
static void nsgtk_cookies_init_menu(struct nsgtk_cookie_window *ncwin)
Connects menu events in the cookies window.
static nserror nsgtk_cookies_key(struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey)
callback for keypress on cookie window
nserror nsgtk_cookies_destroy(void)
Free any resources allocated for the cookie window.
nserror nsgtk_corewindow_init(struct nsgtk_corewindow *nsgtk_cw)
initialise elements of gtk core window.
nserror nsgtk_corewindow_fini(struct nsgtk_corewindow *nsgtk_cw)
finalise elements of gtk core window.
const struct plotter_table nsgtk_plotters
GTK plotter table.
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...)
nserror nsgtk_builder_new_from_resname(const char *resname, GtkBuilder **builder_out)
Create gtk builder object for the named ui resource.
Interface to gtk builtin resource handling.
struct nsgtk_corewindow core
nserror(* key)(struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey)
callback for keypress on nsgtk core window
nserror(* draw)(struct nsgtk_corewindow *nsgtk_cw, struct rect *r)
callback to draw on drawable area of nsgtk core window
GtkScrolledWindow * scrolled
scrollable area drawing area is within
nserror(* mouse)(struct nsgtk_corewindow *nsgtk_cw, browser_mouse_state mouse_state, int x, int y)
callback for mouse event on nsgtk core window
GtkDrawingArea * drawing_area
GTK drawable widget.
bool interactive
Redraw to show interactive features.