26#include <oslib/wimp.h>
72 .background_images =
true,
207 wimp_pointer *pointer)
214 if ((cookiew == NULL) ||
279 if ((cookiew == NULL) ||
348 static const struct ns_menu cookie_menu_def = {
381 ncwin = calloc(1,
sizeof(*ncwin));
389 NSLOG(netsurf, INFO,
"xwimp_create_window: 0x%x: %s",
390 error->errnum, error->errmess);
408 cookies_toolbar_buttons,
411 "HelpCookiesToolbar");
431 ncwin->
menu,
false,
false);
455 NSLOG(netsurf, INFO,
"Presenting");
459 if (search_term != NULL) {
463 NSLOG(netsurf, INFO,
"Failed presenting code %d", res);
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.
bool cookie_manager_has_selection(void)
Determine whether there is a selection.
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).
wimp_window * ro_gui_dialog_load_template(const char *template_name)
Load a template without creating a window.
void ro_gui_save_options(void)
Save the current options.
bool ro_gui_dialog_open_top(wimp_w w, struct toolbar *toolbar, int width, int height)
Moves a window to the top of the stack.
nserror
Enumeration of error codes.
@ NSERROR_NOT_IMPLEMENTED
Functionality is not implemented.
@ NSERROR_NOMEM
Memory exhaustion.
@ THEME_STYLE_COOKIES_TOOLBAR
browser_mouse_state
Mouse state.
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).
nserror ro_gui_cookies_finalise(void)
Free any resources allocated for the cookie window.
static nserror cookie_toolbar_update(struct ro_corewindow *ro_cw)
Handle updating state of buttons in ro core window toolbar.
static nserror cookie_toolbar_save(struct ro_corewindow *ro_cw, char *config)
callback for saving of toolbar state in ro cookie window
static nserror cookie_mouse(struct ro_corewindow *ro_cw, browser_mouse_state mouse_state, int x, int y)
callback for mouse event on ro cookie window
static void cookie_menu_warning(wimp_w w, wimp_i i, wimp_menu *menu, wimp_selection *selection, menu_action action)
Handle submenu warnings for the cookies menu.
static wimp_window * dialog_cookie_template
riscos template for cookie window
static bool cookie_menu_select(wimp_w w, wimp_i i, wimp_menu *menu, wimp_selection *selection, menu_action action)
Handle selections from the cookies menu.
void ro_gui_cookies_initialise(void)
initialise the cookies window template ready for subsequent use.
static nserror ro_cookie_init(void)
Creates the window for the cookie tree.
bool ro_gui_cookies_check_window(wimp_w wh)
check if window handle is for the cookies window
bool ro_gui_cookies_check_menu(wimp_menu *menu)
check if menu handle is for the cookies menu
static struct ro_cookie_window * cookie_window
cookie window is a singleton
static nserror cookie_toolbar_click(struct ro_corewindow *ro_cw, button_bar_action action)
handle clicks in ro core window toolbar.
static nserror cookie_draw(struct ro_corewindow *ro_cw, int originx, int originy, struct rect *r)
callback to draw on drawable area of ro cookie window
nserror ro_gui_cookies_present(const char *search_term)
make the cookie window visible.
static bool cookie_menu_prepare(wimp_w w, wimp_i i, wimp_menu *menu, wimp_pointer *pointer)
Prepare the cookie meu for display.
static nserror cookie_key(struct ro_corewindow *ro_cw, uint32_t nskey)
callback for keypress on ro cookie window
Interface to riscos cookie viewing using riscos core window.
nserror ro_corewindow_fini(struct ro_corewindow *ro_cw)
finalise elements of ro core window.
nserror ro_corewindow_init(struct ro_corewindow *ro_cw, const struct button_bar_buttons *tb_buttons, char *tb_order, theme_style tb_style, const char *tb_help)
initialise elements of riscos core window.
RISC OS core window interface.
nserror ro_warn_user(const char *warning, const char *detail)
Display a warning for a serious problem (eg memory exhaustion).
const struct plotter_table ro_plotters
RISC OS plotter operation table.
bool interactive
Redraw to show interactive features.
struct ro_corewindow core
nserror(* toolbar_click)(struct ro_corewindow *ro_cw, button_bar_action action)
callback for clicks in ro core window toolbar.
nserror(* mouse)(struct ro_corewindow *ro_cw, browser_mouse_state mouse_state, int x, int y)
callback for mouse event on ro core window
nserror(* toolbar_save)(struct ro_corewindow *ro_cw, char *config)
callback for saving ro core window toolbar state.
nserror(* key)(struct ro_corewindow *ro_cw, uint32_t nskey)
callback for keypress on ro core window
nserror(* draw)(struct ro_corewindow *ro_cw, int originx, int originy, struct rect *r)
callback to draw on drawable area of ro core window
nserror(* toolbar_update)(struct ro_corewindow *ro_cw)
callback for updating state of buttons in ro core window toolbar.
struct toolbar * toolbar
toolbar
Option reading and saving interface.
#define nsoption_charp(OPTION)
Get the value of a string option.
#define nsoption_set_charp(OPTION, VALUE)
set string option in default table
void ro_gui_set_window_title(wimp_w w, const char *text)
Set a window title.
General RISC OS WIMP/OS library functions (interface).
void * ro_gui_wimp_event_get_user_data(wimp_w w)
Gets the user data associated with a window.
bool ro_gui_wimp_event_register_menu_selection(wimp_w w, bool(*callback)(wimp_w w, wimp_i i, wimp_menu *m, wimp_selection *s, menu_action a))
Register a function to be called following a menu selection.
bool ro_gui_wimp_event_register_menu_prepare(wimp_w w, bool(*callback)(wimp_w w, wimp_i i, wimp_menu *m, wimp_pointer *p))
Register a function to be called before a menu is (re-)opened.
bool ro_gui_wimp_event_register_menu_warning(wimp_w w, void(*callback)(wimp_w w, wimp_i i, wimp_menu *m, wimp_selection *s, menu_action a))
Register a function to be called when a sub-menu warning is received.
bool ro_gui_wimp_event_register_menu(wimp_w w, wimp_menu *m, bool menu_auto, bool position_ibar)
Register a window menu to be (semi-)automatically handled.
Automated RISC OS WIMP event handling (interface).