NetSurf
|
Iconbar icon and menus implementation. More...
#include <assert.h>
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <features.h>
#include <oslib/os.h>
#include <oslib/osbyte.h>
#include <oslib/wimp.h>
#include "utils/nsoption.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/nsurl.h"
#include "netsurf/browser_window.h"
#include "riscos/gui.h"
#include "riscos/configure.h"
#include "riscos/cookies.h"
#include "riscos/dialog.h"
#include "riscos/global_history.h"
#include "riscos/hotlist.h"
#include "riscos/iconbar.h"
#include "riscos/wimp_event.h"
Go to the source code of this file.
Functions | |
static bool | ro_gui_iconbar_click (wimp_pointer *pointer) |
Handle Mouse_Click events on the iconbar icon. More... | |
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. More... | |
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. More... | |
void | ro_gui_iconbar_initialise (void) |
Initialise the iconbar menus, create an icon and register the necessary handlers to look after them all. More... | |
bool | ro_gui_iconbar_check_menu (wimp_menu *menu) |
Check if a particular menu handle is the iconbar menu. More... | |
Variables | |
static wimp_menu * | ro_gui_iconbar_menu = NULL |
Iconbar menu handle. More... | |
Iconbar icon and menus implementation.
Definition in file iconbar.c.
bool ro_gui_iconbar_check_menu | ( | wimp_menu * | menu | ) |
Check if a particular menu handle is the iconbar menu.
*menu | The menu in question. |
Definition at line 261 of file iconbar.c.
References ro_gui_iconbar_menu.
Referenced by ro_gui_interactive_help_request().
|
static |
Handle Mouse_Click events on the iconbar icon.
*pointer | The wimp event block to be processed. |
Definition at line 124 of file iconbar.c.
References browser_window_create(), BW_CREATE_HISTORY, messages_get_errorcode(), NSERROR_OK, nsoption_charp, nsurl_create(), nsurl_unref(), ro_gui_hotlist_present(), and ro_warn_user().
Referenced by ro_gui_iconbar_initialise().
void ro_gui_iconbar_initialise | ( | void | ) |
Initialise the iconbar menus, create an icon and register the necessary handlers to look after them all.
Definition at line 66 of file iconbar.c.
References APPLICATION_QUIT, BROWSER_NAVIGATE_URL, CHOICES_SHOW, COOKIES_SHOW, dialog_info, dialog_openurl, die(), HELP_OPEN_CONTENTS, HISTORY_SHOW_GLOBAL, HOTLIST_SHOW, NO_ACTION, NSLOG, ro_gui_iconbar_click(), ro_gui_iconbar_menu, ro_gui_iconbar_menu_select(), ro_gui_iconbar_menu_warning(), ro_gui_menu_define_menu(), ro_gui_wimp_event_register_menu(), ro_gui_wimp_event_register_menu_selection(), ro_gui_wimp_event_register_menu_warning(), and ro_gui_wimp_event_register_mouse_click().
Referenced by gui_init().
|
static |
Handle selections from the iconbar menu.
w | The window owning the menu. |
i | The icon owning the menu. |
menu | The wimp menu |
selection | The wimp menu selection data. |
action | The selected menu action. |
Definition at line 199 of file iconbar.c.
References APPLICATION_QUIT, BROWSER_NAVIGATE_URL, browser_window_create(), BW_CREATE_HISTORY, CHOICES_SHOW, COOKIES_SHOW, dialog_openurl, HELP_OPEN_CONTENTS, HISTORY_SHOW_GLOBAL, HOTLIST_SHOW, messages_get_errorcode(), NSERROR_OK, NSLOG, nsurl_create(), nsurl_unref(), riscos_done, ro_gui_configure_show(), ro_gui_cookies_present(), ro_gui_dialog_open_persistent(), ro_gui_dialog_prepare_open_url(), ro_gui_global_history_present(), ro_gui_hotlist_present(), ro_gui_prequit(), and ro_warn_user().
Referenced by ro_gui_iconbar_initialise().
|
static |
Handle submenu warnings for the iconbar menu.
w | The window owning the menu. |
i | The icon owning the menu. |
*menu | The menu to which the warning applies. |
*selection | The wimp menu selection data. |
action | The selected menu action. |
Definition at line 173 of file iconbar.c.
References BROWSER_NAVIGATE_URL, and ro_gui_dialog_prepare_open_url().
Referenced by ro_gui_iconbar_initialise().
|
static |
Iconbar menu handle.
Definition at line 59 of file iconbar.c.
Referenced by ro_gui_iconbar_check_menu(), and ro_gui_iconbar_initialise().