NetSurf
|
#include <stdlib.h>
#include <cflib.h>
#include "utils/log.h"
#include "utils/nsurl.h"
#include "utils/messages.h"
#include "utils/nsoption.h"
#include "utils/utils.h"
#include "netsurf/browser_window.h"
#include "netsurf/keypress.h"
#include "desktop/save_complete.h"
#include "atari/res/netsurf.rsh"
#include "atari/gemtk/gemtk.h"
#include "atari/deskmenu.h"
#include "atari/hotlist.h"
#include "atari/history.h"
#include "atari/cookies.h"
#include "atari/toolbar.h"
#include "atari/settings.h"
#include "atari/misc.h"
#include "atari/gui.h"
#include "atari/findfile.h"
#include "atari/about.h"
#include "atari/plot/plot.h"
#include "atari/rootwin.h"
Go to the source code of this file.
Data Structures | |
struct | s_accelerator |
struct | s_menu_item_evnt |
Macros | |
#define | T_ABOUT 0 |
#define | T_FILE MAINMENU_T_FILE - MAINMENU_T_FILE + 1 |
#define | T_EDIT MAINMENU_T_EDIT - MAINMENU_T_FILE + 1 |
#define | T_VIEW MAINMENU_T_VIEW - MAINMENU_T_FILE + 1 |
#define | T_NAV MAINMENU_T_NAVIGATE - MAINMENU_T_FILE + 1 |
#define | T_UTIL MAINMENU_T_UTIL - MAINMENU_T_FILE + 1 |
#define | T_HELP MAINMENU_T_NAVIGATE - MAINMENU_T_FILE + 1 |
#define | NUM_MENU_TITLES 7 |
Typedefs | |
typedef void __CDECL(* | menu_evnt_func) (short item, short title, void *data) |
Functions | |
static void | register_menu_str (struct s_menu_item_evnt *mi) |
static void __CDECL | menu_about (short item, short title, void *data) |
static void __CDECL | menu_new_win (short item, short title, void *data) |
static void __CDECL | menu_open_url (short item, short title, void *data) |
static void __CDECL | menu_open_file (short item, short title, void *data) |
static void __CDECL | menu_close_win (short item, short title, void *data) |
static void __CDECL | menu_save_page (short item, short title, void *data) |
static void __CDECL | menu_quit (short item, short title, void *data) |
static void __CDECL | menu_cut (short item, short title, void *data) |
static void __CDECL | menu_copy (short item, short title, void *data) |
static void __CDECL | menu_paste (short item, short title, void *data) |
static void __CDECL | menu_find (short item, short title, void *data) |
static void __CDECL | menu_choices (short item, short title, void *data) |
static void __CDECL | menu_stop (short item, short title, void *data) |
static void __CDECL | menu_reload (short item, short title, void *data) |
static void __CDECL | menu_dec_scale (short item, short title, void *data) |
static void __CDECL | menu_inc_scale (short item, short title, void *data) |
static void __CDECL | menu_toolbars (short item, short title, void *data) |
static void __CDECL | menu_savewin (short item, short title, void *data) |
static void __CDECL | menu_debug_render (short item, short title, void *data) |
static void __CDECL | menu_fg_images (short item, short title, void *data) |
static void __CDECL | menu_bg_images (short item, short title, void *data) |
static void __CDECL | menu_back (short item, short title, void *data) |
static void __CDECL | menu_forward (short item, short title, void *data) |
static void __CDECL | menu_home (short item, short title, void *data) |
static void __CDECL | menu_lhistory (short item, short title, void *data) |
static void __CDECL | menu_ghistory (short item, short title, void *data) |
static void __CDECL | menu_add_bookmark (short item, short title, void *data) |
static void __CDECL | menu_bookmarks (short item, short title, void *data) |
static void __CDECL | menu_cookies (short item, short title, void *data) |
static void __CDECL | menu_vlog (short item, short title, void *data) |
static void __CDECL | menu_help_content (short item, short title, void *data) |
void | deskmenu_init (void) |
Setup & display an desktop menu. More... | |
void | deskmenu_destroy (void) |
Uninstall the desktop menu. More... | |
OBJECT * | deskmenu_get_obj_tree (void) |
Return the deskmenu AES OBJECT tree. More... | |
int | deskmenu_dispatch_item (short title, short item) |
Handle an menu item event. More... | |
int | deskmenu_dispatch_keypress (unsigned short kcode, unsigned short kstate, unsigned short nkc) |
Handle an keypress (check for accelerator) More... | |
void | deskmenu_update (void) |
Refresh the desk menu, reflecting netsurf current state. More... | |
Variables | |
void * | h_gem_rsrc |
bool | html_redraw_debug |
struct gui_window * | input_window |
char | options [PATH_MAX] |
const char * | option_homepage_url |
int | option_window_width |
int | option_window_height |
int | option_window_x |
int | option_window_y |
static OBJECT * | h_gem_menu |
struct s_menu_item_evnt | menu_evnt_tbl [] |
#define NUM_MENU_TITLES 7 |
Definition at line 88 of file deskmenu.c.
#define T_ABOUT 0 |
Definition at line 80 of file deskmenu.c.
#define T_EDIT MAINMENU_T_EDIT - MAINMENU_T_FILE + 1 |
Definition at line 82 of file deskmenu.c.
#define T_FILE MAINMENU_T_FILE - MAINMENU_T_FILE + 1 |
Definition at line 81 of file deskmenu.c.
#define T_HELP MAINMENU_T_NAVIGATE - MAINMENU_T_FILE + 1 |
Definition at line 86 of file deskmenu.c.
#define T_NAV MAINMENU_T_NAVIGATE - MAINMENU_T_FILE + 1 |
Definition at line 84 of file deskmenu.c.
#define T_UTIL MAINMENU_T_UTIL - MAINMENU_T_FILE + 1 |
Definition at line 85 of file deskmenu.c.
#define T_VIEW MAINMENU_T_VIEW - MAINMENU_T_FILE + 1 |
Definition at line 83 of file deskmenu.c.
typedef void __CDECL(* menu_evnt_func) (short item, short title, void *data) |
Definition at line 46 of file deskmenu.c.
void deskmenu_destroy | ( | void | ) |
Uninstall the desktop menu.
Definition at line 707 of file deskmenu.c.
References h_gem_menu, and menu_evnt_tbl.
Referenced by gui_quit().
int deskmenu_dispatch_item | ( | short | title, |
short | item | ||
) |
Handle an menu item event.
Definition at line 734 of file deskmenu.c.
References deskmenu_get_obj_tree(), menu_evnt_tbl, and s_menu_item_evnt::menu_func.
Referenced by atari_poll(), and deskmenu_dispatch_keypress().
int deskmenu_dispatch_keypress | ( | unsigned short | kcode, |
unsigned short | kstate, | ||
unsigned short | nkc | ||
) |
Handle an keypress (check for accelerator)
Definition at line 769 of file deskmenu.c.
References s_menu_item_evnt::accel, s_accelerator::ascii, deskmenu_dispatch_item(), menu_evnt_tbl, s_menu_item_evnt::menu_func, and s_accelerator::mod.
Referenced by atari_poll().
OBJECT * deskmenu_get_obj_tree | ( | void | ) |
Return the deskmenu AES OBJECT tree.
Definition at line 726 of file deskmenu.c.
References h_gem_menu.
Referenced by deskmenu_dispatch_item().
void deskmenu_init | ( | void | ) |
Setup & display an desktop menu.
Definition at line 676 of file deskmenu.c.
References deskmenu_update(), h_gem_menu, menu_evnt_tbl, and register_menu_str().
Referenced by gui_init().
void deskmenu_update | ( | void | ) |
Refresh the desk menu, reflecting netsurf current state.
Definition at line 823 of file deskmenu.c.
References h_gem_menu, html_redraw_debug, nsoption_bool, and verbose_log.
Referenced by deskmenu_init(), and save_settings().
|
static |
Definition at line 177 of file deskmenu.c.
References atari_about_show().
|
static |
Definition at line 503 of file deskmenu.c.
References atari_hotlist_add_page(), gui_window::browser, browser_window_access_url(), browser_window_has_content(), s_browser::bw, input_window, NSLOG, and nsurl_access().
|
static |
Definition at line 466 of file deskmenu.c.
References input_window, NSLOG, gui_window::root, s_gui_win_root::toolbar, and toolbar_back_click().
|
static |
Definition at line 459 of file deskmenu.c.
References h_gem_menu, nsoption_bool, and nsoption_set_bool.
|
static |
Definition at line 516 of file deskmenu.c.
References atari_hotlist_open(), and NSLOG.
|
static |
Definition at line 359 of file deskmenu.c.
References NSLOG, and open_settings().
|
static |
Definition at line 281 of file deskmenu.c.
References gui_window_destroy(), input_window, and NSLOG.
|
static |
Definition at line 522 of file deskmenu.c.
References atari_cookie_manager_open(), and NSLOG.
|
static |
Definition at line 332 of file deskmenu.c.
References gui_window::browser, browser_window_key_press(), s_browser::bw, input_window, NS_KEY_COPY_SELECTION, and NSLOG.
|
static |
Definition at line 326 of file deskmenu.c.
References gui_window::browser, browser_window_key_press(), s_browser::bw, input_window, and NS_KEY_CUT_SELECTION.
|
static |
Definition at line 435 of file deskmenu.c.
References gui_window::browser, BROWSER_AREA_CONTENT, browser_window_reformat(), s_browser::bw, h_gem_menu, html_redraw_debug, input_window, NSLOG, gui_window::root, and window_get_grect().
|
static |
Definition at line 394 of file deskmenu.c.
References gui_window::browser, browser_window_set_scale(), s_browser::bw, and input_window.
|
static |
Definition at line 452 of file deskmenu.c.
References h_gem_menu, nsoption_bool, and nsoption_set_bool.
|
static |
Definition at line 346 of file deskmenu.c.
References input_window, NSLOG, gui_window::root, gui_window::search, window_close_search(), and window_open_search().
|
static |
Definition at line 474 of file deskmenu.c.
References input_window, NSLOG, gui_window::root, s_gui_win_root::toolbar, and toolbar_forward_click().
|
static |
Definition at line 497 of file deskmenu.c.
References atari_global_history_open(), and NSLOG.
|
static |
Definition at line 535 of file deskmenu.c.
References NSLOG.
|
static |
Definition at line 482 of file deskmenu.c.
References input_window, NSLOG, gui_window::root, s_gui_win_root::toolbar, and toolbar_home_click().
|
static |
Definition at line 385 of file deskmenu.c.
References gui_window::browser, browser_window_set_scale(), s_browser::bw, and input_window.
|
static |
Definition at line 490 of file deskmenu.c.
References input_window, and NSLOG.
|
static |
Definition at line 205 of file deskmenu.c.
References atari_warn_user(), browser_window_create(), BW_CREATE_HISTORY, messages_get_errorcode(), NSERROR_OK, NSLOG, nsoption_charp, nsurl_create(), and nsurl_unref().
|
static |
Definition at line 251 of file deskmenu.c.
References atari_warn_user(), browser_window_create(), BW_CREATE_HISTORY, file_select(), local_file_to_url(), messages_get(), messages_get_errorcode(), NSERROR_OK, NSLOG, nsurl_create(), and nsurl_unref().
|
static |
Definition at line 235 of file deskmenu.c.
References browser_window_create(), browser_window::bw, BW_CREATE_HISTORY, input_window, and NSLOG.
|
static |
Definition at line 339 of file deskmenu.c.
References gui_window::browser, browser_window_key_press(), s_browser::bw, input_window, NS_KEY_PASTE, and NSLOG.
|
static |
Definition at line 318 of file deskmenu.c.
References NSLOG.
|
static |
Definition at line 376 of file deskmenu.c.
References input_window, NSLOG, gui_window::root, s_gui_win_root::toolbar, and toolbar_reload_click().
|
static |
Definition at line 289 of file deskmenu.c.
References gui_window::browser, browser_window_get_content(), s_browser::bw, file_select(), init, input_window, is_dir(), NSLOG, path(), save_complete(), and save_complete_init().
|
static |
Definition at line 415 of file deskmenu.c.
References gui_window::browser, input_window, NSLOG, nsoption_set_int, nsoption_write(), option_window_height, option_window_width, option_window_x, option_window_y, options, gui_window::root, and s_gui_win_root::win.
|
static |
Definition at line 365 of file deskmenu.c.
References input_window, NSLOG, gui_window::root, s_gui_win_root::toolbar, and toolbar_stop_click().
|
static |
Definition at line 404 of file deskmenu.c.
References input_window, NSLOG, gui_window::root, and s_gui_win_root::toolbar.
|
static |
Definition at line 528 of file deskmenu.c.
References h_gem_menu, NSLOG, and verbose_log.
|
static |
Definition at line 564 of file deskmenu.c.
References s_menu_item_evnt::accel, s_accelerator::ascii, h_gem_menu, s_accelerator::keycode, s_menu_item_evnt::menustr, s_accelerator::mod, NSLOG, and s_menu_item_evnt::rid.
Referenced by deskmenu_init().
|
static |
Definition at line 76 of file deskmenu.c.
Referenced by deskmenu_destroy(), deskmenu_get_obj_tree(), deskmenu_init(), deskmenu_update(), menu_bg_images(), menu_debug_render(), menu_fg_images(), menu_vlog(), and register_menu_str().
|
extern |
Definition at line 68 of file redraw.c.
Referenced by deskmenu_update(), html_debug(), and menu_debug_render().
|
extern |
Definition at line 74 of file gui.c.
Referenced by menu_add_bookmark(), menu_back(), menu_close_win(), menu_copy(), menu_cut(), menu_debug_render(), menu_dec_scale(), menu_find(), menu_forward(), menu_home(), menu_inc_scale(), menu_lhistory(), menu_open_url(), menu_paste(), menu_reload(), menu_save_page(), menu_savewin(), menu_stop(), and menu_toolbars().
struct s_menu_item_evnt menu_evnt_tbl[] |
Definition at line 123 of file deskmenu.c.
Referenced by deskmenu_destroy(), deskmenu_dispatch_item(), deskmenu_dispatch_keypress(), and deskmenu_init().
|
extern |
Definition at line 83 of file gui.c.
Referenced by gui_window_create(), menu_savewin(), and process_cmdline().
|
extern |
Definition at line 82 of file gui.c.
Referenced by gui_window_create(), menu_savewin(), and process_cmdline().
|
extern |
Definition at line 84 of file gui.c.
Referenced by gui_window_create(), menu_savewin(), and process_cmdline().
|
extern |
Definition at line 85 of file gui.c.
Referenced by gui_window_create(), menu_savewin(), and process_cmdline().
|
extern |
Definition at line 91 of file gui.c.
Referenced by form_dom_to_data_select(), gui_init_replicant(), main(), and menu_savewin().