33#include <oslib/osbyte.h>
34#include <oslib/wimp.h>
72 static const struct ns_menu iconbar_definition = {
90 wimp_icon_create icon = {
93 wimp_ICON_SPRITE | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED |
94 (wimp_BUTTON_CLICK << wimp_ICON_BUTTON_TYPE_SHIFT),
96 error = xwimp_create_icon(&icon, 0);
98 NSLOG(netsurf, INFO,
"xwimp_create_icon: 0x%x: %s",
99 error->errnum, error->errmess);
130 switch (pointer->buttons) {
131 case wimp_CLICK_SELECT:
152 case wimp_CLICK_ADJUST:
153 xosbyte1(osbyte_SCAN_KEYBOARD, 0 ^ 0x80, 0, &key_down);
176 if (w != wimp_ICON_BAR || i != wimp_ICON_WINDOW)
205 if (w != wimp_ICON_BAR || i != wimp_ICON_WINDOW)
210 error =
nsurl_create(
"https://www.netsurf-browser.org/documentation/", &url);
243 "QUIT in response to user request");
void die(const char *error)
Cause an abnormal program termination.
Browser window creation and manipulation interface.
nserror browser_window_create(enum browser_window_create_flags flags, struct nsurl *url, struct nsurl *referrer, struct browser_window *existing, struct browser_window **bw)
Create and open a new root browser window with the given page.
@ BW_CREATE_HISTORY
this will form a new history node (don't set for back/reload/etc)
void ro_gui_dialog_prepare_open_url(void)
Prepares the Open URL dialog.
void ro_gui_dialog_open_persistent(wimp_w parent, wimp_w w, bool pointer)
Open a persistent dialog box relative to the pointer.
nserror
Enumeration of error codes.
nserror ro_gui_global_history_present(void)
make the global history window visible.
RISc OS global history interface.
nserror ro_gui_hotlist_present(void)
make the cookie window visible.
bool ro_gui_iconbar_check_menu(wimp_menu *menu)
Check if a particular menu handle is the iconbar menu.
void ro_gui_iconbar_initialise(void)
Initialise the iconbar menus, create an icon and register the necessary handlers to look after them a...
static bool ro_gui_iconbar_menu_select(wimp_w w, wimp_i i, wimp_menu *menu, wimp_selection *selection, menu_action action)
Handle selections from the iconbar menu.
static bool ro_gui_iconbar_click(wimp_pointer *pointer)
Handle Mouse_Click events on the iconbar icon.
static void ro_gui_iconbar_menu_warning(wimp_w w, wimp_i i, wimp_menu *menu, wimp_selection *selection, menu_action action)
Handle submenu warnings for the iconbar menu.
static wimp_menu * ro_gui_iconbar_menu
Iconbar menu handle.
Iconbar icon and menus (interface).
#define NSLOG(catname, level, logmsg, args...)
const char * messages_get_errorcode(nserror code)
lookup of a message by errorcode from the standard Messages hash.
Localised message support (interface).
NetSurf URL handling (interface).
nserror nsurl_create(const char *const url_s, nsurl **url)
Create a NetSurf URL object from a URL string.
void nsurl_unref(nsurl *url)
Drop a reference to a NetSurf URL object.
struct nsurl nsurl
NetSurf URL object.
nserror ro_gui_cookies_present(const char *search_term)
make the cookie window visible.
Interface to riscos cookie viewing using riscos core window.
bool ro_gui_prequit(void)
Test whether it's okay to shutdown, prompting the user if not.
nserror ro_warn_user(const char *warning, const char *detail)
Display a warning for a serious problem (eg memory exhaustion).
Interface to utility string handling.
Interface to time operations.
Option reading and saving interface.
#define nsoption_charp(OPTION)
Get the value of a string option.
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_mouse_click(wimp_w w, bool(*callback)(wimp_pointer *pointer))
Register a function to be called for all mouse-clicks to icons in a window that don't have registered...
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).