27#include <oslib/wimp.h>
76 .background_images =
true,
221 wimp_pointer *pointer)
228 if ((global_historyw == NULL) ||
239 NULL, NULL, NULL, NULL);
296 if ((global_historyw == NULL) ||
373 static const struct ns_menu global_history_menu_def = {
409 ncwin = calloc(1,
sizeof(*ncwin));
418 NSLOG(netsurf, INFO,
"xwimp_create_window: 0x%x: %s",
419 error->errnum, error->errmess);
438 global_history_toolbar_buttons,
441 "HelpGHistoryToolbar");
447 NSLOG(netsurf, INFO,
"Created global history corewindow: %p",
464 ncwin->
menu,
false,
false);
488 NSLOG(netsurf, INFO,
"Presenting");
493 NSLOG(netsurf, INFO,
"Failed presenting code %d", res);
nserror global_history_init(void *core_window_handle)
Initialise the global history.
nserror global_history_expand(bool only_folders)
Expand the treeview's nodes.
nserror global_history_fini(void)
Finalise the global history.
void global_history_redraw(int x, int y, struct rect *clip, const struct redraw_context *ctx)
Redraw the global history.
bool global_history_has_selection(void)
Determine whether there is a selection.
nserror global_history_contract(bool all)
Contract the treeview's nodes.
bool global_history_keypress(uint32_t key)
Key press handling.
void global_history_mouse_action(browser_mouse_state mouse, int x, int y)
Handles all kinds of mouse action.
void ro_gui_dialog_open_persistent(wimp_w parent, wimp_w w, bool pointer)
Open a persistent dialog box relative to the pointer.
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.
static nserror global_history_draw(struct ro_corewindow *ro_cw, int originx, int originy, struct rect *r)
callback to draw on drawable area of ro global_history window
nserror ro_gui_global_history_present(void)
make the global history window visible.
static bool global_history_menu_select(wimp_w w, wimp_i i, wimp_menu *menu, wimp_selection *selection, menu_action action)
Handle selections from the global_history menu.
static wimp_window * dialog_global_history_template
riscos template for global_history window
static bool global_history_menu_prepare(wimp_w w, wimp_i i, wimp_menu *menu, wimp_pointer *pointer)
Prepare the global_history menu for display.
static nserror ro_global_history_init(void)
Creates the window for the global_history tree.
static nserror global_history_toolbar_update(struct ro_corewindow *ro_cw)
Handle updating state of buttons in ro core window toolbar.
static struct ro_global_history_window * global_history_window
global_history window is a singleton
static nserror global_history_mouse(struct ro_corewindow *ro_cw, browser_mouse_state mouse_state, int x, int y)
callback for mouse event on ro global_history window
static nserror global_history_key(struct ro_corewindow *ro_cw, uint32_t nskey)
callback for keypress on ro coookie window
bool ro_gui_global_history_check_menu(wimp_menu *menu)
check if menu handle is for the global history menu
void ro_gui_global_history_initialise(void)
initialise the global history window template ready for subsequent use.
static nserror global_history_toolbar_save(struct ro_corewindow *ro_cw, char *config)
callback for saving of toolbar state in ro global history window
nserror ro_gui_global_history_finalise(void)
Free any resources allocated for the global history window.
static void global_history_menu_warning(wimp_w w, wimp_i i, wimp_menu *menu, wimp_selection *selection, menu_action action)
Handle submenu warnings for the global_history menu.
static nserror global_history_toolbar_click(struct ro_corewindow *ro_cw, button_bar_action action)
handle clicks in ro core window toolbar.
bool ro_gui_global_history_check_window(wimp_w wh)
check if window handle is for the global history window
RISc OS global history interface.
@ THEME_STYLE_GLOBAL_HISTORY_TOOLBAR
browser_mouse_state
Mouse state: 1 is primary mouse button.
Target independent plotting interface.
Interface to platform-specific graphical user interface window operations.
@ GUI_SAVE_HISTORY_EXPORT_HTML
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_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.
File/object/selection saving (Interface).
void ro_gui_save_prepare(gui_save_type save_type, struct hlcache_handle *h, char *s, const nsurl *url, const char *title)
Prepares the save box to reflect gui_save_type and a content, and opens it.
bool interactive
Redraw to show interactive features.
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
struct ro_corewindow core
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).