NetSurf
Functions | Variables
iconbar.c File Reference

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"
Include dependency graph for iconbar.c:

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...
 

Detailed Description

Iconbar icon and menus implementation.

Definition in file iconbar.c.

Function Documentation

◆ ro_gui_iconbar_check_menu()

bool ro_gui_iconbar_check_menu ( wimp_menu *  menu)

Check if a particular menu handle is the iconbar menu.

Parameters
*menuThe menu in question.
Returns
true if this menu is the iconbar menu

Definition at line 261 of file iconbar.c.

References ro_gui_iconbar_menu.

Referenced by ro_gui_interactive_help_request().

Here is the caller graph for this function:

◆ ro_gui_iconbar_click()

bool ro_gui_iconbar_click ( wimp_pointer *  pointer)
static

Handle Mouse_Click events on the iconbar icon.

Parameters
*pointerThe wimp event block to be processed.
Returns
true if the event was handled; else false.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_iconbar_menu_select()

bool ro_gui_iconbar_menu_select ( wimp_w  w,
wimp_i  i,
wimp_menu *  menu,
wimp_selection *  selection,
menu_action  action 
)
static

Handle selections from the iconbar menu.

Parameters
wThe window owning the menu.
iThe icon owning the menu.
menuThe wimp menu
selectionThe wimp menu selection data.
actionThe selected menu action.
Returns
true if action accepted; else false.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_iconbar_menu_warning()

void ro_gui_iconbar_menu_warning ( wimp_w  w,
wimp_i  i,
wimp_menu *  menu,
wimp_selection *  selection,
menu_action  action 
)
static

Handle submenu warnings for the iconbar menu.

Parameters
wThe window owning the menu.
iThe icon owning the menu.
*menuThe menu to which the warning applies.
*selectionThe wimp menu selection data.
actionThe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ro_gui_iconbar_menu

wimp_menu* ro_gui_iconbar_menu = NULL
static

Iconbar menu handle.

Definition at line 59 of file iconbar.c.

Referenced by ro_gui_iconbar_check_menu(), and ro_gui_iconbar_initialise().